e2e cleanup (#2951)

* reduce the code

* reduce code

* reduce code

* reduce code

* cleanup tests

* more readable code

* cleanup code

* fix code

* even more cleanup

* remove some deprecated apis

* code fixes

* cleanup files

* more files switching to user actions
This commit is contained in:
Denys Vuika
2023-02-01 23:22:37 +00:00
committed by GitHub
parent a325deaf1a
commit 567882e864
42 changed files with 628 additions and 926 deletions

View File

@@ -23,7 +23,7 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { AdminActions, LoginPage, BrowsingPage, EXTENSIBILITY_CONFIGS, RepoClient, Utils } from '@alfresco/aca-testing-shared';
import { AdminActions, LoginPage, BrowsingPage, EXTENSIBILITY_CONFIGS, RepoClient, Utils, UserActions } from '@alfresco/aca-testing-shared';
describe('Extensions - Context submenu', () => {
const username = `user-${Utils.random()}`;
@@ -51,12 +51,16 @@ describe('Extensions - Context submenu', () => {
const page = new BrowsingPage();
const { dataTable } = page;
const contextMenu = dataTable.menu;
const adminApiActions = new AdminActions();
const userActions = new UserActions();
beforeAll(async () => {
await adminApiActions.createUser({ username });
fileId = (await apis.user.nodes.createFile(file)).entry.id;
folderId = (await apis.user.nodes.createFolder(folder)).entry.id;
await userActions.login(username, username);
fileId = await apis.user.createFile(file);
folderId = await apis.user.createFolder(folder);
await loginPage.load();
await Utils.setSessionStorageFromConfig(EXTENSIBILITY_CONFIGS.CONTEXT_SUBMENUS);
@@ -70,8 +74,7 @@ describe('Extensions - Context submenu', () => {
});
afterAll(async () => {
await apis.user.nodes.deleteNodeById(fileId, true);
await apis.user.nodes.deleteNodeById(folderId, true);
await userActions.deleteNodes([fileId, folderId]);
});
it('[C286717] Displays the submenu actions set from config', async () => {