@@ -36,7 +36,7 @@ describe('Request container for non-super users', () => {
36
36
}
37
37
} ) ;
38
38
await page . goto (
39
- 'http://localhost:8000/task-requests/details/?id=dM5wwD9QsiTzi7eG7Oq5' ,
39
+ 'http://localhost:8000/task-requests/details/?id=dM5wwD9QsiTzi7eG7Oq5&dev=true ' ,
40
40
) ;
41
41
} ) ;
42
42
@@ -45,19 +45,15 @@ describe('Request container for non-super users', () => {
45
45
} ) ;
46
46
47
47
it ( 'Approve and Reject buttons should not render for non-super users' , async function ( ) {
48
- await page . goto (
49
- 'http://localhost:8000/task-requests/details/?id=dM5wwD9QsiTzi7eG7Oq5&&dev=true' ,
50
- ) ;
48
+ await page . waitForNetworkIdle ( ) ;
51
49
const approveButton = await page . $ ( '[data-testid="task-approve-button"]' ) ;
52
50
const rejectButton = await page . $ ( '[data-testid="task-reject-button"]' ) ;
53
51
expect ( approveButton ) . toBeNull ( ) ;
54
52
expect ( rejectButton ) . toBeNull ( ) ;
55
53
} ) ;
56
54
57
55
it ( 'Should render task status for non-super users' , async function ( ) {
58
- await page . goto (
59
- 'http://localhost:8000/task-requests/details/?id=dM5wwD9QsiTzi7eG7Oq5&&dev=true' ,
60
- ) ;
56
+ await page . waitForNetworkIdle ( ) ;
61
57
const taskRequestStatus = await page . $ (
62
58
'[data-testid="requestors-task-status"]' ,
63
59
) ;
@@ -152,8 +148,9 @@ describe('Task request details page', () => {
152
148
153
149
it ( 'Should render Approve and Reject buttons for super users' , async function ( ) {
154
150
await page . goto (
155
- 'http://localhost:8000/task-requests/details/?id=dM5wwD9QsiTzi7eG7Oq5&& dev=true' ,
151
+ 'http://localhost:8000/task-requests/details/?id=dM5wwD9QsiTzi7eG7Oq5&dev=true' ,
156
152
) ;
153
+ await page . waitForNetworkIdle ( ) ;
157
154
const approveButton = await page . $ ( '[data-testid="task-approve-button"]' ) ;
158
155
const rejectButton = await page . $ ( '[data-testid="task-reject-button"]' ) ;
159
156
expect ( approveButton ) . toBeTruthy ( ) ;
@@ -246,8 +243,9 @@ describe('Task request details page with markdown support in description', () =>
246
243
247
244
it ( 'Should render Approve and Reject buttons for super users' , async function ( ) {
248
245
await page . goto (
249
- 'http://localhost:8000/task-requests/details/?id=dM5wwD9QsiTzi7eG7Oq5& &dev=true' ,
246
+ 'http://localhost:8000/task-requests/details/?id=dM5wwD9QsiTzi7eG7Oq6 &dev=true' ,
250
247
) ;
248
+ await page . waitForNetworkIdle ( ) ;
251
249
const approveButton = await page . $ ( '[data-testid="task-approve-button"]' ) ;
252
250
const rejectButton = await page . $ ( '[data-testid="task-reject-button"]' ) ;
253
251
expect ( approveButton ) . toBeTruthy ( ) ;
0 commit comments