gns3-web-ui/e2e/projects.e2e-spec.ts

34 lines
991 B
TypeScript
Raw Normal View History

2020-02-26 13:43:30 +01:00
import { TestHelper } from './helpers/common.po';
import { ProjectsPage } from './helpers/project.po';
import { ControllersPage } from './helpers/controller.po';
2020-02-26 13:43:30 +01:00
describe('Projects page', () => {
let controllersPage: ControllersPage;
2021-04-12 13:15:45 +02:00
let projectsPage: ProjectsPage;
let helper: TestHelper;
2020-02-26 13:43:30 +01:00
2021-04-12 13:15:45 +02:00
beforeEach(() => {
controllersPage = new ControllersPage();
2021-04-12 13:15:45 +02:00
projectsPage = new ProjectsPage();
helper = new TestHelper();
});
2020-02-26 13:43:30 +01:00
2021-04-12 13:15:45 +02:00
it('user should have possibility to create new project', async () => {
// arrange
controllersPage.maximizeWindow();
await controllersPage.navigateToControllersPage();
await controllersPage.clickAddController();
await controllersPage.navigateToControllerProjects();
2021-04-12 13:15:45 +02:00
helper.sleep(2000);
2020-02-26 13:43:30 +01:00
2021-04-12 13:15:45 +02:00
//act
await projectsPage.openAddProjectDialog();
helper.sleep(2000);
await projectsPage.createProject();
helper.sleep(2000);
2020-02-26 13:43:30 +01:00
2021-04-12 13:15:45 +02:00
//assert
expect(helper.getCurrentUrl()).toMatch('controller/1/project/');
2021-04-12 13:15:45 +02:00
});
2020-02-26 13:43:30 +01:00
});