Skip to content

Commit 27cfe4d

Browse files
committed
updated TextInput and added test
1 parent 5e94d93 commit 27cfe4d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/react-core/src/components/LoginPage/LoginForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const LoginForm: React.FunctionComponent<LoginFormProps> = ({
8888

8989
const passwordInput = (
9090
<TextInput
91-
isRequired
91+
isRequired={isPasswordRequired}
9292
type={passwordHidden ? 'password' : 'text'}
9393
id="pf-login-password-id"
9494
name="pf-login-password-id"

packages/react-integration/cypress/integration/login-page.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,8 @@ describe('Login Page Demo Test', () => {
4545
cy.get('[aria-label="Test show password"]').should('exist');
4646
cy.get('[aria-label="Test hide password"]').should('not.exist');
4747
});
48+
49+
it('Verify password field is required', () => {
50+
cy.get('#pf-login-password-id').should('have.attr', 'required');
51+
});
4852
});

0 commit comments

Comments
 (0)