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

@@ -23,7 +23,7 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { LoginPage, BrowsingPage, EXTENSIBILITY_CONFIGS, RepoClient, Utils } from '@alfresco/aca-testing-shared';
import { AdminActions, LoginPage, BrowsingPage, EXTENSIBILITY_CONFIGS, RepoClient, Utils } from '@alfresco/aca-testing-shared';
describe('Extensions - Context submenu', () => {
const username = `user-${Utils.random()}`;
@@ -44,7 +44,6 @@ describe('Extensions - Context submenu', () => {
};
const apis = {
admin: new RepoClient(),
user: new RepoClient(username, username)
};
@@ -52,9 +51,10 @@ describe('Extensions - Context submenu', () => {
const page = new BrowsingPage();
const { dataTable } = page;
const contextMenu = dataTable.menu;
const adminApiActions = new AdminActions();
beforeAll(async (done) => {
await apis.admin.people.createUser({ username });
await adminApiActions.createUser({ username });
fileId = (await apis.user.nodes.createFile(file)).entry.id;
folderId = (await apis.user.nodes.createFolder(folder)).entry.id;