[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:
siva kumar
2020-02-26 18:05:50 +05:30
committed by GitHub
parent 2cf36c2862
commit 5fb7879900
7 changed files with 308 additions and 90 deletions

View 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();
});
});

View File

@@ -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();
});
});

View 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();
});
});

View File

@@ -1,6 +1,5 @@
<div class="adf-about-product-version-container" *ngIf="bpmVersion || ecmVersion"> <div class="adf-about-product-version-container" *ngIf="bpmVersion || ecmVersion">
<h3 data-automation-id="adf-about-product-version-title">{{ 'ABOUT.VERSIONS.TITLE' | translate }}</h3> <h3 data-automation-id="adf-about-product-version-title">{{ 'ABOUT.VERSIONS.TITLE' | translate }}</h3>
<div *ngIf="bpmVersion">
<mat-card> <mat-card>
<div *ngIf="bpmVersion" data-automation-id="adf-about-bpm-service"> <div *ngIf="bpmVersion" data-automation-id="adf-about-bpm-service">
<h3>{{ 'ABOUT.VERSIONS.PROCESS_SERVICE' | translate }}</h3> <h3>{{ 'ABOUT.VERSIONS.PROCESS_SERVICE' | translate }}</h3>
@@ -12,7 +11,6 @@
bpmVersion.minorVersion }}.{{ bpmVersion.revisionVersion }} bpmVersion.minorVersion }}.{{ bpmVersion.revisionVersion }}
</p> </p>
</div> </div>
<div *ngIf="ecmVersion" data-automation-id="adf-about-ecm-service"> <div *ngIf="ecmVersion" data-automation-id="adf-about-ecm-service">
<h3>{{ 'ABOUT.VERSIONS.CONTENT_SERVICE' | translate }}</h3> <h3>{{ 'ABOUT.VERSIONS.CONTENT_SERVICE' | translate }}</h3>
<p data-automation-id="adf-about-ecm-edition"> <p data-automation-id="adf-about-ecm-edition">
@@ -21,19 +19,17 @@
<p data-automation-id="adf-about-ecm-version"> <p data-automation-id="adf-about-ecm-version">
{{ 'ABOUT.VERSIONS.LABELS.VERSION' | translate }}: {{ ecmVersion.version.display }} {{ 'ABOUT.VERSIONS.LABELS.VERSION' | translate }}: {{ ecmVersion.version.display }}
</p> </p>
</div> </div>
</mat-card> </mat-card>
</div>
<div *ngIf="ecmVersion" data-automation-id="adf-about-ecm"> <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> <adf-datatable [data]="license"></adf-datatable>
<h3 data-automation-id="adf-about-ecm-status-title"> {{ 'ABOUT.VERSIONS.LABELS.STATUS' | translate }}</h3>
<h3> {{ 'ABOUT.VERSIONS.LABELS.STATUS' | translate }}</h3>
<adf-datatable [data]="status"></adf-datatable> <adf-datatable [data]="status"></adf-datatable>
<h3 data-automation-id="adf-about-ecm-modules-title">{{ 'ABOUT.VERSIONS.LABELS.MODULES' | translate }}</h3>
<h3>{{ 'ABOUT.VERSIONS.LABELS.MODULES' | translate }}</h3>
<adf-datatable [data]="modules"></adf-datatable> <adf-datatable [data]="modules"></adf-datatable>
</div> </div>
</div> </div>

View File

