refactor(challenge18): clarify test

This commit is contained in:
ThomasL
2023-07-13 15:48:16 +02:00
parent 257666cea1
commit 4c5b340549
2 changed files with 17 additions and 10 deletions

View File

@@ -2,11 +2,15 @@ import { render } from '@testing-library/angular';
import { ChildComponent } from './child.component';
describe('ChildComponent', () => {
test('add Good title and send request title with no error', async () => {
await render(ChildComponent);
describe('When typing nothing and clicking on Validate', () => {
test('Then show "Title is required" error message and no http request has been sent', async () => {
await render(ChildComponent);
});
});
test('fail validating title because no title were typed', async () => {
await render(ChildComponent);
describe('When typing "Good" and clicking on Validate', () => {
test('Then show "Title is Good" message, no error message and send a http request to the backend', async () => {
await render(ChildComponent);
});
});
});