@@ -28,7 +28,7 @@ describe('ActivityDescriptionComponent', () => {
28
28
expect ( component ) . toBeTruthy ( ) ;
29
29
} ) ;
30
30
31
- it ( 'check if header is being genenrated ' , ( ) => {
31
+ it ( 'check if header is being generated ' , ( ) => {
32
32
const testDimension = 'Sample Dimension' ;
33
33
const testSubDimension = 'Sample subDimension' ;
34
34
component . currentActivity . dimension = testDimension ;
@@ -40,88 +40,89 @@ describe('ActivityDescriptionComponent', () => {
40
40
expect ( heading . textContent ) . toContain ( testSubDimension ) ;
41
41
} ) ;
42
42
43
- it ( 'check if UUID is being genenrated ' , ( ) => {
43
+ it ( 'check if UUID is being generated ' , ( ) => {
44
44
const testUUID = '00000000-0000-0000-0000-000000000000' ;
45
45
component . currentActivity . uuid = testUUID ;
46
46
fixture . detectChanges ( ) ;
47
47
const HTMLElement : HTMLElement = fixture . nativeElement ;
48
- const contentDisplayedinParagraphTag = HTMLElement . querySelectorAll ( 'p ') ! ;
49
- expect ( contentDisplayedinParagraphTag [ 0 ] . textContent ) . toContain ( testUUID ) ;
48
+ const contentDisplayedinParagraphTag = HTMLElement . querySelector ( '#uuid ') ! ;
49
+ expect ( contentDisplayedinParagraphTag . textContent ) . toContain ( testUUID ) ;
50
50
} ) ;
51
51
52
- it ( 'check if description is being genenrated ' , ( ) => {
52
+ it ( 'check if description is being generated ' , ( ) => {
53
53
const testDescription = 'Sample Description' ;
54
54
component . currentActivity . description = testDescription ;
55
55
fixture . detectChanges ( ) ;
56
56
const HTMLElement : HTMLElement = fixture . nativeElement ;
57
- const contentDisplayedinParagraphTag = HTMLElement . querySelectorAll ( 'p' ) ! ;
58
- expect ( contentDisplayedinParagraphTag [ 1 ] . textContent ) . toContain (
57
+ const contentDisplayedinParagraphTag =
58
+ HTMLElement . querySelector ( '#description' ) ! ;
59
+ expect ( contentDisplayedinParagraphTag . textContent ) . toContain (
59
60
testDescription
60
61
) ;
61
62
} ) ;
62
63
63
- it ( 'check if risk is being genenrated ' , ( ) => {
64
+ it ( 'check if risk is being generated ' , ( ) => {
64
65
const testRisk = 'Sample Risk' ;
65
66
component . currentActivity . risk = testRisk ;
66
67
fixture . detectChanges ( ) ;
67
68
const HTMLElement : HTMLElement = fixture . nativeElement ;
68
- const contentDisplayedinParagraphTag = HTMLElement . querySelectorAll ( 'p ') ! ;
69
- expect ( contentDisplayedinParagraphTag [ 2 ] . textContent ) . toContain ( testRisk ) ;
69
+ const contentDisplayedinParagraphTag = HTMLElement . querySelector ( '#risk ') ! ;
70
+ expect ( contentDisplayedinParagraphTag . textContent ) . toContain ( testRisk ) ;
70
71
} ) ;
71
72
72
- it ( 'check if measure is being genenrated ' , ( ) => {
73
+ it ( 'check if measure is being generated ' , ( ) => {
73
74
const testMeasure = 'Sample Measure' ;
74
75
component . currentActivity . measure = testMeasure ;
75
76
fixture . detectChanges ( ) ;
76
77
const HTMLElement : HTMLElement = fixture . nativeElement ;
77
- const contentDisplayedinParagraphTag = HTMLElement . querySelectorAll ( 'p' ) ! ;
78
- expect ( contentDisplayedinParagraphTag [ 3 ] . textContent ) . toContain (
79
- testMeasure
80
- ) ;
78
+ const contentDisplayedinParagraphTag =
79
+ HTMLElement . querySelector ( '#measure' ) ! ;
80
+ expect ( contentDisplayedinParagraphTag . textContent ) . toContain ( testMeasure ) ;
81
81
} ) ;
82
82
83
- it ( 'check if implementation guide is being genenrated ' , ( ) => {
83
+ it ( 'check if implementation guide is being generated ' , ( ) => {
84
84
const testImplementationGuide = 'Sample Implementation Guide' ;
85
85
component . currentActivity . implementatonGuide = testImplementationGuide ;
86
86
fixture . detectChanges ( ) ;
87
87
const HTMLElement : HTMLElement = fixture . nativeElement ;
88
- const contentDisplayedinParagraphTag = HTMLElement . querySelectorAll ( 'p' ) ! ;
89
- expect ( contentDisplayedinParagraphTag [ 4 ] . textContent ) . toContain (
88
+ const contentDisplayedinParagraphTag = HTMLElement . querySelector (
89
+ '#implementatonGuide'
90
+ ) ! ;
91
+ expect ( contentDisplayedinParagraphTag . textContent ) . toContain (
90
92
testImplementationGuide
91
93
) ;
92
94
} ) ;
93
95
94
- it ( 'check if evidence is being genenrated ' , ( ) => {
96
+ it ( 'check if evidence is being generated ' , ( ) => {
95
97
const testEvidence = 'Sample Evidence' ;
96
98
component . currentActivity . evidence = testEvidence ;
97
99
fixture . detectChanges ( ) ;
98
100
const HTMLElement : HTMLElement = fixture . nativeElement ;
99
- const contentDisplayedinParagraphTag = HTMLElement . querySelectorAll ( 'p' ) ! ;
100
- expect ( contentDisplayedinParagraphTag [ 7 ] . textContent ) . toContain (
101
- testEvidence
102
- ) ;
101
+ const contentDisplayedinParagraphTag =
102
+ HTMLElement . querySelector ( '#evidence' ) ! ;
103
+ expect ( contentDisplayedinParagraphTag . textContent ) . toContain ( testEvidence ) ;
103
104
} ) ;
104
105
105
- it ( 'check if assessment is being genenrated ' , ( ) => {
106
+ it ( 'check if assessment is being generated ' , ( ) => {
106
107
const testAssessment = 'Sample Assessment' ;
107
108
component . currentActivity . assessment = testAssessment ;
108
109
fixture . detectChanges ( ) ;
109
110
const HTMLElement : HTMLElement = fixture . nativeElement ;
110
- const contentDisplayedinParagraphTag = HTMLElement . querySelectorAll ( 'p' ) ! ;
111
- expect ( contentDisplayedinParagraphTag [ 8 ] . textContent ) . toContain (
111
+ const contentDisplayedinParagraphTag =
112
+ HTMLElement . querySelector ( '#assessment' ) ! ;
113
+ expect ( contentDisplayedinParagraphTag . textContent ) . toContain (
112
114
testAssessment
113
115
) ;
114
116
} ) ;
115
117
116
- it ( 'check if comments is being genenrated ' , ( ) => {
118
+ it ( 'check if comments is being generated ' , ( ) => {
117
119
const testComments = 'Sample Comments' ;
118
120
component . currentActivity . comments = testComments ;
119
121
fixture . detectChanges ( ) ;
120
122
const HTMLElement : HTMLElement = fixture . nativeElement ;
121
- const contentDisplayedinParagraphTag = HTMLElement . querySelectorAll ( 'p' ) ! ;
122
- expect ( contentDisplayedinParagraphTag [ 11 ] . textContent ) . toContain (
123
- testComments
124
- ) ;
123
+ const contentDisplayedinParagraphTag =
124
+ HTMLElement . querySelector ( '#comments' ) ! ;
125
+ expect ( contentDisplayedinParagraphTag . textContent ) . toContain ( testComments ) ;
125
126
} ) ;
126
127
127
128
it ( 'check if references is being generated' , ( ) => {
0 commit comments