mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
Optimize e2e framework (#1428)
* reduce breadcrumb page * imrpove readability of code * reduce data-table page size * reduce datetime-picker code * fix datatable page * header and info drawer * update datatable page * toolbar cleanup * more test components cleanup * even move component cleanup * move wait utils to the Utils * unified waits * cleanup menu page * code fixes * fix code * code improvements * rename api * fix code * fix code * cleanup dialog pages * more fixes and dead code removal * code fixes * try to fix the flaky teset * fix code * fix code * update code * fix lint * unified text input * fix lint * add missing await * reduce the wrapper method around clear text * resolve element value Co-authored-by: Cilibiu Bogdan <bogdan.cilibiu@ness.com>
This commit is contained in:
@@ -94,7 +94,7 @@ describe('Extensions - Info Drawer', () => {
|
||||
|
||||
it('[C284646] Add a new tab with icon and title', async () => {
|
||||
await page.dataTable.selectItem(file);
|
||||
await page.toolbar.clickViewDetails();
|
||||
await page.toolbar.viewDetailsButton.click();
|
||||
await infoDrawer.waitForInfoDrawerToOpen();
|
||||
|
||||
const val = await infoDrawer.getTabTitle(custom_tab.order);
|
||||
@@ -104,7 +104,7 @@ describe('Extensions - Info Drawer', () => {
|
||||
|
||||
it('[C284647] Remove existing tab', async () => {
|
||||
await page.dataTable.selectItem(file);
|
||||
await page.toolbar.clickViewDetails();
|
||||
await page.toolbar.viewDetailsButton.click();
|
||||
await infoDrawer.waitForInfoDrawerToOpen();
|
||||
|
||||
expect(await infoDrawer.isTabPresent(comments_tab.title)).toBe(false, `${comments_tab.title} tab should not be present!`);
|
||||
@@ -112,7 +112,7 @@ describe('Extensions - Info Drawer', () => {
|
||||
|
||||
it('[C284648] Change tab title', async () => {
|
||||
await page.dataTable.selectItem(file);
|
||||
await page.toolbar.clickViewDetails();
|
||||
await page.toolbar.viewDetailsButton.click();
|
||||
await infoDrawer.waitForInfoDrawerToOpen();
|
||||
|
||||
expect(await infoDrawer.isTabPresent(properties_tab.title)).toBe(true, `${properties_tab.title} tab is not present`);
|
||||
@@ -121,7 +121,7 @@ describe('Extensions - Info Drawer', () => {
|
||||
|
||||
it('[C284649] Tab with icon and no title', async () => {
|
||||
await page.dataTable.selectItem(file);
|
||||
await page.toolbar.clickViewDetails();
|
||||
await page.toolbar.viewDetailsButton.click();
|
||||
await infoDrawer.waitForInfoDrawerToOpen();
|
||||
|
||||
expect(await infoDrawer.isTabPresent(no_title_tab.title)).toBe(true, `${no_title_tab.title} tab is not present`);
|
||||
@@ -130,7 +130,7 @@ describe('Extensions - Info Drawer', () => {
|
||||
|
||||
it('[C284651] Insert new component in tab', async () => {
|
||||
await page.dataTable.selectItem(file);
|
||||
await page.toolbar.clickViewDetails();
|
||||
await page.toolbar.viewDetailsButton.click();
|
||||
await infoDrawer.waitForInfoDrawerToOpen();
|
||||
|
||||
expect(await infoDrawer.isTabDisplayed(custom_tab.title)).toBe(true, `${custom_tab.title} tab is not displayed`);
|
||||
@@ -150,7 +150,7 @@ describe('Extensions - Info Drawer', () => {
|
||||
|
||||
it('[C284650] Remove all tabs', async () => {
|
||||
await page.dataTable.selectItem(file);
|
||||
await page.toolbar.clickViewDetails();
|
||||
await page.toolbar.viewDetailsButton.click();
|
||||
await infoDrawer.waitForInfoDrawerToOpen();
|
||||
|
||||
expect(await infoDrawer.isEmpty()).toBe(true, 'Info Drawer is not empty');
|
||||
|
@@ -83,11 +83,11 @@ describe('Extensions - Metadata presets', () => {
|
||||
await page.refresh();
|
||||
|
||||
await page.dataTable.selectItem(file);
|
||||
await page.toolbar.clickViewDetails();
|
||||
await page.toolbar.viewDetailsButton.click();
|
||||
await infoDrawer.waitForInfoDrawerToOpen();
|
||||
|
||||
await infoDrawer.clickTab(properties_tab.title);
|
||||
await metadataCard.clickExpandButton();
|
||||
await metadataCard.expandButton.click();
|
||||
await metadataCard.waitForFirstExpansionPanel();
|
||||
|
||||
done();
|
||||
|
@@ -109,7 +109,7 @@ describe('Extensions - Viewer', () => {
|
||||
expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened');
|
||||
expect(await viewer.isCustomContentPresent()).toBe(true, 'Custom content is not present');
|
||||
expect(await viewer.getComponentIdOfView()).toEqual(pdfFile.component);
|
||||
await viewer.clickClose();
|
||||
await viewer.closeButton.click();
|
||||
|
||||
await page.dataTable.doubleClickOnRowByName(docxFile.file_name);
|
||||
expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened');
|
||||
@@ -167,7 +167,7 @@ describe('Extensions - Viewer', () => {
|
||||
expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened');
|
||||
|
||||
await toolbar.openMoreMenu();
|
||||
expect(await toolbar.menu.isManagePermissionsPresent()).toBe(false, 'Action is still displayed');
|
||||
expect(await toolbar.menu.managePermissionsAction.isPresent()).toBe(false, 'Action is still displayed');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user