File tree Expand file tree Collapse file tree 2 files changed +28
-7
lines changed
apps/testing-input-output/src/app Expand file tree Collapse file tree 2 files changed +28
-7
lines changed Original file line number Diff line number Diff line change 11import { CounterComponent } from './counter.component' ;
22
33describe ( CounterComponent . name , ( ) => {
4- it ( 'using createOutputSpy' , ( ) => {
5- cy . mount ( CounterComponent ) ;
6- } ) ;
4+ describe ( 'Given an initualValue of 10' , async ( ) => {
5+ it ( 'listen to output using createOutputSpy' , ( ) => {
6+ cy . mount ( CounterComponent ) ;
7+ } ) ;
78
8- it ( 'using autoSpyOutputs' , ( ) => {
9- cy . mount ( CounterComponent ) ;
9+ it ( 'listen to output using autoSpyOutputs' , ( ) => {
10+ cy . mount ( CounterComponent ) ;
11+ } ) ;
1012 } ) ;
1113} ) ;
Original file line number Diff line number Diff line change @@ -2,7 +2,26 @@ import { render } from '@testing-library/angular';
22import { CounterComponent } from './counter.component' ;
33
44describe ( 'CounterComponent' , ( ) => {
5- test ( 'set input and listen to output' , async ( ) => {
6- await render ( CounterComponent ) ;
5+ describe ( 'Given an initualValue of 10' , async ( ) => {
6+ test ( 'Then counterValue is 10' , async ( ) => {
7+ await render ( CounterComponent ) ;
8+ } ) ;
9+
10+ describe ( 'When clicking 5 times on increment button' , async ( ) => {
11+ test ( 'Then counterValue is 15' , async ( ) => {
12+ await render ( CounterComponent ) ;
13+ } ) ;
14+ } ) ;
15+
16+ describe ( 'When clicking 2 times on decrement button' , async ( ) => {
17+ test ( 'Then counterValue is 8' , async ( ) => {
18+ await render ( CounterComponent ) ;
19+ } ) ;
20+ describe ( 'When clicking on Send ' , async ( ) => {
21+ test ( 'Then emitted value is 8' , async ( ) => {
22+ await render ( CounterComponent ) ;
23+ } ) ;
24+ } ) ;
25+ } ) ;
726 } ) ;
827} ) ;
You can’t perform that action at this time.
0 commit comments