Skip to content

Commit

Permalink
traduce login text
Browse files Browse the repository at this point in the history
  • Loading branch information
uo288574 committed Apr 23, 2024
1 parent 96aaa35 commit c51ad40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions webapp/src/components/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,20 @@ const Login = () => {
<TextField
margin="normal"
fullWidth
label="Username"
label="Usuario"
value={username}
onChange={(e) => setUsername(e.target.value)}
/>
<TextField
margin="normal"
fullWidth
label="Password"
label="Contraseña"
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
/>
<Button text="Login" onClick={loginUser} name="Login"/>
<Snackbar open={openSnackbar} autoHideDuration={6000} onClose={handleCloseSnackbar} message="Login successful" />
<Snackbar open={openSnackbar} autoHideDuration={6000} onClose={handleCloseSnackbar} message="Login correctamente" />
{error && (
<Snackbar open={!!error} autoHideDuration={6000} onClose={() => setError('')} message={`Error: ${error}`} />
)}
Expand Down
8 changes: 4 additions & 4 deletions webapp/src/components/Login.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ describe('Login component', () => {
</Router>
</ContextFun>);

const usernameInput = screen.getByLabelText(/Username/i);
const passwordInput = screen.getByLabelText(/Password/i);
const usernameInput = screen.getByLabelText(/Usuario/i);
const passwordInput = screen.getByLabelText(/Contraseña/i);
const loginButton = document.getElementsByClassName('inner')[0]

// Mock the axios.post request to simulate a successful response
Expand Down Expand Up @@ -52,8 +52,8 @@ describe('Login component', () => {
</ContextFun>
);

const usernameInput = screen.getByLabelText(/Username/i);
const passwordInput = screen.getByLabelText(/Password/i);
const usernameInput = screen.getByLabelText(/Usuario/i);
const passwordInput = screen.getByLabelText(/Contraseña/i);
const loginButton = document.getElementsByClassName('inner')[0]

// Mock the axios.post request to simulate an error response
Expand Down

0 comments on commit c51ad40

Please sign in to comment.