import { browser, element, by } from 'protractor'; import { HelpDeskPage } from './helpDesk.po'; import { DispatchPage } from '../dispatch-page/dispatch.po'; type result = any; let hd = new HelpDeskPage(); let dis = new DispatchPage(); describe('Helpdesk Page', () => { it ('show the Tickets Page', async () => { // await hd.sideMenu.last().click(); // await hd.helpdeskPage.click(); await browser.sleep(2000); await dis.waitForItemToBeVisible(hd.helpdeskGrid); await expect(dis.pageHeader.getText()).toBe(hd.helpdeskTitle); }); it ('create a bug ticket with note', async() => { await hd.createBugTicket(); await browser.sleep(2000); await hd.saveTicket.click(); await browser.sleep(2000); await expect(hd.confirmSave.isDisplayed()).toBeTruthy(); }); it ('add solution/rootcause to the ticket', async () =>{ await hd.editTicekt(); await hd.addSolutionAndRootcause(); await hd.saveTicket.click(); await browser.sleep(5000); }); // it ('should count the rows', async () =>{ // var row = element.all(by.className('ui-table-tbody')); // var value = row.all(by.tagName("tr")); // await value.getSize().then(function(rowCount){ // console.log("Count: "+ rowCount) // }); // await browser.sleep(2000) // }); });