2020-02-26 13:43:30 +01:00
|
|
|
import { TestHelper } from './helpers/common.po';
|
2020-02-26 19:39:36 +01:00
|
|
|
import { ProjectMapPage } from './helpers/project-map.po';
|
2021-04-12 13:46:28 +02:00
|
|
|
import { ProjectsPage } from './helpers/project.po';
|
2022-07-21 13:57:09 +05:30
|
|
|
import { ControllersPage } from './helpers/controller.po';
|
2020-02-26 13:43:30 +01:00
|
|
|
|
2020-02-27 13:11:35 +01:00
|
|
|
describe('Project map page', () => {
|
2022-07-21 13:57:09 +05:30
|
|
|
let controllersPage: ControllersPage;
|
2021-04-12 13:15:45 +02:00
|
|
|
let projectsPage: ProjectsPage;
|
|
|
|
let projectMapPage: ProjectMapPage;
|
|
|
|
let helper: TestHelper;
|
2020-02-26 13:43:30 +01:00
|
|
|
|
2021-04-12 13:15:45 +02:00
|
|
|
beforeEach(async () => {
|
2022-07-21 13:57:09 +05:30
|
|
|
controllersPage = new ControllersPage();
|
2021-04-12 13:15:45 +02:00
|
|
|
projectsPage = new ProjectsPage();
|
|
|
|
projectMapPage = new ProjectMapPage();
|
|
|
|
helper = new TestHelper();
|
2020-02-26 13:43:30 +01:00
|
|
|
|
2022-07-20 14:28:13 +05:30
|
|
|
controllersPage.maximizeWindow();
|
2022-07-21 13:57:09 +05:30
|
|
|
await controllersPage.navigateToControllersPage();
|
|
|
|
await controllersPage.clickAddController();
|
2022-07-21 16:32:09 +05:30
|
|
|
await controllersPage.navigateToControllerProjects();
|
2021-04-12 13:15:45 +02:00
|
|
|
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
|
|
|
it('user should have possibility to add nodes to map', async () => {
|
|
|
|
// arrange
|
|
|
|
projectMapPage.openAddProjectDialog();
|
|
|
|
helper.sleep(2000);
|
2020-02-26 13:43:30 +01:00
|
|
|
|
2021-04-12 13:15:45 +02:00
|
|
|
//act
|
|
|
|
projectMapPage.addNode();
|
|
|
|
helper.sleep(2000);
|
2020-02-26 13:43:30 +01:00
|
|
|
|
2021-04-12 13:15:45 +02:00
|
|
|
//assert
|
|
|
|
expect(await projectMapPage.verifyIfNodeWithLabelExists('PC1')).toBe(true);
|
|
|
|
});
|
2020-02-26 13:43:30 +01:00
|
|
|
});
|