mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Create card-view-boolean-item page (#5537)
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
/*!
|
||||
* @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 { element, by, ElementFinder, Locator } from 'protractor';
|
||||
import { BrowserActions, BrowserVisibility } from '../../utils/public-api';
|
||||
|
||||
export class CardBooleanItemPage {
|
||||
|
||||
rootElement: ElementFinder;
|
||||
labelLocator: Locator = by.css('div[data-automation-id*="card-boolean-label"]');
|
||||
checkbox: Locator = by.css('mat-checkbox[data-automation-id*="card-boolean"]');
|
||||
|
||||
constructor(label: string = 'assignee') {
|
||||
this.rootElement = element(by.xpath(`//div[contains(@data-automation-id, "label-${label}")]/ancestor::adf-card-view-boolitem`));
|
||||
}
|
||||
|
||||
async checkboxClick(): Promise<void> {
|
||||
await BrowserActions.click(this.rootElement.element(this.checkbox));
|
||||
}
|
||||
|
||||
async checkLabelIsPresent(): Promise<void> {
|
||||
const labelElement: ElementFinder = this.rootElement.element(this.labelLocator);
|
||||
await BrowserVisibility.waitUntilElementIsPresent(labelElement);
|
||||
}
|
||||
}
|
@@ -16,3 +16,4 @@
|
||||
*/
|
||||
|
||||
export * from './card-view-text-item.page';
|
||||
export * from './card-view-boolean-item.page';
|
||||
|
Reference in New Issue
Block a user