@@ -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)); spyOn(processContentService, 'getFileRawContent').and.returnValue(of(fakePngAnswer));
formService.formContentClicked.subscribe((file) => { formService.formContentClicked.subscribe((file) => {
expect(file).not.toBeNull(); expect(file).not.toBeNull();
expect(file.id).toBe(1155); expect(file.id).toBe(1155);
}); });
fixture.detectChanges();
await fixture.whenStable();
const menuButton: HTMLButtonElement = <HTMLButtonElement> element.querySelector('#file-1155-option-menu'); const menuButton: HTMLButtonElement = <HTMLButtonElement> element.querySelector('#file-1155-option-menu');
expect(menuButton).not.toBeNull(); expect(menuButton).not.toBeNull();
menuButton.click(); menuButton.click();
fixture.detectChanges(); fixture.detectChanges();
await fixture.whenStable();
const showOption: HTMLButtonElement = <HTMLButtonElement> fixture.debugElement.query(By.css('#file-1155-show-file')).nativeElement; const showOption: HTMLButtonElement = <HTMLButtonElement> fixture.debugElement.query(By.css('#file-1155-show-file')).nativeElement;
showOption.click(); 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; fakePngAnswer.isExternal = true;
spyOn(processContentService, 'getFileRawContent').and.returnValue(of(fakePngAnswer)); spyOn(processContentService, 'getFileRawContent').and.returnValue(of(fakePngAnswer));
@@ -378,11 +383,12 @@ describe('AttachFileWidgetComponent', () => {
expect(menuButton).not.toBeNull(); expect(menuButton).not.toBeNull();
menuButton.click(); menuButton.click();
fixture.detectChanges(); fixture.detectChanges();
await fixture.whenStable();
const showOption: HTMLButtonElement = <HTMLButtonElement> fixture.debugElement.query(By.css('#file-1155-show-file')).nativeElement; const showOption: HTMLButtonElement = <HTMLButtonElement> fixture.debugElement.query(By.css('#file-1155-show-file')).nativeElement;
expect(showOption.disabled).toBeTruthy(); 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; fakePngAnswer.isExternal = true;
spyOn(processContentService, 'getFileRawContent').and.returnValue(of(fakePngAnswer)); spyOn(processContentService, 'getFileRawContent').and.returnValue(of(fakePngAnswer));
@@ -390,11 +396,12 @@ describe('AttachFileWidgetComponent', () => {
expect(menuButton).not.toBeNull(); expect(menuButton).not.toBeNull();
menuButton.click(); menuButton.click();
fixture.detectChanges(); fixture.detectChanges();
await fixture.whenStable();
const downloadOption: HTMLButtonElement = <HTMLButtonElement> fixture.debugElement.query(By.css('#file-1155-download-file')).nativeElement; const downloadOption: HTMLButtonElement = <HTMLButtonElement> fixture.debugElement.query(By.css('#file-1155-download-file')).nativeElement;
expect(downloadOption.disabled).toBeTruthy(); 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; fakePngAnswer.isExternal = false;
spyOn(processContentService, 'getFileRawContent').and.returnValue(of(fakePngAnswer)); spyOn(processContentService, 'getFileRawContent').and.returnValue(of(fakePngAnswer));
@@ -402,12 +409,13 @@ describe('AttachFileWidgetComponent', () => {
expect(menuButton).not.toBeNull(); expect(menuButton).not.toBeNull();
menuButton.click(); menuButton.click();
fixture.detectChanges(); fixture.detectChanges();
await fixture.whenStable();
const downloadOption: HTMLButtonElement = <HTMLButtonElement> fixture.debugElement.query(By.css('#file-1155-download-file')).nativeElement; const downloadOption: HTMLButtonElement = <HTMLButtonElement> fixture.debugElement.query(By.css('#file-1155-download-file')).nativeElement;
expect(downloadOption.disabled).toBeFalsy(); 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; fakePngAnswer.contentAvailable = false;
spyOn(processContentService, 'getFileRawContent').and.returnValue(of(fakePngAnswer)); spyOn(processContentService, 'getFileRawContent').and.returnValue(of(fakePngAnswer));
@@ -415,8 +423,9 @@ describe('AttachFileWidgetComponent', () => {
expect(menuButton).not.toBeNull(); expect(menuButton).not.toBeNull();
menuButton.click(); menuButton.click();
fixture.detectChanges(); fixture.detectChanges();
await fixture.whenStable();
const showOption: HTMLButtonElement = <HTMLButtonElement> fixture.debugElement.query(By.css('#file-1155-show-file')).nativeElement; const showOption: HTMLButtonElement = <HTMLButtonElement> fixture.debugElement.query(By.css('#file-1155-show-file')).nativeElement;
expect(showOption.disabled).toBeTruthy(); expect(showOption.disabled).toBeTruthy();
})); });
}); });
}); });

View File

