From 59196285a2bda1eab91e3ac9db2c3bdbf46637b9 Mon Sep 17 00:00:00 2001 From: ThomasL Date: Thu, 13 Jul 2023 16:10:20 +0200 Subject: [PATCH] refactor(challenge24): clarify describe block --- .../src/app/app.component.spec.ts | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/apps/create-harness/src/app/app.component.spec.ts b/apps/create-harness/src/app/app.component.spec.ts index 19115aa..c8d9f4b 100644 --- a/apps/create-harness/src/app/app.component.spec.ts +++ b/apps/create-harness/src/app/app.component.spec.ts @@ -2,14 +2,21 @@ import { render } from '@testing-library/angular'; import { AppComponent } from './app.component'; describe('AppComponent', () => { - test('select first slider and value must be 16 after clicking twice on plus button', async () => { - await render(AppComponent); + describe('When clicking 2 times on plus button of first slider', () => { + test('Then value is 16', async () => { + await render(AppComponent); + }); }); - test('select first slider and click 1 time on plus button and twice on minus button, slider must be 10 again', async () => { - await render(AppComponent); + describe('When clicking 1 time on plus button and two times on minus button of first slider', () => { + test('Then value is still 10', async () => { + await render(AppComponent); + }); }); - test('second slider is disabled, click 4 times on first slider and slider 2 must be enabled', async () => { - await render(AppComponent); + + describe('When clicking 4 times on plus button of slider 1', () => { + test('Then slider 2 is enabled', async () => { + await render(AppComponent); + }); }); });