Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should create a new Order entity', async function () {
await appPage.entitiesTab.click();
//create Order entity
await console.log('create Order entity');
await entityPage.toolsButton.click();
await entityPage.newEntityButton.click();
await browser.sleep(2000);
expect(entityPage.entityEditor.isDisplayed()).toBe(true);
await entityPage.entityTitle.sendKeys('Order');
await entityPage.saveEntity.click();
await browser.wait(EC.elementToBeClickable(entityPage.confirmDialogYesButton));
expect(entityPage.confirmDialogYesButton.isDisplayed()).toBe(true);
await entityPage.confirmDialogYesButton.click();
await browser.wait(EC.visibilityOf(entityPage.getEntityBox('Order')));
expect(entityPage.getEntityBox('Order').isDisplayed()).toBe(true);
await entityPage.toolsButton.click();
// move entity Order
await entityPage.selectEntity('Order');
await browser.actions().dragAndDrop(entityPage.entityBox('Order'), {x: 200, y: 150}).perform();
});
it('Lines opacity should not get lost when timeslider is playing', async () => {
await lineChart.selectLine('China');
await CommonChartPage.buttonPlay.safeClick();
await browser.sleep(2000); // play slider for 2 seconds to get the value in movement
expect(await lineChart.countHighlightedLines()).toEqual(1);
await CommonChartPage.buttonPause.safeClick();
expect(await lineChart.countHighlightedLines()).toEqual(1);
});
waitForBootstrap();
const elem = element(by.css(selector + ' .box'));
const btn = element(by.css(selector + ' button'));
const getWidth = () => elem.getSize().then((sizes: any) => sizes['width']);
btn.click();
browser.sleep(250);
btn.click();
expect(getWidth()).toBeLessThan(600);
browser.sleep(500);
expect(getWidth()).toBeLessThan(50);
});
async selectModelerEditorTab(): Promise {
await BrowserActions.click(this.modelerEditorTabButton);
await browser.sleep(300);
}
browser.switchTo().window(handles[0]).then(function () {
browser.sleep(Common.microWait);
waitforskiptest(jazzServices_po.activeTestBranch(), Common.xxlWait);
jazzServices_po.activeTestBranch().click().
then(null, function (err) {
console.log("the error occurred is : " + err.name);
});
commonUtils.waitForSpinnerDisappear();
browser.sleep(Common.miniWait);
});
});
jazzServices_po.getGitLogout().click().then(null, function (err) {
console.log("Unable to locate Logout link"+err.name);
flag = 0;
browser.sleep(Common.longWait);
browser.close();
});
browser.sleep(Common.microWait);
browser.sleep(Common.microWait);
jazzServices_po.btn_CreateBranch().click().then(null, function (err) {
console.log(err.name);
});
browser.sleep(Common.microWait);
jazzServices_po.getBitLogoutIcon().click().then(null, function (err) {
console.log(err.name);
});
browser.sleep(Common.microWait);
jazzServices_po.getBitLogout().click().then(null, function (err) {
console.log(err.name);
flag = 0;
browser.sleep(Common.longWait);
browser.close();
});
browser.sleep(Common.microWait);
browser.close();
}
});
});
it('should toggle content', () => {
legend.click();
browser.sleep(1000);
legend.click();
expect(contentWrapper.get(1).getCssValue('height')).not.toBe('0');
});
it('should have image', () => {
browser.sleep(1000);
let ng2Img = element(by.css('img'));
expect(ng2Img.isDisplayed()).toBeTruthy();
});
});
async clickAdvSettingsExpandCollapse() {
await browser.sleep(1000);
await console.log("CLicking advance settings");
return await this.advSettingsExpandCollapse.click();
}