mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
Various code fixes (#1704)
* fix typings and missing lib * fix i18n typo, add typings * code improvements * fix missing awaits * more fixes * fix bug in the evaluators, simplify code * more fixes
This commit is contained in:
@@ -84,7 +84,7 @@ describe('Extensions - DocumentList presets', () => {
|
||||
const expectedColumns = testData.filter((item) => !item.disabled).map((data) => data.label);
|
||||
const actualColumns = await dataTable.getColumnHeadersText();
|
||||
|
||||
expect(actualColumns).toEqual(expectedColumns);
|
||||
await expect(actualColumns).toEqual(expectedColumns);
|
||||
});
|
||||
|
||||
it('[C286699] Disabled items are not shown', async () => {
|
||||
|
@@ -88,14 +88,14 @@ describe('Favorites', () => {
|
||||
const expectedColumns = ['Name', 'Location', 'Size', 'Modified', 'Modified by'];
|
||||
const actualColumns = await dataTable.getColumnHeadersText();
|
||||
|
||||
expect(actualColumns).toEqual(expectedColumns);
|
||||
await expect(actualColumns).toEqual(expectedColumns);
|
||||
});
|
||||
|
||||
it('[C213226] displays the favorite files and folders', async () => {
|
||||
expect(await dataTable.getRowsCount()).toEqual(4, 'Incorrect number of items displayed');
|
||||
expect(await dataTable.isItemPresent(fileName1)).toBe(true, `${fileName1} not displayed`);
|
||||
expect(await dataTable.isItemPresent(fileName2)).toBe(true, `${fileName2} not displayed`);
|
||||
expect(await dataTable.isItemPresent(favFolderName)).toBe(true, `${favFolderName} not displayed`);
|
||||
await expect(await dataTable.getRowsCount()).toEqual(4, 'Incorrect number of items displayed');
|
||||
await expect(await dataTable.isItemPresent(fileName1)).toBe(true, `${fileName1} not displayed`);
|
||||
await expect(await dataTable.isItemPresent(fileName2)).toBe(true, `${fileName2} not displayed`);
|
||||
await expect(await dataTable.isItemPresent(favFolderName)).toBe(true, `${favFolderName} not displayed`);
|
||||
});
|
||||
|
||||
it(`[C213228] deleted favorite file does not appear`, async () => {
|
||||
@@ -120,12 +120,12 @@ describe('Favorites', () => {
|
||||
|
||||
it('[C213650] Location column redirect - item in user Home', async () => {
|
||||
await dataTable.clickItemLocation(favFolderName);
|
||||
expect(await breadcrumb.getAllItems()).toEqual(['Personal Files']);
|
||||
await expect(await breadcrumb.getAllItems()).toEqual(['Personal Files']);
|
||||
});
|
||||
|
||||
it('[C280484] Location column redirect - file in folder', async () => {
|
||||
await dataTable.clickItemLocation(fileName2);
|
||||
expect(await breadcrumb.getAllItems()).toEqual(['Personal Files', parentFolder]);
|
||||
await expect(await breadcrumb.getAllItems()).toEqual(['Personal Files', parentFolder]);
|
||||
});
|
||||
|
||||
it('[C280485] Location column redirect - file in site', async () => {
|
||||
|
@@ -103,7 +103,7 @@ describe('File Libraries', () => {
|
||||
const expectedColumns = ['Name', 'Description', 'My Role', 'Visibility'];
|
||||
const actualColumns = await dataTable.getColumnHeadersText();
|
||||
|
||||
expect(actualColumns).toEqual(expectedColumns);
|
||||
await expect(actualColumns).toEqual(expectedColumns);
|
||||
});
|
||||
|
||||
it('[C280501] User can see only the sites he is a member of', async () => {
|
||||
@@ -123,7 +123,7 @@ describe('File Libraries', () => {
|
||||
const sitesList = await dataTable.getSitesNameAndVisibility();
|
||||
|
||||
for (const site of Object.keys(expectedSitesVisibility)) {
|
||||
expect(sitesList[site]).toEqual(expectedSitesVisibility[site]);
|
||||
await expect(sitesList[site]).toEqual(expectedSitesVisibility[site]);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -138,14 +138,14 @@ describe('File Libraries', () => {
|
||||
const sitesList = await dataTable.getSitesNameAndRole();
|
||||
|
||||
for (const site of Object.keys(expectedSitesRoles)) {
|
||||
expect(sitesList[site]).toEqual(expectedSitesRoles[site]);
|
||||
await expect(sitesList[site]).toEqual(expectedSitesRoles[site]);
|
||||
}
|
||||
});
|
||||
|
||||
it('[C217098] Site ID is displayed when two sites have the same name', async () => {
|
||||
const expectedSites = [`${siteName} (${siteId1})`, `${siteName} (${siteId2})`];
|
||||
const actualSites = await dataTable.getCellsContainingName(siteName);
|
||||
expect(actualSites.sort()).toEqual(expectedSites.sort());
|
||||
await expect(actualSites.sort()).toEqual(expectedSites.sort());
|
||||
});
|
||||
|
||||
it('[C217096] Tooltip for sites without description', async () => {
|
||||
@@ -169,7 +169,7 @@ describe('File Libraries', () => {
|
||||
const expectedColumns = ['Name', 'Description', 'My Role', 'Visibility'];
|
||||
const actualColumns = await dataTable.getColumnHeadersText();
|
||||
|
||||
expect(actualColumns).toEqual(expectedColumns);
|
||||
await expect(actualColumns).toEqual(expectedColumns);
|
||||
});
|
||||
|
||||
it('[C289897] User can see only his favorite sites', async () => {
|
||||
|
@@ -88,15 +88,15 @@ describe('Personal Files', () => {
|
||||
const expectedColumns = ['Name', 'Size', 'Modified', 'Modified by'];
|
||||
const actualColumns = await dataTable.getColumnHeadersText();
|
||||
|
||||
expect(actualColumns).toEqual(expectedColumns);
|
||||
await expect(actualColumns).toEqual(expectedColumns);
|
||||
});
|
||||
|
||||
it('[C217143] has default sorted column', async () => {
|
||||
expect(await dataTable.getSortedColumnHeaderText()).toBe('Name');
|
||||
await expect(await dataTable.getSortedColumnHeaderText()).toBe('Name');
|
||||
});
|
||||
|
||||
it('[C213242] has user created content', async () => {
|
||||
expect(await dataTable.isItemPresent(userFolder)).toBe(true, 'user folder not displayed');
|
||||
await expect(await dataTable.isItemPresent(userFolder)).toBe(true, 'user folder not displayed');
|
||||
});
|
||||
|
||||
it('[C213244] navigates to folder', async () => {
|
||||
|
@@ -84,7 +84,7 @@ describe('Recent Files', () => {
|
||||
const expectedColumns = ['Name', 'Location', 'Size', 'Modified'];
|
||||
const actualColumns = await dataTable.getColumnHeadersText();
|
||||
|
||||
expect(actualColumns).toEqual(expectedColumns);
|
||||
await expect(actualColumns).toEqual(expectedColumns);
|
||||
});
|
||||
|
||||
it('[C213171] default sorting column', async () => {
|
||||
@@ -117,7 +117,7 @@ describe('Recent Files', () => {
|
||||
|
||||
it('[C213176] Location column redirect - file in user Home', async () => {
|
||||
await dataTable.clickItemLocation(fileName2);
|
||||
expect(await breadcrumb.getAllItems()).toEqual(['Personal Files']);
|
||||
await expect(await breadcrumb.getAllItems()).toEqual(['Personal Files']);
|
||||
});
|
||||
|
||||
it('[C280486] Location column redirect - file in folder', async () => {
|
||||
|
@@ -97,7 +97,7 @@ describe('Shared Files', () => {
|
||||
const expectedColumns = ['Name', 'Location', 'Size', 'Modified', 'Modified by', 'Shared by'];
|
||||
const actualColumns = await dataTable.getColumnHeadersText();
|
||||
|
||||
expect(actualColumns).toEqual(expectedColumns);
|
||||
await expect(actualColumns).toEqual(expectedColumns);
|
||||
});
|
||||
|
||||
it('[C213115] default sorting column', async () => {
|
||||
@@ -126,7 +126,7 @@ describe('Shared Files', () => {
|
||||
|
||||
it('[C213666] Location column redirect - file in user Home', async () => {
|
||||
await dataTable.clickItemLocation(file4User);
|
||||
expect(await breadcrumb.getAllItems()).toEqual(['Personal Files']);
|
||||
await expect(await breadcrumb.getAllItems()).toEqual(['Personal Files']);
|
||||
});
|
||||
|
||||
it('[C280490] Location column redirect - file in folder', async () => {
|
||||
|
@@ -108,7 +108,7 @@ describe('Trash', () => {
|
||||
const expectedColumns = ['Name', 'Location', 'Size', 'Deleted', 'Deleted by'];
|
||||
const actualColumns = await dataTable.getColumnHeadersText();
|
||||
|
||||
expect(actualColumns).toEqual(expectedColumns);
|
||||
await expect(actualColumns).toEqual(expectedColumns);
|
||||
});
|
||||
|
||||
it('[C280493] displays the files and folders deleted by everyone', async () => {
|
||||
@@ -135,7 +135,7 @@ describe('Trash', () => {
|
||||
const expectedColumns = ['Name', 'Location', 'Size', 'Deleted'];
|
||||
const actualColumns = await dataTable.getColumnHeadersText();
|
||||
|
||||
expect(actualColumns).toEqual(expectedColumns);
|
||||
await expect(actualColumns).toEqual(expectedColumns);
|
||||
});
|
||||
|
||||
it('[C213218] displays the files and folders deleted by the user', async () => {
|
||||
|
@@ -80,7 +80,7 @@ describe('Pagination on multiple pages : ', () => {
|
||||
|
||||
describe('on Search Results', () => {
|
||||
beforeAll(async () => {
|
||||
userApi.search.waitForApi(username, { expect: initialSearchTotalItems + 101 });
|
||||
await userApi.search.waitForApi(username, { expect: initialSearchTotalItems + 101 });
|
||||
}, 120000);
|
||||
searchResultsTests(username);
|
||||
});
|
||||
|
@@ -172,7 +172,7 @@ describe('Search results - libraries', () => {
|
||||
const expectedColumns = ['Name', 'Description', 'My Role', 'Visibility'];
|
||||
const actualColumns = await dataTable.getColumnHeadersText();
|
||||
|
||||
expect(actualColumns).toEqual(expectedColumns);
|
||||
await expect(actualColumns).toEqual(expectedColumns);
|
||||
});
|
||||
|
||||
it('[C290017] Library visibility is correctly displayed', async () => {
|
||||
|
Reference in New Issue
Block a user