2020-02-26 12:43:30 +00:00
|
|
|
import { TestHelper } from './helpers/common.po';
|
|
|
|
import { ProjectsPage } from './helpers/project.po';
|
2021-04-12 11:46:28 +00:00
|
|
|
import { ServersPage } from './helpers/server.po';
|
2020-02-26 12:43:30 +00:00
|
|
|
|
|
|
|
describe('Projects page', () => {
|
2022-07-20 08:58:13 +00:00
|
|
|
let controllersPage: ServersPage;
|
2021-04-12 11:15:45 +00:00
|
|
|
let projectsPage: ProjectsPage;
|
|
|
|
let helper: TestHelper;
|
2020-02-26 12:43:30 +00:00
|
|
|
|
2021-04-12 11:15:45 +00:00
|
|
|
beforeEach(() => {
|
2022-07-20 08:58:13 +00:00
|
|
|
controllersPage = new ServersPage();
|
2021-04-12 11:15:45 +00:00
|
|
|
projectsPage = new ProjectsPage();
|
|
|
|
helper = new TestHelper();
|
|
|
|
});
|
2020-02-26 12:43:30 +00:00
|
|
|
|
2021-04-12 11:15:45 +00:00
|
|
|
it('user should have possibility to create new project', async () => {
|
|
|
|
// arrange
|
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
|
|
|
helper.sleep(2000);
|
2020-02-26 12:43:30 +00:00
|
|
|
|
2021-04-12 11:15:45 +00:00
|
|
|
//act
|
|
|
|
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
|
|
|
//assert
|
2022-07-18 08:31:09 +00:00
|
|
|
expect(helper.getCurrentUrl()).toMatch('controller/1/project/');
|
2021-04-12 11:15:45 +00:00
|
|
|
});
|
2020-02-26 12:43:30 +00:00
|
|
|
});
|