mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACS-12311] add e2e manage version nonreversible file (#5342)
* [ACS-12311] Add few more unit test for empty entry and aspectnames * [ACS-12311] Fix manage versions for search-results * [ACS-12311] add test to playwright --------- Co-authored-by: Shivangi Shree <shivangi.shree@hyland.com>
This commit is contained in:
co-authored by
Shivangi Shree
parent
86f2e48326
commit
04c3e067d0
@@ -1,68 +1,6 @@
|
|||||||
{
|
{
|
||||||
"all": {
|
"all": {
|
||||||
"XAT-4845": "https://hyland.atlassian.net/browse/ACS-12214",
|
"XAT-4845": "https://hyland.atlassian.net/browse/ACS-12214",
|
||||||
"XAT-4835": "https://hyland.atlassian.net/browse/ACS-12214",
|
"XAT-4835": "https://hyland.atlassian.net/browse/ACS-12214"
|
||||||
"XAT-4846": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4847": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4853": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4854": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4855": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4861": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4862": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4863": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4637": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4638": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4642": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4643": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4808": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4809": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4810": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4811": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4814": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4815": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4825": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4826": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4827": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4828": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4829": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4830": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4831": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4843": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4844": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4848": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4849": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4850": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4851": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4816": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4817": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4812": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4813": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4818": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4819": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4820": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4821": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4823": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4824": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4822": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4832": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4833": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4834": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4838": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4839": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4840": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4841": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4836": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4837": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4842": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4852": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4856": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4857": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4858": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4859": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4860": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4864": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4865": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4866": "https://hyland.atlassian.net/browse/ACS-12385",
|
|
||||||
"XAT-4867": "https://hyland.atlassian.net/browse/ACS-12385"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -117,6 +117,7 @@ test.describe('Special permissions : ', () => {
|
|||||||
fileDocxFavId = (await managerFileActions.uploadFileWithRename(TEST_FILES.DOCX.path, testData.fileDocxFav.name, docLibId)).entry.id;
|
fileDocxFavId = (await managerFileActions.uploadFileWithRename(TEST_FILES.DOCX.path, testData.fileDocxFav.name, docLibId)).entry.id;
|
||||||
await managerNodeActions.createFile(testData.file.name, docLibId, '', '', '', true, ['cm:versionable']);
|
await managerNodeActions.createFile(testData.file.name, docLibId, '', '', '', true, ['cm:versionable']);
|
||||||
fileFavId = (await managerNodeActions.createFile(testData.fileFav.name, docLibId, '', '', '', true, ['cm:versionable'])).entry.id;
|
fileFavId = (await managerNodeActions.createFile(testData.fileFav.name, docLibId, '', '', '', true, ['cm:versionable'])).entry.id;
|
||||||
|
await managerNodeActions.createFile(testData.fileNotVersionable.name, docLibId, '', '', '', true, []);
|
||||||
fileDocxSharedId = (await managerFileActions.uploadFileWithRename(TEST_FILES.DOCX.path, testData.fileDocxShared.name, docLibId)).entry.id;
|
fileDocxSharedId = (await managerFileActions.uploadFileWithRename(TEST_FILES.DOCX.path, testData.fileDocxShared.name, docLibId)).entry.id;
|
||||||
fileDocxSharedFavId = (await managerFileActions.uploadFileWithRename(TEST_FILES.DOCX.path, testData.fileDocxSharedFav.name, docLibId)).entry.id;
|
fileDocxSharedFavId = (await managerFileActions.uploadFileWithRename(TEST_FILES.DOCX.path, testData.fileDocxSharedFav.name, docLibId)).entry.id;
|
||||||
fileSharedId = (await managerNodeActions.createFile(testData.fileShared.name, docLibId, '', '', '', true, ['cm:versionable'])).entry.id;
|
fileSharedId = (await managerNodeActions.createFile(testData.fileShared.name, docLibId, '', '', '', true, ['cm:versionable'])).entry.id;
|
||||||
|
|||||||
@@ -81,6 +81,18 @@ export function viewerTests(userConsumer: string, siteName: string) {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('[XAT-19608] Manage Versions is not shown for a file without cm:versionable aspect', async ({ loginPage, myLibrariesPage }) => {
|
||||||
|
await checkViewerActions(
|
||||||
|
loginPage,
|
||||||
|
myLibrariesPage,
|
||||||
|
testData.fileNotVersionable.name,
|
||||||
|
testData.fileNotVersionable.viewerToolbarPrimary,
|
||||||
|
testData.fileNotVersionable.viewerToolbarMore
|
||||||
|
);
|
||||||
|
const actualMoreActions = await myLibrariesPage.matMenu.getActualMoreActions();
|
||||||
|
expect(actualMoreActions.includes('Manage Versions'), 'Manage Versions should not be visible for a non-versionable file').toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
test('[XAT-4814] Actions for Consumer on a file Office, shared', async ({ loginPage, myLibrariesPage }) => {
|
test('[XAT-4814] Actions for Consumer on a file Office, shared', async ({ loginPage, myLibrariesPage }) => {
|
||||||
await checkViewerActions(
|
await checkViewerActions(
|
||||||
loginPage,
|
loginPage,
|
||||||
@@ -372,6 +384,21 @@ export function viewerTests(userConsumer: string, siteName: string) {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('[XAT-19609] Manage Versions is not shown for a file without cm:versionable aspect - Search Results', async ({
|
||||||
|
loginPage,
|
||||||
|
searchPage
|
||||||
|
}) => {
|
||||||
|
await checkViewerActions(
|
||||||
|
loginPage,
|
||||||
|
searchPage,
|
||||||
|
testData.fileNotVersionable.name,
|
||||||
|
testData.fileNotVersionable.viewerToolbarPrimary,
|
||||||
|
testData.fileNotVersionable.viewerToolbarMore
|
||||||
|
);
|
||||||
|
const actualMoreActions = await searchPage.matMenu.getActualMoreActions();
|
||||||
|
expect(actualMoreActions.includes('Manage Versions'), 'Manage Versions should not be visible for a non-versionable file').toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
test('[XAT-4838] Actions for Consumer on a file Office, shared', async ({ loginPage, searchPage }) => {
|
test('[XAT-4838] Actions for Consumer on a file Office, shared', async ({ loginPage, searchPage }) => {
|
||||||
await checkViewerActions(
|
await checkViewerActions(
|
||||||
loginPage,
|
loginPage,
|
||||||
|
|||||||
+6
-2
@@ -57,15 +57,19 @@ export class MatMenuComponent extends BaseComponent {
|
|||||||
return menuElement.isVisible();
|
return menuElement.isVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
async verifyActualMoreActions(expectedToolbarMore: string[]): Promise<void> {
|
async getActualMoreActions(): Promise<string[]> {
|
||||||
await this.getRoot().waitFor();
|
await this.getRoot().waitFor();
|
||||||
const menus = await this.getChild('[role="menuitem"]').all();
|
const menus = await this.getChild('[role="menuitem"]').all();
|
||||||
const actualMoreActions: string[] = await Promise.all(
|
return Promise.all(
|
||||||
menus.map(async (button) => {
|
menus.map(async (button) => {
|
||||||
const title = await button.locator('span span').innerText();
|
const title = await button.locator('span span').innerText();
|
||||||
return title || '';
|
return title || '';
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
async verifyActualMoreActions(expectedToolbarMore: string[]): Promise<void> {
|
||||||
|
const actualMoreActions = await this.getActualMoreActions();
|
||||||
for (const action of expectedToolbarMore) {
|
for (const action of expectedToolbarMore) {
|
||||||
expect(
|
expect(
|
||||||
actualMoreActions.includes(action),
|
actualMoreActions.includes(action),
|
||||||
|
|||||||
@@ -336,6 +336,25 @@ export const fileSharedFavLocked = {
|
|||||||
export const fileGranularPermission = `file-${random}-granular.txt`;
|
export const fileGranularPermission = `file-${random}-granular.txt`;
|
||||||
export const fileLockedByUser = `file-${random}-my-locked.txt`;
|
export const fileLockedByUser = `file-${random}-my-locked.txt`;
|
||||||
|
|
||||||
|
// ---- non-versionable file (no cm:versionable aspect) ----
|
||||||
|
|
||||||
|
const consumerNotVersionableToolbarMore = ['Favorite', 'Copy'];
|
||||||
|
const consumerNotVersionableContextMenu = ['Share', 'Download', 'View', 'Favorite', 'Copy'];
|
||||||
|
const consumerViewerNotVersionableToolbarMore = ['Favorite', 'Copy'];
|
||||||
|
|
||||||
|
export const fileNotVersionable = {
|
||||||
|
name: `file-${random}-not-versionable.txt`,
|
||||||
|
description: 'file not shared, not fav, not office, not locked, not versionable - should not show Manage Versions',
|
||||||
|
|
||||||
|
contextMenu: consumerNotVersionableContextMenu,
|
||||||
|
toolbarPrimary: consumerToolbarPrimary,
|
||||||
|
toolbarMore: consumerNotVersionableToolbarMore,
|
||||||
|
viewerToolbarPrimary: consumerViewerToolbarPrimary,
|
||||||
|
viewerToolbarMore: consumerViewerNotVersionableToolbarMore,
|
||||||
|
|
||||||
|
searchToolbarPrimary: searchConsumerToolbarPrimary
|
||||||
|
};
|
||||||
|
|
||||||
// ---- folders ---
|
// ---- folders ---
|
||||||
|
|
||||||
const consumerFolderContextMenu = ['Download', 'Favorite', 'Copy'];
|
const consumerFolderContextMenu = ['Download', 'Favorite', 'Copy'];
|
||||||
|
|||||||
Reference in New Issue
Block a user