@@ -2,7 +2,6 @@ const path = require('path');
22const { test, expect } = require ( '@playwright/test' ) ;
33const config = require ( '../../config' ) ;
44const common = require ( '../../common' ) ;
5- const endpoints = require ( '../../../sdk-config.json' ) ;
65
76test . beforeEach ( async ( { page } ) => {
87 await page . setViewportSize ( { width : 1920 , height : 1080 } ) ;
@@ -110,25 +109,15 @@ test.describe('E2E test', () => {
110109 const filePath = path . join ( __dirname , '../../../src/assets/cableinfo.jpg' ) ;
111110 const attachInputId = await page . locator ( 'div[id="attachment-container"] >> input' ) . getAttribute ( 'id' ) ;
112111 await page . setInputFiles ( `#${ attachInputId } ` , filePath ) ;
113-
114- await Promise . all ( [
115- page . waitForResponse (
116- `${ endpoints . serverConfig . infinityRestServerUrl } ${
117- endpoints . serverConfig . appAlias ? `/app/${ endpoints . serverConfig . appAlias } ` : ''
118- } /api/application/v2/attachments/upload`
119- )
120- ] ) ;
112+ await page . waitForTimeout ( 5000 ) ;
113+ await expect ( page . locator ( 'mat-spinner' ) ) . not . toBeVisible ( ) ;
121114
122115 await page . locator ( 'button:has-text("submit")' ) . click ( ) ;
123116
124- await Promise . all ( [
125- page . waitForResponse (
126- `${ endpoints . serverConfig . infinityRestServerUrl } ${
127- endpoints . serverConfig . appAlias ? `/app/${ endpoints . serverConfig . appAlias } ` : ''
128- } /api/application/v2/cases/${ currentCaseID } /attachments?includeThumbnail=false`
129- )
130- ] ) ;
117+ const todo = page . locator ( 'div[id="worklist"]' ) ;
118+ await expect ( todo . getByText ( 'To do' ) ) . toBeVisible ( ) ;
131119
120+ await page . waitForTimeout ( 5000 ) ;
132121 const attachmentCount = await page . locator ( 'div[id="attachments-count"]' ) . textContent ( ) ;
133122 await expect ( Number ( attachmentCount ) ) . toBeGreaterThan ( 0 ) ;
134123 } , 10000 ) ;
0 commit comments