Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('setup: click on word with multiple definitions (found by lexeme)', () => {
editorPage.edit.findEntryByLexeme(constants.testMultipleMeaningEntry1.lexeme.th.value).click();
// fix problem with protractor not scrolling to element before click
browser.driver.executeScript('arguments[0].scrollIntoView();',
editorPage.edit.senses.first().getWebElement());
editorPage.edit.senses.first().click();
});
it('[C260498] Check viewer for a generated app', () => {
let viewerUrl = TestConfig.adf.url + TestConfig.adf.port + `/documentlist(overlay:files/${pdfFile.id}/view)`;
browser.driver.get(viewerUrl);
browser.driver.sleep(3000); // wait open file
viewerPage.checkFileContent('1', pdfFile.firstPageText);
viewerPage.checkCloseButtonIsDisplayed();
viewerPage.clickCloseButton();
});
onPrepare: () => {
browser.driver.manage().window().maximize();
},
// These are various cucumber compiler options
' and advanced position calculation when the container is scrolled to the bottom', () => {
// Cause the scroll container to be scrolled to the end
browser.driver.executeScript('document.getElementById(\'complexContainer\').scrollTop =' +
' document.getElementById(\'complexContainer\').scrollHeight');
page.getComplexContainerScrollTop().then((initialScrollTop: number) => {
expect(initialScrollTop).toBeGreaterThan(0);
page.triggerNestedScrollButton2().then(() => {
browser.sleep(1250).then(() => {
protractor.promise.all([page.getComplexContainerTargetVerticalPosition(), page.getComplexScrollTargetVerticalPosition()])
.then(locations => {
expect(locations[0]).toBeCloseTo(locations[1], Closeness.ofByOne);
});
});
});
});
});
function serviceapprover() {
browser.driver.sleep(5000);
jazzServices_po.getSubmit().click();
fluentwaittry(jazzServices_po.getDone(), 15000);
jazzServices_po.getDone().click();
}
function waitForSpinnerDisappear() {
const size = await browser.manage().window().getSize();
const directions: Object = {
top: 0,
bottom: size.height,
left: 0,
right: size.width,
};
if (!directions.hasOwnProperty(topBottom) || !directions.hasOwnProperty(leftRight)) {
return P.reject(`unknown directions [${topBottom}, ${leftRight}`);
}
const x = directions[leftRight];
const y = directions[topBottom];
log.info(`scrolling to [x=${x},y=${y}]`);
return browser.driver.executeScript((browserX, browserY) => window.scrollTo(browserX, browserY), x, y);
}
}
afterAll(() => {
jazzServices_po = new Jazz();
commonUtils = new Common();
browser.driver.sleep(Common.miniWait);
jazzServices_po.logoutIcon().click();
jazzServices_po.logout().click();
});
beforeAll(() => {
browser.driver
.manage()
.window()
.maximize();
login = new Login();
login.navigateTo('/');
login.login();
login.waitRedirect('instances');
});
await browser.driver.sleep(1000);
await processCloudDemoPage.editProcessFilterCloudComponent().openFilter();
await processCloudDemoPage.editProcessFilterCloudComponent().checkCustomiseFilterHeaderIsExpanded();
await expect(await processCloudDemoPage.getActiveFilterName()).toBe('New');
await expect(await processCloudDemoPage.editProcessFilterCloudComponent().getSortFilterDropDownValue()).toEqual('Id');
await processCloudDemoPage.editProcessFilterCloudComponent().setSortFilterDropDown('Name');
await expect(await processCloudDemoPage.editProcessFilterCloudComponent().getSortFilterDropDownValue()).toEqual('Name');
await processCloudDemoPage.editProcessFilterCloudComponent().clickSaveAsButton();
await processCloudDemoPage.editProcessFilterCloudComponent().editProcessFilterDialog().setFilterName('New');
await processCloudDemoPage.editProcessFilterCloudComponent().editProcessFilterDialog().clickOnSaveButton();
await processCloudDemoPage.editProcessFilterCloudComponent().openFilter();
await processCloudDemoPage.editProcessFilterCloudComponent().checkCustomiseFilterHeaderIsExpanded();
await browser.driver.sleep(1000);
await expect(await processCloudDemoPage.getActiveFilterName()).toBe('New');
await expect(await processCloudDemoPage.editProcessFilterCloudComponent().getSortFilterDropDownValue()).toEqual('Name');
await processCloudDemoPage.editProcessFilterCloudComponent().clickDeleteButton();
await browser.driver.sleep(1000);
await processCloudDemoPage.customProcessFilter('custom-new').clickProcessFilter();
await processCloudDemoPage.editProcessFilterCloudComponent().openFilter();
await processCloudDemoPage.editProcessFilterCloudComponent().checkCustomiseFilterHeaderIsExpanded();
await expect(await processCloudDemoPage.editProcessFilterCloudComponent().getSortFilterDropDownValue()).toEqual('Id');
await processCloudDemoPage.editProcessFilterCloudComponent().clickDeleteButton();
});