mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
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:
@@ -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();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user