mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-06-30 18:14:45 +00:00
[ACS-9616] [E2E] Code refactor in ACA
This commit is contained in:
parent
744ba8db68
commit
39f62d8070
@ -65,9 +65,9 @@ test.describe('viewer file', () => {
|
|||||||
await expect(loginPage.password, 'password input is not enabled').toBeEnabled();
|
await expect(loginPage.password, 'password input is not enabled').toBeEnabled();
|
||||||
await expect(loginPage.submitButton, 'SIGN IN button is enabled').toBeDisabled();
|
await expect(loginPage.submitButton, 'SIGN IN button is enabled').toBeDisabled();
|
||||||
await loginPage.password.fill('text');
|
await loginPage.password.fill('text');
|
||||||
expect(await loginPage.isPasswordDisplayed(), 'Password is not hidden by default').toBe(false);
|
expect(await loginPage.isPasswordDisplayed(), 'Password is not hidden by default').toBeFalsy();
|
||||||
await loginPage.passwordVisibility.click();
|
await loginPage.passwordVisibility.click();
|
||||||
expect(await loginPage.isPasswordDisplayed(), 'Password is not visible on show password').toBe(true);
|
expect(await loginPage.isPasswordDisplayed(), 'Password is not visible on show password').toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -183,20 +183,11 @@ test.describe('Move actions', () => {
|
|||||||
expect(await personalFiles.dataTable.isItemPresent(sourceFileInsideFolder)).toBeTruthy();
|
expect(await personalFiles.dataTable.isItemPresent(sourceFileInsideFolder)).toBeTruthy();
|
||||||
}
|
}
|
||||||
|
|
||||||
[
|
test('[XAT-4997] Move a folder with content', async ({ personalFiles }) => {
|
||||||
{
|
await moveFolderWithContent(personalFiles, false);
|
||||||
id: 'XAT-4997',
|
});
|
||||||
testTitle: `Move a folder with content`,
|
|
||||||
lockedFile: false
|
test('[XAT-4990] Move folder that contains locked file', async ({ personalFiles }) => {
|
||||||
},
|
await moveFolderWithContent(personalFiles, true);
|
||||||
{
|
|
||||||
id: 'XAT-4990',
|
|
||||||
testTitle: 'Move folder that contains locked file',
|
|
||||||
lockedFile: true
|
|
||||||
}
|
|
||||||
].forEach((testCase) => {
|
|
||||||
test(`[${testCase.id}] ${testCase.testTitle}`, async ({ personalFiles }) => {
|
|
||||||
await moveFolderWithContent(personalFiles, testCase.lockedFile);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -245,7 +245,7 @@ test.describe('Create file from template', () => {
|
|||||||
await expect(createFileFromTemplateDialog.getDialogLabel(nameLabel)).toHaveValue(emptyString);
|
await expect(createFileFromTemplateDialog.getDialogLabel(nameLabel)).toHaveValue(emptyString);
|
||||||
expect
|
expect
|
||||||
.soft(await createFileFromTemplateDialog.isErrorMessageDisplayed(errorStrings.nameIsRequiredError), errorStrings.errorMessageNotPresent)
|
.soft(await createFileFromTemplateDialog.isErrorMessageDisplayed(errorStrings.nameIsRequiredError), errorStrings.errorMessageNotPresent)
|
||||||
.toBe(true);
|
.toBeTruthy();
|
||||||
await expect(createFileFromTemplateDialog.createButton).toBeDisabled();
|
await expect(createFileFromTemplateDialog.createButton).toBeDisabled();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -261,7 +261,7 @@ test.describe('Create file from template', () => {
|
|||||||
await createFileFromTemplateDialog.isErrorMessageDisplayed(errorStrings.nameWithSpecialCharactersError),
|
await createFileFromTemplateDialog.isErrorMessageDisplayed(errorStrings.nameWithSpecialCharactersError),
|
||||||
errorStrings.errorMessageNotPresent
|
errorStrings.errorMessageNotPresent
|
||||||
)
|
)
|
||||||
.toBe(true);
|
.toBeTruthy();
|
||||||
await expect(createFileFromTemplateDialog.createButton).toBeDisabled();
|
await expect(createFileFromTemplateDialog.createButton).toBeDisabled();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -272,7 +272,7 @@ test.describe('Create file from template', () => {
|
|||||||
await expect(createFileFromTemplateDialog.getDialogLabel(nameLabel)).toHaveValue(template1InRoot + dotString);
|
await expect(createFileFromTemplateDialog.getDialogLabel(nameLabel)).toHaveValue(template1InRoot + dotString);
|
||||||
expect
|
expect
|
||||||
.soft(await createFileFromTemplateDialog.isErrorMessageDisplayed(errorStrings.nameEndWithDotError), errorStrings.errorMessageNotPresent)
|
.soft(await createFileFromTemplateDialog.isErrorMessageDisplayed(errorStrings.nameEndWithDotError), errorStrings.errorMessageNotPresent)
|
||||||
.toBe(true);
|
.toBeTruthy();
|
||||||
await expect(createFileFromTemplateDialog.createButton).toBeDisabled();
|
await expect(createFileFromTemplateDialog.createButton).toBeDisabled();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -286,7 +286,7 @@ test.describe('Create file from template', () => {
|
|||||||
await createFileFromTemplateDialog.isErrorMessageDisplayed(errorStrings.nameContainOnlySpacesError),
|
await createFileFromTemplateDialog.isErrorMessageDisplayed(errorStrings.nameContainOnlySpacesError),
|
||||||
errorStrings.errorMessageNotPresent
|
errorStrings.errorMessageNotPresent
|
||||||
)
|
)
|
||||||
.toBe(true);
|
.toBeTruthy();
|
||||||
await expect(createFileFromTemplateDialog.createButton).toBeDisabled();
|
await expect(createFileFromTemplateDialog.createButton).toBeDisabled();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -296,7 +296,7 @@ test.describe('Create file from template', () => {
|
|||||||
await expect(createFileFromTemplateDialog.getDialogLabel(titleLabel)).toHaveValue(Utils.string257Long);
|
await expect(createFileFromTemplateDialog.getDialogLabel(titleLabel)).toHaveValue(Utils.string257Long);
|
||||||
expect
|
expect
|
||||||
.soft(await createFileFromTemplateDialog.isErrorMessageDisplayed(errorStrings.titleLengthLimitError), errorStrings.errorMessageNotPresent)
|
.soft(await createFileFromTemplateDialog.isErrorMessageDisplayed(errorStrings.titleLengthLimitError), errorStrings.errorMessageNotPresent)
|
||||||
.toBe(true);
|
.toBeTruthy();
|
||||||
await expect(createFileFromTemplateDialog.createButton).toBeDisabled();
|
await expect(createFileFromTemplateDialog.createButton).toBeDisabled();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -309,7 +309,7 @@ test.describe('Create file from template', () => {
|
|||||||
await createFileFromTemplateDialog.isErrorMessageDisplayed(errorStrings.descriptionLengthLimitError),
|
await createFileFromTemplateDialog.isErrorMessageDisplayed(errorStrings.descriptionLengthLimitError),
|
||||||
errorStrings.errorMessageNotPresent
|
errorStrings.errorMessageNotPresent
|
||||||
)
|
)
|
||||||
.toBe(true);
|
.toBeTruthy();
|
||||||
await expect(createFileFromTemplateDialog.createButton).toBeDisabled();
|
await expect(createFileFromTemplateDialog.createButton).toBeDisabled();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ test.describe('Create folder from template', () => {
|
|||||||
await expect(createFolderFromTemplateDialog.getDialogLabel(nameLabel)).toHaveValue(emptyString);
|
await expect(createFolderFromTemplateDialog.getDialogLabel(nameLabel)).toHaveValue(emptyString);
|
||||||
expect
|
expect
|
||||||
.soft(await createFolderFromTemplateDialog.isErrorMessageDisplayed(errorStrings.nameIsRequiredError), errorStrings.errorMessageNotPresent)
|
.soft(await createFolderFromTemplateDialog.isErrorMessageDisplayed(errorStrings.nameIsRequiredError), errorStrings.errorMessageNotPresent)
|
||||||
.toBe(true);
|
.toBeTruthy();
|
||||||
await expect(createFolderFromTemplateDialog.createButton).toBeDisabled();
|
await expect(createFolderFromTemplateDialog.createButton).toBeDisabled();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -288,7 +288,7 @@ test.describe('Create folder from template', () => {
|
|||||||
await createFolderFromTemplateDialog.isErrorMessageDisplayed(errorStrings.nameWithSpecialCharactersError),
|
await createFolderFromTemplateDialog.isErrorMessageDisplayed(errorStrings.nameWithSpecialCharactersError),
|
||||||
errorStrings.errorMessageNotPresent
|
errorStrings.errorMessageNotPresent
|
||||||
)
|
)
|
||||||
.toBe(true);
|
.toBeTruthy();
|
||||||
await expect(createFolderFromTemplateDialog.createButton).toBeDisabled();
|
await expect(createFolderFromTemplateDialog.createButton).toBeDisabled();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -299,7 +299,7 @@ test.describe('Create folder from template', () => {
|
|||||||
await expect(createFolderFromTemplateDialog.getDialogLabel(nameLabel)).toHaveValue(templateFolder1 + dotString);
|
await expect(createFolderFromTemplateDialog.getDialogLabel(nameLabel)).toHaveValue(templateFolder1 + dotString);
|
||||||
expect
|
expect
|
||||||
.soft(await createFolderFromTemplateDialog.isErrorMessageDisplayed(errorStrings.nameEndWithDotError), errorStrings.errorMessageNotPresent)
|
.soft(await createFolderFromTemplateDialog.isErrorMessageDisplayed(errorStrings.nameEndWithDotError), errorStrings.errorMessageNotPresent)
|
||||||
.toBe(true);
|
.toBeTruthy();
|
||||||
await expect(createFolderFromTemplateDialog.createButton).toBeDisabled();
|
await expect(createFolderFromTemplateDialog.createButton).toBeDisabled();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -313,7 +313,7 @@ test.describe('Create folder from template', () => {
|
|||||||
await createFolderFromTemplateDialog.isErrorMessageDisplayed(errorStrings.nameContainOnlySpacesError),
|
await createFolderFromTemplateDialog.isErrorMessageDisplayed(errorStrings.nameContainOnlySpacesError),
|
||||||
errorStrings.errorMessageNotPresent
|
errorStrings.errorMessageNotPresent
|
||||||
)
|
)
|
||||||
.toBe(true);
|
.toBeTruthy();
|
||||||
await expect(createFolderFromTemplateDialog.createButton).toBeDisabled();
|
await expect(createFolderFromTemplateDialog.createButton).toBeDisabled();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -323,7 +323,7 @@ test.describe('Create folder from template', () => {
|
|||||||
await expect(createFolderFromTemplateDialog.getDialogLabel(titleLabel)).toHaveValue(Utils.string257Long);
|
await expect(createFolderFromTemplateDialog.getDialogLabel(titleLabel)).toHaveValue(Utils.string257Long);
|
||||||
expect
|
expect
|
||||||
.soft(await createFolderFromTemplateDialog.isErrorMessageDisplayed(errorStrings.titleLengthLimitError), errorStrings.errorMessageNotPresent)
|
.soft(await createFolderFromTemplateDialog.isErrorMessageDisplayed(errorStrings.titleLengthLimitError), errorStrings.errorMessageNotPresent)
|
||||||
.toBe(true);
|
.toBeTruthy();
|
||||||
await expect(createFolderFromTemplateDialog.createButton).toBeDisabled();
|
await expect(createFolderFromTemplateDialog.createButton).toBeDisabled();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -336,7 +336,7 @@ test.describe('Create folder from template', () => {
|
|||||||
await createFolderFromTemplateDialog.isErrorMessageDisplayed(errorStrings.descriptionLengthLimitError),
|
await createFolderFromTemplateDialog.isErrorMessageDisplayed(errorStrings.descriptionLengthLimitError),
|
||||||
errorStrings.errorMessageNotPresent
|
errorStrings.errorMessageNotPresent
|
||||||
)
|
)
|
||||||
.toBe(true);
|
.toBeTruthy();
|
||||||
await expect(createFolderFromTemplateDialog.createButton).toBeDisabled();
|
await expect(createFolderFromTemplateDialog.createButton).toBeDisabled();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ test.describe('Create Libraries ', () => {
|
|||||||
await libraryDialog.getLabelText(libraryIdLabel).fill(specialLibraryId);
|
await libraryDialog.getLabelText(libraryIdLabel).fill(specialLibraryId);
|
||||||
await libraryDialog.page.keyboard.press(tabKeyString);
|
await libraryDialog.page.keyboard.press(tabKeyString);
|
||||||
await expect(libraryDialog.getLabelText(libraryIdLabel)).toHaveValue(specialLibraryId);
|
await expect(libraryDialog.getLabelText(libraryIdLabel)).toHaveValue(specialLibraryId);
|
||||||
expect(await libraryDialog.isErrorMessageDisplayed(libraryErrors.useNumbersAndLettersOnly), errorMessageNotPresent).toBe(true);
|
expect(await libraryDialog.isErrorMessageDisplayed(libraryErrors.useNumbersAndLettersOnly), errorMessageNotPresent).toBeTruthy();
|
||||||
await expect(libraryDialog.createButton).toBeDisabled();
|
await expect(libraryDialog.createButton).toBeDisabled();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -234,7 +234,7 @@ test.describe('Create Libraries ', () => {
|
|||||||
await expect(libraryDialog.getLabelText(libraryIdLabel)).toHaveValue(commonLibraryName);
|
await expect(libraryDialog.getLabelText(libraryIdLabel)).toHaveValue(commonLibraryName);
|
||||||
|
|
||||||
await expect(libraryDialog.createButton).toBeDisabled();
|
await expect(libraryDialog.createButton).toBeDisabled();
|
||||||
expect(await libraryDialog.isErrorMessageDisplayed(libraryErrors.libraryIdIsNotAvailable), errorMessageNotPresent).toBe(true);
|
expect(await libraryDialog.isErrorMessageDisplayed(libraryErrors.libraryIdIsNotAvailable), errorMessageNotPresent).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5125] Create library using the ID of a library from the Trashcan', async () => {
|
test('[XAT-5125] Create library using the ID of a library from the Trashcan', async () => {
|
||||||
@ -246,6 +246,6 @@ test.describe('Create Libraries ', () => {
|
|||||||
await expect(libraryDialog.createButton).toBeEnabled();
|
await expect(libraryDialog.createButton).toBeEnabled();
|
||||||
await libraryDialog.createButton.click();
|
await libraryDialog.createButton.click();
|
||||||
await expect(libraryDialog.createButton).toBeDisabled();
|
await expect(libraryDialog.createButton).toBeDisabled();
|
||||||
expect(await libraryDialog.isErrorMessageDisplayed(libraryErrors.libraryIdIsAlreadyUsed), errorMessageNotPresent).toBe(true);
|
expect(await libraryDialog.isErrorMessageDisplayed(libraryErrors.libraryIdIsAlreadyUsed), errorMessageNotPresent).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -81,7 +81,7 @@ test.describe('Edit offline - on Personal Files', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('XAT-5305] Lock information is displayed', async ({ personalFiles }) => {
|
test('XAT-5305] Lock information is displayed', async ({ personalFiles }) => {
|
||||||
expect(await personalFiles.dataTable.isItemPresent(fileLocked2)).toBe(true);
|
expect(await personalFiles.dataTable.isItemPresent(fileLocked2)).toBeTruthy();
|
||||||
expect(await personalFiles.dataTable.getLockOwner(fileLocked2)).toContain(username);
|
expect(await personalFiles.dataTable.getLockOwner(fileLocked2)).toContain(username);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -126,58 +126,58 @@ test.describe('Mark items as favorites', () => {
|
|||||||
test('[XAT-5042] Favorite action has empty star icon for an item not marked as favorite', async ({ personalFiles }) => {
|
test('[XAT-5042] Favorite action has empty star icon for an item not marked as favorite', async ({ personalFiles }) => {
|
||||||
await personalFiles.dataTable.selectItems(fileNotFavUI);
|
await personalFiles.dataTable.selectItems(fileNotFavUI);
|
||||||
await personalFiles.acaHeader.clickMoreActions();
|
await personalFiles.acaHeader.clickMoreActions();
|
||||||
expect(await personalFiles.matMenu.isMenuItemVisible('Favorite')).toBe(true);
|
expect(await personalFiles.matMenu.isMenuItemVisible('Favorite')).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5043] Favorite action has empty star icon for multiple selection of items when some are not favorite', async ({ personalFiles }) => {
|
test('[XAT-5043] Favorite action has empty star icon for multiple selection of items when some are not favorite', async ({ personalFiles }) => {
|
||||||
await personalFiles.dataTable.selectItems(fileNotFavUI, fileFavUI);
|
await personalFiles.dataTable.selectItems(fileNotFavUI, fileFavUI);
|
||||||
await personalFiles.acaHeader.clickMoreActions();
|
await personalFiles.acaHeader.clickMoreActions();
|
||||||
expect(await personalFiles.matMenu.isMenuItemVisible('Favorite')).toBe(true);
|
expect(await personalFiles.matMenu.isMenuItemVisible('Favorite')).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5044] Favorite action has full star icon for items marked as favorite', async ({ personalFiles }) => {
|
test('[XAT-5044] Favorite action has full star icon for items marked as favorite', async ({ personalFiles }) => {
|
||||||
await personalFiles.dataTable.selectItems(fileFavUI);
|
await personalFiles.dataTable.selectItems(fileFavUI);
|
||||||
await personalFiles.acaHeader.clickMoreActions();
|
await personalFiles.acaHeader.clickMoreActions();
|
||||||
expect(await personalFiles.matMenu.isMenuItemVisible('Remove Favorite')).toBe(true);
|
expect(await personalFiles.matMenu.isMenuItemVisible('Remove Favorite')).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5045] Favorite a file', async ({ personalFiles }) => {
|
test('[XAT-5045] Favorite a file', async ({ personalFiles }) => {
|
||||||
await personalFiles.selectItemsAndToggleFavorite([fileNotFav1], 'Favorite');
|
await personalFiles.selectItemsAndToggleFavorite([fileNotFav1], 'Favorite');
|
||||||
|
|
||||||
expect(await favoritesApi.isFavoriteWithRetry(username, fileNotFav1Id, { expect: true })).toBe(true);
|
expect(await favoritesApi.isFavoriteWithRetry(username, fileNotFav1Id, { expect: true })).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5046] Favorite a folder', async ({ personalFiles }) => {
|
test('[XAT-5046] Favorite a folder', async ({ personalFiles }) => {
|
||||||
await personalFiles.selectItemsAndToggleFavorite([folder], 'Favorite');
|
await personalFiles.selectItemsAndToggleFavorite([folder], 'Favorite');
|
||||||
|
|
||||||
expect(await favoritesApi.isFavoriteWithRetry(username, folderId, { expect: true })).toBe(true);
|
expect(await favoritesApi.isFavoriteWithRetry(username, folderId, { expect: true })).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5047] Unfavorite an item', async ({ personalFiles }) => {
|
test('[XAT-5047] Unfavorite an item', async ({ personalFiles }) => {
|
||||||
await personalFiles.selectItemsAndToggleFavorite([fileFav1], 'Remove Favorite');
|
await personalFiles.selectItemsAndToggleFavorite([fileFav1], 'Remove Favorite');
|
||||||
|
|
||||||
expect(await favoritesApi.isFavoriteWithRetry(username, fileFav1Id, { expect: false })).toBe(false);
|
expect(await favoritesApi.isFavoriteWithRetry(username, fileFav1Id, { expect: false })).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5048] Favorite multiple items - all unfavorite', async ({ personalFiles }) => {
|
test('[XAT-5048] Favorite multiple items - all unfavorite', async ({ personalFiles }) => {
|
||||||
await personalFiles.selectItemsAndToggleFavorite([fileNotFav2, fileNotFav3], 'Favorite');
|
await personalFiles.selectItemsAndToggleFavorite([fileNotFav2, fileNotFav3], 'Favorite');
|
||||||
|
|
||||||
expect(await favoritesApi.isFavoriteWithRetry(username, fileNotFav2Id, { expect: true })).toBe(true);
|
expect(await favoritesApi.isFavoriteWithRetry(username, fileNotFav2Id, { expect: true })).toBeTruthy();
|
||||||
expect(await favoritesApi.isFavoriteWithRetry(username, fileNotFav3Id, { expect: true })).toBe(true);
|
expect(await favoritesApi.isFavoriteWithRetry(username, fileNotFav3Id, { expect: true })).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5049] Unfavorite multiple items', async ({ personalFiles }) => {
|
test('[XAT-5049] Unfavorite multiple items', async ({ personalFiles }) => {
|
||||||
await personalFiles.selectItemsAndToggleFavorite([fileFav3, fileFav4], 'Remove Favorite');
|
await personalFiles.selectItemsAndToggleFavorite([fileFav3, fileFav4], 'Remove Favorite');
|
||||||
|
|
||||||
expect(await favoritesApi.isFavoriteWithRetry(username, fileFav3Id, { expect: false })).toBe(false);
|
expect(await favoritesApi.isFavoriteWithRetry(username, fileFav3Id, { expect: false })).toBeFalsy();
|
||||||
expect(await favoritesApi.isFavoriteWithRetry(username, fileFav4Id, { expect: false })).toBe(false);
|
expect(await favoritesApi.isFavoriteWithRetry(username, fileFav4Id, { expect: false })).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5050] Favorite multiple items - some favorite and some unfavorite', async ({ personalFiles }) => {
|
test('[XAT-5050] Favorite multiple items - some favorite and some unfavorite', async ({ personalFiles }) => {
|
||||||
await personalFiles.selectItemsAndToggleFavorite([fileNotFav4, fileFav2], 'Favorite');
|
await personalFiles.selectItemsAndToggleFavorite([fileNotFav4, fileFav2], 'Favorite');
|
||||||
|
|
||||||
expect(await favoritesApi.isFavoriteWithRetry(username, fileNotFav4Id, { expect: true })).toBe(true);
|
expect(await favoritesApi.isFavoriteWithRetry(username, fileNotFav4Id, { expect: true })).toBeTruthy();
|
||||||
expect(await favoritesApi.isFavoriteWithRetry(username, fileFav2Id, { expect: true })).toBe(true);
|
expect(await favoritesApi.isFavoriteWithRetry(username, fileFav2Id, { expect: true })).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -142,7 +142,7 @@ test.describe('Library properties', () => {
|
|||||||
|
|
||||||
await myLibrariesPage.libraryDetails.updateButton.click();
|
await myLibrariesPage.libraryDetails.updateButton.click();
|
||||||
await expect(myLibrariesPage.snackBar.message).toHaveText('Library properties updated');
|
await expect(myLibrariesPage.snackBar.message).toHaveText('Library properties updated');
|
||||||
expect(await myLibrariesPage.dataTable.isItemPresent(siteUpdated.name)).toBe(true);
|
expect(await myLibrariesPage.dataTable.isItemPresent(siteUpdated.name)).toBeTruthy();
|
||||||
await expect(myLibrariesPage.libraryDetails.infoDrawerPanel).toBeHidden();
|
await expect(myLibrariesPage.libraryDetails.infoDrawerPanel).toBeHidden();
|
||||||
expect((await sitesApi.getSite(siteForUpdate.id)).entry.title).toEqual(siteUpdated.name);
|
expect((await sitesApi.getSite(siteForUpdate.id)).entry.title).toEqual(siteUpdated.name);
|
||||||
expect((await sitesApi.getSite(siteForUpdate.id)).entry.description).toEqual(siteUpdated.description);
|
expect((await sitesApi.getSite(siteForUpdate.id)).entry.description).toEqual(siteUpdated.description);
|
||||||
@ -167,8 +167,8 @@ test.describe('Library properties', () => {
|
|||||||
await expect(myLibrariesPage.libraryDetails.updateButton).toBeEnabled();
|
await expect(myLibrariesPage.libraryDetails.updateButton).toBeEnabled();
|
||||||
|
|
||||||
await myLibrariesPage.libraryDetails.cancelButton.click();
|
await myLibrariesPage.libraryDetails.cancelButton.click();
|
||||||
expect(await myLibrariesPage.dataTable.isItemPresent(newName)).toBe(false);
|
expect(await myLibrariesPage.dataTable.isItemPresent(newName)).toBeFalsy();
|
||||||
expect(await myLibrariesPage.dataTable.isItemPresent(site.name)).toBe(true);
|
expect(await myLibrariesPage.dataTable.isItemPresent(site.name)).toBeTruthy();
|
||||||
await expect(myLibrariesPage.libraryDetails.infoDrawerPanel).toBeVisible();
|
await expect(myLibrariesPage.libraryDetails.infoDrawerPanel).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ test.describe('Library actions ', () => {
|
|||||||
await myLibrariesHeader.clickMoreActions();
|
await myLibrariesHeader.clickMoreActions();
|
||||||
await libraryMenu.clickMenuItem(favoriteButton);
|
await libraryMenu.clickMenuItem(favoriteButton);
|
||||||
await myLibrariesHeader.clickMoreActions();
|
await myLibrariesHeader.clickMoreActions();
|
||||||
expect(await libraryMenu.isMenuItemVisible(removeFavoriteButton)).toBe(true);
|
expect(await libraryMenu.isMenuItemVisible(removeFavoriteButton)).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5142] Remove a library from favorites - from My Libraries', async ({ myLibrariesPage }) => {
|
test('[XAT-5142] Remove a library from favorites - from My Libraries', async ({ myLibrariesPage }) => {
|
||||||
@ -216,10 +216,10 @@ test.describe('Library actions ', () => {
|
|||||||
await libraryTable.getRowByName(user2Library2).click();
|
await libraryTable.getRowByName(user2Library2).click();
|
||||||
await myLibrariesPage.page.waitForTimeout(1000);
|
await myLibrariesPage.page.waitForTimeout(1000);
|
||||||
await myLibrariesHeader.clickMoreActions();
|
await myLibrariesHeader.clickMoreActions();
|
||||||
expect(await libraryMenu.isMenuItemVisible(removeFavoriteButton)).toBe(true);
|
expect(await libraryMenu.isMenuItemVisible(removeFavoriteButton)).toBeTruthy();
|
||||||
await libraryMenu.clickMenuItem(removeFavoriteButton);
|
await libraryMenu.clickMenuItem(removeFavoriteButton);
|
||||||
await myLibrariesHeader.clickMoreActions();
|
await myLibrariesHeader.clickMoreActions();
|
||||||
expect(await libraryMenu.isMenuItemVisible(favoriteButton)).toBe(true);
|
expect(await libraryMenu.isMenuItemVisible(favoriteButton)).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5145] Delete a library - from My Libraries', async ({ trashPage }) => {
|
test('[XAT-5145] Delete a library - from My Libraries', async ({ trashPage }) => {
|
||||||
@ -290,7 +290,7 @@ test.describe('Library actions ', () => {
|
|||||||
await libraryTable.performActionFromExpandableMenu(adminModerateLibrary3, cancelJoinRequestButton);
|
await libraryTable.performActionFromExpandableMenu(adminModerateLibrary3, cancelJoinRequestButton);
|
||||||
await expect.soft(snackBar.getByMessageLocator(cancelJoinRequestMessage)).toBeVisible();
|
await expect.soft(snackBar.getByMessageLocator(cancelJoinRequestMessage)).toBeVisible();
|
||||||
const hasJoinRequest = await user2SitesApi.hasMembershipRequest(username2, adminModerateLibrary3);
|
const hasJoinRequest = await user2SitesApi.hasMembershipRequest(username2, adminModerateLibrary3);
|
||||||
expect(hasJoinRequest).toBe(false);
|
expect(hasJoinRequest).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5143] Remove a library from favorites - from Favorite Libraries', async ({ favoriteLibrariesPage }) => {
|
test('[XAT-5143] Remove a library from favorites - from Favorite Libraries', async ({ favoriteLibrariesPage }) => {
|
||||||
@ -373,7 +373,7 @@ test.describe('Library actions ', () => {
|
|||||||
await libraryTable.performActionFromExpandableMenu(adminModerateLibrary4, cancelJoinRequestButton);
|
await libraryTable.performActionFromExpandableMenu(adminModerateLibrary4, cancelJoinRequestButton);
|
||||||
await expect.soft(snackBar.getByMessageLocator(cancelJoinRequestMessage)).toBeVisible();
|
await expect.soft(snackBar.getByMessageLocator(cancelJoinRequestMessage)).toBeVisible();
|
||||||
const hasJoinRequest = await user2SitesApi.hasMembershipRequest(username2, adminModerateLibrary4);
|
const hasJoinRequest = await user2SitesApi.hasMembershipRequest(username2, adminModerateLibrary4);
|
||||||
expect(hasJoinRequest).toBe(false);
|
expect(hasJoinRequest).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5141] Mark a library as favorite - from Search Results', async ({ myLibrariesPage, searchPage }) => {
|
test('[XAT-5141] Mark a library as favorite - from Search Results', async ({ myLibrariesPage, searchPage }) => {
|
||||||
@ -390,7 +390,7 @@ test.describe('Library actions ', () => {
|
|||||||
await myLibrariesHeader.clickMoreActions();
|
await myLibrariesHeader.clickMoreActions();
|
||||||
await libraryMenu.clickMenuItem(favoriteButton);
|
await libraryMenu.clickMenuItem(favoriteButton);
|
||||||
await myLibrariesHeader.clickMoreActions();
|
await myLibrariesHeader.clickMoreActions();
|
||||||
expect(await libraryMenu.isMenuItemVisible(removeFavoriteButton)).toBe(true);
|
expect(await libraryMenu.isMenuItemVisible(removeFavoriteButton)).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5144] Remove a library from favorites - from Search Results', async ({ searchPage }) => {
|
test('[XAT-5144] Remove a library from favorites - from Search Results', async ({ searchPage }) => {
|
||||||
@ -408,7 +408,7 @@ test.describe('Library actions ', () => {
|
|||||||
await searchHeader.clickMoreActions();
|
await searchHeader.clickMoreActions();
|
||||||
await libraryMenu.clickMenuItem(removeFavoriteButton);
|
await libraryMenu.clickMenuItem(removeFavoriteButton);
|
||||||
await searchHeader.clickMoreActions();
|
await searchHeader.clickMoreActions();
|
||||||
expect(await libraryMenu.isMenuItemVisible(favoriteButton)).toBe(true);
|
expect(await libraryMenu.isMenuItemVisible(favoriteButton)).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5147] Delete a library - from Search Results', async ({ searchPage, trashPage }) => {
|
test('[XAT-5147] Delete a library - from Search Results', async ({ searchPage, trashPage }) => {
|
||||||
|
@ -61,7 +61,7 @@ test.describe('Empty list views', () => {
|
|||||||
|
|
||||||
test('[XAT-4402] Empty My Libraries', async ({ myLibrariesPage }) => {
|
test('[XAT-4402] Empty My Libraries', async ({ myLibrariesPage }) => {
|
||||||
await myLibrariesPage.navigate();
|
await myLibrariesPage.navigate();
|
||||||
expect(await myLibrariesPage.dataTable.isEmpty(), 'list is not empty').toBe(true);
|
expect(await myLibrariesPage.dataTable.isEmpty(), 'list is not empty').toBeTruthy();
|
||||||
expect(await myLibrariesPage.dataTable.getEmptyStateTitle()).toContain(`You aren't a member of any File Libraries yet`);
|
expect(await myLibrariesPage.dataTable.getEmptyStateTitle()).toContain(`You aren't a member of any File Libraries yet`);
|
||||||
expect(await myLibrariesPage.dataTable.getEmptyStateSubtitle()).toContain('Join libraries to upload, view, and share files.');
|
expect(await myLibrariesPage.dataTable.getEmptyStateSubtitle()).toContain('Join libraries to upload, view, and share files.');
|
||||||
});
|
});
|
||||||
@ -90,12 +90,12 @@ test.describe('Empty list views', () => {
|
|||||||
|
|
||||||
test('[XAT-4581] Trash - Pagination control is not displayed on empty page load', async ({ trashPage }) => {
|
test('[XAT-4581] Trash - Pagination control is not displayed on empty page load', async ({ trashPage }) => {
|
||||||
await trashPage.navigate();
|
await trashPage.navigate();
|
||||||
expect(await trashPage.dataTable.isEmpty(), 'list is not empty').toBe(true);
|
expect(await trashPage.dataTable.isEmpty(), 'list is not empty').toBeTruthy();
|
||||||
expect(await trashPage.dataTable.getEmptyStateTitle()).toContain('Trash is empty');
|
expect(await trashPage.dataTable.getEmptyStateTitle()).toContain('Trash is empty');
|
||||||
expect(await trashPage.dataTable.getEmptyListText()).toContain('Items you delete are moved to the Trash.');
|
expect(await trashPage.dataTable.getEmptyListText()).toContain('Items you delete are moved to the Trash.');
|
||||||
expect(await trashPage.dataTable.getEmptyListText()).toContain('Empty Trash to permanently delete items.');
|
expect(await trashPage.dataTable.getEmptyListText()).toContain('Empty Trash to permanently delete items.');
|
||||||
expect(await trashPage.pagination.isRangePresent(), 'Range is present').toBe(false);
|
expect(await trashPage.pagination.isRangePresent(), 'Range is present').toBeFalsy();
|
||||||
expect(await trashPage.pagination.isMaxItemsPresent(), 'Max items is present').toBe(false);
|
expect(await trashPage.pagination.isMaxItemsPresent(), 'Max items is present').toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-4590] Search Page - Pagination control is not displayed on empty page load', async ({ personalFiles, searchPage }) => {
|
test('[XAT-4590] Search Page - Pagination control is not displayed on empty page load', async ({ personalFiles, searchPage }) => {
|
||||||
@ -106,9 +106,9 @@ test.describe('Empty list views', () => {
|
|||||||
await searchPage.reload({ waitUntil: 'domcontentloaded' });
|
await searchPage.reload({ waitUntil: 'domcontentloaded' });
|
||||||
await searchPage.dataTable.spinnerWaitForReload();
|
await searchPage.dataTable.spinnerWaitForReload();
|
||||||
|
|
||||||
expect(await personalFiles.pagination.isRangePresent(), 'Range is present').toBe(false);
|
expect(await personalFiles.pagination.isRangePresent(), 'Range is present').toBeFalsy();
|
||||||
expect(await personalFiles.pagination.isMaxItemsPresent(), 'Max items is present').toBe(false);
|
expect(await personalFiles.pagination.isMaxItemsPresent(), 'Max items is present').toBeFalsy();
|
||||||
expect(await personalFiles.dataTable.isEmpty(), 'list is not empty').toBe(true);
|
expect(await personalFiles.dataTable.isEmpty(), 'list is not empty').toBeTruthy();
|
||||||
expect(await personalFiles.dataTable.emptySearchText.innerText()).toContain('Your search returned 0 results');
|
expect(await personalFiles.dataTable.emptySearchText.innerText()).toContain('Your search returned 0 results');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -97,11 +97,11 @@ test.describe('Favorites Files', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test(`[XAT-4456] Deleted favorite files and folders do not appear in the list`, async ({ favoritePage }) => {
|
test(`[XAT-4456] Deleted favorite files and folders do not appear in the list`, async ({ favoritePage }) => {
|
||||||
expect(await favoritePage.dataTable.isItemPresent(fileName3), `${fileName3} is displayed`).not.toBe(true);
|
expect(await favoritePage.dataTable.isItemPresent(fileName3), `${fileName3} is displayed`).not.toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test(`[XAT-4457] Favorite files and folders restored from trashcan are displayed in the list`, async ({ favoritePage }) => {
|
test(`[XAT-4457] Favorite files and folders restored from trashcan are displayed in the list`, async ({ favoritePage }) => {
|
||||||
expect(await favoritePage.dataTable.isItemPresent(fileName4), `${fileName4} not displayed`).toBe(true);
|
expect(await favoritePage.dataTable.isItemPresent(fileName4), `${fileName4} not displayed`).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-4459] Location column displays the parent folder of the file as link', async ({ favoritePage }) => {
|
test('[XAT-4459] Location column displays the parent folder of the file as link', async ({ favoritePage }) => {
|
||||||
|
@ -148,7 +148,7 @@ test.describe('File Libraries', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-4424] User can see only his favorite sites', async ({ favoritesLibrariesPage }) => {
|
test('[XAT-4424] User can see only his favorite sites', async ({ favoritesLibrariesPage }) => {
|
||||||
expect(await favoritesLibrariesPage.dataTable.isItemPresent(adminSite5), `${adminSite5} should not appear`).toBe(false);
|
expect(await favoritesLibrariesPage.dataTable.isItemPresent(adminSite5), `${adminSite5} should not appear`).toBeFalsy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -100,7 +100,7 @@ test.describe('Special permissions', () => {
|
|||||||
expect(await recentFilesPage.dataTable.getRowsCount(), 'Incorrect number of items').toBeGreaterThanOrEqual(1);
|
expect(await recentFilesPage.dataTable.getRowsCount(), 'Incorrect number of items').toBeGreaterThanOrEqual(1);
|
||||||
await siteApiAdmin.deleteSiteMember(sitePrivate, username);
|
await siteApiAdmin.deleteSiteMember(sitePrivate, username);
|
||||||
await recentFilesPage.reload();
|
await recentFilesPage.reload();
|
||||||
expect(await recentFilesPage.dataTable.isItemPresent(fileName), 'Items are still displayed').toBe(false);
|
expect(await recentFilesPage.dataTable.isItemPresent(fileName), 'Items are still displayed').toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-4455] Favorites - File is not displayed if the user no longer has permissions on it', async ({ favoritePage }) => {
|
test('[XAT-4455] Favorites - File is not displayed if the user no longer has permissions on it', async ({ favoritePage }) => {
|
||||||
@ -108,7 +108,7 @@ test.describe('Special permissions', () => {
|
|||||||
expect(await favoritePage.dataTable.getRowsCount(), 'Incorrect number of items').toBe(1);
|
expect(await favoritePage.dataTable.getRowsCount(), 'Incorrect number of items').toBe(1);
|
||||||
await siteApiAdmin.deleteSiteMember(sitePrivate, username);
|
await siteApiAdmin.deleteSiteMember(sitePrivate, username);
|
||||||
await favoritePage.reload();
|
await favoritePage.reload();
|
||||||
expect(await favoritePage.dataTable.isEmpty(), 'Items are still displayed').toBe(true);
|
expect(await favoritePage.dataTable.isEmpty(), 'Items are still displayed').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test(`[XAT-4433] Shared file that the user doesn't have permission to view is not displayed in the list`, async ({ sharedPage }) => {
|
test(`[XAT-4433] Shared file that the user doesn't have permission to view is not displayed in the list`, async ({ sharedPage }) => {
|
||||||
@ -179,7 +179,7 @@ test.describe('Special permissions', () => {
|
|||||||
recentFilesPage
|
recentFilesPage
|
||||||
}) => {
|
}) => {
|
||||||
await recentFilesPage.navigate();
|
await recentFilesPage.navigate();
|
||||||
expect(await recentFilesPage.dataTable.isItemPresent(fileName)).toBe(true);
|
expect(await recentFilesPage.dataTable.isItemPresent(fileName)).toBeTruthy();
|
||||||
expect(await recentFilesPage.dataTable.getItemLocationText(fileName)).toEqual('Unknown');
|
expect(await recentFilesPage.dataTable.getItemLocationText(fileName)).toEqual('Unknown');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ test.describe('Personal Files', () => {
|
|||||||
await personalFiles.sidenav.openPanel(SIDEBAR_LABELS.PERSONAL_FILES);
|
await personalFiles.sidenav.openPanel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||||
await personalFiles.dataTable.spinnerWaitForReload();
|
await personalFiles.dataTable.spinnerWaitForReload();
|
||||||
expect(personalFiles.page.url()).toContain(APP_ROUTES.PERSONAL_FILES);
|
expect(personalFiles.page.url()).toContain(APP_ROUTES.PERSONAL_FILES);
|
||||||
expect(await personalFiles.sidenav.isActive(SIDEBAR_LABELS.PERSONAL_FILES), 'My Libraries link not active').toBe(true);
|
expect(await personalFiles.sidenav.isActive(SIDEBAR_LABELS.PERSONAL_FILES), 'My Libraries link not active').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-4412] Personal Files - List reloads on browser Refresh', async ({ personalFiles }) => {
|
test('[XAT-4412] Personal Files - List reloads on browser Refresh', async ({ personalFiles }) => {
|
||||||
|
@ -95,7 +95,7 @@ test.describe('Recent Files', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test(`[XAT-4446] File recently edited that is deleted afterwards is not displayed in the list`, async ({ recentFilesPage }) => {
|
test(`[XAT-4446] File recently edited that is deleted afterwards is not displayed in the list`, async ({ recentFilesPage }) => {
|
||||||
expect(await recentFilesPage.dataTable.isItemPresent(fileName3), `${fileName3} is displayed`).not.toBe(true);
|
expect(await recentFilesPage.dataTable.isItemPresent(fileName3), `${fileName3} is displayed`).not.toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test(`[XAT-4448] Clicking on the location link redirects to parent folder - item in User's Home`, async ({ recentFilesPage }) => {
|
test(`[XAT-4448] Clicking on the location link redirects to parent folder - item in User's Home`, async ({ recentFilesPage }) => {
|
||||||
|
@ -104,11 +104,11 @@ test.describe('Shared Files', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test(`[XAT-4434] File that was quick shared and deleted afterwards is not displayed in the list`, async ({ sharedPage }) => {
|
test(`[XAT-4434] File that was quick shared and deleted afterwards is not displayed in the list`, async ({ sharedPage }) => {
|
||||||
expect(await sharedPage.dataTable.isItemPresent(file2User), `${file2User} is displayed`).toBe(false);
|
expect(await sharedPage.dataTable.isItemPresent(file2User), `${file2User} is displayed`).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-4435] File that was quick shared and then unshared is not displayed in the list', async ({ sharedPage }) => {
|
test('[XAT-4435] File that was quick shared and then unshared is not displayed in the list', async ({ sharedPage }) => {
|
||||||
expect(await sharedPage.dataTable.isItemPresent(file3User), `${file3User} is displayed`).toBe(false);
|
expect(await sharedPage.dataTable.isItemPresent(file3User), `${file3User} is displayed`).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test(`[XAT-4437] Clicking on the location link redirects to parent folder - item in User's Home`, async ({ sharedPage }) => {
|
test(`[XAT-4437] Clicking on the location link redirects to parent folder - item in User's Home`, async ({ sharedPage }) => {
|
||||||
|
@ -43,35 +43,35 @@ test.describe('Sidebar', () => {
|
|||||||
await personalFiles.sidenav.openPanel(SIDEBAR_LABELS.MY_LIBRARIES);
|
await personalFiles.sidenav.openPanel(SIDEBAR_LABELS.MY_LIBRARIES);
|
||||||
await personalFiles.dataTable.spinnerWaitForReload();
|
await personalFiles.dataTable.spinnerWaitForReload();
|
||||||
expect(myLibrariesPage.page.url()).toContain(APP_ROUTES.MY_LIBRARIES);
|
expect(myLibrariesPage.page.url()).toContain(APP_ROUTES.MY_LIBRARIES);
|
||||||
expect(await myLibrariesPage.sidenav.isActive(SIDEBAR_LABELS.MY_LIBRARIES), 'My Libraries link not active').toBe(true);
|
expect(await myLibrariesPage.sidenav.isActive(SIDEBAR_LABELS.MY_LIBRARIES), 'My Libraries link not active').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5387] The sidenav can be expanded when search results page is displayed', async ({ personalFiles }) => {
|
test('[XAT-5387] The sidenav can be expanded when search results page is displayed', async ({ personalFiles }) => {
|
||||||
await personalFiles.navigate({ remoteUrl: `#/search;q=test` });
|
await personalFiles.navigate({ remoteUrl: `#/search;q=test` });
|
||||||
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar expanded').toBe(false);
|
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar expanded').toBeFalsy();
|
||||||
await personalFiles.sidenav.expandSideNav();
|
await personalFiles.sidenav.expandSideNav();
|
||||||
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar not expanded').toBe(true);
|
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar not expanded').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5384] Sidenav state is preserved on page refresh', async ({ personalFiles }) => {
|
test('[XAT-5384] Sidenav state is preserved on page refresh', async ({ personalFiles }) => {
|
||||||
await personalFiles.navigate();
|
await personalFiles.navigate();
|
||||||
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar not expanded').toBe(true);
|
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar not expanded').toBeTruthy();
|
||||||
await personalFiles.reload();
|
await personalFiles.reload();
|
||||||
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar not expanded').toBe(true);
|
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar not expanded').toBeTruthy();
|
||||||
|
|
||||||
await personalFiles.sidenav.collapseSideNav();
|
await personalFiles.sidenav.collapseSideNav();
|
||||||
|
|
||||||
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar expanded').toBe(false);
|
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar expanded').toBeFalsy();
|
||||||
await personalFiles.reload();
|
await personalFiles.reload();
|
||||||
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar expanded').toBe(false);
|
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar expanded').toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5382] Sidenav can be collapsed and expanded', async ({ personalFiles }) => {
|
test('[XAT-5382] Sidenav can be collapsed and expanded', async ({ personalFiles }) => {
|
||||||
await personalFiles.navigate();
|
await personalFiles.navigate();
|
||||||
await personalFiles.sidenav.collapseSideNav();
|
await personalFiles.sidenav.collapseSideNav();
|
||||||
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar expanded').toBe(false);
|
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar expanded').toBeFalsy();
|
||||||
await personalFiles.sidenav.expandSideNav();
|
await personalFiles.sidenav.expandSideNav();
|
||||||
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar not expanded').toBe(true);
|
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar not expanded').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5386] The sidenav returns to the default state when navigating away from the search results page', async ({
|
test('[XAT-5386] The sidenav returns to the default state when navigating away from the search results page', async ({
|
||||||
@ -81,6 +81,6 @@ test.describe('Sidebar', () => {
|
|||||||
await personalFiles.navigate({ remoteUrl: `#/search;q=test` });
|
await personalFiles.navigate({ remoteUrl: `#/search;q=test` });
|
||||||
await searchPage.searchInput.searchCloseButton.click();
|
await searchPage.searchInput.searchCloseButton.click();
|
||||||
await searchPage.sidenav.expandedSidenav.waitFor({ state: 'attached' });
|
await searchPage.sidenav.expandedSidenav.waitFor({ state: 'attached' });
|
||||||
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar not expanded').toBe(true);
|
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar not expanded').toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -145,7 +145,7 @@ test.describe('Search sorting', () => {
|
|||||||
await searchPage.searchWithin(`search-sort *${random}`, 'files');
|
await searchPage.searchWithin(`search-sort *${random}`, 'files');
|
||||||
await searchPage.searchSortingPicker.actionMenu.click();
|
await searchPage.searchSortingPicker.actionMenu.click();
|
||||||
|
|
||||||
expect(await searchPage.searchSortingPicker.isSortOrderButtonDisplayed()).toBe(true);
|
expect(await searchPage.searchSortingPicker.isSortOrderButtonDisplayed()).toBeTruthy();
|
||||||
|
|
||||||
await searchPage.searchSortingPicker.clickSortByDropdown();
|
await searchPage.searchSortingPicker.clickSortByDropdown();
|
||||||
|
|
||||||
|
@ -138,11 +138,11 @@ test.describe('Share a file', () => {
|
|||||||
expect(labels[0].trim()).toBe(`Share ${file3}`);
|
expect(labels[0].trim()).toBe(`Share ${file3}`);
|
||||||
expect(await personalFiles.shareDialog.getInfoText()).toEqual('Share Link');
|
expect(await personalFiles.shareDialog.getInfoText()).toEqual('Share Link');
|
||||||
expect(await personalFiles.shareDialog.getLinkUrl()).toContain(shareLinkPreUrl);
|
expect(await personalFiles.shareDialog.getLinkUrl()).toContain(shareLinkPreUrl);
|
||||||
expect(await personalFiles.shareDialog.isUrlReadOnly()).toBe(true);
|
expect(await personalFiles.shareDialog.isUrlReadOnly()).toBeTruthy();
|
||||||
expect(await personalFiles.shareDialog.isShareToggleChecked()).toBe(true);
|
expect(await personalFiles.shareDialog.isShareToggleChecked()).toBeTruthy();
|
||||||
expect(labels[1].trim()).toBe('Link Expiry Date');
|
expect(labels[1].trim()).toBe('Link Expiry Date');
|
||||||
expect(await personalFiles.shareDialog.isExpireToggleEnabled()).toBe(false);
|
expect(await personalFiles.shareDialog.isExpireToggleEnabled()).toBeFalsy();
|
||||||
expect(await personalFiles.shareDialog.isCloseEnabled()).toBe(true);
|
expect(await personalFiles.shareDialog.isCloseEnabled()).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5151] Share a file', async ({ personalFiles, nodesApiAction }) => {
|
test('[XAT-5151] Share a file', async ({ personalFiles, nodesApiAction }) => {
|
||||||
@ -180,10 +180,10 @@ test.describe('Share a file', () => {
|
|||||||
await personalFiles.dataTable.performActionFromExpandableMenu(file5, 'Share');
|
await personalFiles.dataTable.performActionFromExpandableMenu(file5, 'Share');
|
||||||
|
|
||||||
await personalFiles.shareDialog.expireToggle.click();
|
await personalFiles.shareDialog.expireToggle.click();
|
||||||
expect(await personalFiles.shareDialog.isExpireToggleEnabled()).toBe(true);
|
expect(await personalFiles.shareDialog.isExpireToggleEnabled()).toBeTruthy();
|
||||||
|
|
||||||
await personalFiles.shareDialog.datetimePickerButton.click();
|
await personalFiles.shareDialog.datetimePickerButton.click();
|
||||||
expect(await personalFiles.shareDialog.dateTimePicker.isCalendarOpen()).toBe(true);
|
expect(await personalFiles.shareDialog.dateTimePicker.isCalendarOpen()).toBeTruthy();
|
||||||
|
|
||||||
await personalFiles.shareDialog.dateTimePicker.pickDateTime();
|
await personalFiles.shareDialog.dateTimePicker.pickDateTime();
|
||||||
|
|
||||||
@ -199,18 +199,18 @@ test.describe('Share a file', () => {
|
|||||||
const expireProperty = await nodesApiAction.getNodeProperty(file6Id, 'qshare:expiryDate');
|
const expireProperty = await nodesApiAction.getNodeProperty(file6Id, 'qshare:expiryDate');
|
||||||
|
|
||||||
expect(expireProperty).toEqual(expiryDate);
|
expect(expireProperty).toEqual(expiryDate);
|
||||||
expect(await personalFiles.shareDialog.isExpireToggleEnabled()).toBe(true);
|
expect(await personalFiles.shareDialog.isExpireToggleEnabled()).toBeTruthy();
|
||||||
expect(Utils.formatDate(await personalFiles.shareDialog.getExpireDate())).toEqual(Utils.formatDate(expiryDate));
|
expect(Utils.formatDate(await personalFiles.shareDialog.getExpireDate())).toEqual(Utils.formatDate(expiryDate));
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5155] Disable the share link expiration', async ({ personalFiles, nodesApiAction, page }) => {
|
test('[XAT-5155] Disable the share link expiration', async ({ personalFiles, nodesApiAction, page }) => {
|
||||||
await personalFiles.dataTable.performActionFromExpandableMenu(file7, 'Share');
|
await personalFiles.dataTable.performActionFromExpandableMenu(file7, 'Share');
|
||||||
|
|
||||||
expect(await personalFiles.shareDialog.isExpireToggleEnabled()).toBe(true);
|
expect(await personalFiles.shareDialog.isExpireToggleEnabled()).toBeTruthy();
|
||||||
expect(await personalFiles.shareDialog.getExpireDate()).not.toBe('');
|
expect(await personalFiles.shareDialog.getExpireDate()).not.toBe('');
|
||||||
|
|
||||||
await personalFiles.shareDialog.expireToggle.click();
|
await personalFiles.shareDialog.expireToggle.click();
|
||||||
expect(await personalFiles.shareDialog.isExpireToggleEnabled()).toBe(false);
|
expect(await personalFiles.shareDialog.isExpireToggleEnabled()).toBeFalsy();
|
||||||
|
|
||||||
await page.waitForTimeout(timeouts.tiny);
|
await page.waitForTimeout(timeouts.tiny);
|
||||||
await personalFiles.shareDialog.clickClose();
|
await personalFiles.shareDialog.clickClose();
|
||||||
@ -237,7 +237,7 @@ test.describe('Share a file', () => {
|
|||||||
await personalFiles.shareDialog.clickClose();
|
await personalFiles.shareDialog.clickClose();
|
||||||
|
|
||||||
const sharedId = await nodesApiAction.getNodeProperty(file9Id, 'qshare:sharedId');
|
const sharedId = await nodesApiAction.getNodeProperty(file9Id, 'qshare:sharedId');
|
||||||
expect(await nodesApiAction.isFileShared(file9Id)).toBe(true);
|
expect(await nodesApiAction.isFileShared(file9Id)).toBeTruthy();
|
||||||
expect(url).toContain(sharedId);
|
expect(url).toContain(sharedId);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -123,7 +123,7 @@ test.describe('Unshare a file from Search Results', () => {
|
|||||||
await personalFiles.acaHeader.shareButton.click();
|
await personalFiles.acaHeader.shareButton.click();
|
||||||
await personalFiles.viewerDialog.shareDialogTitle.waitFor({ state: 'attached', timeout: timeouts.normal });
|
await personalFiles.viewerDialog.shareDialogTitle.waitFor({ state: 'attached', timeout: timeouts.normal });
|
||||||
|
|
||||||
expect(await personalFiles.shareDialog.isShareToggleChecked()).toBe(true);
|
expect(await personalFiles.shareDialog.isShareToggleChecked()).toBeTruthy();
|
||||||
await personalFiles.shareDialog.shareToggle.click();
|
await personalFiles.shareDialog.shareToggle.click();
|
||||||
|
|
||||||
await expect(personalFiles.confirmDialog.getDialogTitle('Remove this shared link')).toBeVisible();
|
await expect(personalFiles.confirmDialog.getDialogTitle('Remove this shared link')).toBeVisible();
|
||||||
@ -150,7 +150,7 @@ test.describe('Unshare a file from Search Results', () => {
|
|||||||
await page.goto(url);
|
await page.goto(url);
|
||||||
await personalFiles.viewer.waitForViewerToOpen();
|
await personalFiles.viewer.waitForViewerToOpen();
|
||||||
await expect(personalFiles.viewer.fileTitleButtonLocator).not.toHaveText(file2);
|
await expect(personalFiles.viewer.fileTitleButtonLocator).not.toHaveText(file2);
|
||||||
expect(await nodesApiAction.isFileShared(file2Id)).toBe(false);
|
expect(await nodesApiAction.isFileShared(file2Id)).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5199] Cancel the Unshare action', async ({ personalFiles, searchPage }) => {
|
test('[XAT-5199] Cancel the Unshare action', async ({ personalFiles, searchPage }) => {
|
||||||
@ -165,7 +165,7 @@ test.describe('Unshare a file from Search Results', () => {
|
|||||||
const urlBefore = await personalFiles.shareDialog.getLinkUrl();
|
const urlBefore = await personalFiles.shareDialog.getLinkUrl();
|
||||||
await personalFiles.shareDialog.shareToggle.click();
|
await personalFiles.shareDialog.shareToggle.click();
|
||||||
await personalFiles.confirmDialog.cancelButton.click();
|
await personalFiles.confirmDialog.cancelButton.click();
|
||||||
expect(await personalFiles.shareDialog.isShareToggleChecked()).toBe(true);
|
expect(await personalFiles.shareDialog.isShareToggleChecked()).toBeTruthy();
|
||||||
|
|
||||||
const urlAfter = await personalFiles.shareDialog.getLinkUrl();
|
const urlAfter = await personalFiles.shareDialog.getLinkUrl();
|
||||||
expect(urlBefore).toEqual(urlAfter);
|
expect(urlBefore).toEqual(urlAfter);
|
||||||
@ -187,7 +187,7 @@ test.describe('Unshare a file from Search Results', () => {
|
|||||||
await page.goto(url);
|
await page.goto(url);
|
||||||
await personalFiles.viewer.waitForViewerToOpen();
|
await personalFiles.viewer.waitForViewerToOpen();
|
||||||
expect(personalFiles.viewer.fileTitleButtonLocator.textContent()).not.toEqual(file4);
|
expect(personalFiles.viewer.fileTitleButtonLocator.textContent()).not.toEqual(file4);
|
||||||
expect(await nodesApiAction.isFileShared(file4Id)).toBe(false);
|
expect(await nodesApiAction.isFileShared(file4Id)).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5227] Unshare a file as consumer - file shared by other user - Search Page', async ({ personalFiles, searchPage, nodesApiAction }) => {
|
test('[XAT-5227] Unshare a file as consumer - file shared by other user - Search Page', async ({ personalFiles, searchPage, nodesApiAction }) => {
|
||||||
@ -199,10 +199,10 @@ test.describe('Unshare a file from Search Results', () => {
|
|||||||
await personalFiles.dataTable.selectItems(fileSite1);
|
await personalFiles.dataTable.selectItems(fileSite1);
|
||||||
await personalFiles.acaHeader.shareButton.click();
|
await personalFiles.acaHeader.shareButton.click();
|
||||||
|
|
||||||
expect(await personalFiles.shareDialog.isShareToggleChecked()).toBe(true);
|
expect(await personalFiles.shareDialog.isShareToggleChecked()).toBeTruthy();
|
||||||
await personalFiles.shareDialog.shareToggle.click();
|
await personalFiles.shareDialog.shareToggle.click();
|
||||||
await personalFiles.confirmDialog.okButton.click();
|
await personalFiles.confirmDialog.okButton.click();
|
||||||
expect(await nodesApiAction.isFileShared(fileSite2Id)).toBe(true);
|
expect(await nodesApiAction.isFileShared(fileSite2Id)).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5228] Unshare a file as consumer - file shared by the user - Search Page', async ({
|
test('[XAT-5228] Unshare a file as consumer - file shared by the user - Search Page', async ({
|
||||||
@ -218,11 +218,11 @@ test.describe('Unshare a file from Search Results', () => {
|
|||||||
|
|
||||||
await personalFiles.dataTable.selectItems(fileSite2);
|
await personalFiles.dataTable.selectItems(fileSite2);
|
||||||
await personalFiles.acaHeader.shareButton.click();
|
await personalFiles.acaHeader.shareButton.click();
|
||||||
expect(await personalFiles.shareDialog.isShareToggleChecked()).toBe(true);
|
expect(await personalFiles.shareDialog.isShareToggleChecked()).toBeTruthy();
|
||||||
|
|
||||||
await personalFiles.shareDialog.shareToggle.click();
|
await personalFiles.shareDialog.shareToggle.click();
|
||||||
await personalFiles.confirmDialog.okButton.click();
|
await personalFiles.confirmDialog.okButton.click();
|
||||||
await page.waitForTimeout(timeouts.tiny);
|
await page.waitForTimeout(timeouts.tiny);
|
||||||
expect(await nodesApiAction.isFileShared(fileSite2Id)).toBe(false);
|
expect(await nodesApiAction.isFileShared(fileSite2Id)).toBeFalsy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -95,12 +95,12 @@ test.describe('viewer file', () => {
|
|||||||
await personalFiles.dataTable.getRowByName(randomDocxName).click();
|
await personalFiles.dataTable.getRowByName(randomDocxName).click();
|
||||||
await personalFiles.acaHeader.viewButton.click();
|
await personalFiles.acaHeader.viewButton.click();
|
||||||
await personalFiles.dataTable.spinnerWaitForReload();
|
await personalFiles.dataTable.spinnerWaitForReload();
|
||||||
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-17737] Check action for viewer to close', async ({ personalFiles }) => {
|
test('[XAT-17737] Check action for viewer to close', async ({ personalFiles }) => {
|
||||||
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
||||||
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
expect(await personalFiles.viewer.getCloseButtonTooltip()).toEqual('Close');
|
expect(await personalFiles.viewer.getCloseButtonTooltip()).toEqual('Close');
|
||||||
await personalFiles.viewer.closeButtonLocator.click();
|
await personalFiles.viewer.closeButtonLocator.click();
|
||||||
await expect(personalFiles.dataTable.getCellLinkByName(randomDocxName), 'Viewer did not close').toBeVisible();
|
await expect(personalFiles.dataTable.getCellLinkByName(randomDocxName), 'Viewer did not close').toBeVisible();
|
||||||
@ -110,7 +110,7 @@ test.describe('viewer file', () => {
|
|||||||
const previewURL = `#/personal-files/${folderId}/(viewer:view/${fileDocxId})`;
|
const previewURL = `#/personal-files/${folderId}/(viewer:view/${fileDocxId})`;
|
||||||
await personalFiles.navigate({ remoteUrl: previewURL });
|
await personalFiles.navigate({ remoteUrl: previewURL });
|
||||||
await personalFiles.dataTable.spinnerWaitForReload();
|
await personalFiles.dataTable.spinnerWaitForReload();
|
||||||
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
await expect(personalFiles.viewer.fileTitleButtonLocator).toHaveText(randomDocxName);
|
await expect(personalFiles.viewer.fileTitleButtonLocator).toHaveText(randomDocxName);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -72,7 +72,7 @@ test.describe('Download from Personal Files', () => {
|
|||||||
await personalFiles.dataTable.selectItems(childFolder);
|
await personalFiles.dataTable.selectItems(childFolder);
|
||||||
const [download] = await Promise.all([personalFiles.page.waitForEvent('download'), personalFiles.acaHeader.downloadButton.click()]);
|
const [download] = await Promise.all([personalFiles.page.waitForEvent('download'), personalFiles.acaHeader.downloadButton.click()]);
|
||||||
const filePath = await download.path();
|
const filePath = await download.path();
|
||||||
expect(await Utils.verifyZipFileContent(filePath, [childFolder])).toBe(true);
|
expect(await Utils.verifyZipFileContent(filePath, [childFolder])).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-4913] Download a multiple selection of files / folders', async ({ personalFiles }) => {
|
test('[XAT-4913] Download a multiple selection of files / folders', async ({ personalFiles }) => {
|
||||||
@ -80,6 +80,6 @@ test.describe('Download from Personal Files', () => {
|
|||||||
await personalFiles.dataTable.selectItems(childFile, childFolder);
|
await personalFiles.dataTable.selectItems(childFile, childFolder);
|
||||||
const [download] = await Promise.all([personalFiles.page.waitForEvent('download'), personalFiles.acaHeader.downloadButton.click()]);
|
const [download] = await Promise.all([personalFiles.page.waitForEvent('download'), personalFiles.acaHeader.downloadButton.click()]);
|
||||||
const filePath = await download.path();
|
const filePath = await download.path();
|
||||||
expect(await Utils.verifyZipFileContent(filePath, [childFile, childFolder])).toBe(true);
|
expect(await Utils.verifyZipFileContent(filePath, [childFile, childFolder])).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -129,7 +129,7 @@ test.describe('Upload new version', () => {
|
|||||||
await searchPage.uploadNewVersionDialog.description.fill('new version description');
|
await searchPage.uploadNewVersionDialog.description.fill('new version description');
|
||||||
await searchPage.uploadNewVersionDialog.cancelButton.click();
|
await searchPage.uploadNewVersionDialog.cancelButton.click();
|
||||||
|
|
||||||
expect(await searchPage.dataTable.isItemPresent(fileSearch3)).toBe(true);
|
expect(await searchPage.dataTable.isItemPresent(fileSearch3)).toBeTruthy();
|
||||||
expect(await nodesApi.getNodeProperty(fileSearch3Id, 'cm:versionLabel'), 'File has incorrect version label').toEqual('1.0');
|
expect(await nodesApi.getNodeProperty(fileSearch3Id, 'cm:versionLabel'), 'File has incorrect version label').toEqual('1.0');
|
||||||
expect(await nodesApi.getNodeProperty(fileSearch3Id, 'cm:versionType'), 'File has incorrect version type').toEqual('MAJOR');
|
expect(await nodesApi.getNodeProperty(fileSearch3Id, 'cm:versionType'), 'File has incorrect version type').toEqual('MAJOR');
|
||||||
});
|
});
|
||||||
@ -159,7 +159,7 @@ test.describe('Upload new version', () => {
|
|||||||
|
|
||||||
const message = await personalFiles.snackBar.message.innerText();
|
const message = await personalFiles.snackBar.message.innerText();
|
||||||
expect(message).toContain('New version not uploaded, another file with the same name already exists');
|
expect(message).toContain('New version not uploaded, another file with the same name already exists');
|
||||||
expect(await personalFiles.dataTable.isItemPresent(file1)).toBe(true);
|
expect(await personalFiles.dataTable.isItemPresent(file1)).toBeTruthy();
|
||||||
expect(await nodesApi.getNodeProperty(file1Id, 'cm:versionLabel')).toEqual('1.0');
|
expect(await nodesApi.getNodeProperty(file1Id, 'cm:versionLabel')).toEqual('1.0');
|
||||||
expect(await nodesApi.getNodeProperty(file1Id, 'cm:versionType')).toEqual('MAJOR');
|
expect(await nodesApi.getNodeProperty(file1Id, 'cm:versionType')).toEqual('MAJOR');
|
||||||
});
|
});
|
||||||
@ -170,7 +170,7 @@ test.describe('Upload new version', () => {
|
|||||||
await personalFiles.uploadNewVersionDialog.description.fill('new version description');
|
await personalFiles.uploadNewVersionDialog.description.fill('new version description');
|
||||||
await personalFiles.uploadNewVersionDialog.uploadButton.click();
|
await personalFiles.uploadNewVersionDialog.uploadButton.click();
|
||||||
|
|
||||||
expect(await personalFiles.dataTable.isItemPresent(fileToUpload1), 'File was not updated').toBe(true);
|
expect(await personalFiles.dataTable.isItemPresent(fileToUpload1), 'File was not updated').toBeTruthy();
|
||||||
expect(await nodesApi.getNodeProperty(fileLocked1Id, 'cm:lockType'), `${fileLocked1} is still locked`).not.toEqual('WRITE_LOCK');
|
expect(await nodesApi.getNodeProperty(fileLocked1Id, 'cm:lockType'), `${fileLocked1} is still locked`).not.toEqual('WRITE_LOCK');
|
||||||
expect(await nodesApi.getNodeProperty(fileLocked1Id, 'cm:versionType'), 'File has incorrect version type').toEqual('MINOR');
|
expect(await nodesApi.getNodeProperty(fileLocked1Id, 'cm:versionType'), 'File has incorrect version type').toEqual('MINOR');
|
||||||
expect(await nodesApi.getNodeProperty(fileLocked1Id, 'cm:versionLabel'), 'File has incorrect version label').toEqual('1.1');
|
expect(await nodesApi.getNodeProperty(fileLocked1Id, 'cm:versionLabel'), 'File has incorrect version label').toEqual('1.1');
|
||||||
@ -180,7 +180,7 @@ test.describe('Upload new version', () => {
|
|||||||
await uploadNewVersion(personalFiles, fileLocked2, TEST_FILES.DOCX2.path);
|
await uploadNewVersion(personalFiles, fileLocked2, TEST_FILES.DOCX2.path);
|
||||||
await personalFiles.uploadNewVersionDialog.cancelButton.click();
|
await personalFiles.uploadNewVersionDialog.cancelButton.click();
|
||||||
|
|
||||||
expect(await personalFiles.dataTable.isItemPresent(fileLocked2), 'File not displayed').toBe(true);
|
expect(await personalFiles.dataTable.isItemPresent(fileLocked2), 'File not displayed').toBeTruthy();
|
||||||
expect(await nodesApi.getNodeProperty(fileLocked2Id, 'cm:lockType'), `${fileLocked2} was unlocked`).toEqual('WRITE_LOCK');
|
expect(await nodesApi.getNodeProperty(fileLocked2Id, 'cm:lockType'), `${fileLocked2} was unlocked`).toEqual('WRITE_LOCK');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -60,7 +60,7 @@ test.describe('Upload files', () => {
|
|||||||
|
|
||||||
test('[XAT-5279] Upload a file / multiple files', async ({ personalFiles }) => {
|
test('[XAT-5279] Upload a file / multiple files', async ({ personalFiles }) => {
|
||||||
const uploadedFiles = await personalFiles.dataTable.isItemPresent(TEST_FILES.JPG_FILE.name);
|
const uploadedFiles = await personalFiles.dataTable.isItemPresent(TEST_FILES.JPG_FILE.name);
|
||||||
expect(uploadedFiles, 'Uploaded file was not present in data table').toBe(true);
|
expect(uploadedFiles, 'Uploaded file was not present in data table').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-17778] The upload dialog can be closed', async ({ personalFiles }) => {
|
test('[XAT-17778] The upload dialog can be closed', async ({ personalFiles }) => {
|
||||||
|
@ -102,7 +102,7 @@ test.describe('viewer action file', () => {
|
|||||||
await personalFiles.dataTable.getCellLinkByName(randomDocxName).waitFor({ state: 'attached' });
|
await personalFiles.dataTable.getCellLinkByName(randomDocxName).waitFor({ state: 'attached' });
|
||||||
await expect(personalFiles.dataTable.getCellLinkByName(randomDocxDelete), 'file should not visible').toBeHidden();
|
await expect(personalFiles.dataTable.getCellLinkByName(randomDocxDelete), 'file should not visible').toBeHidden();
|
||||||
await trashPage.navigate({ waitUntil: 'domcontentloaded' });
|
await trashPage.navigate({ waitUntil: 'domcontentloaded' });
|
||||||
expect(await trashPage.dataTable.isItemPresent(randomDocxDelete), 'Item should be present in Trash').toBe(true);
|
expect(await trashPage.dataTable.isItemPresent(randomDocxDelete), 'Item should be present in Trash').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5423] Viewer - Edit Offline action - Personal Files', async ({ personalFiles }) => {
|
test('[XAT-5423] Viewer - Edit Offline action - Personal Files', async ({ personalFiles }) => {
|
||||||
@ -115,9 +115,9 @@ test.describe('viewer action file', () => {
|
|||||||
await personalFiles.acaHeader.downloadButtonViewer.click();
|
await personalFiles.acaHeader.downloadButtonViewer.click();
|
||||||
const download = await downloadPromise;
|
const download = await downloadPromise;
|
||||||
expect(download.suggestedFilename(), 'File should found in download location').toBe(fileForEditOffline);
|
expect(download.suggestedFilename(), 'File should found in download location').toBe(fileForEditOffline);
|
||||||
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is closed after pressing Full screen').toBe(true);
|
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is closed after pressing Full screen').toBeTruthy();
|
||||||
await personalFiles.acaHeader.clickViewerMoreActions();
|
await personalFiles.acaHeader.clickViewerMoreActions();
|
||||||
expect(await personalFiles.matMenu.isMenuItemVisible('Cancel Editing'), 'Cancel Editing menu should be visible').toBe(true);
|
expect(await personalFiles.matMenu.isMenuItemVisible('Cancel Editing'), 'Cancel Editing menu should be visible').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5424] Viewer - Cancel Editing action - Personal Files', async ({ personalFiles }) => {
|
test('[XAT-5424] Viewer - Cancel Editing action - Personal Files', async ({ personalFiles }) => {
|
||||||
@ -126,14 +126,14 @@ test.describe('viewer action file', () => {
|
|||||||
await personalFiles.acaHeader.clickViewerMoreActions();
|
await personalFiles.acaHeader.clickViewerMoreActions();
|
||||||
await personalFiles.matMenu.clickMenuItem('Cancel Editing');
|
await personalFiles.matMenu.clickMenuItem('Cancel Editing');
|
||||||
await personalFiles.acaHeader.clickViewerMoreActions();
|
await personalFiles.acaHeader.clickViewerMoreActions();
|
||||||
expect(await personalFiles.matMenu.isMenuItemVisible('Edit Offline'), 'Edit offline menu should be visible').toBe(true);
|
expect(await personalFiles.matMenu.isMenuItemVisible('Edit Offline'), 'Edit offline menu should be visible').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5415] Full screen action', async ({ personalFiles }) => {
|
test('[XAT-5415] Full screen action', async ({ personalFiles }) => {
|
||||||
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
||||||
await personalFiles.viewer.waitForViewerToOpen();
|
await personalFiles.viewer.waitForViewerToOpen();
|
||||||
await personalFiles.acaHeader.fullScreenButton.click();
|
await personalFiles.acaHeader.fullScreenButton.click();
|
||||||
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is closed after pressing Full screen').toBe(true);
|
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is closed after pressing Full screen').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5416] Pressing ESC in the viewer closes only the action dialog', async ({ personalFiles }) => {
|
test('[XAT-5416] Pressing ESC in the viewer closes only the action dialog', async ({ personalFiles }) => {
|
||||||
@ -141,16 +141,16 @@ test.describe('viewer action file', () => {
|
|||||||
await personalFiles.viewer.waitForViewerToOpen();
|
await personalFiles.viewer.waitForViewerToOpen();
|
||||||
await personalFiles.acaHeader.clickViewerMoreActions();
|
await personalFiles.acaHeader.clickViewerMoreActions();
|
||||||
await personalFiles.viewerDialog.clickActionsCopy();
|
await personalFiles.viewerDialog.clickActionsCopy();
|
||||||
expect(await personalFiles.viewerDialog.isCopyDialogOpen(), 'Dialog is not open').toBe(true);
|
expect(await personalFiles.viewerDialog.isCopyDialogOpen(), 'Dialog is not open').toBeTruthy();
|
||||||
await personalFiles.page.keyboard.press('Escape');
|
await personalFiles.page.keyboard.press('Escape');
|
||||||
expect(await personalFiles.viewerDialog.isCopyDialogClose(), 'Dialog is not open').toBe(false);
|
expect(await personalFiles.viewerDialog.isCopyDialogClose(), 'Dialog is not open').toBeFalsy();
|
||||||
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer should be opened').toBe(true);
|
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer should be opened').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5442] Favorite action from Shared Files', async ({ sharedPage, favoritePage }) => {
|
test('[XAT-5442] Favorite action from Shared Files', async ({ sharedPage, favoritePage }) => {
|
||||||
await sharedPage.navigate({ waitUntil: 'domcontentloaded' });
|
await sharedPage.navigate({ waitUntil: 'domcontentloaded' });
|
||||||
await sharedPage.dataTable.performClickFolderOrFileToOpen(randomDocxNameShare);
|
await sharedPage.dataTable.performClickFolderOrFileToOpen(randomDocxNameShare);
|
||||||
expect(await sharedPage.viewer.isViewerOpened(), 'Viewer should be opened').toBe(true);
|
expect(await sharedPage.viewer.isViewerOpened(), 'Viewer should be opened').toBeTruthy();
|
||||||
|
|
||||||
await sharedPage.acaHeader.clickViewerMoreActions();
|
await sharedPage.acaHeader.clickViewerMoreActions();
|
||||||
|
|
||||||
@ -163,13 +163,13 @@ test.describe('viewer action file', () => {
|
|||||||
await expect(sharedPage.viewerDialog.removeFavoriteMenuButton, 'Item should be remove favorite').toBeVisible();
|
await expect(sharedPage.viewerDialog.removeFavoriteMenuButton, 'Item should be remove favorite').toBeVisible();
|
||||||
await sharedPage.page.keyboard.press('Escape');
|
await sharedPage.page.keyboard.press('Escape');
|
||||||
await favoritePage.navigate({ waitUntil: 'domcontentloaded' });
|
await favoritePage.navigate({ waitUntil: 'domcontentloaded' });
|
||||||
expect(await favoritePage.dataTable.isItemPresent(randomDocxNameShare), 'Item is not present in Favorites list').toBe(true);
|
expect(await favoritePage.dataTable.isItemPresent(randomDocxNameShare), 'Item is not present in Favorites list').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5462] Share action from Favorites', async ({ favoritePage }) => {
|
test('[XAT-5462] Share action from Favorites', async ({ favoritePage }) => {
|
||||||
await favoritePage.navigate({ waitUntil: 'domcontentloaded' });
|
await favoritePage.navigate({ waitUntil: 'domcontentloaded' });
|
||||||
await favoritePage.dataTable.performClickFolderOrFileToOpen(randomDocxNameFavorite);
|
await favoritePage.dataTable.performClickFolderOrFileToOpen(randomDocxNameFavorite);
|
||||||
expect(await favoritePage.viewer.isViewerOpened(), 'Viewer should be opened').toBe(true);
|
expect(await favoritePage.viewer.isViewerOpened(), 'Viewer should be opened').toBeTruthy();
|
||||||
await favoritePage.viewer.shareButton.waitFor({ state: 'attached', timeout: timeouts.normal });
|
await favoritePage.viewer.shareButton.waitFor({ state: 'attached', timeout: timeouts.normal });
|
||||||
await favoritePage.viewer.shareButton.click();
|
await favoritePage.viewer.shareButton.click();
|
||||||
await favoritePage.viewerDialog.shareDialogTitle.waitFor({ state: 'attached', timeout: timeouts.normal });
|
await favoritePage.viewerDialog.shareDialogTitle.waitFor({ state: 'attached', timeout: timeouts.normal });
|
||||||
@ -190,7 +190,7 @@ test.describe('viewer action file', () => {
|
|||||||
await personalFiles.uploadNewVersionDialog.uploadButton.click();
|
await personalFiles.uploadNewVersionDialog.uploadButton.click();
|
||||||
await personalFiles.uploadNewVersionDialog.uploadButton.waitFor({ state: 'detached' });
|
await personalFiles.uploadNewVersionDialog.uploadButton.waitFor({ state: 'detached' });
|
||||||
await expect(personalFiles.uploadNewVersionDialog.cancelButton).toHaveCount(0);
|
await expect(personalFiles.uploadNewVersionDialog.cancelButton).toHaveCount(0);
|
||||||
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not open').toBe(true);
|
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not open').toBeTruthy();
|
||||||
await Utils.waitForApiResponse(personalFiles, 'content', 200);
|
await Utils.waitForApiResponse(personalFiles, 'content', 200);
|
||||||
|
|
||||||
expect(await personalFiles.viewer.getFileTitle()).toContain(docxFile2);
|
expect(await personalFiles.viewer.getFileTitle()).toContain(docxFile2);
|
||||||
@ -220,7 +220,7 @@ test.describe('viewer action file', () => {
|
|||||||
test('[XAT-5448] Copy action from Recent Files', async ({ recentFilesPage, personalFiles }) => {
|
test('[XAT-5448] Copy action from Recent Files', async ({ recentFilesPage, personalFiles }) => {
|
||||||
await recentFilesPage.navigate();
|
await recentFilesPage.navigate();
|
||||||
await recentFilesPage.dataTable.performClickFolderOrFileToOpen(docxRecentFiles);
|
await recentFilesPage.dataTable.performClickFolderOrFileToOpen(docxRecentFiles);
|
||||||
expect(await recentFilesPage.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await recentFilesPage.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
|
|
||||||
await recentFilesPage.acaHeader.clickViewerMoreActions();
|
await recentFilesPage.acaHeader.clickViewerMoreActions();
|
||||||
await recentFilesPage.matMenu.clickMenuItem('Copy');
|
await recentFilesPage.matMenu.clickMenuItem('Copy');
|
||||||
@ -231,6 +231,6 @@ test.describe('viewer action file', () => {
|
|||||||
expect(await recentFilesPage.snackBar.message.innerText()).toContain('Copied 1 item');
|
expect(await recentFilesPage.snackBar.message.innerText()).toContain('Copied 1 item');
|
||||||
await recentFilesPage.viewer.closeButtonLocator.click();
|
await recentFilesPage.viewer.closeButtonLocator.click();
|
||||||
await personalFiles.navigate({ remoteUrl: `#/personal-files/${destinationId}` });
|
await personalFiles.navigate({ remoteUrl: `#/personal-files/${destinationId}` });
|
||||||
expect(await personalFiles.dataTable.isItemPresent(docxRecentFiles), 'Item is not present in destination').toBe(true);
|
expect(await personalFiles.dataTable.isItemPresent(docxRecentFiles), 'Item is not present in destination').toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -91,7 +91,7 @@ test.describe('viewer file types', () => {
|
|||||||
fileType: 'viewerImage' | 'viewerDocument' | 'viewerMedia' = 'viewerImage'
|
fileType: 'viewerImage' | 'viewerDocument' | 'viewerMedia' = 'viewerImage'
|
||||||
) {
|
) {
|
||||||
await page.dataTable.performClickFolderOrFileToOpen(fileName);
|
await page.dataTable.performClickFolderOrFileToOpen(fileName);
|
||||||
expect(await page.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await page.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
await page.viewer.waitForViewerLoaderToFinish();
|
await page.viewer.waitForViewerLoaderToFinish();
|
||||||
|
|
||||||
const viewerElements = {
|
const viewerElements = {
|
||||||
@ -146,7 +146,7 @@ test.describe('viewer file types', () => {
|
|||||||
|
|
||||||
test('[XAT-5485] User can select a document page through the thumbnail pane', async ({ personalFiles }) => {
|
test('[XAT-5485] User can select a document page through the thumbnail pane', async ({ personalFiles }) => {
|
||||||
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomPdfName);
|
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomPdfName);
|
||||||
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
await personalFiles.viewer.documentThumbnailButton.click();
|
await personalFiles.viewer.documentThumbnailButton.click();
|
||||||
await expect(personalFiles.viewer.thumbnailsPages.first()).toBeVisible();
|
await expect(personalFiles.viewer.thumbnailsPages.first()).toBeVisible();
|
||||||
await personalFiles.viewer.checkViewerActivePage(1);
|
await personalFiles.viewer.checkViewerActivePage(1);
|
||||||
@ -156,7 +156,7 @@ test.describe('viewer file types', () => {
|
|||||||
|
|
||||||
test('[XAT-5486] User can close the thumbnail pane', async ({ personalFiles }) => {
|
test('[XAT-5486] User can close the thumbnail pane', async ({ personalFiles }) => {
|
||||||
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomPdfName);
|
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomPdfName);
|
||||||
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
await personalFiles.viewer.documentThumbnailButton.click();
|
await personalFiles.viewer.documentThumbnailButton.click();
|
||||||
await expect(personalFiles.viewer.thumbnailsPages.first()).toBeVisible();
|
await expect(personalFiles.viewer.thumbnailsPages.first()).toBeVisible();
|
||||||
await personalFiles.viewer.thumbnailsCloseButton.click();
|
await personalFiles.viewer.thumbnailsCloseButton.click();
|
||||||
|
@ -53,10 +53,10 @@ test.describe('viewer file', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5467] Password dialog appears when opening a protected file', async ({ personalFiles }) => {
|
test('[XAT-5467] Password dialog appears when opening a protected file', async ({ personalFiles }) => {
|
||||||
expect(await personalFiles.passwordDialog.isDialogOpen(), 'Password dialog not open').toBe(true);
|
expect(await personalFiles.passwordDialog.isDialogOpen(), 'Password dialog not open').toBeTruthy();
|
||||||
expect(await personalFiles.passwordDialog.isPasswordInputDisplayed(), 'Password input not displayed').toBe(true);
|
expect(await personalFiles.passwordDialog.isPasswordInputDisplayed(), 'Password input not displayed').toBeTruthy();
|
||||||
await expect(personalFiles.passwordDialog.submitButton, 'Submit button not disabled').toBeVisible();
|
await expect(personalFiles.passwordDialog.submitButton, 'Submit button not disabled').toBeVisible();
|
||||||
expect(await personalFiles.passwordDialog.isCloseVisible(), 'Close button not enabled').toBe(true);
|
expect(await personalFiles.passwordDialog.isCloseVisible(), 'Close button not enabled').toBeTruthy();
|
||||||
await expect(personalFiles.viewer.pdfViewerContentPages, 'Viewer did not close').toBeHidden();
|
await expect(personalFiles.viewer.pdfViewerContentPages, 'Viewer did not close').toBeHidden();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ test.describe('viewer file', () => {
|
|||||||
await personalFiles.passwordDialog.submitButton.click();
|
await personalFiles.passwordDialog.submitButton.click();
|
||||||
await personalFiles.passwordDialog.waitForDialogToClose();
|
await personalFiles.passwordDialog.waitForDialogToClose();
|
||||||
|
|
||||||
expect(await personalFiles.viewer.isPdfViewerContentDisplayed(), 'file content not displayed').toBe(true);
|
expect(await personalFiles.viewer.isPdfViewerContentDisplayed(), 'file content not displayed').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5469] Error appears when entering an incorrect password', async ({ personalFiles }) => {
|
test('[XAT-5469] Error appears when entering an incorrect password', async ({ personalFiles }) => {
|
||||||
@ -76,7 +76,7 @@ test.describe('viewer file', () => {
|
|||||||
await personalFiles.passwordDialog.submitButton.click();
|
await personalFiles.passwordDialog.submitButton.click();
|
||||||
|
|
||||||
expect(await personalFiles.passwordDialog.getErrorMessage()).toBe('Password is wrong');
|
expect(await personalFiles.passwordDialog.getErrorMessage()).toBe('Password is wrong');
|
||||||
expect(await personalFiles.viewer.isPdfViewerContentDisplayed(), 'file content is displayed').toBe(false);
|
expect(await personalFiles.viewer.isPdfViewerContentDisplayed(), 'file content is displayed').toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5470] Refresh the page while Password dialog is open', async ({ personalFiles }) => {
|
test('[XAT-5470] Refresh the page while Password dialog is open', async ({ personalFiles }) => {
|
||||||
@ -84,7 +84,7 @@ test.describe('viewer file', () => {
|
|||||||
await personalFiles.reload({ waitUntil: 'domcontentloaded' });
|
await personalFiles.reload({ waitUntil: 'domcontentloaded' });
|
||||||
await personalFiles.viewer.waitForViewerToOpen();
|
await personalFiles.viewer.waitForViewerToOpen();
|
||||||
|
|
||||||
expect(await personalFiles.viewer.isPdfViewerContentDisplayed(), 'file content is displayed').toBe(false);
|
expect(await personalFiles.viewer.isPdfViewerContentDisplayed(), 'file content is displayed').toBeFalsy();
|
||||||
expect(await personalFiles.passwordDialog.isDialogOpen(), 'Password dialog not open').toBe(true);
|
expect(await personalFiles.passwordDialog.isDialogOpen(), 'Password dialog not open').toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -66,11 +66,11 @@ test.describe('from File Libraries', () => {
|
|||||||
await myLibrariesPage.navigate();
|
await myLibrariesPage.navigate();
|
||||||
await myLibrariesPage.dataTable.getCellLinkByName(siteName).click();
|
await myLibrariesPage.dataTable.getCellLinkByName(siteName).click();
|
||||||
await myLibrariesPage.dataTable.performClickFolderOrFileToOpen(xlsxLibraries);
|
await myLibrariesPage.dataTable.performClickFolderOrFileToOpen(xlsxLibraries);
|
||||||
expect(await myLibrariesPage.viewer.isViewerOpened(), 'Viewer should be opened').toBe(true);
|
expect(await myLibrariesPage.viewer.isViewerOpened(), 'Viewer should be opened').toBeTruthy();
|
||||||
|
|
||||||
await myLibrariesPage.acaHeader.clickViewerMoreActions();
|
await myLibrariesPage.acaHeader.clickViewerMoreActions();
|
||||||
await myLibrariesPage.matMenu.clickMenuItem('Move');
|
await myLibrariesPage.matMenu.clickMenuItem('Move');
|
||||||
expect(await myLibrariesPage.viewerDialog.isCopyDialogOpen(), 'Dialog is not open').toBe(true);
|
expect(await myLibrariesPage.viewerDialog.isCopyDialogOpen(), 'Dialog is not open').toBeTruthy();
|
||||||
|
|
||||||
await myLibrariesPage.copyMoveDialog.selectLocation('Personal Files');
|
await myLibrariesPage.copyMoveDialog.selectLocation('Personal Files');
|
||||||
await myLibrariesPage.copyMoveDialog.selectDestination(destination);
|
await myLibrariesPage.copyMoveDialog.selectDestination(destination);
|
||||||
@ -81,6 +81,6 @@ test.describe('from File Libraries', () => {
|
|||||||
await myLibrariesPage.dataTable.getRowByName(xlsxLibraries).waitFor({ state: 'detached' });
|
await myLibrariesPage.dataTable.getRowByName(xlsxLibraries).waitFor({ state: 'detached' });
|
||||||
await expect(myLibrariesPage.dataTable.getRowByName(xlsxLibraries), 'Item was not moved').toBeHidden();
|
await expect(myLibrariesPage.dataTable.getRowByName(xlsxLibraries), 'Item was not moved').toBeHidden();
|
||||||
await personalFiles.navigate({ remoteUrl: `#/personal-files/${destinationId}` });
|
await personalFiles.navigate({ remoteUrl: `#/personal-files/${destinationId}` });
|
||||||
expect(await personalFiles.dataTable.isItemPresent(xlsxLibraries), 'Item is not present in destination').toBe(true);
|
expect(await personalFiles.dataTable.isItemPresent(xlsxLibraries), 'Item is not present in destination').toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -156,28 +156,28 @@ test.describe('viewer zoom functionality and reset', () => {
|
|||||||
|
|
||||||
test('[XAT-17637] Zoom functionality when a jpg image is opened in viewer mode in Personal Files', async ({ personalFiles }) => {
|
test('[XAT-17637] Zoom functionality when a jpg image is opened in viewer mode in Personal Files', async ({ personalFiles }) => {
|
||||||
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomJpgName);
|
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomJpgName);
|
||||||
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
await validateZoomScaleInViewer(personalFiles);
|
await validateZoomScaleInViewer(personalFiles);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-17650] Zoom functionality when a jpg file is opened in viewer mode in Recent Files', async ({ recentFilesPage }) => {
|
test('[XAT-17650] Zoom functionality when a jpg file is opened in viewer mode in Recent Files', async ({ recentFilesPage }) => {
|
||||||
await recentFilesPage.navigate();
|
await recentFilesPage.navigate();
|
||||||
await recentFilesPage.dataTable.performClickFolderOrFileToOpen(randomJpgName);
|
await recentFilesPage.dataTable.performClickFolderOrFileToOpen(randomJpgName);
|
||||||
expect(await recentFilesPage.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await recentFilesPage.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
await validateZoomScaleInViewer(recentFilesPage);
|
await validateZoomScaleInViewer(recentFilesPage);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-17638] Zoom functionality when a png image is opened in viewer mode in Shared Files', async ({ sharedPage }) => {
|
test('[XAT-17638] Zoom functionality when a png image is opened in viewer mode in Shared Files', async ({ sharedPage }) => {
|
||||||
await sharedPage.navigate();
|
await sharedPage.navigate();
|
||||||
await sharedPage.dataTable.performClickFolderOrFileToOpen(randomPngName);
|
await sharedPage.dataTable.performClickFolderOrFileToOpen(randomPngName);
|
||||||
expect(await sharedPage.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await sharedPage.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
await validateZoomScaleInViewer(sharedPage);
|
await validateZoomScaleInViewer(sharedPage);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-17639] Zoom functionality when a pdf file is opened in viewer mode in Favorite Files', async ({ favoritePage }) => {
|
test('[XAT-17639] Zoom functionality when a pdf file is opened in viewer mode in Favorite Files', async ({ favoritePage }) => {
|
||||||
await favoritePage.navigate();
|
await favoritePage.navigate();
|
||||||
await favoritePage.dataTable.performClickFolderOrFileToOpen(randomPdfName);
|
await favoritePage.dataTable.performClickFolderOrFileToOpen(randomPdfName);
|
||||||
expect(await favoritePage.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await favoritePage.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
await favoritePage.viewer.waitForZoomPercentageToDisplay();
|
await favoritePage.viewer.waitForZoomPercentageToDisplay();
|
||||||
await validateZoomScaleInViewer(favoritePage);
|
await validateZoomScaleInViewer(favoritePage);
|
||||||
});
|
});
|
||||||
@ -187,35 +187,35 @@ test.describe('viewer zoom functionality and reset', () => {
|
|||||||
await myLibrariesPage.dataTable.performClickFolderOrFileToOpen(randomLibraryName);
|
await myLibrariesPage.dataTable.performClickFolderOrFileToOpen(randomLibraryName);
|
||||||
await myLibrariesPage.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
await myLibrariesPage.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
||||||
await myLibrariesPage.viewer.waitForViewerLoaderToFinish();
|
await myLibrariesPage.viewer.waitForViewerLoaderToFinish();
|
||||||
expect(await myLibrariesPage.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await myLibrariesPage.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
await myLibrariesPage.viewer.waitForZoomPercentageToDisplay();
|
await myLibrariesPage.viewer.waitForZoomPercentageToDisplay();
|
||||||
await validateZoomScaleInViewer(myLibrariesPage);
|
await validateZoomScaleInViewer(myLibrariesPage);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-17641] User can restore the default state of jpg image in viewer mode in Personal Files', async ({ personalFiles }) => {
|
test('[XAT-17641] User can restore the default state of jpg image in viewer mode in Personal Files', async ({ personalFiles }) => {
|
||||||
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomJpgName);
|
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomJpgName);
|
||||||
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
await validateZoomResetButtonActivity(personalFiles);
|
await validateZoomResetButtonActivity(personalFiles);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-17651] User can restore the default state of jpg image in viewer mode in Recent Files', async ({ recentFilesPage }) => {
|
test('[XAT-17651] User can restore the default state of jpg image in viewer mode in Recent Files', async ({ recentFilesPage }) => {
|
||||||
await recentFilesPage.navigate();
|
await recentFilesPage.navigate();
|
||||||
await recentFilesPage.dataTable.performClickFolderOrFileToOpen(randomJpgName);
|
await recentFilesPage.dataTable.performClickFolderOrFileToOpen(randomJpgName);
|
||||||
expect(await recentFilesPage.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await recentFilesPage.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
await validateZoomResetButtonActivity(recentFilesPage);
|
await validateZoomResetButtonActivity(recentFilesPage);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-17642] User can restore the default state of png image in viewer mode in Shared Files', async ({ sharedPage }) => {
|
test('[XAT-17642] User can restore the default state of png image in viewer mode in Shared Files', async ({ sharedPage }) => {
|
||||||
await sharedPage.navigate();
|
await sharedPage.navigate();
|
||||||
await sharedPage.dataTable.performClickFolderOrFileToOpen(randomPngName);
|
await sharedPage.dataTable.performClickFolderOrFileToOpen(randomPngName);
|
||||||
expect(await sharedPage.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await sharedPage.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
await validateZoomResetButtonActivity(sharedPage);
|
await validateZoomResetButtonActivity(sharedPage);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-17643] User can restore the default state of pdf file in viewer mode in Favorites Files', async ({ favoritePage }) => {
|
test('[XAT-17643] User can restore the default state of pdf file in viewer mode in Favorites Files', async ({ favoritePage }) => {
|
||||||
await favoritePage.navigate();
|
await favoritePage.navigate();
|
||||||
await favoritePage.dataTable.performClickFolderOrFileToOpen(randomPdfName);
|
await favoritePage.dataTable.performClickFolderOrFileToOpen(randomPdfName);
|
||||||
expect(await favoritePage.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await favoritePage.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
await favoritePage.viewer.waitForZoomPercentageToDisplay();
|
await favoritePage.viewer.waitForZoomPercentageToDisplay();
|
||||||
await validateFitToPageButtonActivity(favoritePage);
|
await validateFitToPageButtonActivity(favoritePage);
|
||||||
});
|
});
|
||||||
@ -225,7 +225,7 @@ test.describe('viewer zoom functionality and reset', () => {
|
|||||||
await myLibrariesPage.dataTable.performClickFolderOrFileToOpen(randomLibraryName);
|
await myLibrariesPage.dataTable.performClickFolderOrFileToOpen(randomLibraryName);
|
||||||
await myLibrariesPage.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
await myLibrariesPage.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
||||||
await myLibrariesPage.viewer.waitForViewerLoaderToFinish();
|
await myLibrariesPage.viewer.waitForViewerLoaderToFinish();
|
||||||
expect(await myLibrariesPage.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await myLibrariesPage.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
await myLibrariesPage.viewer.waitForZoomPercentageToDisplay();
|
await myLibrariesPage.viewer.waitForZoomPercentageToDisplay();
|
||||||
await validateFitToPageButtonActivity(myLibrariesPage);
|
await validateFitToPageButtonActivity(myLibrariesPage);
|
||||||
});
|
});
|
||||||
|
@ -139,27 +139,27 @@ test.describe('viewer file', () => {
|
|||||||
|
|
||||||
test('[XAT-5471] Viewer opens on double clicking on a file from Personal Files', async ({ personalFiles }) => {
|
test('[XAT-5471] Viewer opens on double clicking on a file from Personal Files', async ({ personalFiles }) => {
|
||||||
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
||||||
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5472] Viewer opens when clicking the View action for a file', async ({ personalFiles }) => {
|
test('[XAT-5472] Viewer opens when clicking the View action for a file', async ({ personalFiles }) => {
|
||||||
await personalFiles.dataTable.getRowByName(randomDocxName).click();
|
await personalFiles.dataTable.getRowByName(randomDocxName).click();
|
||||||
await personalFiles.acaHeader.viewButton.click();
|
await personalFiles.acaHeader.viewButton.click();
|
||||||
await personalFiles.dataTable.spinnerWaitForReload();
|
await personalFiles.dataTable.spinnerWaitForReload();
|
||||||
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5473] The viewer general elements are displayed correctly', async ({ personalFiles }) => {
|
test('[XAT-5473] The viewer general elements are displayed correctly', async ({ personalFiles }) => {
|
||||||
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
||||||
expect(await personalFiles.viewer.isViewerOpened()).toBe(true);
|
expect(await personalFiles.viewer.isViewerOpened()).toBeTruthy();
|
||||||
await personalFiles.dataTable.spinnerWaitForReload();
|
await personalFiles.dataTable.spinnerWaitForReload();
|
||||||
expect(await personalFiles.viewer.isCloseButtonDisplayed(), 'Close button is not displayed').toBe(true);
|
expect(await personalFiles.viewer.isCloseButtonDisplayed(), 'Close button is not displayed').toBeTruthy();
|
||||||
expect(await personalFiles.viewer.isFileTitleDisplayed(), 'File title is not displayed').toBe(true);
|
expect(await personalFiles.viewer.isFileTitleDisplayed(), 'File title is not displayed').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5474] Close the viewer', async ({ personalFiles }) => {
|
test('[XAT-5474] Close the viewer', async ({ personalFiles }) => {
|
||||||
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
await personalFiles.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
||||||
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
expect(await personalFiles.viewer.getCloseButtonTooltip()).toEqual('Close');
|
expect(await personalFiles.viewer.getCloseButtonTooltip()).toEqual('Close');
|
||||||
await personalFiles.viewer.closeButtonLocator.click();
|
await personalFiles.viewer.closeButtonLocator.click();
|
||||||
await expect(personalFiles.dataTable.getCellLinkByName(randomDocxName), 'Viewer did not close').toBeVisible();
|
await expect(personalFiles.dataTable.getCellLinkByName(randomDocxName), 'Viewer did not close').toBeVisible();
|
||||||
@ -171,9 +171,9 @@ test.describe('viewer file', () => {
|
|||||||
await recentFilesPage.navigate();
|
await recentFilesPage.navigate();
|
||||||
await recentFilesPage.reload();
|
await recentFilesPage.reload();
|
||||||
await recentFilesPage.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
await recentFilesPage.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
||||||
expect(await recentFilesPage.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await recentFilesPage.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
expect(await recentFilesPage.viewer.isCloseButtonDisplayed(), 'Close button is not displayed').toBe(true);
|
expect(await recentFilesPage.viewer.isCloseButtonDisplayed(), 'Close button is not displayed').toBeTruthy();
|
||||||
expect(await recentFilesPage.viewer.isFileTitleDisplayed(), 'File title is not displayed').toBe(true);
|
expect(await recentFilesPage.viewer.isFileTitleDisplayed(), 'File title is not displayed').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5482] Viewer opens for a file from Search Results', async ({ personalFiles, searchPage }) => {
|
test('[XAT-5482] Viewer opens for a file from Search Results', async ({ personalFiles, searchPage }) => {
|
||||||
@ -183,16 +183,16 @@ test.describe('viewer file', () => {
|
|||||||
await searchPage.searchOverlay.searchFor(randomDocxName);
|
await searchPage.searchOverlay.searchFor(randomDocxName);
|
||||||
await searchPage.dataTable.goThroughPagesLookingForRowWithName(randomDocxName);
|
await searchPage.dataTable.goThroughPagesLookingForRowWithName(randomDocxName);
|
||||||
await searchPage.searchInput.performDoubleClickFolderOrFileToOpen(randomDocxName);
|
await searchPage.searchInput.performDoubleClickFolderOrFileToOpen(randomDocxName);
|
||||||
expect(await searchPage.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await searchPage.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
expect(await searchPage.viewer.isCloseButtonDisplayed(), 'Close button is not displayed').toBe(true);
|
expect(await searchPage.viewer.isCloseButtonDisplayed(), 'Close button is not displayed').toBeTruthy();
|
||||||
expect(await searchPage.viewer.isFileTitleDisplayed(), 'File title is not displayed').toBe(true);
|
expect(await searchPage.viewer.isFileTitleDisplayed(), 'File title is not displayed').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5476] Viewer opens when accessing the preview URL for a file', async ({ personalFiles }) => {
|
test('[XAT-5476] Viewer opens when accessing the preview URL for a file', async ({ personalFiles }) => {
|
||||||
const previewURL = `#/personal-files/${folderId}/(viewer:view/${fileDocxId})`;
|
const previewURL = `#/personal-files/${folderId}/(viewer:view/${fileDocxId})`;
|
||||||
await personalFiles.navigate({ remoteUrl: previewURL });
|
await personalFiles.navigate({ remoteUrl: previewURL });
|
||||||
await personalFiles.dataTable.spinnerWaitForReload();
|
await personalFiles.dataTable.spinnerWaitForReload();
|
||||||
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
await expect(personalFiles.viewer.fileTitleButtonLocator).toHaveText(randomDocxName);
|
await expect(personalFiles.viewer.fileTitleButtonLocator).toHaveText(randomDocxName);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -201,18 +201,18 @@ test.describe('viewer file', () => {
|
|||||||
await sharedPage.reload({ waitUntil: 'domcontentloaded' });
|
await sharedPage.reload({ waitUntil: 'domcontentloaded' });
|
||||||
await sharedPage.dataTable.goThroughPagesLookingForRowWithName(randomDocxName);
|
await sharedPage.dataTable.goThroughPagesLookingForRowWithName(randomDocxName);
|
||||||
await sharedPage.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
await sharedPage.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
||||||
expect(await sharedPage.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await sharedPage.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
expect(await sharedPage.viewer.isCloseButtonDisplayed(), 'Close button is not displayed').toBe(true);
|
expect(await sharedPage.viewer.isCloseButtonDisplayed(), 'Close button is not displayed').toBeTruthy();
|
||||||
expect(await sharedPage.viewer.isFileTitleDisplayed(), 'File title is not displayed').toBe(true);
|
expect(await sharedPage.viewer.isFileTitleDisplayed(), 'File title is not displayed').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5481] Viewer opens for a file from Favorites', async ({ favoritePage }) => {
|
test('[XAT-5481] Viewer opens for a file from Favorites', async ({ favoritePage }) => {
|
||||||
await favoritePage.navigate({ waitUntil: 'domcontentloaded' });
|
await favoritePage.navigate({ waitUntil: 'domcontentloaded' });
|
||||||
await favoritePage.dataTable.goThroughPagesLookingForRowWithName(randomDocxName);
|
await favoritePage.dataTable.goThroughPagesLookingForRowWithName(randomDocxName);
|
||||||
await favoritePage.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
await favoritePage.dataTable.performClickFolderOrFileToOpen(randomDocxName);
|
||||||
expect(await favoritePage.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await favoritePage.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
expect(await favoritePage.viewer.isCloseButtonDisplayed(), 'Close button is not displayed').toBe(true);
|
expect(await favoritePage.viewer.isCloseButtonDisplayed(), 'Close button is not displayed').toBeTruthy();
|
||||||
expect(await favoritePage.viewer.isFileTitleDisplayed(), 'File title is not displayed').toBe(true);
|
expect(await favoritePage.viewer.isFileTitleDisplayed(), 'File title is not displayed').toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[XAT-5477] Viewer does not open when accessing the preview URL for a file without permissions', async ({ personalFiles }) => {
|
test('[XAT-5477] Viewer does not open when accessing the preview URL for a file without permissions', async ({ personalFiles }) => {
|
||||||
@ -225,8 +225,8 @@ test.describe('viewer file', () => {
|
|||||||
await myLibrariesPage.navigate();
|
await myLibrariesPage.navigate();
|
||||||
await myLibrariesPage.dataTable.performClickFolderOrFileToOpen(siteUser);
|
await myLibrariesPage.dataTable.performClickFolderOrFileToOpen(siteUser);
|
||||||
await myLibrariesPage.dataTable.performClickFolderOrFileToOpen(fileInSite);
|
await myLibrariesPage.dataTable.performClickFolderOrFileToOpen(fileInSite);
|
||||||
expect(await myLibrariesPage.viewer.isViewerOpened(), 'Viewer is not opened').toBe(true);
|
expect(await myLibrariesPage.viewer.isViewerOpened(), 'Viewer is not opened').toBeTruthy();
|
||||||
expect(await myLibrariesPage.viewer.isCloseButtonDisplayed(), 'Close button is not displayed').toBe(true);
|
expect(await myLibrariesPage.viewer.isCloseButtonDisplayed(), 'Close button is not displayed').toBeTruthy();
|
||||||
expect(await myLibrariesPage.viewer.isFileTitleDisplayed(), 'File title is not displayed').toBe(true);
|
expect(await myLibrariesPage.viewer.isFileTitleDisplayed(), 'File title is not displayed').toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user