mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4232] Fix filePreviewPage methods to reach expectations (#4668)
* [ADF-4232] Fix filePreviewPage methods to reach expectations * [ADF-4232] Implement new methods * Fix word spelling * [ADF-4232] Fix e2e test and rebase * Rebase branch * [ADF-4232] add test for reset zoom check - remove un-reached expects from filePreviewPage * [ADF-4232] better naming - review changes * [ADF-4232] no sleep(s), more timeout * [ADF-4232] some code clean up * [ADF-4232] some code clean up * [ADF-4232] refactoring - renaming * [ADF-4232] refactoring * [ADF-4232] refactoring move expects to test - code review changes * [ADF-4232] remove unused methods - these already exist on viewerPage.ts * [ADF-4232] remove duplicated code - use viewerPage instead of filePreviewPage * [ADF-4232] reset to original timeout in afterAll
This commit is contained in:
committed by
Eugenio Romano
parent
7611268bd9
commit
b19646d201
@@ -15,8 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { browser } from 'protractor';
|
|
||||||
|
|
||||||
import { LoginPage } from '@alfresco/adf-testing';
|
import { LoginPage } from '@alfresco/adf-testing';
|
||||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||||
import { ViewerPage } from '../../pages/adf/viewerPage';
|
import { ViewerPage } from '../../pages/adf/viewerPage';
|
||||||
@@ -28,8 +26,11 @@ import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
|||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||||
|
import { browser } from 'protractor';
|
||||||
|
|
||||||
describe('Content Services Viewer', () => {
|
describe('Content Services Viewer', () => {
|
||||||
|
const originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
|
||||||
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = 50000;
|
||||||
|
|
||||||
const acsUser = new AcsUserModel();
|
const acsUser = new AcsUserModel();
|
||||||
const viewerPage = new ViewerPage();
|
const viewerPage = new ViewerPage();
|
||||||
@@ -126,6 +127,7 @@ describe('Content Services Viewer', () => {
|
|||||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, mp4File.getId());
|
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, mp4File.getId());
|
||||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, pptFile.getId());
|
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, pptFile.getId());
|
||||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, unsupportedFile.getId());
|
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, unsupportedFile.getId());
|
||||||
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
|
||||||
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@@ -134,7 +136,6 @@ describe('Content Services Viewer', () => {
|
|||||||
contentServicesPage.checkAcsContainer();
|
contentServicesPage.checkAcsContainer();
|
||||||
|
|
||||||
viewerPage.viewFile(pdfFile.name);
|
viewerPage.viewFile(pdfFile.name);
|
||||||
browser.driver.sleep(3000); // wait open file
|
|
||||||
viewerPage.checkZoomInButtonIsDisplayed();
|
viewerPage.checkZoomInButtonIsDisplayed();
|
||||||
|
|
||||||
viewerPage.checkFileContent('1', pdfFile.firstPageText);
|
viewerPage.checkFileContent('1', pdfFile.firstPageText);
|
||||||
@@ -155,7 +156,7 @@ describe('Content Services Viewer', () => {
|
|||||||
viewerPage.clickCloseButton();
|
viewerPage.clickCloseButton();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C260040] Should be able to change pages and zoom when .pdf file is open', () => {
|
it('[C260040] Should be able to change pages and zoom when .pdf file is open', async () => {
|
||||||
viewerPage.viewFile(pdfFile.name);
|
viewerPage.viewFile(pdfFile.name);
|
||||||
viewerPage.checkZoomInButtonIsDisplayed();
|
viewerPage.checkZoomInButtonIsDisplayed();
|
||||||
|
|
||||||
@@ -171,15 +172,20 @@ describe('Content Services Viewer', () => {
|
|||||||
viewerPage.clearPageNumber();
|
viewerPage.clearPageNumber();
|
||||||
viewerPage.checkPageSelectorInputIsDisplayed('');
|
viewerPage.checkPageSelectorInputIsDisplayed('');
|
||||||
|
|
||||||
viewerPage.clickZoomOutButton();
|
const initialWidth = await viewerPage.getCanvasWidth();
|
||||||
|
const initialHeight = await viewerPage.getCanvasHeight();
|
||||||
|
|
||||||
zoom = viewerPage.getZoom();
|
|
||||||
viewerPage.clickZoomOutButton();
|
|
||||||
viewerPage.checkZoomedOut(zoom);
|
|
||||||
|
|
||||||
zoom = viewerPage.getZoom();
|
|
||||||
viewerPage.clickZoomInButton();
|
viewerPage.clickZoomInButton();
|
||||||
viewerPage.checkZoomedIn(zoom);
|
expect(+(await viewerPage.getCanvasWidth())).toBeGreaterThan(+initialWidth);
|
||||||
|
expect(+(await viewerPage.getCanvasHeight())).toBeGreaterThan(+initialHeight);
|
||||||
|
|
||||||
|
viewerPage.clickActualSize();
|
||||||
|
expect(+(await viewerPage.getCanvasWidth())).toEqual(+initialWidth);
|
||||||
|
expect(+(await viewerPage.getCanvasHeight())).toEqual(+initialHeight);
|
||||||
|
|
||||||
|
viewerPage.clickZoomOutButton();
|
||||||
|
expect(+(await viewerPage.getCanvasWidth())).toBeLessThan(+initialWidth);
|
||||||
|
expect(+(await viewerPage.getCanvasHeight())).toBeLessThan(+initialHeight);
|
||||||
|
|
||||||
viewerPage.clickCloseButton();
|
viewerPage.clickCloseButton();
|
||||||
});
|
});
|
||||||
@@ -303,8 +309,6 @@ describe('Content Services Viewer', () => {
|
|||||||
it('[C260054] Should display Preview could not be loaded and viewer toolbar when opening an unsupported file', () => {
|
it('[C260054] Should display Preview could not be loaded and viewer toolbar when opening an unsupported file', () => {
|
||||||
viewerPage.viewFile(unsupportedFile.name);
|
viewerPage.viewFile(unsupportedFile.name);
|
||||||
|
|
||||||
browser.driver.sleep(3000); // wait open file
|
|
||||||
|
|
||||||
viewerPage.checkCloseButtonIsDisplayed();
|
viewerPage.checkCloseButtonIsDisplayed();
|
||||||
viewerPage.checkFileNameIsDisplayed(unsupportedFile.name);
|
viewerPage.checkFileNameIsDisplayed(unsupportedFile.name);
|
||||||
viewerPage.checkFileThumbnailIsDisplayed();
|
viewerPage.checkFileThumbnailIsDisplayed();
|
||||||
@@ -335,8 +339,6 @@ describe('Content Services Viewer', () => {
|
|||||||
it('[C261123] Should be able to preview all pages and navigate to a page when using thumbnails', () => {
|
it('[C261123] Should be able to preview all pages and navigate to a page when using thumbnails', () => {
|
||||||
viewerPage.viewFile(pdfFile.name);
|
viewerPage.viewFile(pdfFile.name);
|
||||||
|
|
||||||
browser.driver.sleep(3000); // wait open file
|
|
||||||
|
|
||||||
viewerPage.checkZoomInButtonIsDisplayed();
|
viewerPage.checkZoomInButtonIsDisplayed();
|
||||||
viewerPage.checkFileContent('1', pdfFile.firstPageText);
|
viewerPage.checkFileContent('1', pdfFile.firstPageText);
|
||||||
viewerPage.checkThumbnailsBtnIsDisplayed();
|
viewerPage.checkThumbnailsBtnIsDisplayed();
|
||||||
@@ -393,8 +395,6 @@ describe('Content Services Viewer', () => {
|
|||||||
it('[C268901] Should need a password when opening a protected file', () => {
|
it('[C268901] Should need a password when opening a protected file', () => {
|
||||||
viewerPage.viewFile(protectedFile.name);
|
viewerPage.viewFile(protectedFile.name);
|
||||||
|
|
||||||
browser.driver.sleep(3000); // wait open file
|
|
||||||
|
|
||||||
viewerPage.checkZoomInButtonIsDisplayed();
|
viewerPage.checkZoomInButtonIsDisplayed();
|
||||||
viewerPage.checkPasswordDialogIsDisplayed();
|
viewerPage.checkPasswordDialogIsDisplayed();
|
||||||
viewerPage.checkPasswordSubmitDisabledIsDisplayed();
|
viewerPage.checkPasswordSubmitDisabledIsDisplayed();
|
||||||
|
@@ -1,171 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright 2019 Alfresco Software, Ltd.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { browser, by, element, protractor } from 'protractor';
|
|
||||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
|
||||||
|
|
||||||
export class FilePreviewPage {
|
|
||||||
|
|
||||||
pdfTitleFromSearch = element(by.css(`span[id='adf-viewer-display-name']`));
|
|
||||||
textLayer = element.all(by.css(`div[class='textLayer']`)).first();
|
|
||||||
closeButton = element(by.css('button[data-automation-id="adf-toolbar-back"]'));
|
|
||||||
|
|
||||||
waitForElements() {
|
|
||||||
BrowserVisibility.waitUntilElementIsVisible(element(by.css(`i[id='viewer-close-button']`)));
|
|
||||||
}
|
|
||||||
|
|
||||||
viewFile(fileName) {
|
|
||||||
BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`div[data-automation-id="${fileName}"]`, fileName)));
|
|
||||||
browser.actions().doubleClick(element(by.cssContainingText(`div[data-automation-id="${fileName}"]`, fileName))).perform();
|
|
||||||
this.waitForElements();
|
|
||||||
}
|
|
||||||
|
|
||||||
getPDFTitleFromSearch() {
|
|
||||||
const deferred = protractor.promise.defer();
|
|
||||||
BrowserVisibility.waitUntilElementIsVisible(this.pdfTitleFromSearch);
|
|
||||||
BrowserVisibility.waitUntilElementIsVisible(this.textLayer);
|
|
||||||
this.pdfTitleFromSearch.getText().then((result) => {
|
|
||||||
deferred.fulfill(result);
|
|
||||||
});
|
|
||||||
return deferred.promise;
|
|
||||||
}
|
|
||||||
|
|
||||||
closePreviewWithButton() {
|
|
||||||
BrowserActions.clickExecuteScript('button[data-automation-id="adf-toolbar-back"]');
|
|
||||||
}
|
|
||||||
|
|
||||||
clickZoomIn() {
|
|
||||||
const zoomInButton = element(by.css(`div[id='viewer-zoom-in-button']`));
|
|
||||||
BrowserActions.click(zoomInButton);
|
|
||||||
}
|
|
||||||
|
|
||||||
clickZoomOut() {
|
|
||||||
const zoomOutButton = element(by.css(`div[id='viewer-zoom-out-button']`));
|
|
||||||
BrowserActions.click(zoomOutButton);
|
|
||||||
}
|
|
||||||
|
|
||||||
clickActualSize() {
|
|
||||||
const actualSizeButton = element(by.css(`div[id='viewer-scale-page-button']`));
|
|
||||||
BrowserActions.click(actualSizeButton);
|
|
||||||
}
|
|
||||||
|
|
||||||
checkCanvasWidth() {
|
|
||||||
return element.all(by.css(`div[class='canvasWrapper'] > canvas`)).first().getAttribute(`width`).then((width) => {
|
|
||||||
return width;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
checkCanvasHeight() {
|
|
||||||
return element.all(by.css(`div[class='canvasWrapper'] > canvas`)).first().getAttribute(`height`).then((height) => {
|
|
||||||
return height;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
zoomIn() {
|
|
||||||
const canvasLayer = element.all(by.css(`div[class='canvasWrapper'] > canvas`)).first();
|
|
||||||
const textLayer = element(by.css(`div[id*='pageContainer'] div[class='textLayer'] > div`));
|
|
||||||
|
|
||||||
BrowserVisibility.waitUntilElementIsVisible(canvasLayer);
|
|
||||||
BrowserVisibility.waitUntilElementIsVisible(textLayer);
|
|
||||||
|
|
||||||
let actualWidth,
|
|
||||||
zoomedInWidth,
|
|
||||||
actualHeight,
|
|
||||||
zoomedInHeight;
|
|
||||||
|
|
||||||
this.checkCanvasWidth().then((width) => {
|
|
||||||
actualWidth = width;
|
|
||||||
if (actualWidth && zoomedInWidth) {
|
|
||||||
expect(zoomedInWidth).toBeGreaterThan(actualWidth);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.checkCanvasHeight().then((height) => {
|
|
||||||
actualHeight = height;
|
|
||||||
if (actualHeight && zoomedInHeight) {
|
|
||||||
expect(zoomedInHeight).toBeGreaterThan(actualHeight);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.clickZoomIn();
|
|
||||||
|
|
||||||
this.checkCanvasWidth().then((width) => {
|
|
||||||
zoomedInWidth = width;
|
|
||||||
if (actualWidth && zoomedInWidth) {
|
|
||||||
expect(zoomedInWidth).toBeGreaterThan(actualWidth);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.checkCanvasHeight().then((height) => {
|
|
||||||
zoomedInHeight = height;
|
|
||||||
if (actualHeight && zoomedInHeight) {
|
|
||||||
expect(zoomedInHeight).toBeGreaterThan(actualHeight);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
actualSize() {
|
|
||||||
const canvasLayer = element.all(by.css(`div[class='canvasWrapper'] > canvas`)).first();
|
|
||||||
const textLayer = element(by.css(`div[id*='pageContainer'] div[class='textLayer'] > div`));
|
|
||||||
|
|
||||||
BrowserVisibility.waitUntilElementIsVisible(canvasLayer);
|
|
||||||
BrowserVisibility.waitUntilElementIsVisible(textLayer);
|
|
||||||
|
|
||||||
let actualWidth,
|
|
||||||
actualHeight,
|
|
||||||
zoomedWidth,
|
|
||||||
zoomedHeight,
|
|
||||||
newWidth,
|
|
||||||
newHeight;
|
|
||||||
|
|
||||||
this.checkCanvasWidth().then((width) => {
|
|
||||||
actualWidth = width;
|
|
||||||
});
|
|
||||||
|
|
||||||
this.checkCanvasHeight().then((height) => {
|
|
||||||
actualHeight = height;
|
|
||||||
});
|
|
||||||
|
|
||||||
this.clickZoomIn();
|
|
||||||
|
|
||||||
this.checkCanvasWidth().then((width) => {
|
|
||||||
zoomedWidth = width;
|
|
||||||
});
|
|
||||||
|
|
||||||
this.checkCanvasHeight().then((height) => {
|
|
||||||
zoomedHeight = height;
|
|
||||||
});
|
|
||||||
|
|
||||||
this.clickActualSize();
|
|
||||||
|
|
||||||
this.checkCanvasWidth().then((width) => {
|
|
||||||
newWidth = width;
|
|
||||||
if (actualWidth && zoomedWidth && newWidth) {
|
|
||||||
expect(newWidth).toBeLessThan(zoomedWidth);
|
|
||||||
expect(newWidth).toEqual(actualWidth);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.checkCanvasHeight().then((height) => {
|
|
||||||
newHeight = height;
|
|
||||||
if (actualHeight && zoomedHeight && newHeight) {
|
|
||||||
expect(newHeight).toBeLessThan(zoomedHeight);
|
|
||||||
expect(newHeight).toEqual(actualHeight);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
@@ -63,6 +63,7 @@ export class ViewerPage {
|
|||||||
toolbar = element(by.id('adf-viewer-toolbar'));
|
toolbar = element(by.id('adf-viewer-toolbar'));
|
||||||
lastButton = element.all(by.css('#adf-viewer-toolbar mat-toolbar > button[data-automation-id*="adf-toolbar-"]')).last();
|
lastButton = element.all(by.css('#adf-viewer-toolbar mat-toolbar > button[data-automation-id*="adf-toolbar-"]')).last();
|
||||||
goBackSwitch = element(by.id('adf-switch-goback'));
|
goBackSwitch = element(by.id('adf-switch-goback'));
|
||||||
|
canvasLayer = element.all(by.css('div[class="canvasWrapper"] > canvas')).first();
|
||||||
|
|
||||||
openWithSwitch = element(by.id('adf-switch-openwith'));
|
openWithSwitch = element(by.id('adf-switch-openwith'));
|
||||||
openWith = element(by.id('adf-viewer-openwith'));
|
openWith = element(by.id('adf-viewer-openwith'));
|
||||||
@@ -120,6 +121,19 @@ export class ViewerPage {
|
|||||||
return BrowserActions.getText(this.percentage);
|
return BrowserActions.getText(this.percentage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCanvasWidth() {
|
||||||
|
return this.canvasLayer.getAttribute(`width`);
|
||||||
|
}
|
||||||
|
|
||||||
|
getCanvasHeight() {
|
||||||
|
return this.canvasLayer.getAttribute(`height`);
|
||||||
|
}
|
||||||
|
|
||||||
|
getDisplayedFileName() {
|
||||||
|
BrowserVisibility.waitUntilElementIsVisible(this.fileName);
|
||||||
|
return this.fileName.getText();
|
||||||
|
}
|
||||||
|
|
||||||
exitFullScreen() {
|
exitFullScreen() {
|
||||||
const jsCode = 'document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen();';
|
const jsCode = 'document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen();';
|
||||||
browser.executeScript(jsCode);
|
browser.executeScript(jsCode);
|
||||||
@@ -263,7 +277,7 @@ export class ViewerPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkFileContent(pageNumber, text) {
|
async checkFileContent(pageNumber, text) {
|
||||||
const allPages = element.all(by.css('div[class="canvasWrapper"] > canvas')).first();
|
const allPages = this.canvasLayer;
|
||||||
const pageLoaded = element.all(by.css('div[data-page-number="' + pageNumber + '"][data-loaded="true"]')).first();
|
const pageLoaded = element.all(by.css('div[data-page-number="' + pageNumber + '"][data-loaded="true"]')).first();
|
||||||
const textLayerLoaded = element.all(by.css('div[data-page-number="' + pageNumber + '"] div[class="textLayer"]')).first();
|
const textLayerLoaded = element.all(by.css('div[data-page-number="' + pageNumber + '"] div[class="textLayer"]')).first();
|
||||||
const specificText = element.all(by.cssContainingText('div[data-page-number="' + pageNumber + '"] div[class="textLayer"]', text)).first();
|
const specificText = element.all(by.cssContainingText('div[data-page-number="' + pageNumber + '"] div[class="textLayer"]', text)).first();
|
||||||
@@ -402,6 +416,10 @@ export class ViewerPage {
|
|||||||
BrowserActions.click(this.zoomOutButton);
|
BrowserActions.click(this.zoomOutButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clickActualSize() {
|
||||||
|
BrowserActions.click(this.scalePageButton);
|
||||||
|
}
|
||||||
|
|
||||||
clickFullScreenButton() {
|
clickFullScreenButton() {
|
||||||
BrowserActions.click(this.fullScreenButton);
|
BrowserActions.click(this.fullScreenButton);
|
||||||
}
|
}
|
||||||
|
@@ -20,7 +20,7 @@ import { browser } from 'protractor';
|
|||||||
import { LoginPage } from '@alfresco/adf-testing';
|
import { LoginPage } from '@alfresco/adf-testing';
|
||||||
import { SearchDialog } from '../pages/adf/dialog/searchDialog';
|
import { SearchDialog } from '../pages/adf/dialog/searchDialog';
|
||||||
import { ContentServicesPage } from '../pages/adf/contentServicesPage';
|
import { ContentServicesPage } from '../pages/adf/contentServicesPage';
|
||||||
import { FilePreviewPage } from '../pages/adf/filePreviewPage';
|
import { ViewerPage } from '../pages/adf/viewerPage';
|
||||||
import { SearchResultsPage } from '../pages/adf/searchResultsPage';
|
import { SearchResultsPage } from '../pages/adf/searchResultsPage';
|
||||||
|
|
||||||
import { AcsUserModel } from '../models/ACS/acsUserModel';
|
import { AcsUserModel } from '../models/ACS/acsUserModel';
|
||||||
@@ -51,7 +51,7 @@ describe('Search component - Search Bar', () => {
|
|||||||
|
|
||||||
const searchDialog = new SearchDialog();
|
const searchDialog = new SearchDialog();
|
||||||
const searchResultPage = new SearchResultsPage();
|
const searchResultPage = new SearchResultsPage();
|
||||||
const filePreviewPage = new FilePreviewPage();
|
const viewerPage = new ViewerPage();
|
||||||
|
|
||||||
const acsUser = new AcsUserModel();
|
const acsUser = new AcsUserModel();
|
||||||
const uploadActions = new UploadActions();
|
const uploadActions = new UploadActions();
|
||||||
@@ -209,7 +209,7 @@ describe('Search component - Search Bar', () => {
|
|||||||
expect(searchDialog.getSpecificRowsCompleteName(firstFileModel.name)).toEqual(firstFileModel.name);
|
expect(searchDialog.getSpecificRowsCompleteName(firstFileModel.name)).toEqual(firstFileModel.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C260257] Should display content when clicking on folder from search suggestions', () => {
|
it('[C260257] Should display content when clicking on folder from search suggestions', async () => {
|
||||||
searchDialog
|
searchDialog
|
||||||
.clickOnSearchIcon()
|
.clickOnSearchIcon()
|
||||||
.checkSearchBarIsVisible()
|
.checkSearchBarIsVisible()
|
||||||
@@ -228,9 +228,9 @@ describe('Search component - Search Bar', () => {
|
|||||||
.resultTableContainsRow(firstFileModel.name);
|
.resultTableContainsRow(firstFileModel.name);
|
||||||
|
|
||||||
searchDialog.clickOnSpecificRow(firstFileModel.name);
|
searchDialog.clickOnSpecificRow(firstFileModel.name);
|
||||||
expect(filePreviewPage.getPDFTitleFromSearch()).toEqual(firstFileModel.name);
|
expect(await viewerPage.getDisplayedFileName()).toEqual(firstFileModel.name);
|
||||||
|
|
||||||
filePreviewPage.closePreviewWithButton();
|
viewerPage.clickCloseButton();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C272801] Should display message when searching for non-existent folder', () => {
|
it('[C272801] Should display message when searching for non-existent folder', () => {
|
||||||
|
Reference in New Issue
Block a user