Code cleanup and optimisations (#3383)

* cleanup unused css

* remove unused store/reducer blocks

* fix typo in toolbar ("tool-bar")

* toolbar action: break dependency on adf-core

* unified toolbar component

* break dependency on adf toolbar module

* update e2e

* update e2e

* update e2e

* update e2e

* update e2e

* fix search results toolbar spacing

* cleanup unused app state

* cleanup unused code

* fix toolbar divider color

* fix missing buttons in the info drawer

* fix css nesting

* fix search results css
This commit is contained in:
Denys Vuika
2023-08-14 19:43:33 +01:00
committed by GitHub
parent 5279472a0a
commit 27eddf3596
78 changed files with 316 additions and 634 deletions

View File

@@ -54,18 +54,6 @@ export async function checkToolbarPrimary(item: string, expectedToolbarPrimary:
}
}
export async function checkToolbarMoreActions(item: string, expectedToolbarMore: string[]): Promise<void> {
await dataTable.selectItem(item);
await toolbar.openMoreMenu();
const actualMoreActions = await toolbar.menu.getMenuItems();
for (const action of expectedToolbarMore) {
expect(actualMoreActions.includes(action)).toBe(true, `Expected to contain ${action}`);
}
await toolbar.closeMoreMenu();
}
export async function checkToolbarActions(item: string, expectedToolbarPrimary: string[], expectedToolbarMore: string[]): Promise<void> {
await dataTable.selectItem(item);

View File

@@ -63,7 +63,7 @@ describe('File preview', () => {
const documentText = 'This is a small demonstration';
await searchInput.searchUntilResult(fileName, 'URL');
await dataTable.selectItem(fileName);
await BrowserActions.click(browsingPage.toolbar.viewDetailsButton);
await BrowserActions.click(infoDrawer.toolbar.viewDetailsButton);
await infoDrawer.previewButton.click();
await viewerPage.checkFileContent(pageNumber, documentText);
});