5
5
6
6
/// <reference types="cypress" />
7
7
8
- import { DataJobsExplorePage } from ' ../../../../../support/pages/explore/data-jobs/data-jobs.po' ;
9
- import { DataJobExploreDetailsPage } from ' ../../../../../support/pages/explore/data-jobs/details/data-job-details.po' ;
8
+ import { DataJobsExplorePage } from " ../../../../../support/pages/explore/data-jobs/data-jobs.po" ;
9
+ import { DataJobExploreDetailsPage } from " ../../../../../support/pages/explore/data-jobs/details/data-job-details.po" ;
10
10
11
- describe ( 'Data Job Explore Details Page' , { tags : [ '@dataPipelines' , '@exploreDataJobDetails' , '@explore' ] } , ( ) => {
11
+ describe (
12
+ "Data Job Explore Details Page" ,
13
+ { tags : [ "@dataPipelines" , "@exploreDataJobDetails" , "@explore" ] } ,
14
+ ( ) => {
12
15
/**
13
16
* @type {DataJobExploreDetailsPage }
14
17
*/
@@ -23,101 +26,191 @@ describe('Data Job Explore Details Page', { tags: ['@dataPipelines', '@exploreDa
23
26
let dataJobsExplorePage ;
24
27
25
28
before ( ( ) => {
26
- return DataJobExploreDetailsPage . recordHarIfSupported ( )
27
- . then ( ( ) => cy . clearLocalStorageSnapshot ( 'data-job-explore-details' ) )
28
- . then ( ( ) => DataJobExploreDetailsPage . login ( ) )
29
- . then ( ( ) => cy . saveLocalStorage ( 'data-job-explore-details' ) )
30
- . then ( ( ) => DataJobExploreDetailsPage . deleteShortLivedTestJobsNoDeploy ( true ) )
31
- . then ( ( ) => DataJobExploreDetailsPage . createShortLivedTestJobsNoDeploy ( ) )
32
- . then ( ( ) =>
33
- DataJobExploreDetailsPage . loadShortLivedTestJobsFixtureNoDeploy ( ) . then ( ( fixtures ) => {
34
- testJobsFixture = [ fixtures [ 0 ] , fixtures [ 1 ] ] ;
35
-
36
- return cy . wrap ( {
37
- context : 'explore::data-job-details.spec::before()' ,
38
- action : 'continue'
39
- } ) ;
40
- } )
41
- ) ;
29
+ return DataJobExploreDetailsPage . recordHarIfSupported ( )
30
+ . then ( ( ) => cy . clearLocalStorageSnapshot ( "data-job-explore-details" ) )
31
+ . then ( ( ) => DataJobExploreDetailsPage . login ( ) )
32
+ . then ( ( ) => cy . saveLocalStorage ( "data-job-explore-details" ) )
33
+ . then ( ( ) =>
34
+ DataJobExploreDetailsPage . deleteShortLivedTestJobsNoDeploy ( true ) ,
35
+ )
36
+ . then ( ( ) =>
37
+ DataJobExploreDetailsPage . createShortLivedTestJobsNoDeploy ( ) ,
38
+ )
39
+ . then ( ( ) =>
40
+ DataJobExploreDetailsPage . loadShortLivedTestJobsFixtureNoDeploy ( ) . then (
41
+ ( fixtures ) => {
42
+ testJobsFixture = [ fixtures [ 0 ] , fixtures [ 1 ] ] ;
43
+
44
+ return cy . wrap ( {
45
+ context : "explore::data-job-details.spec::before()" ,
46
+ action : "continue" ,
47
+ } ) ;
48
+ } ,
49
+ ) ,
50
+ ) ;
42
51
} ) ;
43
52
44
53
after ( ( ) => {
45
- DataJobExploreDetailsPage . deleteShortLivedTestJobsNoDeploy ( ) ;
54
+ DataJobExploreDetailsPage . deleteShortLivedTestJobsNoDeploy ( ) ;
46
55
47
- DataJobExploreDetailsPage . saveHarIfSupported ( ) ;
56
+ DataJobExploreDetailsPage . saveHarIfSupported ( ) ;
48
57
} ) ;
49
58
50
59
beforeEach ( ( ) => {
51
- cy . restoreLocalStorage ( ' data-job-explore-details' ) ;
60
+ cy . restoreLocalStorage ( " data-job-explore-details" ) ;
52
61
53
- DataJobExploreDetailsPage . wireUserSession ( ) ;
54
- DataJobExploreDetailsPage . initInterceptors ( ) ;
62
+ DataJobExploreDetailsPage . wireUserSession ( ) ;
63
+ DataJobExploreDetailsPage . initInterceptors ( ) ;
55
64
} ) ;
56
65
57
- describe ( 'smoke' , { tags : [ '@smoke' ] } , ( ) => {
58
- it ( 'should load and show job details' , ( ) => {
59
- dataJobsExplorePage = DataJobsExplorePage . navigateWithSideMenu ( ) ;
60
-
61
- // filter by job name substring because there are a lot of jobs, and it could potentially be on second/third page
62
- dataJobsExplorePage . filterByJobName ( testJobsFixture [ 0 ] . job_name . substring ( 0 , 20 ) ) ;
63
-
64
- dataJobsExplorePage . openJobDetails ( testJobsFixture [ 0 ] . team , testJobsFixture [ 0 ] . job_name ) ;
65
-
66
- dataJobExploreDetailsPage = DataJobExploreDetailsPage . getPage ( ) ;
67
-
68
- dataJobExploreDetailsPage . getDetailsTab ( ) . scrollIntoView ( ) . should ( 'be.visible' ) ;
69
-
70
- dataJobExploreDetailsPage . getPageTitle ( ) . scrollIntoView ( ) . should ( 'be.visible' ) . should ( 'contains.text' , testJobsFixture [ 0 ] . job_name ) ;
71
-
72
- dataJobExploreDetailsPage . getStatusField ( ) . scrollIntoView ( ) . should ( 'be.visible' ) . should ( 'have.text' , 'Not Deployed' ) ;
73
-
74
- dataJobExploreDetailsPage . getDescriptionField ( ) . scrollIntoView ( ) . should ( 'be.visible' ) . should ( 'contain.text' , testJobsFixture [ 0 ] . description ) ;
75
-
76
- dataJobExploreDetailsPage . getTeamField ( ) . scrollIntoView ( ) . should ( 'be.visible' ) . should ( 'have.text' , testJobsFixture [ 0 ] . team ) ;
77
-
78
- dataJobExploreDetailsPage . getScheduleField ( ) . scrollIntoView ( ) . should ( 'be.visible' ) . should ( 'contains.text' , 'At 12:00 AM, on day 01 of the month, and on Friday' ) ;
79
-
80
- dataJobExploreDetailsPage . getOnDeployedField ( ) . scrollIntoView ( ) . should ( 'be.visible' ) . should ( 'contains.text' , testJobsFixture [ 0 ] . config . contacts . notified_on_job_deploy ) ;
81
-
82
- dataJobExploreDetailsPage . getOnPlatformErrorField ( ) . scrollIntoView ( ) . should ( 'be.visible' ) . should ( 'contains.text' , testJobsFixture [ 0 ] . config . contacts . notified_on_job_failure_platform_error ) ;
83
-
84
- dataJobExploreDetailsPage . getOnUserErrorField ( ) . scrollIntoView ( ) . should ( 'be.visible' ) . should ( 'contains.text' , testJobsFixture [ 0 ] . config . contacts . notified_on_job_failure_user_error ) ;
85
-
86
- dataJobExploreDetailsPage . getOnSuccessField ( ) . scrollIntoView ( ) . should ( 'be.visible' ) . should ( 'contains.text' , testJobsFixture [ 0 ] . config . contacts . notified_on_job_success ) ;
87
- } ) ;
88
-
89
- it ( 'should verify Details tab is visible and active' , ( ) => {
90
- dataJobsExplorePage = DataJobsExplorePage . navigateTo ( ) ;
91
-
92
- // filter by job name substring because there are a lot of jobs, and it could potentially be on second/third page
93
- dataJobsExplorePage . filterByJobName ( testJobsFixture [ 0 ] . job_name . substring ( 0 , 20 ) ) ;
94
-
95
- dataJobsExplorePage . openJobDetails ( testJobsFixture [ 0 ] . team , testJobsFixture [ 0 ] . job_name ) ;
96
-
97
- const dataJobExploreDetailsPage = DataJobExploreDetailsPage . getPage ( ) ;
98
-
99
- dataJobExploreDetailsPage . getPageTitle ( ) . scrollIntoView ( ) . should ( 'be.visible' ) . should ( 'contains.text' , testJobsFixture [ 0 ] . job_name ) ;
100
-
101
- dataJobExploreDetailsPage . getDetailsTab ( ) . scrollIntoView ( ) . should ( 'be.visible' ) . should ( 'have.class' , 'active' ) ;
102
- } ) ;
66
+ describe ( "smoke" , { tags : [ "@smoke" ] } , ( ) => {
67
+ it ( "should load and show job details" , ( ) => {
68
+ dataJobsExplorePage = DataJobsExplorePage . navigateWithSideMenu ( ) ;
69
+
70
+ // filter by job name substring because there are a lot of jobs, and it could potentially be on second/third page
71
+ dataJobsExplorePage . filterByJobName (
72
+ testJobsFixture [ 0 ] . job_name . substring ( 0 , 20 ) ,
73
+ ) ;
74
+
75
+ dataJobsExplorePage . openJobDetails (
76
+ testJobsFixture [ 0 ] . team ,
77
+ testJobsFixture [ 0 ] . job_name ,
78
+ ) ;
79
+
80
+ dataJobExploreDetailsPage = DataJobExploreDetailsPage . getPage ( ) ;
81
+
82
+ dataJobExploreDetailsPage
83
+ . getDetailsTab ( )
84
+ . scrollIntoView ( )
85
+ . should ( "be.visible" ) ;
86
+
87
+ dataJobExploreDetailsPage
88
+ . getPageTitle ( )
89
+ . scrollIntoView ( )
90
+ . should ( "be.visible" )
91
+ . should ( "contains.text" , testJobsFixture [ 0 ] . job_name ) ;
92
+
93
+ dataJobExploreDetailsPage
94
+ . getStatusField ( )
95
+ . scrollIntoView ( )
96
+ . should ( "be.visible" )
97
+ . should ( "have.text" , "Not Deployed" ) ;
98
+
99
+ dataJobExploreDetailsPage
100
+ . getDescriptionField ( )
101
+ . scrollIntoView ( )
102
+ . should ( "be.visible" )
103
+ . should ( "contain.text" , testJobsFixture [ 0 ] . description ) ;
104
+
105
+ dataJobExploreDetailsPage
106
+ . getTeamField ( )
107
+ . scrollIntoView ( )
108
+ . should ( "be.visible" )
109
+ . should ( "have.text" , testJobsFixture [ 0 ] . team ) ;
110
+
111
+ dataJobExploreDetailsPage
112
+ . getScheduleField ( )
113
+ . scrollIntoView ( )
114
+ . should ( "be.visible" )
115
+ . should (
116
+ "contains.text" ,
117
+ "At 12:00 AM, on day 01 of the month, and on Friday" ,
118
+ ) ;
119
+
120
+ dataJobExploreDetailsPage
121
+ . getOnDeployedField ( )
122
+ . scrollIntoView ( )
123
+ . should ( "be.visible" )
124
+ . should (
125
+ "contains.text" ,
126
+ testJobsFixture [ 0 ] . config . contacts . notified_on_job_deploy ,
127
+ ) ;
128
+
129
+ dataJobExploreDetailsPage
130
+ . getOnPlatformErrorField ( )
131
+ . scrollIntoView ( )
132
+ . should ( "be.visible" )
133
+ . should (
134
+ "contains.text" ,
135
+ testJobsFixture [ 0 ] . config . contacts
136
+ . notified_on_job_failure_platform_error ,
137
+ ) ;
138
+
139
+ dataJobExploreDetailsPage
140
+ . getOnUserErrorField ( )
141
+ . scrollIntoView ( )
142
+ . should ( "be.visible" )
143
+ . should (
144
+ "contains.text" ,
145
+ testJobsFixture [ 0 ] . config . contacts
146
+ . notified_on_job_failure_user_error ,
147
+ ) ;
148
+
149
+ dataJobExploreDetailsPage
150
+ . getOnSuccessField ( )
151
+ . scrollIntoView ( )
152
+ . should ( "be.visible" )
153
+ . should (
154
+ "contains.text" ,
155
+ testJobsFixture [ 0 ] . config . contacts . notified_on_job_success ,
156
+ ) ;
157
+ } ) ;
158
+
159
+ it ( "should verify Details tab is visible and active" , ( ) => {
160
+ dataJobsExplorePage = DataJobsExplorePage . navigateTo ( ) ;
161
+
162
+ // filter by job name substring because there are a lot of jobs, and it could potentially be on second/third page
163
+ dataJobsExplorePage . filterByJobName (
164
+ testJobsFixture [ 0 ] . job_name . substring ( 0 , 20 ) ,
165
+ ) ;
166
+
167
+ dataJobsExplorePage . openJobDetails (
168
+ testJobsFixture [ 0 ] . team ,
169
+ testJobsFixture [ 0 ] . job_name ,
170
+ ) ;
171
+
172
+ const dataJobExploreDetailsPage = DataJobExploreDetailsPage . getPage ( ) ;
173
+
174
+ dataJobExploreDetailsPage
175
+ . getPageTitle ( )
176
+ . scrollIntoView ( )
177
+ . should ( "be.visible" )
178
+ . should ( "contains.text" , testJobsFixture [ 0 ] . job_name ) ;
179
+
180
+ dataJobExploreDetailsPage
181
+ . getDetailsTab ( )
182
+ . scrollIntoView ( )
183
+ . should ( "be.visible" )
184
+ . should ( "have.class" , "active" ) ;
185
+ } ) ;
103
186
} ) ;
104
187
105
- describe ( ' extended' , ( ) => {
106
- it ( ' should verify Action buttons are not displayed' , ( ) => {
107
- dataJobsExplorePage = DataJobsExplorePage . navigateTo ( ) ;
188
+ describe ( " extended" , ( ) => {
189
+ it ( " should verify Action buttons are not displayed" , ( ) => {
190
+ dataJobsExplorePage = DataJobsExplorePage . navigateTo ( ) ;
108
191
109
- // filter by job name substring because there are a lot of jobs, and it could potentially be on second/third page
110
- dataJobsExplorePage . filterByJobName ( testJobsFixture [ 0 ] . job_name . substring ( 0 , 20 ) ) ;
192
+ // filter by job name substring because there are a lot of jobs, and it could potentially be on second/third page
193
+ dataJobsExplorePage . filterByJobName (
194
+ testJobsFixture [ 0 ] . job_name . substring ( 0 , 20 ) ,
195
+ ) ;
111
196
112
- dataJobsExplorePage . openJobDetails ( testJobsFixture [ 0 ] . team , testJobsFixture [ 0 ] . job_name ) ;
197
+ dataJobsExplorePage . openJobDetails (
198
+ testJobsFixture [ 0 ] . team ,
199
+ testJobsFixture [ 0 ] . job_name ,
200
+ ) ;
113
201
114
- const dataJobExploreDetailsPage = DataJobExploreDetailsPage . getPage ( ) ;
202
+ const dataJobExploreDetailsPage = DataJobExploreDetailsPage . getPage ( ) ;
115
203
116
- dataJobExploreDetailsPage . getPageTitle ( ) . scrollIntoView ( ) . should ( 'be.visible' ) . should ( 'contains.text' , testJobsFixture [ 0 ] . job_name ) ;
204
+ dataJobExploreDetailsPage
205
+ . getPageTitle ( )
206
+ . scrollIntoView ( )
207
+ . should ( "be.visible" )
208
+ . should ( "contains.text" , testJobsFixture [ 0 ] . job_name ) ;
117
209
118
- dataJobExploreDetailsPage . getExecuteNowButton ( ) . should ( ' not.exist' ) ;
210
+ dataJobExploreDetailsPage . getExecuteNowButton ( ) . should ( " not.exist" ) ;
119
211
120
- dataJobExploreDetailsPage . getActionDropdownBtn ( ) . should ( ' not.exist' ) ;
121
- } ) ;
212
+ dataJobExploreDetailsPage . getActionDropdownBtn ( ) . should ( " not.exist" ) ;
213
+ } ) ;
122
214
} ) ;
123
- } ) ;
215
+ } ,
216
+ ) ;
0 commit comments