gns3-web-ui/e2e/helpers/project.po.ts

21 lines
671 B
TypeScript
Raw Normal View History

2021-04-12 11:15:45 +00:00
import { browser, by } from 'protractor';
2021-04-12 11:46:28 +00:00
import { TestHelper } from './common.po';
2020-02-26 12:43:30 +00:00
export class ProjectsPage {
2021-04-12 11:15:45 +00:00
helper = new TestHelper();
2020-02-26 12:43:30 +00:00
2021-04-12 11:15:45 +00:00
async openAddProjectDialog() {
let addButton = await browser.driver.findElement(by.css('button.add-button'));
await addButton.click();
}
2020-02-26 12:43:30 +00:00
2021-04-12 11:15:45 +00:00
async createProject() {
let today = new Date();
let inputs = await browser.driver.findElements(by.css('input.mat-input-element'));
await inputs[1].sendKeys('test project ' + today.getUTCMilliseconds());
this.helper.sleep(2000);
let dialogButton = await browser.driver.findElement(by.css('button.add-project-button'));
await dialogButton.click();
}
2020-02-26 12:43:30 +00:00
}