gns3-web-ui/e2e/projects.e2e-spec.ts
2021-04-12 13:46:28 +02:00

34 lines
935 B
TypeScript

import { TestHelper } from './helpers/common.po';
import { ProjectsPage } from './helpers/project.po';
import { ServersPage } from './helpers/server.po';
describe('Projects page', () => {
let serversPage: ServersPage;
let projectsPage: ProjectsPage;
let helper: TestHelper;
beforeEach(() => {
serversPage = new ServersPage();
projectsPage = new ProjectsPage();
helper = new TestHelper();
});
it('user should have possibility to create new project', async () => {
// arrange
serversPage.maximizeWindow();
await serversPage.navigateToServersPage();
await serversPage.clickAddServer();
await serversPage.navigateToServerProjects();
helper.sleep(2000);
//act
await projectsPage.openAddProjectDialog();
helper.sleep(2000);
await projectsPage.createProject();
helper.sleep(2000);
//assert
expect(helper.getCurrentUrl()).toMatch('server/1/project/');
});
});