feat(challenge20): setup test for challenge

This commit is contained in:
thomas
2023-04-25 14:46:38 +02:00
parent f378ea01fb
commit 8ce516adc2
3 changed files with 32 additions and 29 deletions

View File

@@ -0,0 +1,19 @@
import { AppComponent } from './app.component';
describe(AppComponent.name, () => {
const setup = () => {
cy.mount(AppComponent);
};
test('error modal is displayed if you click on "Confirm" without inputing a name', () => {
setup();
});
test('error message is shown if you click "Cancel" in the confirmation modal after submitting a name', () => {
setup();
});
test('confirm message is shown if you click "Confirm" in the confirmation modal after submitting a name', () => {
setup();
});
});