@@ -91,24 +91,19 @@ test.describe('E2E test', () => {
9191 /** Testing invalid attachment case by uploading an empty file */
9292 await page . setInputFiles ( `#AttachmentList` , [ zeroBytesFilePath ] ) ;
9393 await expect ( page . locator ( `div >> text="Empty file can't be uploaded."` ) ) . toBeVisible ( ) ;
94-
9594 await page . locator ( 'div[class="psdk-attachment-card"]' ) . filter ( { hasText : 'Unable to upload file' } ) . locator ( '#delete-attachment' ) . click ( ) ;
96-
9795 await page . locator ( 'button:has-text("submit")' ) . click ( ) ;
9896
99- // Raised bug BUG-960405
100- // await page.locator('button[id="setting-button"] >> nth=0').click();
101-
102- // /** Download attachment */
103- // const menuSelector = await page.locator('div[role="menu"]');
104- // await menuSelector.locator('button >> text="Download"').click();
97+ /** Download attachment */
98+ await page . locator ( 'button[id="setting-button"] >> nth=0' ) . click ( ) ;
99+ const menuSelector = await page . locator ( 'div[role="menu"]' ) ;
100+ await menuSelector . locator ( 'button >> text="Download"' ) . click ( ) ;
105101
106- // await page.locator('button[id="setting-button"] >> nth=0').click();
107-
108- // /** Delete attachment */
109- // await menuSelector.locator('button >> text="Delete"').click();
110- // await expect(page.locator('div >> text="cableinfo.jpg"')).toBeVisible();
111- // await expect(page.locator('div >> text="cablechat.jpg"')).toBeHidden();
102+ /** Delete attachment */
103+ await page . locator ( 'button[id="setting-button"] >> nth=0' ) . click ( ) ;
104+ await menuSelector . locator ( 'button >> text="Delete"' ) . click ( ) ;
105+ await expect ( page . locator ( 'div >> text="cableinfo.jpg"' ) ) . toBeVisible ( ) ;
106+ await expect ( page . locator ( 'div >> text="cablechat.jpg"' ) ) . toBeHidden ( ) ;
112107 } , 10000 ) ;
113108} ) ;
114109
0 commit comments