e2e improvements part2 (#1728)

* deprecate comments api wrapper, delete sites perf improve

* introduce user actions

* admin actions inherit user actions

* unlock nodes helper

* api improvements

* api improvements

* update code

* api improvements

* deprecate trashcan api wrapper

* shared api improvements
This commit is contained in:
Denys Vuika
2020-10-07 19:06:21 +01:00
committed by GitHub
parent ffa7ca3aa6
commit e9b837462a
35 changed files with 509 additions and 458 deletions

View File

@@ -24,7 +24,7 @@
*/
import { browser } from 'protractor';
import { AdminActions, LoginPage, BrowsingPage, Utils, RepoClient } from '@alfresco/aca-testing-shared';
import { AdminActions, UserActions, LoginPage, BrowsingPage, Utils, RepoClient } from '@alfresco/aca-testing-shared';
describe('Generic errors', () => {
const username = `user-${Utils.random()}`;
@@ -43,11 +43,16 @@ describe('Generic errors', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { dataTable } = page;
const adminApiActions = new AdminActions();
const userActions = new UserActions();
beforeAll(async (done) => {
await adminApiActions.login();
await adminApiActions.createUser({ username });
await adminApiActions.createUser({ username: username2 });
await userActions.login(username, username);
parentId = (await apis.user.nodes.createFolder(parent)).entry.id;
file1Id = (await apis.user.nodes.createFile(file1, parentId)).entry.id;
await apis.user.nodes.createFile(file2, parentId);
@@ -57,8 +62,8 @@ describe('Generic errors', () => {
});
afterAll(async (done) => {
await apis.user.nodes.deleteNodeById(parentId);
await apis.user.trashcan.emptyTrash();
await userActions.deleteNodes([parentId]);
await userActions.emptyTrashcan();
done();
});