e2e api enhancements (part 1) (#1727)

* add typings, deprecate username wrapper

* improve imports

* unify admin actions for people

* remove auth api wrapper

* remove unused apis

* remove unused apis

* use admin api actions everywhere
This commit is contained in:
Denys Vuika
2020-10-07 10:40:20 +01:00
committed by GitHub
parent e5292eec52
commit d7367623f6
62 changed files with 403 additions and 511 deletions

View File

@@ -24,11 +24,10 @@
*/
import { browser } from 'protractor';
import { LoginPage, BrowsingPage, Utils, RepoClient } from '@alfresco/aca-testing-shared';
import { AdminActions, LoginPage, BrowsingPage, Utils, RepoClient } from '@alfresco/aca-testing-shared';
describe('Generic errors', () => {
const username = `user-${Utils.random()}`;
const username2 = `user2-${Utils.random()}`;
const parent = `folder-${Utils.random()}`;
@@ -38,17 +37,17 @@ describe('Generic errors', () => {
const file2 = `file2-${Utils.random()}.txt`;
const apis = {
admin: new RepoClient(),
user: new RepoClient(username, username)
};
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { dataTable } = page;
const adminApiActions = new AdminActions();
beforeAll(async (done) => {
await apis.admin.people.createUser({ username });
await apis.admin.people.createUser({ username: username2 });
await adminApiActions.createUser({ username });
await adminApiActions.createUser({ username: username2 });
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);