Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async checkCellByHighlightContent(content: string): Promise {
const cell = this.rootElement.element(by.cssContainingText(`adf-datatable-row[class*='adf-datatable-row'] div[class*='adf-name-location-cell-name'] span.adf-highlight`, content));
await BrowserVisibility.waitUntilElementIsVisible(cell);
}
await entityPage.getPropertyType(lastProperty).element(by.cssContainingText('option', 'string')).click();
await entityPage.getPropertyDescription(lastProperty).sendKeys("this is a test property");
//let's see if our values hold!
expect(entityPage.getPropertyName(lastProperty).getAttribute('value')).toEqual("sku");
expect(entityPage.hasClass(entityPage.getPropertyRangeIndex(lastProperty), 'active')).toBe(true);
expect(entityPage.getPropertyType(lastProperty).getAttribute('value')).toEqual("24: string");
expect(entityPage.getPropertyDescription(lastProperty).getAttribute('value')).toEqual("this is a test property");
//let's add 1 more so we can remove one for the next test
await entityPage.addProperty.click();
//repoint last property to the new last property
lastProperty = entityPage.lastProperty;
expect(lastProperty.isDisplayed() && lastProperty.isDisplayed());
//populate the fields for name, range index, type, and description
await entityPage.getPropertyName(lastProperty).sendKeys("ID");
await entityPage.getPropertyPrimaryKey(lastProperty).click();
await entityPage.getPropertyType(lastProperty).element(by.cssContainingText('option', 'integer')).click();
await entityPage.getPropertyDescription(lastProperty).sendKeys("this is our primary key");
//let's save it now that it's populated
await entityPage.saveEntity.click();
browser.wait(EC.elementToBeClickable(entityPage.confirmDialogNoButton));
expect(entityPage.confirmDialogNoButton.isDisplayed()).toBe(true);
await entityPage.confirmDialogNoButton.click();
});
editFolder: `.mat-menu-item[id$='editFolder']`,
favoriteAction: `.mat-menu-item[id$='favorite.add']`,
removeFavoriteAction: `.mat-menu-item[id$='favorite.remove']`,
editOffline: `.mat-menu-item[title='Edit Offline']`,
cancelEditing: `.mat-menu-item[title='Cancel Editing']`
};
items: ElementArrayFinder = this.component.all(by.css(Menu.selectors.item));
backdrop: ElementFinder = browser.element(by.css('.cdk-overlay-backdrop'));
uploadFiles: ElementFinder = browser.element(by.id(Menu.selectors.uploadFiles));
submenus: ElementArrayFinder = browser.element.all(by.css(Menu.selectors.submenu));
cancelEditingAction: ElementFinder = this.component.element(by.css(Menu.selectors.cancelEditing));
cancelJoinAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Cancel Join'));
copyAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Copy'));
createFolderAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Create Folder'));
createLibraryAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Create Library'));
deleteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Delete'));
downloadAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Download'));
editFolderAction: ElementFinder = this.component.element(by.css(Menu.selectors.editFolder));
editOfflineAction: ElementFinder = this.component.element(by.css(Menu.selectors.editOffline));
favoriteAction: ElementFinder = this.component.element(by.css(Menu.selectors.favoriteAction));
removeFavoriteAction: ElementFinder = this.component.element(by.css(Menu.selectors.removeFavoriteAction));
toggleFavoriteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Favorite'));
toggleRemoveFavoriteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Remove Favorite'));
joinAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Join'));
leaveAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Leave'));
managePermissionsAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Permissions'));
manageVersionsAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Manage Versions'));
uploadNewVersionAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Upload New Version'));
moveAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Move'));
permanentDeleteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Permanently Delete'));
multiSelectByLabel(label: string): rxMultiSelect {
let selectWrapper = this.element(by.cssContainingText('.select-wrapper', label));
return new rxMultiSelect(selectWrapper.$('rx-multi-select'));
}
mergeOptionDialogPropertyOptions(option: string) {
return element(by.cssContainingText('mat-option .mat-option-text', option));
}
removeFavoriteAction: `.mat-menu-item[id$='favorite.remove']`,
editOffline: `.mat-menu-item[title='Edit Offline']`,
cancelEditing: `.mat-menu-item[title='Cancel Editing']`
};
items: ElementArrayFinder = this.component.all(by.css(Menu.selectors.item));
backdrop: ElementFinder = browser.element(by.css('.cdk-overlay-backdrop'));
uploadFiles: ElementFinder = browser.element(by.id(Menu.selectors.uploadFiles));
submenus: ElementArrayFinder = browser.element.all(by.css(Menu.selectors.submenu));
cancelEditingAction: ElementFinder = this.component.element(by.css(Menu.selectors.cancelEditing));
cancelJoinAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Cancel Join'));
copyAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Copy'));
createFolderAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Create Folder'));
createLibraryAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Create Library'));
deleteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Delete'));
downloadAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Download'));
editFolderAction: ElementFinder = this.component.element(by.css(Menu.selectors.editFolder));
editOfflineAction: ElementFinder = this.component.element(by.css(Menu.selectors.editOffline));
favoriteAction: ElementFinder = this.component.element(by.css(Menu.selectors.favoriteAction));
removeFavoriteAction: ElementFinder = this.component.element(by.css(Menu.selectors.removeFavoriteAction));
toggleFavoriteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Favorite'));
toggleRemoveFavoriteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Remove Favorite'));
joinAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Join'));
leaveAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Leave'));
managePermissionsAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Permissions'));
manageVersionsAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Manage Versions'));
uploadNewVersionAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Upload New Version'));
moveAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Move'));
permanentDeleteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Permanently Delete'));
restoreAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Restore'));
shareAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Share'));
get jsonDataFormatButton() {
return element(by.cssContainingText('app-select-list td', 'JSON'));
}
flowNameFilterOptions(option: string) {
return element(by.cssContainingText('mat-option .mat-option-text', option));
}
static async selectNgSelectOptionByText(
selectElement: ElementFinder,
text: string
) {
selectElement.element(by.css('.ng-select-container')).click();
await this.wait4VisibleElement(element(by.css('.ng-dropdown-panel-items')));
return selectElement
.all(by.cssContainingText('.ng-option', text))
.first()
.click();
}
sourceFileTypeOptions(option: string) {
return element(by.cssContainingText('mat-option .mat-option-text', option));
}