@@ -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 } ) ;
@@ -106,29 +105,18 @@ test.describe('E2E test', () => {
106105 const sendToMgr = page . locator ( 'mat-checkbox[data-test-id="C3B43E79AEC2D689F0CF97BD6AFB7DC4"]' ) ;
107106 await sendToMgr . click ( ) ;
108107
109- const currentCaseID = await page . locator ( 'div[id="current-caseID"]' ) . textContent ( ) ;
110108 const filePath = path . join ( __dirname , '../../../src/assets/cableinfo.jpg' ) ;
111109 const attachInputId = await page . locator ( 'div[id="attachment-container"] >> input' ) . getAttribute ( 'id' ) ;
112110 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- ] ) ;
111+ await page . waitForTimeout ( 5000 ) ;
112+ await expect ( page . locator ( 'mat-spinner' ) ) . not . toBeVisible ( ) ;
121113
122114 await page . locator ( 'button:has-text("submit")' ) . click ( ) ;
123115
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- ] ) ;
116+ const todo = await page . locator ( 'div[class="psdk-todo-assignments"]' ) ;
117+ await expect ( todo ) . toBeVisible ( ) ;
131118
119+ await page . waitForTimeout ( 5000 ) ;
132120 const attachmentCount = await page . locator ( 'div[id="attachments-count"]' ) . textContent ( ) ;
133121 await expect ( Number ( attachmentCount ) ) . toBeGreaterThan ( 0 ) ;
134122 } , 10000 ) ;
@@ -151,7 +139,7 @@ test.describe('E2E test', () => {
151139
152140 await page . locator ( 'button:has-text("submit")' ) . click ( ) ;
153141
154- const todo = await page . locator ( 'div[id="worklist"]:has-text("To do") ' ) ;
142+ const todo = await page . locator ( 'div[class="psdk-todo-assignments"] ' ) ;
155143 await expect ( todo ) . toBeVisible ( ) ;
156144 } , 10000 ) ;
157145
0 commit comments