mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-06-30 18:15:11 +00:00
[AAE-2021] Automate About component (#5499)
* * Added unit tests to the about-github-link component. * Removed unused css * * Added unit tests to the about module and prodcut-version components * * Automated about page * * Fixed comments * * FIxed failing unit tests on attach-file-widget component. * * After rebase
This commit is contained in:
parent
2cf36c2862
commit
5fb7879900
64
e2e/content-services/about-content-services.component.e2e.ts
Normal file
64
e2e/content-services/about-content-services.component.e2e.ts
Normal file
@ -0,0 +1,64 @@
|
||||
/*!
|
||||
* @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 { LoginPage, AboutPage } from '@alfresco/adf-testing';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { AcsUserModel } from '../models/ACS/acs-user.model';
|
||||
|
||||
describe('About Content Services', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const aboutPage = new AboutPage();
|
||||
const acsUser = new AcsUserModel();
|
||||
|
||||
beforeAll(async() => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await navigationBarPage.clickAboutButton();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C280002] Should be able to view about content services info', async () => {
|
||||
await aboutPage.checkAppTitleIsDisplayed();
|
||||
await aboutPage.checkSourceCodeTitleIsDisplayed();
|
||||
await aboutPage.checkGithubUrlIsDisplayed();
|
||||
await aboutPage.checkGithubVersionIsDisplayed();
|
||||
await aboutPage.checkEcmHostIsDisplayed();
|
||||
await aboutPage.checkEcmEditionIsDisplayed();
|
||||
await aboutPage.checkEcmVersionIsDisplayed();
|
||||
await aboutPage.checkAboutListIsLoaded();
|
||||
await aboutPage.checkPackageColumnsIsDisplayed();
|
||||
await aboutPage.checkEcmStatusTitleIsDisplayed();
|
||||
await aboutPage.checkStatusColumnsIsDisplayed();
|
||||
await aboutPage.checkEcmLicenseTitleIsDisplayed();
|
||||
await aboutPage.checkLicenseColumnsIsDisplayed();
|
||||
await aboutPage.checkEcmModulesTitleIsDisplayed();
|
||||
await aboutPage.checkModulesColumnsIsDisplayed();
|
||||
});
|
||||
});
|
@ -0,0 +1,53 @@
|
||||
/*!
|
||||
* @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 { ApiService, IdentityService, AboutPage, LoginSSOPage } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
|
||||
describe('About Process Services Cloud', () => {
|
||||
|
||||
const loginSSOPage = new LoginSSOPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const aboutPage = new AboutPage();
|
||||
let identityService: IdentityService;
|
||||
let testUser;
|
||||
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, 'BPM');
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||
identityService = new IdentityService(apiService);
|
||||
testUser = await identityService.createIdentityUserWithRole(apiService, [identityService.ROLES.ACTIVITI_USER, identityService.ROLES.ACTIVITI_DEVOPS]);
|
||||
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await navigationBarPage.clickAboutButton();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
||||
});
|
||||
|
||||
it('[C280002] Should be able to view about process services cloud info', async () => {
|
||||
await aboutPage.checkAppTitleIsDisplayed();
|
||||
await aboutPage.checkSourceCodeTitleIsDisplayed();
|
||||
await aboutPage.checkGithubUrlIsDisplayed();
|
||||
await aboutPage.checkGithubVersionIsDisplayed();
|
||||
await aboutPage.checkBpmHostIsDisplayed();
|
||||
await aboutPage.checkEcmHostIsDisplayed();
|
||||
});
|
||||
});
|
62
e2e/process-services/about-process-services.e2e.ts
Normal file
62
e2e/process-services/about-process-services.e2e.ts
Normal file
@ -0,0 +1,62 @@
|
||||
/*!
|
||||
* @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 { LoginPage, AboutPage } from '@alfresco/adf-testing';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { browser } from 'protractor';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
|
||||
describe('About Process Services', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const aboutPage = new AboutPage();
|
||||
let user, tenantId;
|
||||
|
||||
beforeAll(async() => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'BPM',
|
||||
hostBpm: browser.params.testConfig.adf_aps.host
|
||||
});
|
||||
const users = new UsersActions();
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||
tenantId = user.tenantId;
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
await navigationBarPage.clickAboutButton();
|
||||
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(tenantId);
|
||||
});
|
||||
|
||||
it('[C280002] Should be able to view about process services info', async () => {
|
||||
await aboutPage.checkAppTitleIsDisplayed();
|
||||
await aboutPage.checkSourceCodeTitleIsDisplayed();
|
||||
await aboutPage.checkGithubUrlIsDisplayed();
|
||||
await aboutPage.checkGithubVersionIsDisplayed();
|
||||
await aboutPage.checkBpmHostIsDisplayed();
|
||||
await aboutPage.checkBpmEditionIsDisplayed();
|
||||
await aboutPage.checkBpmVersionIsDisplayed();
|
||||
await aboutPage.checkAboutListIsLoaded();
|
||||
await aboutPage.checkPackageColumnsIsDisplayed();
|
||||
});
|
||||
});
|
@ -1,6 +1,5 @@
|
||||
<div class="adf-about-product-version-container" *ngIf="bpmVersion || ecmVersion">
|
||||
<h3 data-automation-id="adf-about-product-version-title">{{ 'ABOUT.VERSIONS.TITLE' | translate }}</h3>
|
||||
<div *ngIf="bpmVersion">
|
||||
<mat-card>
|
||||
<div *ngIf="bpmVersion" data-automation-id="adf-about-bpm-service">
|
||||
<h3>{{ 'ABOUT.VERSIONS.PROCESS_SERVICE' | translate }}</h3>
|
||||
@ -12,7 +11,6 @@
|
||||
bpmVersion.minorVersion }}.{{ bpmVersion.revisionVersion }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="ecmVersion" data-automation-id="adf-about-ecm-service">
|
||||
<h3>{{ 'ABOUT.VERSIONS.CONTENT_SERVICE' | translate }}</h3>
|
||||
<p data-automation-id="adf-about-ecm-edition">
|
||||
@ -21,19 +19,17 @@
|
||||
<p data-automation-id="adf-about-ecm-version">
|
||||
{{ 'ABOUT.VERSIONS.LABELS.VERSION' | translate }}: {{ ecmVersion.version.display }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
<div *ngIf="ecmVersion" data-automation-id="adf-about-ecm">
|
||||
<h3>{{ 'ABOUT.VERSIONS.LABELS.LICENSE' | translate }}</h3>
|
||||
<h3 data-automation-id="adf-about-ecm-license-title">{{ 'ABOUT.VERSIONS.LABELS.LICENSE' | translate }}</h3>
|
||||
<adf-datatable [data]="license"></adf-datatable>
|
||||
|
||||
<h3> {{ 'ABOUT.VERSIONS.LABELS.STATUS' | translate }}</h3>
|
||||
<h3 data-automation-id="adf-about-ecm-status-title"> {{ 'ABOUT.VERSIONS.LABELS.STATUS' | translate }}</h3>
|
||||
<adf-datatable [data]="status"></adf-datatable>
|
||||
|
||||
<h3>{{ 'ABOUT.VERSIONS.LABELS.MODULES' | translate }}</h3>
|
||||
<h3 data-automation-id="adf-about-ecm-modules-title">{{ 'ABOUT.VERSIONS.LABELS.MODULES' | translate }}</h3>
|
||||
<adf-datatable [data]="modules"></adf-datatable>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
@ -356,21 +356,26 @@ describe('AttachFileWidgetComponent', () => {
|
||||
});
|
||||
}));
|
||||
|
||||
it('should raise formContentClicked event when show file is clicked', async(() => {
|
||||
it('should raise formContentClicked event when show file is clicked', async() => {
|
||||
spyOn(processContentService, 'getFileRawContent').and.returnValue(of(fakePngAnswer));
|
||||
formService.formContentClicked.subscribe((file) => {
|
||||
expect(file).not.toBeNull();
|
||||
expect(file.id).toBe(1155);
|
||||
});
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
const menuButton: HTMLButtonElement = <HTMLButtonElement> element.querySelector('#file-1155-option-menu');
|
||||
expect(menuButton).not.toBeNull();
|
||||
menuButton.click();
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
const showOption: HTMLButtonElement = <HTMLButtonElement> fixture.debugElement.query(By.css('#file-1155-show-file')).nativeElement;
|
||||
showOption.click();
|
||||
}));
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
});
|
||||
|
||||
it('should not display the show button file when is an external file', async(() => {
|
||||
it('should not display the show button file when is an external file', async() => {
|
||||
fakePngAnswer.isExternal = true;
|
||||
spyOn(processContentService, 'getFileRawContent').and.returnValue(of(fakePngAnswer));
|
||||
|
||||
@ -378,11 +383,12 @@ describe('AttachFileWidgetComponent', () => {
|
||||
expect(menuButton).not.toBeNull();
|
||||
menuButton.click();
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
const showOption: HTMLButtonElement = <HTMLButtonElement> fixture.debugElement.query(By.css('#file-1155-show-file')).nativeElement;
|
||||
expect(showOption.disabled).toBeTruthy();
|
||||
}));
|
||||
});
|
||||
|
||||
it('should not display the download button file when is an external file', async(() => {
|
||||
it('should not display the download button file when is an external file', async() => {
|
||||
fakePngAnswer.isExternal = true;
|
||||
spyOn(processContentService, 'getFileRawContent').and.returnValue(of(fakePngAnswer));
|
||||
|
||||
@ -390,11 +396,12 @@ describe('AttachFileWidgetComponent', () => {
|
||||
expect(menuButton).not.toBeNull();
|
||||
menuButton.click();
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
const downloadOption: HTMLButtonElement = <HTMLButtonElement> fixture.debugElement.query(By.css('#file-1155-download-file')).nativeElement;
|
||||
expect(downloadOption.disabled).toBeTruthy();
|
||||
}));
|
||||
});
|
||||
|
||||
it('should display the download button file when is an internal file', async(() => {
|
||||
it('should display the download button file when is an internal file', async() => {
|
||||
fakePngAnswer.isExternal = false;
|
||||
spyOn(processContentService, 'getFileRawContent').and.returnValue(of(fakePngAnswer));
|
||||
|
||||
@ -402,12 +409,13 @@ describe('AttachFileWidgetComponent', () => {
|
||||
expect(menuButton).not.toBeNull();
|
||||
menuButton.click();
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
const downloadOption: HTMLButtonElement = <HTMLButtonElement> fixture.debugElement.query(By.css('#file-1155-download-file')).nativeElement;
|
||||
expect(downloadOption.disabled).toBeFalsy();
|
||||
|
||||
}));
|
||||
});
|
||||
|
||||
it('should not display the show button file when there is no contentAvailable', async(() => {
|
||||
it('should not display the show button file when there is no contentAvailable', async() => {
|
||||
fakePngAnswer.contentAvailable = false;
|
||||
spyOn(processContentService, 'getFileRawContent').and.returnValue(of(fakePngAnswer));
|
||||
|
||||
@ -415,8 +423,9 @@ describe('AttachFileWidgetComponent', () => {
|
||||
expect(menuButton).not.toBeNull();
|
||||
menuButton.click();
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
const showOption: HTMLButtonElement = <HTMLButtonElement> fixture.debugElement.query(By.css('#file-1155-show-file')).nativeElement;
|
||||
expect(showOption.disabled).toBeTruthy();
|
||||
}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -15,117 +15,150 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, protractor, browser, ElementFinder } from 'protractor';
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||
import { BrowserActions } from '../utils/browser-actions';
|
||||
import { DataTableComponentPage } from './data-table-component.page';
|
||||
|
||||
export class AboutPage {
|
||||
|
||||
checkBox: ElementFinder = element(by.cssContainingText('.mat-checkbox-label', 'Show menu button'));
|
||||
headerColor: ElementFinder = element(by.css('option[value="primary"]'));
|
||||
titleInput: ElementFinder = element(by.css('input[name="title"]'));
|
||||
iconInput: ElementFinder = element(by.css('input[placeholder="URL path"]'));
|
||||
hexColorInput: ElementFinder = element(by.css('input[placeholder="hex color code"]'));
|
||||
logoHyperlinkInput: ElementFinder = element(by.css('input[placeholder="Redirect URL"]'));
|
||||
logoTooltipInput: ElementFinder = element(by.css('input[placeholder="Tooltip text"]'));
|
||||
positionStart: ElementFinder = element.all(by.css('mat-radio-button[value="start"]')).first();
|
||||
positionEnd: ElementFinder = element.all(by.css('mat-radio-button[value="end"]')).first();
|
||||
sideBarPositionRight: ElementFinder = element(by.css('mat-sidenav.mat-drawer.mat-sidenav.mat-drawer-end'));
|
||||
sideBarPositionLeft: ElementFinder = element(by.css('mat-sidenav.mat-drawer.mat-sidenav'));
|
||||
moduleColumns = {
|
||||
id: 'id',
|
||||
title: 'title',
|
||||
installDate: 'installDate',
|
||||
installState: 'installState',
|
||||
versionMin: 'versionMin'
|
||||
};
|
||||
|
||||
async checkShowMenuCheckBoxIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.checkBox);
|
||||
licenseColumns = {
|
||||
issuedAt: 'issuedAt',
|
||||
expiresAt: 'expiresAt',
|
||||
remainingDays: 'remainingDays',
|
||||
holder: 'holder',
|
||||
mode: 'mode'
|
||||
};
|
||||
|
||||
statusColumns = {
|
||||
isReadOnly: 'isReadOnly',
|
||||
isAuditEnabled: 'isAuditEnabled'
|
||||
};
|
||||
|
||||
packageColumns = {
|
||||
name: 'name',
|
||||
version: 'version'
|
||||
};
|
||||
|
||||
appTitle: ElementFinder = element(by.css('[data-automation-id="adf-github-app-title"]'));
|
||||
sourceCodeTitle: ElementFinder = element(by.css('[data-automation-id="adf-github-source-code-title"]'));
|
||||
githubUrl: ElementFinder = element(by.css('[data-automation-id="adf-github-url"]'));
|
||||
githubVersion: ElementFinder = element(by.css('[data-automation-id="adf-github-version"]'));
|
||||
bpmHost: ElementFinder = element(by.css('[data-automation-id="adf-process-service-host"]'));
|
||||
ecmHost: ElementFinder = element(by.css('[data-automation-id="adf-content-service-host"]'));
|
||||
productVersionTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-product-version-title"]'));
|
||||
bpmEdition: ElementFinder = element(by.css('[data-automation-id="adf-about-bpm-edition"]'));
|
||||
ecmEdition: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-edition"]'));
|
||||
bpmVersion: ElementFinder = element(by.css('[data-automation-id="adf-about-bpm-version"]'));
|
||||
ecmVersion: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-version"]'));
|
||||
ecmStatusTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-status-title"]'));
|
||||
ecmLicenseTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-license-title"]'));
|
||||
ecmModulesTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-modules-title"]'));
|
||||
aboutModulesTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-modules-title"]'));
|
||||
|
||||
dataTable: DataTableComponentPage = new DataTableComponentPage();
|
||||
|
||||
getDataTable(): DataTableComponentPage {
|
||||
return this.dataTable;
|
||||
}
|
||||
|
||||
async checkChooseHeaderColourIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.headerColor);
|
||||
async checkStatusColumnsIsDisplayed(): Promise<void> {
|
||||
await this.checkColumnIsDisplayed(this.statusColumns.isAuditEnabled);
|
||||
await this.checkColumnIsDisplayed(this.statusColumns.isReadOnly);
|
||||
}
|
||||
|
||||
async checkChangeTitleIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.titleInput);
|
||||
async checkPackageColumnsIsDisplayed(): Promise<void> {
|
||||
await this.checkColumnIsDisplayed(this.packageColumns.name);
|
||||
await this.checkColumnIsDisplayed(this.packageColumns.version);
|
||||
}
|
||||
|
||||
async checkChangeUrlPathIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.iconInput);
|
||||
async checkLicenseColumnsIsDisplayed(): Promise<void> {
|
||||
await this.checkColumnIsDisplayed(this.licenseColumns.expiresAt);
|
||||
await this.checkColumnIsDisplayed(this.licenseColumns.issuedAt);
|
||||
await this.checkColumnIsDisplayed(this.licenseColumns.remainingDays);
|
||||
await this.checkColumnIsDisplayed(this.licenseColumns.holder);
|
||||
await this.checkColumnIsDisplayed(this.licenseColumns.mode);
|
||||
}
|
||||
|
||||
async clickShowMenuButton(): Promise<void> {
|
||||
const checkBox = element.all(by.css('mat-checkbox')).first();
|
||||
await BrowserActions.click(checkBox);
|
||||
async checkModulesColumnsIsDisplayed(): Promise<void> {
|
||||
await this.checkColumnIsDisplayed(this.moduleColumns.id);
|
||||
await this.checkColumnIsDisplayed(this.moduleColumns.installDate);
|
||||
await this.checkColumnIsDisplayed(this.moduleColumns.installState);
|
||||
await this.checkColumnIsDisplayed(this.moduleColumns.versionMin);
|
||||
await this.checkColumnIsDisplayed(this.moduleColumns.title);
|
||||
}
|
||||
|
||||
async changeHeaderColor(color): Promise<void> {
|
||||
const headerColor = element(by.css('option[value="' + color + '"]'));
|
||||
await BrowserActions.click(headerColor);
|
||||
async checkAboutListIsLoaded() {
|
||||
await this.dataTable.tableIsLoaded();
|
||||
await this.dataTable.waitTillContentLoaded();
|
||||
}
|
||||
|
||||
async checkAppTitle(name): Promise<void> {
|
||||
const title = element(by.cssContainingText('.adf-app-title', name));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(title);
|
||||
async checkAppTitleIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.appTitle);
|
||||
}
|
||||
|
||||
async addTitle(title): Promise<void> {
|
||||
await BrowserActions.click(this.titleInput);
|
||||
await BrowserActions.clearSendKeys(this.titleInput, title);
|
||||
await this.titleInput.sendKeys(protractor.Key.ENTER);
|
||||
async checkAboutModulesTitleIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.aboutModulesTitle);
|
||||
}
|
||||
|
||||
async checkIconIsDisplayed(url): Promise<void> {
|
||||
const icon = element(by.css('img[src="' + url + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(icon);
|
||||
async checkSourceCodeTitleIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.sourceCodeTitle);
|
||||
}
|
||||
|
||||
async addIcon(url): Promise<void> {
|
||||
await BrowserActions.click(this.iconInput);
|
||||
await BrowserActions.clearSendKeys(this.iconInput, url);
|
||||
await this.iconInput.sendKeys(protractor.Key.ENTER);
|
||||
async checkGithubUrlIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.githubUrl);
|
||||
}
|
||||
|
||||
async checkHexColorInputIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.hexColorInput);
|
||||
async checkGithubVersionIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.githubVersion);
|
||||
}
|
||||
|
||||
async checkLogoHyperlinkInputIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.logoHyperlinkInput);
|
||||
async checkBpmHostIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.githubUrl);
|
||||
}
|
||||
|
||||
async checkLogoTooltipInputIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.logoTooltipInput);
|
||||
async checkEcmHostIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.githubVersion);
|
||||
}
|
||||
|
||||
async addHexCodeColor(hexCode): Promise<void> {
|
||||
await BrowserActions.click(this.hexColorInput);
|
||||
await BrowserActions.clearSendKeys(this.hexColorInput, hexCode);
|
||||
await this.hexColorInput.sendKeys(protractor.Key.ENTER);
|
||||
async checkProductVersionTitleIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.productVersionTitle);
|
||||
}
|
||||
async checkBpmEditionIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.bpmEdition);
|
||||
}
|
||||
|
||||
async addLogoHyperlink(hyperlink): Promise<void> {
|
||||
await BrowserActions.click(this.logoHyperlinkInput);
|
||||
await BrowserActions.clearSendKeys(this.logoHyperlinkInput, hyperlink);
|
||||
await this.logoHyperlinkInput.sendKeys(protractor.Key.ENTER);
|
||||
async checkEcmEditionIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.ecmEdition);
|
||||
}
|
||||
|
||||
async addLogoTooltip(tooltip): Promise<void> {
|
||||
await BrowserActions.click(this.logoTooltipInput);
|
||||
await BrowserActions.clearSendKeys(this.logoTooltipInput, tooltip);
|
||||
await this.logoTooltipInput.sendKeys(protractor.Key.ENTER);
|
||||
async checkBpmVersionIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.bpmVersion);
|
||||
}
|
||||
async checkEcmVersionIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.ecmVersion);
|
||||
}
|
||||
async checkEcmStatusTitleIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.ecmStatusTitle);
|
||||
}
|
||||
|
||||
async sideBarPositionStart(): Promise<void> {
|
||||
await BrowserActions.click(this.positionStart);
|
||||
async checkEcmLicenseTitleIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.ecmLicenseTitle);
|
||||
}
|
||||
|
||||
async sideBarPositionEnd(): Promise<void> {
|
||||
await browser.executeScript('arguments[0].scrollIntoView()', this.positionEnd);
|
||||
await BrowserActions.click(this.positionEnd);
|
||||
async checkEcmModulesTitleIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.ecmModulesTitle);
|
||||
}
|
||||
|
||||
async checkSidebarPositionStart(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.sideBarPositionLeft);
|
||||
}
|
||||
|
||||
async checkSidebarPositionEnd(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.sideBarPositionRight);
|
||||
async checkColumnIsDisplayed(column: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.css(`div[data-automation-id="auto_id_${column}"]`)));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -30,3 +30,4 @@ export * from './form/public-api';
|
||||
export * from './card-view/public-api';
|
||||
export * from './viewer.page';
|
||||
export * from './config-editor-page';
|
||||
export * from './about.page';
|
||||
|
Loading…
x
Reference in New Issue
Block a user