Created
December 24, 2022 08:28
-
-
Save ksakae1216/c56037355fbbe29d77dceb38cec5af9c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('LoginFormComponent', () => { | |
it('should display required error message', () => { | |
setup(); | |
cy.get('input[name=loginId]').click(); | |
cy.get('[data-cy="password"]').click({force: true}); | |
cy.get('mat-error').should('contain', 'ログインIDを入力してください'); | |
}); | |
}); | |
function setup() { | |
cy.mount(LoginFormComponent, { | |
imports: [BrowserAnimationsModule, ReactiveFormsModule, MatButtonModule, MatCardModule, MatFormFieldModule, MatIconModule, MatInputModule], | |
declarations: [MatError], | |
schemas: [CUSTOM_ELEMENTS_SCHEMA], | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment