[ACS-8845] [E2E] Added e2e tests for verifying file types in viewer (#4156)

This commit is contained in:
Adam Świderski
2024-10-02 09:51:49 +02:00
committed by GitHub
parent 5b44f75197
commit 5968a39de5
11 changed files with 193 additions and 1 deletions

View File

@@ -38,6 +38,13 @@ export class ViewerComponent extends BaseComponent {
public downloadButton = this.getChild('button[id="app.viewer.download"]');
public allButtons = this.getChild('button');
public unknownFormat = this.getChild(`adf-viewer-unknown-format .adf-viewer__unknown-format-view`);
public viewerImage = this.viewerLocator.locator('.cropper-canvas img');
public viewerDocument = this.viewerLocator.locator('.adf-pdf-viewer__content [role="document"]');
public documentThumbnailButton = this.getChild('[data-automation-id="adf-thumbnails-button"]');
public thumbnailsPages = this.getChild('[data-automation-id="adf-thumbnails-content"] adf-pdf-thumb');
public thumbnailsCloseButton = this.getChild('[data-automation-id="adf-thumbnails-close"]');
public viewerPage = this.getChild('[data-automation-id="adf-page-selector"]');
public viewerMedia = this.getChild('adf-media-player');
toolbar = new AcaHeader(this.page);

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -70,6 +70,30 @@ export const TEST_FILES = {
path: resolve(__dirname, 'file-jpg-1mb.jpg'),
name: 'file-jpg-1mb'
},
PNG_FILE: {
path: resolve(__dirname, 'file-png.png'),
name: 'file-png'
},
GIF_FILE: {
path: resolve(__dirname, 'file-gif.gif'),
name: 'file-gif'
},
PPTX_FILE: {
path: resolve(__dirname, 'file-pptx.pptx'),
name: 'file-pptx'
},
MP3_FILE: {
path: resolve(__dirname, 'file-mp3.mp3'),
name: 'file-mp3'
},
MP4_FILE: {
path: resolve(__dirname, 'file-mp4.mp4'),
name: 'file-mp4'
},
WEBM_FILE: {
path: resolve(__dirname, 'file-webm.webm'),
name: 'file-webm'
},
PDF_PROTECTED2: {
path: resolve(__dirname, 'protected.pdf'),
name: 'file-protected',