2020-02-26 12:43:30 +00:00
|
|
|
import { TestHelper } from './helpers/common.po';
|
2020-02-26 18:39:36 +00:00
|
|
|
import { ProjectMapPage } from './helpers/project-map.po';
|
2021-04-12 11:46:28 +00:00
|
|
|
import { ProjectsPage } from './helpers/project.po';
|
|
|
|
import { ServersPage } from './helpers/server.po';
|
2020-02-26 12:43:30 +00:00
|
|
|
|
2020-02-27 12:11:35 +00:00
|
|
|
describe('Project map page', () => {
|
2022-07-20 08:58:13 +00:00
|
|
|
let controllersPage: ServersPage;
|
2021-04-12 11:15:45 +00:00
|
|
|
let projectsPage: ProjectsPage;
|
|
|
|
let projectMapPage: ProjectMapPage;
|
|
|
|
let helper: TestHelper;
|
2020-02-26 12:43:30 +00:00
|
|
|
|
2021-04-12 11:15:45 +00:00
|
|
|
beforeEach(async () => {
|
2022-07-20 08:58:13 +00:00
|
|
|
controllersPage = new ServersPage();
|
2021-04-12 11:15:45 +00:00
|
|
|
projectsPage = new ProjectsPage();
|
|
|
|
projectMapPage = new ProjectMapPage();
|
|
|
|
helper = new TestHelper();
|
2020-02-26 12:43:30 +00:00
|
|
|
|
2022-07-20 08:58:13 +00:00
|
|
|
controllersPage.maximizeWindow();
|
|
|
|
await controllersPage.navigateToServersPage();
|
|
|
|
await controllersPage.clickAddServer();
|
|
|
|
await controllersPage.navigateToServerProjects();
|
2021-04-12 11:15:45 +00:00
|
|
|
await projectsPage.openAddProjectDialog();
|
|
|
|
helper.sleep(2000);
|
|
|
|
await projectsPage.createProject();
|
|
|
|
helper.sleep(2000);
|
|
|
|
});
|
2020-02-26 12:43:30 +00:00
|
|
|
|
2021-04-12 11:15:45 +00:00
|
|
|
it('user should have possibility to add nodes to map', async () => {
|
|
|
|
// arrange
|
|
|
|
projectMapPage.openAddProjectDialog();
|
|
|
|
helper.sleep(2000);
|
2020-02-26 12:43:30 +00:00
|
|
|
|
2021-04-12 11:15:45 +00:00
|
|
|
//act
|
|
|
|
projectMapPage.addNode();
|
|
|
|
helper.sleep(2000);
|
2020-02-26 12:43:30 +00:00
|
|
|
|
2021-04-12 11:15:45 +00:00
|
|
|
//assert
|
|
|
|
expect(await projectMapPage.verifyIfNodeWithLabelExists('PC1')).toBe(true);
|
|
|
|
});
|
2020-02-26 12:43:30 +00:00
|
|
|
});
|