mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-28 00:38:50 +00:00
34 lines
991 B
TypeScript
34 lines
991 B
TypeScript
import { TestHelper } from './helpers/common.po';
|
|
import { ProjectsPage } from './helpers/project.po';
|
|
import { ControllersPage } from './helpers/controller.po';
|
|
|
|
describe('Projects page', () => {
|
|
let controllersPage: ControllersPage;
|
|
let projectsPage: ProjectsPage;
|
|
let helper: TestHelper;
|
|
|
|
beforeEach(() => {
|
|
controllersPage = new ControllersPage();
|
|
projectsPage = new ProjectsPage();
|
|
helper = new TestHelper();
|
|
});
|
|
|
|
it('user should have possibility to create new project', async () => {
|
|
// arrange
|
|
controllersPage.maximizeWindow();
|
|
await controllersPage.navigateToControllersPage();
|
|
await controllersPage.clickAddController();
|
|
await controllersPage.navigateToControllerProjects();
|
|
helper.sleep(2000);
|
|
|
|
//act
|
|
await projectsPage.openAddProjectDialog();
|
|
helper.sleep(2000);
|
|
await projectsPage.createProject();
|
|
helper.sleep(2000);
|
|
|
|
//assert
|
|
expect(helper.getCurrentUrl()).toMatch('controller/1/project/');
|
|
});
|
|
});
|