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