[ACS-5761] Demo Shell pages cleanup (#8802)

remove the content that is not covered by e2e testing, preparation steps for the demo shell decommissioning
This commit is contained in:
Denys Vuika
2023-08-08 14:09:41 +01:00
committed by GitHub
parent 17535c9f53
commit 4f2b3bce3c
257 changed files with 528 additions and 15154 deletions
@@ -1,67 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* 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 { createApiService, DataTableComponentPage, LoginPage, UserModel, UsersActions } from '@alfresco/adf-testing';
import { DataTablePage } from '../../core/pages/data-table.page';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
describe('Datatable component - selection', () => {
const apiService = createApiService();
const usersActions = new UsersActions(apiService);
const dataTablePage = new DataTablePage();
const loginPage = new LoginPage();
const acsUser = new UserModel();
const navigationBarPage = new NavigationBarPage();
const dataTableComponent = new DataTableComponentPage();
beforeAll(async () => {
await apiService.loginWithProfile('admin');
await usersActions.createUser(acsUser);
await loginPage.login(acsUser.username, acsUser.password);
await navigationBarPage.navigateToDatatable();
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
});
it('[C213258] Should be possible change the selection modes when change the selectionMode property', async () => {
await dataTablePage.selectRow('2');
await dataTableComponent.checkRowIsSelected('Id', '2');
await expect(await dataTablePage.getNumberOfSelectedRows()).toEqual(1);
await dataTablePage.selectRow('3');
await dataTableComponent.checkRowIsSelected('Id', '3');
await expect(await dataTablePage.getNumberOfSelectedRows()).toEqual(1);
await dataTablePage.selectSelectionMode('Multiple');
await dataTablePage.selectRow('1');
await dataTableComponent.checkRowIsSelected('Id', '1');
await dataTablePage.selectRowWithKeyboard('3');
await dataTableComponent.checkRowIsSelected('Id', '1');
await dataTableComponent.checkRowIsSelected('Id', '3');
await dataTablePage.checkRowIsNotSelected('2');
await dataTablePage.checkRowIsNotSelected('4');
await dataTablePage.selectSelectionMode('None');
await dataTablePage.selectRow('1');
await dataTablePage.checkNoRowIsSelected();
});
});
@@ -1,73 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* 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 { createApiService,
DropActions,
LoginPage,
NotificationHistoryPage,
UserModel,
UsersActions
} from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { FileModel } from '../../models/ACS/file.model';
import { DataTablePage } from '../../core/pages/data-table.page';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
describe('Datatable component', () => {
const dragAndDropDataTablePage = new DataTablePage();
const loginPage = new LoginPage();
const acsUser = new UserModel();
const navigationBarPage = new NavigationBarPage();
const notificationHistoryPage = new NotificationHistoryPage();
const pngFile = new FileModel({
name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_location
});
const apiService = createApiService();
const usersActions = new UsersActions(apiService);
beforeAll(async () => {
await apiService.loginWithProfile('admin');
await usersActions.createUser(acsUser);
await loginPage.login(acsUser.username, acsUser.password);
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
});
describe('Datatable component - Drag and Drop', () => {
beforeAll(async () => {
await navigationBarPage.navigateToDragAndDropDatatable();
await dragAndDropDataTablePage.dataTable.waitForTableBody();
});
it('[C307984] Should trigger the event handling header-drop and cell-drop', async () => {
const dragAndDropHeader = dragAndDropDataTablePage.getDropTargetIdColumnHeader();
await DropActions.dropFile(dragAndDropHeader, pngFile.location);
await notificationHistoryPage.checkNotifyContains('Dropped data on [ id ] header');
const dragAndDropCell = dragAndDropDataTablePage.getDropTargetIdColumnCell(1);
await DropActions.dropFile(dragAndDropCell, pngFile.location);
await notificationHistoryPage.checkNotifyContains('Dropped data on [ id ] cell');
});
});
});
-171
View File
@@ -1,171 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* 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 { createApiService,
BrowserActions,
ErrorPage,
LocalStorageUtil,
UserInfoPage,
UserModel,
UsersActions
} from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { ContentServicesPage } from '../../core/pages/content-services.page';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import { LoginShellPage } from '../../core/pages/login-shell.page';
describe('Login component', () => {
const navigationBarPage = new NavigationBarPage();
const userInfoPage = new UserInfoPage();
const contentServicesPage = new ContentServicesPage();
const loginPage = new LoginShellPage();
const errorPage = new ErrorPage();
const userA = new UserModel();
const userB = new UserModel();
const errorMessages = {
username: 'Your username needs to be at least 2 characters.',
invalid_credentials: 'You\'ve entered an unknown username or password',
password: 'Enter your password to sign in',
required: 'Required'
};
const apiService = createApiService();
const usersActions = new UsersActions(apiService);
beforeAll(async () => {
await LocalStorageUtil.setStorageItem('authType', 'BASIC');
await apiService.loginWithProfile('admin');
await usersActions.createUser(userA);
await usersActions.createUser(userB);
});
afterEach(async () => {
await navigationBarPage.clickLogoutButton();
});
it('[C276746] Should display the right information in user-info when a different users logs in', async () => {
await LocalStorageUtil.setStorageItem('providers', 'ECM');
await loginPage.login(userA.username, userA.password);
await userInfoPage.clickUserProfile();
await expect(await userInfoPage.getContentHeaderTitle()).toEqual(`${userA.firstName} ${userA.lastName}`);
await navigationBarPage.clickLogoutButton();
await loginPage.login(userB.username, userB.password);
await userInfoPage.clickUserProfile();
await expect(await userInfoPage.getContentHeaderTitle()).toEqual(`${userB.firstName} ${userB.lastName}`);
});
it('[C299206] Should redirect the user without the right access role on a forbidden page', async () => {
await loginPage.login(userA.username, userA.password);
await navigationBarPage.navigateToProcessServicesCloudPage();
await expect(await errorPage.getErrorCode()).toBe('403');
await expect(await errorPage.getErrorTitle()).toBe('You don\'t have permission to access this server.');
await expect(await errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
});
it('[C260036] Should require username', async () => {
await loginPage.goToLoginPage();
await loginPage.checkUsernameInactive();
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
await loginPage.enterUsername('A');
await expect(await loginPage.getUsernameTooltip()).toEqual(errorMessages.username);
await loginPage.clearUsername();
await expect(await loginPage.getUsernameTooltip()).toEqual(errorMessages.required);
await loginPage.checkUsernameHighlighted();
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
});
it('[C260044] Username should be at least 2 characters long', async () => {
await loginPage.goToLoginPage();
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
await loginPage.enterUsername('A');
await expect(await loginPage.getUsernameTooltip()).toEqual(errorMessages.username);
await loginPage.enterUsername('AB');
await loginPage.checkUsernameTooltipIsNotVisible();
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
await loginPage.clearUsername();
});
it('[C260045] Should enable login button after entering a valid username and a password', async () => {
await loginPage.goToLoginPage();
await loginPage.enterUsername(browser.params.testConfig.users.admin.username);
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
await loginPage.enterPassword('a');
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(true);
await loginPage.clearUsername();
await loginPage.clearPassword();
});
it('[C260047] Password should be crypted', async () => {
await loginPage.goToLoginPage();
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
await loginPage.enterPassword('test');
await loginPage.showPassword();
const tooltip = await loginPage.getShownPassword();
await expect(tooltip).toEqual('test');
await loginPage.hidePassword();
await loginPage.checkPasswordIsHidden();
await loginPage.clearPassword();
});
it('[C260048] Should be possible to enable/disable login footer', async () => {
await loginPage.goToLoginPage();
await loginPage.enableFooter();
await loginPage.checkRememberIsDisplayed();
await loginPage.checkNeedHelpIsDisplayed();
await loginPage.checkRegisterDisplayed();
await loginPage.disableFooter();
await loginPage.checkRememberIsNotDisplayed();
await loginPage.checkNeedHelpIsNotDisplayed();
await loginPage.checkRegisterIsNotDisplayed();
});
it('[C260050] Should be possible to login to Content Services with Process Services disabled', async () => {
await LocalStorageUtil.setStorageItem('providers', 'ECM');
await loginPage.goToLoginPage();
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
await loginPage.loginWithProfile('admin');
await navigationBarPage.navigateToContentServices();
await contentServicesPage.checkAcsContainer();
});
it('[C277754] Should the user be redirect to the login page when the Content Service session expire', async () => {
await LocalStorageUtil.setStorageItem('providers', 'ECM');
await loginPage.goToLoginPage();
await loginPage.loginWithProfile('admin');
await browser.executeScript('window.localStorage.removeItem("ADF_ticket-ECM");');
await BrowserActions.getUrl(browser.baseUrl + '/files');
await loginPage.waitForElements();
await LocalStorageUtil.setStorageItem('providers', 'ALL');
});
it('[C279933] Should be possible change the login component logo when logoImageUrl is changed', async () => {
await loginPage.goToLoginPage();
await loginPage.enableLogoSwitch();
await loginPage.enterLogo('https://rawgit.com/Alfresco/alfresco-ng2-components/master/assets/angular2.png');
await loginPage.checkLoginImgURL();
});
});
@@ -1,39 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* 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 { LoginPage, SettingsPage } from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { NavigationBarPage } from '../../pages/navigation-bar.page';
describe('Logout component - SSO', () => {
const settingsPage = new SettingsPage();
const loginSSOPage = new LoginPage();
const navigationBarPage = new NavigationBarPage();
it('[C280665] Should be possible change the logout redirect URL', async () => {
await settingsPage.setProviderEcmSso(browser.params.testConfig.appConfig.ecmHost,
browser.params.testConfig.appConfig.oauth2.host,
browser.params.testConfig.appConfig.identityHost, false, true, browser.params.testConfig.appConfig.oauth2.clientId, '#/login');
await loginSSOPage.loginSSOIdentityService(browser.params.testConfig.users.admin.username, browser.params.testConfig.users.admin.password);
await navigationBarPage.clickLogoutButton();
const actualUrl = await browser.getCurrentUrl();
await expect(actualUrl).toEqual(browser.baseUrl + '/login');
});
});
-39
View File
@@ -1,39 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* 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 { SettingsPage, LocalStorageUtil } from '@alfresco/adf-testing';
import { LoginShellPage } from '../../core/pages/login-shell.page';
describe('Login component - Remember Me', () => {
const settingsPage = new SettingsPage();
const loginPage = new LoginShellPage();
beforeAll(async () => {
await LocalStorageUtil.setStorageItem('authType', 'BASIC');
await loginPage.goToLoginPage();
await loginPage.clickSettingsIcon();
await settingsPage.setProviderEcmBpm();
});
it('[C260501] Should Remember me checkbox not be present in the login if the property showRememberMe is false', async () => {
await loginPage.checkRememberIsDisplayed();
await loginPage.disableRememberMe();
await loginPage.checkRememberIsNotDisplayed();
});
});
-124
View File
@@ -1,124 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* 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 { createApiService, LoginPage, UserModel, UsersActions } from '@alfresco/adf-testing';
import { NotificationDemoPage } from '../core/pages/notification.page';
import { browser } from 'protractor';
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
describe('Notifications Component', () => {
const loginPage = new LoginPage();
const notificationPage = new NotificationDemoPage();
const navigationBarPage = new NavigationBarPage();
const apiService = createApiService();
const usersActions = new UsersActions(apiService);
let acsUser: UserModel;
beforeAll(async () => {
await apiService.loginWithProfile('admin');
acsUser = await usersActions.createUser();
await apiService.login(acsUser.username, acsUser.password);
await loginPage.login(acsUser.username, acsUser.password);
await notificationPage.goToNotificationsPage();
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
});
beforeEach(async () => {
await notificationPage.enterDurationField(3000);
});
afterEach(async () => {
await notificationPage.snackbarPage.waitForSnackBarToClose();
await browser.executeScript(`document.querySelector('button[data-automation-id="notification-custom-dismiss-button"]').click();`);
});
it('[C279979] Should not show notification when the message is empty and button is clicked', async () => {
await notificationPage.clearMessage();
await notificationPage.clickNotificationButton();
await expect(await notificationPage.snackbarPage.isNotificationSnackBarDisplayed()).toEqual(false);
});
it('[C279977] Should show notification when the message is not empty and button is clicked', async () => {
await notificationPage.enterMessageField('test');
await notificationPage.clickNotificationButton();
await expect(await notificationPage.snackbarPage.getSnackBarMessage()).toEqual('test');
});
it('[C279978] Should show notification with action when the message is not empty and button is clicked', async () => {
await notificationPage.enterMessageField('test');
await notificationPage.clickActionToggle();
await notificationPage.clickNotificationButton();
await expect(await notificationPage.snackbarPage.getSnackBarMessage()).toEqual('test');
await notificationPage.clickActionButton();
await notificationPage.checkActionEvent();
await notificationPage.clickActionToggle();
});
it('[C279981] Should show notification with action when the message is not empty and custom configuration button is clicked', async () => {
await notificationPage.enterMessageField('test');
await notificationPage.clickNotificationButton();
await expect(await notificationPage.snackbarPage.isNotificationSnackBarDisplayed()).toEqual(true);
});
it('[C280000] Should show notification with action when the message is not empty and custom button is clicked', async () => {
await notificationPage.enterMessageField('test');
await notificationPage.clickActionToggle();
await notificationPage.clickNotificationButton();
await expect(await notificationPage.snackbarPage.isNotificationSnackBarDisplayed()).toEqual(true);
await expect(await notificationPage.snackbarPage.getSnackBarMessage()).toEqual('test');
await notificationPage.snackbarPage.waitForSnackBarToClose();
await notificationPage.clickNotificationButton();
await notificationPage.clickActionButton();
await notificationPage.checkActionEvent();
await notificationPage.clickActionToggle();
});
it('[C694098] Should show a decorative icon when the message and the icon fields are not empty and button is clicked', async () => {
await notificationPage.enterMessageField('test');
await notificationPage.enterDecorativeIconField('folder');
await notificationPage.clickNotificationButton();
await expect(await notificationPage.snackbarPage.getSnackBarDecorativeIcon()).toEqual('folder');
});
it('[C279987] Should show custom notification during a limited time when a duration is added', async () => {
await notificationPage.enterMessageField('test');
await notificationPage.enterDurationField(1000);
await notificationPage.clickNotificationButton();
await expect(await notificationPage.snackbarPage.isNotificationSnackBarDisplayed()).toEqual(true);
await browser.sleep(2000);
await expect(await notificationPage.snackbarPage.isNotificationSnackBarDisplayed()).toEqual(false);
});
it('[C280001] Should meet configuration when a custom notification is set', async () => {
await notificationPage.enterMessageField('test');
await notificationPage.enterDurationField(1000);
await notificationPage.selectHorizontalPosition('Right');
await notificationPage.selectVerticalPosition('Top');
await notificationPage.selectDirection('Left to right');
await notificationPage.clickNotificationButton();
await expect(await notificationPage.getConfigObject()).toBe('{"direction": "ltr", "duration": "1000", "horizontalPosition": "right", "verticalPosition": "top"}');
});
});
-252
View File
@@ -1,252 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* 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 { $, by, element } from 'protractor';
import {
BrowserVisibility,
BrowserActions,
CardTextItemPage,
DropdownPage,
CardBooleanItemPage
} from '@alfresco/adf-testing';
export class CardViewComponentPage {
addButton = element(by.className('adf-card-view__key-value-pairs__add-btn'));
nameCardTextItem = new CardTextItemPage('name');
booleanCardBooleanItem = new CardBooleanItemPage('boolean');
intField = $(`input[data-automation-id='card-textitem-editinput-int']`);
floatField = $(`input[data-automation-id='card-textitem-editinput-float']`);
valueInputField = element(by.xpath(`//*[contains(@id,'input') and @placeholder='Value']`));
nameInputField = element(by.xpath(`//*[contains(@id,'input') and @placeholder='Name']`));
consoleLog = element(by.className('app-console'));
deleteButton = element.all(by.className('adf-card-view__key-value-pairs__remove-btn')).first();
resetButton = $(`#adf-reset-card-log`);
editableSwitch = $('#app-toggle-editable');
clearDateSwitch = $('#app-toggle-clear-date');
noneOptionSwitch = $('#app-toggle-none-option');
clickableField = $(`[data-automation-id="card-textitem-toggle-click"]`);
selectDropdown = new DropdownPage($('mat-select[data-automation-class="select-box"]'));
async clickOnAddButton(): Promise<void> {
await BrowserActions.click(this.addButton);
}
async checkNameTextLabelIsPresent(): Promise<void> {
await this.nameCardTextItem.checkLabelIsPresent();
}
async getNameTextFieldText(): Promise<string> {
return this.nameCardTextItem.getFieldValue();
}
async enterNameTextField(text: string): Promise<void> {
await this.nameCardTextItem.enterTextField(text);
}
async clickOnNameTextSaveIcon(): Promise<void> {
await this.nameCardTextItem.clickOnSaveButton();
}
async clickOnNameTextClearIcon(): Promise<void> {
await this.nameCardTextItem.clickOnClearButton();
}
async clickOnResetButton(): Promise<void> {
await BrowserActions.click(this.resetButton);
}
async clickOnIntField(): Promise<void> {
const toggleText = $('div[data-automation-id="card-textitem-toggle-int"]');
await BrowserActions.click(toggleText);
await BrowserVisibility.waitUntilElementIsVisible(this.intField);
}
async clickOnIntClearIcon(): Promise<void> {
const clearIcon = $('button[data-automation-id="card-textitem-reset-int"]');
await BrowserActions.click(clearIcon);
}
async clickOnIntSaveIcon(): Promise<void> {
const saveIcon = $('button[data-automation-id="card-textitem-update-int"]');
await BrowserActions.click(saveIcon);
}
async enterIntField(text): Promise<void> {
await BrowserActions.clearSendKeys(this.intField, text);
}
getIntFieldText(): Promise<string> {
const textField = $('span[data-automation-id="card-textitem-value-int"]');
return BrowserActions.getText(textField);
}
getErrorInt(): Promise<string> {
const errorElement = $('mat-error[data-automation-id="card-textitem-error-int"]');
return BrowserActions.getText(errorElement);
}
async clickOnFloatField(): Promise<void> {
const toggleText = $('div[data-automation-id="card-textitem-toggle-float"]');
await BrowserActions.click(toggleText);
await BrowserVisibility.waitUntilElementIsVisible(this.floatField);
}
async clickOnFloatClearIcon(): Promise<void> {
const clearIcon = $(`button[data-automation-id="card-textitem-reset-float"]`);
await BrowserActions.click(clearIcon);
}
async clickOnFloatSaveIcon(): Promise<void> {
const saveIcon = $(`button[data-automation-id="card-textitem-update-float"]`);
await BrowserActions.click(saveIcon);
}
async enterFloatField(text): Promise<void> {
await BrowserActions.clearSendKeys(this.floatField, text);
}
getFloatFieldText(): Promise<string> {
const textField = $('span[data-automation-id="card-textitem-value-float"]');
return BrowserActions.getText(textField);
}
getErrorFloat(): Promise<string> {
const errorElement = $('mat-error[data-automation-id="card-textitem-error-float"]');
return BrowserActions.getText(errorElement);
}
async setName(name: string): Promise<void> {
await BrowserActions.clearSendKeys(this.nameInputField, name);
}
async setValue(value): Promise<void> {
await BrowserActions.clearSendKeys(this.valueInputField, value);
}
async waitForOutput(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.consoleLog);
}
getOutputText(index: number): Promise<string> {
return BrowserActions.getText(this.consoleLog.$$('p').get(index));
}
async deletePairsValues(): Promise<void> {
await BrowserActions.click(this.deleteButton);
}
async clickSelectBox(): Promise<void> {
await this.selectDropdown.clickDropdown();
await this.selectDropdown.checkOptionsPanelIsDisplayed();
}
async checkboxClick(): Promise<void> {
await this.booleanCardBooleanItem.checkboxClick();
}
async checkBooleanLabelIsPresent(): Promise<void> {
await this.booleanCardBooleanItem.checkLabelIsPresent();
}
async selectValueFromComboBox(index): Promise<void> {
await this.selectDropdown.selectOptionFromIndex(index);
}
async disableEdit(): Promise<void> {
const check = await BrowserActions.getAttribute(this.editableSwitch, 'class');
if (check.indexOf('mat-checked') > -1) {
await BrowserActions.click(this.editableSwitch);
await expect(await BrowserActions.getAttribute(this.editableSwitch, 'class')).not.toContain('mat-checked');
}
}
async getDateValue(): Promise<string> {
const dateValue = $('span[data-automation-id="card-date-value-date"]');
return dateValue.getText();
}
async getDateTimeValue(): Promise<string> {
const dateTimeValue = $('span[data-automation-id="card-datetime-value-datetime"]');
return dateTimeValue.getText();
}
async clearDateField(): Promise<void> {
const clearDateButton = $('mat-icon[data-automation-id="datepicker-date-clear-date"]');
await BrowserActions.click(clearDateButton);
}
async clearDateTimeField(): Promise<void> {
const clearDateButton = $('mat-icon[data-automation-id="datepicker-date-clear-datetime"]');
await BrowserActions.click(clearDateButton);
}
async enableClearDate(): Promise<void> {
const switchClass = await BrowserActions.getAttribute(this.editableSwitch, 'class');
if (switchClass.indexOf('mat-checked') === -1) {
await this.clearDateSwitch.click();
const clearDateChecked = $('mat-slide-toggle[id="app-toggle-clear-date"][class*="mat-checked"]');
await BrowserVisibility.waitUntilElementIsVisible(clearDateChecked);
}
}
async enableNoneOption(): Promise<void> {
const switchClass = await BrowserActions.getAttribute(this.noneOptionSwitch, 'class');
if (switchClass.indexOf('mat-checked') === -1) {
await this.noneOptionSwitch.click();
const noneOptionChecked = $('mat-slide-toggle[id="app-toggle-none-option"][class*="mat-checked"]');
await BrowserVisibility.waitUntilElementIsVisible(noneOptionChecked);
}
}
async isErrorNotDisplayed(): Promise<boolean> {
const errorElement = $('mat-error[data-automation-id="card-textitem-error-int"]');
try {
await BrowserVisibility.waitUntilElementIsNotVisible(errorElement);
return true;
} catch {
return false;
}
}
async getClickableValue(): Promise<string> {
return this.clickableField.getText();
}
async updateClickableField(text: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.clickableField);
await BrowserActions.click(this.clickableField);
const inputField = $('input[data-automation-id="card-textitem-editinput-click"]');
await BrowserVisibility.waitUntilElementIsPresent(inputField);
await BrowserActions.clearSendKeys(inputField, text);
const save = $('[data-automation-id="card-textitem-update-click"]');
await BrowserVisibility.waitUntilElementIsVisible(save);
await BrowserActions.click(save);
}
async hasCardViewConsoleLog(text: string): Promise<string> {
const cardViewConsole = element(by.cssContainingText('.app-console', text));
await BrowserVisibility.waitUntilElementIsVisible(cardViewConsole);
return cardViewConsole.getText();
}
async clearIntField(): Promise<void> {
await this.intField.clear();
}
}
+9 -9
View File
@@ -69,17 +69,17 @@ export class ContentServicesPage {
emptyFolderImage = $('.adf-empty-folder-image');
gridViewButton = $('button[data-automation-id="document-list-grid-view"]');
cardViewContainer = $('div.app-document-list-container div.adf-datatable-card');
shareNodeButton = element(by.cssContainingText('mat-icon', ' share '));
shareNodeButton = element(by.cssContainingText('mat-icon', 'share'));
nameColumnHeader = 'name';
createdByColumnHeader = 'createdByUser.displayName';
createdColumnHeader = 'createdAt';
deleteContentElement = $('button[data-automation-id*="DELETE"]');
metadataAction = $('button[data-automation-id*="METADATA"]');
versionManagerAction = $('button[data-automation-id*="VERSIONS"]');
moveContentElement = $('button[data-automation-id*="MOVE"]');
copyContentElement = $('button[data-automation-id*="COPY"]');
lockContentElement = $('button[data-automation-id="DOCUMENT_LIST.ACTIONS.LOCK"]');
downloadContent = $('button[data-automation-id*="DOWNLOAD"]');
deleteContentElement = $('button[data-automation-id="Delete"]');
metadataAction = $('button[data-automation-id="Info"]');
versionManagerAction = $('button[data-automation-id="Manage versions"]');
moveContentElement = $('button[data-automation-id="Move"]');
copyContentElement = $('button[data-automation-id="Copy"]');
lockContentElement = $('button[data-automation-id="Lock"]');
downloadContent = $('button[data-automation-id="Download"]');
downloadButton = $('button[title="Download"]');
favoriteButton = $('button[data-automation-id="favorite"]');
markedFavorite = element(by.cssContainingText('button[data-automation-id="favorite"] mat-icon', 'star'));
@@ -124,7 +124,7 @@ export class ContentServicesPage {
async checkDeleteIsDisabled(content): Promise<void> {
await this.contentList.clickOnActionMenu(content);
const disabledDelete = $(`button[data-automation-id*='DELETE'][disabled='true']`);
const disabledDelete = $(`button[data-automation-id='Delete'][disabled='true']`);
await BrowserVisibility.waitUntilElementIsVisible(disabledDelete);
}
-86
View File
@@ -1,86 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* 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 { BrowserActions, BrowserVisibility, DataTableComponentPage, DropdownPage } from '@alfresco/adf-testing';
import { $, $$, browser, by, element, ElementFinder, protractor } from 'protractor';
export class DataTablePage {
columns = {
id: 'Id',
name: 'Name',
createdBy: 'Created By',
json: 'Json'
};
data = {
copyClipboardDataTable: 'copyClipboard-datatable',
defaultTable: 'datatable'
};
dataTable: DataTableComponentPage;
reset = element(by.xpath(`//span[contains(text(),'Reset to default')]/..`));
allSelectedRows = $$(`adf-datatable-row[class*='is-selected']`);
selectedRowNumber = $(`adf-datatable-row[class*='is-selected'] div[data-automation-id*='text_']`);
idColumnHeader = $(`div[data-automation-id='auto_id_id']`);
selectModeDropdown = new DropdownPage($(`mat-select[data-automation-id='datatable-selection-mode']`));
constructor(data?) {
if (this.data[data]) {
this.dataTable = new DataTableComponentPage($(`div[data-automation-id='` + this.data[data] + `']`));
} else {
this.dataTable = new DataTableComponentPage($(`div[data-automation-id='` + this.data.defaultTable + `']`));
}
}
async checkRowIsNotSelected(rowNumber: string): Promise<void> {
const isRowSelected = this.dataTable.getCellElementByValue(this.columns.id, rowNumber)
.element(by.xpath(`ancestor::adf-datatable-row[contains(@class, 'adf-datatable-row custom-row-style ng-star-inserted is-selected')]`));
await BrowserVisibility.waitUntilElementIsNotVisible(isRowSelected);
}
async checkNoRowIsSelected(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.selectedRowNumber);
}
async getNumberOfSelectedRows(): Promise<number> {
return this.allSelectedRows.count();
}
async selectRow(rowNumber: string): Promise<void> {
const row = this.dataTable.getCellElementByValue(this.columns.id, rowNumber);
await BrowserActions.click(row);
}
async selectRowWithKeyboard(rowNumber: string): Promise<void> {
await browser.actions().sendKeys(protractor.Key.COMMAND).perform();
await this.selectRow(rowNumber);
await browser.actions().sendKeys(protractor.Key.NULL).perform();
}
async selectSelectionMode(selectionMode: string): Promise<void> {
await this.selectModeDropdown.selectDropdownOption(selectionMode);
}
getDropTargetIdColumnCell(rowNumber: number): ElementFinder {
return this.dataTable.getCellByRowNumberAndColumnName(rowNumber - 1, this.columns.id);
}
getDropTargetIdColumnHeader(): ElementFinder {
return this.idColumnHeader;
}
}
@@ -96,14 +96,6 @@ export class ShareDialogPage {
await this.dateTimePickerPage.setDate(tomorrow);
}
async setDefaultHour(): Promise<void> {
await this.dateTimePickerPage.dateTime.setDefaultEnabledHour();
}
async setDefaultMinutes() {
await this.dateTimePickerPage.dateTime.setDefaultEnabledMinutes();
}
async dateTimePickerDialogIsClosed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsStale($('mat-datetimepicker-content'));
}
-43
View File
@@ -1,43 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* 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 { $, ElementFinder } from 'protractor';
import { BrowserVisibility } from '@alfresco/adf-testing';
export class IconsPage {
locateCustomIcon = (name: string): ElementFinder => $(`adf-icon[value='${name}'] svg`);
locateLigatureIcon = (name: string): ElementFinder => $(`adf-icon[value='${name}'] .material-icons`);
async isCustomIconDisplayed(name: string) {
const present = await BrowserVisibility.waitUntilElementIsVisible(this.locateCustomIcon(name));
if (present) {
return this.locateCustomIcon(name).isDisplayed();
} else {
return false;
}
}
async isLigatureIconDisplayed(name: string) {
const present = await BrowserVisibility.waitUntilElementIsVisible(this.locateLigatureIcon(name));
if (present) {
return this.locateLigatureIcon(name).isDisplayed();
} else {
return false;
}
}
}
+5 -138
View File
@@ -15,41 +15,15 @@
* limitations under the License.
*/
import { $, browser, by, element } from 'protractor';
import { TogglePage, BrowserActions, BrowserVisibility, LoginPage } from '@alfresco/adf-testing';
import { $ } from 'protractor';
import { BrowserActions, BrowserVisibility } from '@alfresco/adf-testing';
export class LoginShellPage {
loginURL = browser.baseUrl + '/login';
loginSSOPage = new LoginPage();
togglePage = new TogglePage();
txtUsername = $('input[id="username"]');
txtPassword = $('input[id="password"]');
logoImg = $('img[id="adf-login-img-logo"]');
logoTxt = $('input[data-automation-id="adf-url-logo"]');
usernameError = $('span[data-automation-id="username-error"]');
usernameInactive = $('input[id="username"][class*="ng-invalid"]');
adfLogo = $('.adf-img-logo');
usernameHighlighted = $('input[id="username"][aria-invalid="true"]');
signInButton = $('#login-button');
showPasswordElement = $('button[data-automation-id="show_password"]');
hidePasswordElement = $('button[data-automation-id="hide_password"]');
rememberMe = $('mat-checkbox[id="adf-login-remember"]');
needHelp = $('#adf-login-action-left');
register = $('#adf-login-action-right');
footerSwitch = $('#switch4');
rememberMeSwitch = $('#adf-toggle-show-rememberme');
logoSwitch = $('#adf-toggle-logo');
header = $('#adf-header');
settingsIcon = element(by.cssContainingText('a[data-automation-id="settings"] mat-icon', 'settings'));
private txtUsername = $('input[id="username"]');
private txtPassword = $('input[id="password"]');
private signInButton = $('#login-button');
sidenavLayout = $(`[data-automation-id="sidenav-layout"]`);
async goToLoginPage(): Promise<void> {
await BrowserActions.getUrl(this.loginURL);
await this.waitForElements();
}
async waitForElements(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.txtUsername);
await BrowserVisibility.waitUntilElementIsVisible(this.txtPassword);
@@ -63,114 +37,7 @@ export class LoginShellPage {
await BrowserActions.clearSendKeys(this.txtPassword, password);
}
async clearUsername(): Promise<void> {
await BrowserActions.click(this.txtUsername);
await BrowserActions.clearWithBackSpace(this.txtUsername);
}
async clearPassword(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.txtPassword);
await BrowserActions.clearWithBackSpace(this.txtPassword);
}
async getUsernameTooltip(): Promise<string> {
return BrowserActions.getText(this.usernameError);
}
async checkLoginImgURL(): Promise<string> {
return BrowserActions.getAttribute(this.logoImg, 'src');
}
async checkUsernameInactive(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.usernameInactive);
}
async checkUsernameHighlighted(): Promise<void> {
await BrowserActions.click(this.adfLogo);
await BrowserVisibility.waitUntilElementIsVisible(this.usernameHighlighted);
}
async checkUsernameTooltipIsNotVisible(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.usernameError);
}
async getSignInButtonIsEnabled(): Promise<boolean> {
return this.signInButton.isEnabled();
}
async clickSignInButton(): Promise<void> {
await BrowserActions.click(this.signInButton);
}
async clickSettingsIcon(): Promise<void> {
await BrowserActions.click(this.settingsIcon);
}
async showPassword(): Promise<void> {
await BrowserActions.click(this.showPasswordElement);
}
async hidePassword(): Promise<void> {
await BrowserActions.click(this.hidePasswordElement);
}
async getShownPassword(): Promise<string> {
return BrowserActions.getInputValue(this.txtPassword);
}
async checkPasswordIsHidden(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.txtPassword);
}
async checkRememberIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.rememberMe);
}
async checkRememberIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.rememberMe);
}
async checkNeedHelpIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.needHelp);
}
async checkNeedHelpIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.needHelp);
}
async checkRegisterDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.register);
}
async checkRegisterIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.register);
}
async enableFooter(): Promise<void> {
await this.togglePage.enableToggle(this.footerSwitch);
}
async disableFooter(): Promise<void> {
await this.togglePage.disableToggle(this.footerSwitch);
}
async disableRememberMe(): Promise<void> {
await this.togglePage.disableToggle(this.rememberMeSwitch);
}
async enableLogoSwitch(): Promise<void> {
await this.togglePage.enableToggle(this.logoSwitch);
}
async enterLogo(logo: string): Promise<void> {
await BrowserActions.clearSendKeys(this.logoTxt, logo);
}
async login(username: string, password: string): Promise<void> {
await this.loginSSOPage.login(username, password);
}
async loginWithProfile(profile: string): Promise<void> {
await this.loginSSOPage.loginWithProfile(profile);
}
}
-28
View File
@@ -1,28 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* 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 { $ } from 'protractor';
import { BrowserVisibility } from '@alfresco/adf-testing';
export class LogoutPage {
logoutSection = $('div[data-automation-id="adf-logout-section"]');
async checkLogoutSectionIsDisplayed() {
await BrowserVisibility.waitUntilElementIsVisible(this.logoutSection);
}
}
-27
View File
@@ -21,8 +21,6 @@ import { ProcessServicesPage } from '../../process-services/pages/process-servic
export class NavigationBarPage {
linkMenuChildrenContainer = $('.nestedMenu');
dataTableNestedButton = this.linkMenuChildrenContainer.$('.app-sidenav-link[data-automation-id="Datatable"]');
dataTableDragAndDropButton = this.linkMenuChildrenContainer.$('.app-sidenav-link[data-automation-id="Drag and Drop"]');
processServicesNestedButton = this.linkMenuChildrenContainer.$('.app-sidenav-link[data-automation-id="App"]');
processServicesCloudHomeButton = this.linkMenuChildrenContainer.$('.app-sidenav-link[data-automation-id="Home"]');
formButton = this.linkMenuChildrenContainer.$('.app-sidenav-link[data-automation-id="Form"]');
@@ -100,31 +98,6 @@ export class NavigationBarPage {
await this.clickNavigationBarItem('Custom Sources');
}
async clickDataTable(): Promise<void> {
await this.clickNavigationBarItem('Datatable');
await BrowserVisibility.waitUntilElementIsVisible(this.linkMenuChildrenContainer);
}
async navigateToDatatable(): Promise<void> {
await this.clickDataTable();
await BrowserActions.click(this.dataTableNestedButton);
await BrowserVisibility.waitUntilElementIsNotPresent(this.linkMenuChildrenContainer);
}
async navigateToDragAndDropDatatable(): Promise<void> {
await this.clickDataTable();
await BrowserActions.click(this.dataTableDragAndDropButton);
await BrowserVisibility.waitUntilElementIsNotPresent(this.linkMenuChildrenContainer);
}
async clickTagButton(): Promise<void> {
await this.clickNavigationBarItem('Tag');
}
async clickSocialButton(): Promise<void> {
await this.clickNavigationBarItem('Social');
}
async clickOverlayViewerButton(): Promise<void> {
await this.clickNavigationBarItem('Overlay Viewer');
}
-95
View File
@@ -1,95 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* 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 { element, by, browser, $, $$ } from 'protractor';
import { BrowserVisibility, BrowserActions, DropdownPage, SnackbarPage } from '@alfresco/adf-testing';
export class NotificationDemoPage {
snackbarPage = new SnackbarPage();
messageField = $('input[data-automation-id="notification-message"]');
decorativeIconField = $('input[data-automation-id="notification-icon"]');
durationField = $('input[data-automation-id="notification-duration"]');
actionToggle = $('mat-slide-toggle[data-automation-id="notification-action-toggle"]');
notificationSnackBar = $$('simple-snack-bar').first();
actionOutput = $('div[data-automation-id="notification-action-output"]');
notificationsPage = $('.app-sidenav-link[data-automation-id="Notifications"]');
notificationConfig = $('p[data-automation-id="notification-custom-object"]');
horizontalPositionDropdown = new DropdownPage($('mat-select[data-automation-id="notification-horizontal-position"]'));
verticalPositionDropdown = new DropdownPage($('mat-select[data-automation-id="notification-vertical-position"]'));
directionDropdown = new DropdownPage($('mat-select[data-automation-id="notification-direction"]'));
async checkNotifyContains(message): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(element.all(by.cssContainingText('simple-snack-bar', message)).first());
}
async goToNotificationsPage(): Promise<void> {
await BrowserActions.click(this.notificationsPage);
}
getConfigObject(): Promise<string> {
return BrowserActions.getText(this.notificationConfig);
}
async enterMessageField(text: string): Promise<void> {
await BrowserActions.clearSendKeys(this.messageField, text);
}
async enterDecorativeIconField(icon: string): Promise<void> {
await BrowserActions.clearSendKeys(this.decorativeIconField, icon);
}
async enterDurationField(time: number): Promise<void> {
await BrowserActions.clearSendKeys(this.durationField, time.toString());
}
async selectHorizontalPosition(selectItem: string): Promise<void> {
await this.horizontalPositionDropdown.selectDropdownOption(selectItem);
}
async selectVerticalPosition(selectItem: string): Promise<void> {
await this.verticalPositionDropdown.selectDropdownOption(selectItem);
}
async selectDirection(selectItem: string): Promise<void> {
await this.directionDropdown.selectDropdownOption(selectItem);
}
async clickNotificationButton(): Promise<void> {
const button = $('button[data-automation-id="notification-custom-config-button"]');
await BrowserActions.click(button);
}
async checkActionEvent(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.actionOutput);
}
async clickActionToggle(): Promise<void> {
await BrowserActions.click(this.actionToggle);
}
async clickActionButton(): Promise<void> {
await browser.executeScript(`document.querySelector("[data-automation-id='adf-snackbar-message-content-action-button']").click();`);
}
async clearMessage(): Promise<void> {
await BrowserActions.click(this.messageField);
await BrowserActions.clearWithBackSpace(this.messageField);
}
}
+7 -19
View File
@@ -19,28 +19,21 @@ import { BrowserActions, BrowserVisibility, DocumentListPage } from '@alfresco/a
import { browser, $$, $ } from 'protractor';
export class TrashcanPage {
contentList = new DocumentListPage($('adf-document-list'));
rows = $$('adf-document-list div[class*="adf-datatable-body"] adf-datatable-row[class*="adf-datatable-row"]');
tableBody = $$('adf-document-list .adf-datatable-body').first();
pagination = $('adf-pagination');
emptyTrashcan = $('adf-empty-content');
restoreButton = $(`button[title='Restore']`);
private contentList = new DocumentListPage($('adf-document-list'));
private restoreButton = $(`button[title='Restore']`);
async numberOfResultsDisplayed(): Promise<number> {
return this.rows.count();
const rows = $$('adf-document-list div[class*="adf-datatable-body"] adf-datatable-row[class*="adf-datatable-row"]');
return rows.count();
}
async waitForTableBody(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.tableBody);
}
async waitForPagination(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.pagination);
const tableBody = $$('adf-document-list .adf-datatable-body').first();
await BrowserVisibility.waitUntilElementIsVisible(tableBody);
}
async checkTrashcanIsEmpty(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.emptyTrashcan);
await BrowserVisibility.waitUntilElementIsVisible($('adf-empty-content'));
}
getDocumentList(): DocumentListPage {
@@ -55,9 +48,4 @@ export class TrashcanPage {
async checkRestoreButtonIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.restoreButton);
}
async checkRestoreButtonIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.restoreButton);
}
}
+1 -26
View File
@@ -17,7 +17,6 @@
import { browser } from 'protractor';
import { createApiService,
DataTableComponentPage,
LoginPage,
UploadActions,
UserModel,
@@ -35,7 +34,6 @@ describe('Viewer', () => {
const contentServicesPage = new ContentServicesPage();
const loginPage = new LoginPage();
const navigationBarPage = new NavigationBarPage();
const dataTable = new DataTableComponentPage();
const pngFile = new FileModel({
name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
@@ -168,28 +166,5 @@ describe('Viewer', () => {
await viewerPage.checkLeftSideBarButtonIsNotDisplayed();
await viewerPage.checkLeftSideBarIsNotDisplayed();
});
});
fit('[C260100] Should be possible to disable Overlay viewer', async () => {
await navigationBarPage.clickOverlayViewerButton();
await dataTable.doubleClickRow('Name', fileForOverlay.name);
await viewerPage.checkOverlayViewerIsDisplayed();
await viewerPage.clickCloseButton();
await dataTable.doubleClickRow('Name', pngFile.name);
await viewerPage.checkOverlayViewerIsDisplayed();
await viewerPage.clickCloseButton();
await viewerPage.disableOverlay();
await dataTable.doubleClickRow('Name', fileForOverlay.name);
await viewerPage.checkImgContainerIsDisplayed();
await viewerPage.checkInlineViewerIsDisplayed();
await dataTable.doubleClickRow('Name', pngFile.name);
await viewerPage.checkImgContainerIsDisplayed();
await viewerPage.checkInlineViewerIsDisplayed();
});
})
;
});