mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-09-24 14:31:16 +00:00
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:
@@ -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 () => {
|
||||
|
Reference in New Issue
Block a user