@@ -15,117 +15,150 @@
* limitations under the License. * 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 { BrowserVisibility } from '../utils/browser-visibility';
import { BrowserActions } from '../utils/browser-actions'; import { DataTableComponentPage } from './data-table-component.page';
export class AboutPage { export class AboutPage {
checkBox: ElementFinder = element(by.cssContainingText('.mat-checkbox-label', 'Show menu button')); moduleColumns = {
headerColor: ElementFinder = element(by.css('option[value="primary"]')); id: 'id',
titleInput: ElementFinder = element(by.css('input[name="title"]')); title: 'title',
iconInput: ElementFinder = element(by.css('input[placeholder="URL path"]')); installDate: 'installDate',
hexColorInput: ElementFinder = element(by.css('input[placeholder="hex color code"]')); installState: 'installState',
logoHyperlinkInput: ElementFinder = element(by.css('input[placeholder="Redirect URL"]')); versionMin: 'versionMin'
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'));
async checkShowMenuCheckBoxIsDisplayed(): Promise<void> { licenseColumns = {
await BrowserVisibility.waitUntilElementIsVisible(this.checkBox); 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> { async checkStatusColumnsIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.headerColor); await this.checkColumnIsDisplayed(this.statusColumns.isAuditEnabled);
await this.checkColumnIsDisplayed(this.statusColumns.isReadOnly);
} }
async checkChangeTitleIsDisplayed(): Promise<void> { async checkPackageColumnsIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.titleInput); await this.checkColumnIsDisplayed(this.packageColumns.name);
await this.checkColumnIsDisplayed(this.packageColumns.version);
} }
async checkChangeUrlPathIsDisplayed(): Promise<void> { async checkLicenseColumnsIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.iconInput); 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> { async checkModulesColumnsIsDisplayed(): Promise<void> {
const checkBox = element.all(by.css('mat-checkbox')).first(); await this.checkColumnIsDisplayed(this.moduleColumns.id);
await BrowserActions.click(checkBox); 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> { async checkAboutListIsLoaded() {
const headerColor = element(by.css('option[value="' + color + '"]')); await this.dataTable.tableIsLoaded();
await BrowserActions.click(headerColor); await this.dataTable.waitTillContentLoaded();
} }
async checkAppTitle(name): Promise<void> { async checkAppTitleIsDisplayed(): Promise<void> {
const title = element(by.cssContainingText('.adf-app-title', name)); await BrowserVisibility.waitUntilElementIsVisible(this.appTitle);
await BrowserVisibility.waitUntilElementIsVisible(title);
} }
async addTitle(title): Promise<void> { async checkAboutModulesTitleIsDisplayed(): Promise<void> {
await BrowserActions.click(this.titleInput); await BrowserVisibility.waitUntilElementIsVisible(this.aboutModulesTitle);
await BrowserActions.clearSendKeys(this.titleInput, title);
await this.titleInput.sendKeys(protractor.Key.ENTER);
} }
async checkIconIsDisplayed(url): Promise<void> { async checkSourceCodeTitleIsDisplayed(): Promise<void> {
const icon = element(by.css('img[src="' + url + '"]')); await BrowserVisibility.waitUntilElementIsVisible(this.sourceCodeTitle);
await BrowserVisibility.waitUntilElementIsVisible(icon);
} }
async addIcon(url): Promise<void> { async checkGithubUrlIsDisplayed(): Promise<void> {
await BrowserActions.click(this.iconInput); await BrowserVisibility.waitUntilElementIsVisible(this.githubUrl);
await BrowserActions.clearSendKeys(this.iconInput, url);
await this.iconInput.sendKeys(protractor.Key.ENTER);
} }
async checkHexColorInputIsDisplayed(): Promise<void> { async checkGithubVersionIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.hexColorInput); await BrowserVisibility.waitUntilElementIsVisible(this.githubVersion);
} }
async checkLogoHyperlinkInputIsDisplayed(): Promise<void> { async checkBpmHostIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.logoHyperlinkInput); await BrowserVisibility.waitUntilElementIsVisible(this.githubUrl);
} }
async checkLogoTooltipInputIsDisplayed(): Promise<void> { async checkEcmHostIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.logoTooltipInput); await BrowserVisibility.waitUntilElementIsVisible(this.githubVersion);
} }
async addHexCodeColor(hexCode): Promise<void> { async checkProductVersionTitleIsDisplayed(): Promise<void> {
await BrowserActions.click(this.hexColorInput); await BrowserVisibility.waitUntilElementIsVisible(this.productVersionTitle);
await BrowserActions.clearSendKeys(this.hexColorInput, hexCode); }
await this.hexColorInput.sendKeys(protractor.Key.ENTER); async checkBpmEditionIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.bpmEdition);
} }
async addLogoHyperlink(hyperlink): Promise<void> { async checkEcmEditionIsDisplayed(): Promise<void> {
await BrowserActions.click(this.logoHyperlinkInput); await BrowserVisibility.waitUntilElementIsVisible(this.ecmEdition);
await BrowserActions.clearSendKeys(this.logoHyperlinkInput, hyperlink);
await this.logoHyperlinkInput.sendKeys(protractor.Key.ENTER);
} }
async addLogoTooltip(tooltip): Promise<void> { async checkBpmVersionIsDisplayed(): Promise<void> {
await BrowserActions.click(this.logoTooltipInput); await BrowserVisibility.waitUntilElementIsVisible(this.bpmVersion);
await BrowserActions.clearSendKeys(this.logoTooltipInput, tooltip); }
await this.logoTooltipInput.sendKeys(protractor.Key.ENTER); async checkEcmVersionIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.ecmVersion);
}
async checkEcmStatusTitleIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.ecmStatusTitle);
} }
async sideBarPositionStart(): Promise<void> { async checkEcmLicenseTitleIsDisplayed(): Promise<void> {
await BrowserActions.click(this.positionStart); await BrowserVisibility.waitUntilElementIsVisible(this.ecmLicenseTitle);
} }
async sideBarPositionEnd(): Promise<void> { async checkEcmModulesTitleIsDisplayed(): Promise<void> {
await browser.executeScript('arguments[0].scrollIntoView()', this.positionEnd); await BrowserVisibility.waitUntilElementIsVisible(this.ecmModulesTitle);
await BrowserActions.click(this.positionEnd);
} }
async checkSidebarPositionStart(): Promise<void> { async checkColumnIsDisplayed(column: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.sideBarPositionLeft); await BrowserVisibility.waitUntilElementIsVisible(element(by.css(`div[data-automation-id="auto_id_${column}"]`)));
}
async checkSidebarPositionEnd(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.sideBarPositionRight);
} }
} }

View File

@@ -30,3 +30,4 @@ export * from './form/public-api';
export * from './card-view/public-api'; export * from './card-view/public-api';
export * from './viewer.page'; export * from './viewer.page';
export * from './config-editor-page'; export * from './config-editor-page';
export * from './about.page';