E2E: QA Fixed the failing tests due to the recent UI changes (#20576)
* Added skip tag for the failing tests due to the issues and added waits for the flaky tests * Commentted code as the reference items displays randomly * Bumped version * Added more waits to avoid the flaky tests * Updated tests for setting culture and hostnames since the first content already has the default domain * Fixed flaky tests * Updated tests since the reload step is flaky * Added more waits for the flaky tests in Windows * Need to publish first document before set domain for second document * Make permission tests run in the pipeline * Added step to ensure the rollback action is completed * Reverted npm command * Added skip tag for the permission tests * Fixed test for the culture and hostname permission * Removed waits as it is includes in test helper * Fixed test for adding a media in RTE Tiptap property editor * Updated test helper function to avoid the flaky tests releated to block * Added more waits to ensure image uploaded * Bumped version * Bumped version * Reverted * Reverted code * Bumped version of test helper * Bumped version * Reverted code * Added more waits to avoid flaky tests * Added more waits * Updated nightly pipeline: remove v17/dev, run different app setting tests by default and not run Relation Type in Linux as they are too flaky * Added more waits * Added npm command for testWindows * Added more waits after creating a folder
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@umbraco/json-models-builders": "^2.0.41",
|
||||
"@umbraco/playwright-testhelpers": "^17.0.0-beta.10",
|
||||
"@umbraco/playwright-testhelpers": "^17.0.3",
|
||||
"camelize": "^1.0.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"node-fetch": "^2.6.7"
|
||||
@@ -67,9 +67,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@umbraco/playwright-testhelpers": {
|
||||
"version": "17.0.0-beta.10",
|
||||
"resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-17.0.0-beta.10.tgz",
|
||||
"integrity": "sha512-ePvtWK2IG/j3TIL1w7xkZR63FHM32hIjZxaxJOQ4rYNuVxBKT7TTKEvASfdwpDBFnlAN186xZRGA9KJq+Jxijg==",
|
||||
"version": "17.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-17.0.3.tgz",
|
||||
"integrity": "sha512-nlc7c7l/E264De+Z/niPfTT8yfRPauEmwbpX+N85PD30iM0mGLHd80InfM0mia19kL2njUm9ww3X8p7ZwBUM/g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@umbraco/json-models-builders": "2.0.41",
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
"createTest": "node createTest.js",
|
||||
"smokeTest": "npx playwright test DefaultConfig --grep \"@smoke\"",
|
||||
"smokeTestSqlite": "npx playwright test DefaultConfig --grep \"@smoke\" --grep-invert \"Users\"",
|
||||
"releaseTest": "npx playwright test DefaultConfig --grep \"@release\""
|
||||
"releaseTest": "npx playwright test DefaultConfig --grep \"@release\"",
|
||||
"testWindows": "npx playwright test DefaultConfig --grep-invert \"RelationType\""
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "1.50",
|
||||
@@ -22,7 +23,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@umbraco/json-models-builders": "^2.0.41",
|
||||
"@umbraco/playwright-testhelpers": "^17.0.0-beta.10",
|
||||
"@umbraco/playwright-testhelpers": "^17.0.3",
|
||||
"camelize": "^1.0.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"node-fetch": "^2.6.7"
|
||||
|
||||
@@ -81,7 +81,7 @@ test('can add a block element in the content', async ({umbracoApi, umbracoUi}) =
|
||||
// Act
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
await umbracoUi.content.clickAddBlockElementButton();
|
||||
await umbracoUi.content.clickTextButtonWithName(elementTypeName);
|
||||
await umbracoUi.content.clickBlockElementWithName(elementTypeName);
|
||||
await umbracoUi.content.enterTextstring(inputText);
|
||||
await umbracoUi.content.clickCreateModalButton();
|
||||
await umbracoUi.content.clickSaveButton();
|
||||
@@ -160,8 +160,7 @@ test('cannot add number of block element greater than the maximum amount', {tag:
|
||||
// Act
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
await umbracoUi.content.clickAddBlockElementButton();
|
||||
await umbracoUi.waitForTimeout(500);
|
||||
await umbracoUi.content.clickTextButtonWithName(elementTypeName);
|
||||
await umbracoUi.content.clickBlockElementWithName(elementTypeName);
|
||||
await umbracoUi.content.clickCreateModalButton();
|
||||
|
||||
// Assert
|
||||
@@ -196,7 +195,7 @@ test('can set the label of block element in the content', async ({umbracoApi, um
|
||||
// Act
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
await umbracoUi.content.clickAddBlockElementButton();
|
||||
await umbracoUi.content.clickTextButtonWithName(elementTypeName);
|
||||
await umbracoUi.content.clickBlockElementWithName(elementTypeName);
|
||||
await umbracoUi.content.clickCreateModalButton();
|
||||
await umbracoUi.content.clickSaveButton();
|
||||
|
||||
@@ -217,7 +216,7 @@ test('can set the number of columns for the layout in the content', async ({umbr
|
||||
// Act
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
await umbracoUi.content.clickAddBlockElementButton();
|
||||
await umbracoUi.content.clickTextButtonWithName(elementTypeName);
|
||||
await umbracoUi.content.clickBlockElementWithName(elementTypeName);
|
||||
await umbracoUi.content.clickCreateModalButton();
|
||||
await umbracoUi.content.clickSaveButton();
|
||||
|
||||
@@ -245,7 +244,7 @@ test('can add settings model for the block in the content', async ({umbracoApi,
|
||||
// Act
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
await umbracoUi.content.clickAddBlockElementButton();
|
||||
await umbracoUi.content.clickTextButtonWithName(elementTypeName);
|
||||
await umbracoUi.content.clickBlockElementWithName(elementTypeName);
|
||||
await umbracoUi.content.enterTextstring(contentBlockInputText);
|
||||
await umbracoUi.content.clickAddBlockSettingsTabButton();
|
||||
await umbracoUi.content.enterTextArea(settingBlockInputText);
|
||||
@@ -298,7 +297,7 @@ test('can add a block element with inline editing mode enabled', async ({umbraco
|
||||
// Act
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
await umbracoUi.content.clickAddBlockElementButton();
|
||||
await umbracoUi.content.clickTextButtonWithName(elementTypeName);
|
||||
await umbracoUi.content.clickBlockElementWithName(elementTypeName);
|
||||
await umbracoUi.content.enterTextstring(inputText);
|
||||
await umbracoUi.content.clickCreateModalButton();
|
||||
await umbracoUi.content.clickSaveAndPublishButton();
|
||||
@@ -329,7 +328,7 @@ test('can add an invariant block element with an invariant RTE Tiptap in the con
|
||||
// Act
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
await umbracoUi.content.clickAddBlockElementButton();
|
||||
await umbracoUi.content.clickTextButtonWithName(customElementTypeName);
|
||||
await umbracoUi.content.clickBlockElementWithName(customElementTypeName);
|
||||
await umbracoUi.content.enterRTETipTapEditor(inputText);
|
||||
await umbracoUi.content.clickCreateModalButton();
|
||||
await umbracoUi.content.clickSaveButtonForContent();
|
||||
@@ -363,7 +362,7 @@ test('can add a variant block element with variant RTE Tiptap in the content', a
|
||||
// Act
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
await umbracoUi.content.clickAddBlockElementButton();
|
||||
await umbracoUi.content.clickTextButtonWithName(customElementTypeName);
|
||||
await umbracoUi.content.clickBlockElementWithName(customElementTypeName);
|
||||
await umbracoUi.content.enterRTETipTapEditor(inputText);
|
||||
await umbracoUi.content.clickCreateModalButton();
|
||||
await umbracoUi.content.clickSaveButtonForContent();
|
||||
@@ -399,7 +398,7 @@ test('can add a variant block element with invariant RTE Tiptap in the content',
|
||||
// Act
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
await umbracoUi.content.clickAddBlockElementButton();
|
||||
await umbracoUi.content.clickTextButtonWithName(customElementTypeName);
|
||||
await umbracoUi.content.clickBlockElementWithName(customElementTypeName);
|
||||
await umbracoUi.content.enterRTETipTapEditor(inputText);
|
||||
await umbracoUi.content.clickCreateModalButton();
|
||||
await umbracoUi.content.clickSaveButtonForContent();
|
||||
|
||||
@@ -194,7 +194,7 @@ test('can add settings model for the block in the content', async ({umbracoApi,
|
||||
// Act
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
await umbracoUi.content.clickAddBlockElementButton();
|
||||
await umbracoUi.content.clickTextButtonWithName(elementTypeName);
|
||||
await umbracoUi.content.clickBlockElementWithName(elementTypeName);
|
||||
await umbracoUi.content.enterTextstring(contentBlockInputText);
|
||||
await umbracoUi.content.clickAddBlockSettingsTabButton();
|
||||
await umbracoUi.content.enterTextArea(settingBlockInputText);
|
||||
@@ -276,7 +276,7 @@ test('can add an invariant block element with invariant RTE Tiptap in the conten
|
||||
// Act
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
await umbracoUi.content.clickAddBlockElementButton();
|
||||
await umbracoUi.content.clickTextButtonWithName(customElementTypeName);
|
||||
await umbracoUi.content.clickBlockElementWithName(customElementTypeName);
|
||||
await umbracoUi.content.enterRTETipTapEditor(inputText);
|
||||
await umbracoUi.content.clickCreateModalButton();
|
||||
await umbracoUi.content.clickSaveButton();
|
||||
@@ -310,7 +310,7 @@ test('can add a variant block element with variant RTE Tiptap in the content', a
|
||||
// Act
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
await umbracoUi.content.clickAddBlockElementButton();
|
||||
await umbracoUi.content.clickTextButtonWithName(customElementTypeName);
|
||||
await umbracoUi.content.clickBlockElementWithName(customElementTypeName);
|
||||
await umbracoUi.content.enterRTETipTapEditor(inputText);
|
||||
await umbracoUi.content.clickCreateModalButton();
|
||||
await umbracoUi.content.clickSaveButtonForContent();
|
||||
@@ -346,7 +346,7 @@ test('can add a variant block element with invariant RTE Tiptap in the content',
|
||||
// Act
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
await umbracoUi.content.clickAddBlockElementButton();
|
||||
await umbracoUi.content.clickTextButtonWithName(customElementTypeName);
|
||||
await umbracoUi.content.clickBlockElementWithName(customElementTypeName);
|
||||
await umbracoUi.content.enterRTETipTapEditor(inputText);
|
||||
await umbracoUi.content.clickCreateModalButton();
|
||||
await umbracoUi.content.clickSaveButtonForContent();
|
||||
|
||||
@@ -36,6 +36,8 @@ test('can create content with the image cropper data type', async ({umbracoApi,
|
||||
await umbracoUi.content.chooseDocumentType(documentTypeName);
|
||||
await umbracoUi.content.enterContentName(contentName);
|
||||
await umbracoUi.content.uploadFile(imageFilePath);
|
||||
// Wait for the upload to complete
|
||||
await umbracoUi.waitForTimeout(1000);
|
||||
await umbracoUi.content.clickSaveButton();
|
||||
|
||||
// Assert
|
||||
|
||||
@@ -114,7 +114,7 @@ test('can save a variant content node after removing embedded block in RTE', asy
|
||||
|
||||
// Act
|
||||
await umbracoUi.content.clickInsertBlockButton();
|
||||
await umbracoUi.content.clickLinkWithName(elementTypeName);
|
||||
await umbracoUi.content.clickBlockElementWithName(elementTypeName);
|
||||
await umbracoUi.content.enterTextstring(textStringValue);
|
||||
await umbracoUi.content.clickCreateModalButton();
|
||||
await umbracoUi.content.clickSaveButtonForContent();
|
||||
|
||||
@@ -31,7 +31,7 @@ test('can add a media in RTE Tiptap property editor', async ({umbracoApi, umbrac
|
||||
// Act
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
await umbracoUi.content.clickTipTapToolbarIconWithTitle(iconTitle);
|
||||
await umbracoUi.content.selectMediaWithName(imageName);
|
||||
await umbracoUi.content.selectMediaWithName(imageName, true);
|
||||
await umbracoUi.content.clickChooseModalButton();
|
||||
await umbracoUi.content.clickMediaCaptionAltTextModalSubmitButton();
|
||||
await umbracoUi.content.clickSaveAndPublishButton();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {ConstantHelper, NotificationConstantHelper, test} from '@umbraco/playwright-testhelpers';
|
||||
import {ConstantHelper, test} from '@umbraco/playwright-testhelpers';
|
||||
import {expect} from "@playwright/test";
|
||||
|
||||
let dataTypeId = '';
|
||||
|
||||
@@ -427,6 +427,7 @@ test('can add a thumbnail to a block', {tag: '@release'}, async ({umbracoApi, um
|
||||
// Act
|
||||
await umbracoUi.dataType.goToDataType(blockListEditorName);
|
||||
await umbracoUi.dataType.goToBlockWithName(elementTypeName);
|
||||
await umbracoUi.waitForTimeout(500);
|
||||
await umbracoUi.dataType.chooseBlockThumbnailWithPath(mediaUrl);
|
||||
await umbracoUi.dataType.clickSubmitButton();
|
||||
await umbracoUi.dataType.clickSaveButton();
|
||||
|
||||
@@ -47,6 +47,7 @@ test('can create a data type folder using create options', async ({umbracoApi, u
|
||||
|
||||
// Assert
|
||||
await umbracoUi.dataType.waitForDataTypeToBeCreated();
|
||||
await umbracoUi.waitForTimeout(500); // Wait for the folder to be fully created
|
||||
expect(await umbracoApi.dataType.doesNameExist(dataTypeFolderName)).toBeTruthy();
|
||||
// Check if the created data type is displayed in the collection view and has correct icon
|
||||
await umbracoUi.dataType.clickDataTypesMenu();
|
||||
@@ -89,6 +90,7 @@ test('can create a data type folder in a folder using create options', async ({u
|
||||
|
||||
// Assert
|
||||
await umbracoUi.dataType.waitForDataTypeToBeCreated();
|
||||
await umbracoUi.waitForTimeout(500); // Wait for folder to be created
|
||||
expect(await umbracoApi.dataType.doesNameExist(childFolderName)).toBeTruthy();
|
||||
// Check if the created data type is displayed in the collection view and has correct icon
|
||||
await umbracoUi.dataType.doesCollectionTreeItemTableRowHaveName(childFolderName);
|
||||
|
||||
@@ -43,6 +43,7 @@ test('can rename a data type folder', async ({umbracoApi, umbracoUi}) => {
|
||||
|
||||
// Assert
|
||||
await umbracoUi.dataType.waitForDataTypeToBeRenamed();
|
||||
await umbracoUi.waitForTimeout(500); // Wait for the rename to be fully processed
|
||||
expect(await umbracoApi.dataType.doesNameExist(dataTypeFolderName)).toBeTruthy();
|
||||
expect(await umbracoApi.dataType.doesNameExist(wrongDataTypeFolderName)).toBeFalsy();
|
||||
});
|
||||
@@ -99,6 +100,7 @@ test('can create a folder in a folder', async ({umbracoApi, umbracoUi}) => {
|
||||
|
||||
// Assert
|
||||
await umbracoUi.dataType.waitForDataTypeToBeCreated();
|
||||
await umbracoUi.waitForTimeout(500); // Wait for folder to be created
|
||||
expect(await umbracoApi.dataType.doesNameExist(childFolderName)).toBeTruthy();
|
||||
const dataTypeChildren = await umbracoApi.dataType.getChildren(dataTypeFolderId);
|
||||
expect(dataTypeChildren[0].name).toBe(childFolderName);
|
||||
@@ -120,6 +122,7 @@ test('can create a folder in a folder in a folder', async ({umbracoApi, umbracoU
|
||||
|
||||
// Assert
|
||||
await umbracoUi.dataType.waitForDataTypeToBeCreated();
|
||||
await umbracoUi.waitForTimeout(500); // Wait for folder to be created
|
||||
expect(await umbracoApi.dataType.doesNameExist(childOfChildFolderName)).toBeTruthy();
|
||||
const childrenFolderData = await umbracoApi.dataType.getChildren(childFolderId);
|
||||
expect(childrenFolderData[0].name).toBe(childOfChildFolderName);
|
||||
|
||||
@@ -7,11 +7,11 @@ test('can update value of activate the profiler by default', async ({umbracoUi})
|
||||
await umbracoUi.profiling.clickProfilingTab();
|
||||
|
||||
// Act
|
||||
await umbracoUi.profiling.isActivateProfilerByDefaultToggleChecked(false);
|
||||
await umbracoUi.profiling.clickActivateProfilerByDefaultToggle();
|
||||
await umbracoUi.reloadPage();
|
||||
// TODO: We need to wait a bit to make sure the page is loaded after we have reloaded the page, otherwise it can be flaky and it might not find the toggle
|
||||
await umbracoUi.waitForTimeout(500);
|
||||
|
||||
// Assert
|
||||
await umbracoUi.profiling.goToSection(ConstantHelper.sections.settings);
|
||||
await umbracoUi.profiling.clickProfilingTab();
|
||||
await umbracoUi.profiling.isActivateProfilerByDefaultToggleChecked(true);
|
||||
});
|
||||
|
||||
@@ -172,6 +172,7 @@ test('can create a document type folder in a folder using create options', async
|
||||
const childFolderName = 'Test Child Folder';
|
||||
await umbracoApi.documentType.ensureNameNotExists(childFolderName);
|
||||
await umbracoApi.documentType.createFolder(documentFolderName);
|
||||
await umbracoUi.waitForTimeout(500); // Wait for folder to be created before navigating to it
|
||||
await umbracoUi.documentType.goToDocumentType(documentFolderName);
|
||||
|
||||
// Act
|
||||
|
||||
@@ -61,6 +61,7 @@ test('can rename a document type folder', async ({umbracoApi, umbracoUi}) => {
|
||||
|
||||
// Assert
|
||||
await umbracoUi.documentType.waitForDocumentTypeToBeRenamed();
|
||||
await umbracoUi.waitForTimeout(500); // Wait for the rename to be fully processed
|
||||
expect(await umbracoApi.documentType.doesNameExist(oldFolderName)).toBeFalsy();
|
||||
expect(await umbracoApi.documentType.doesNameExist(documentFolderName)).toBeTruthy();
|
||||
await umbracoUi.documentType.isDocumentTreeItemVisible(oldFolderName, false);
|
||||
|
||||
@@ -54,14 +54,14 @@ test('can rename a media type folder', async ({umbracoApi, umbracoUi}) => {
|
||||
await umbracoUi.mediaType.clickRootFolderCaretButton();
|
||||
await umbracoUi.mediaType.clickActionsMenuForName(oldFolderName);
|
||||
await umbracoUi.mediaType.clickUpdateActionMenuOption();
|
||||
await umbracoUi.waitForTimeout(500);
|
||||
await umbracoUi.mediaType.enterFolderName(mediaTypeFolderName);
|
||||
await umbracoUi.mediaType.clickConfirmRenameButton();
|
||||
|
||||
// Assert
|
||||
await umbracoUi.mediaType.waitForMediaTypeToBeRenamed();
|
||||
const folder = await umbracoApi.mediaType.getByName(mediaTypeFolderName);
|
||||
expect(folder.name).toBe(mediaTypeFolderName);
|
||||
await umbracoUi.waitForTimeout(500); // Small wait to ensure the API has caught up
|
||||
const folderData = await umbracoApi.mediaType.getByName(mediaTypeFolderName);
|
||||
expect(folderData.name).toBe(mediaTypeFolderName);
|
||||
await umbracoUi.mediaType.isMediaTypeTreeItemVisible(oldFolderName, false);
|
||||
await umbracoUi.mediaType.isMediaTypeTreeItemVisible(mediaTypeFolderName, true);
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {ConstantHelper, NotificationConstantHelper, test} from '@umbraco/playwright-testhelpers';
|
||||
import {ConstantHelper, test} from '@umbraco/playwright-testhelpers';
|
||||
|
||||
const testUser = ConstantHelper.testUserCredentials;
|
||||
let testUserCookieAndToken = {cookie: "", accessToken: "", refreshToken: ""};
|
||||
@@ -57,7 +57,8 @@ test('can see root start node and children', async ({umbracoApi, umbracoUi}) =>
|
||||
await umbracoUi.content.isChildContentInTreeVisible(rootDocumentName, childDocumentTwoName);
|
||||
});
|
||||
|
||||
test('can see parent of start node but not access it', async ({umbracoApi, umbracoUi}) => {
|
||||
// Skip this test due to this issue: https://github.com/umbraco/Umbraco-CMS/issues/20505
|
||||
test.skip('can see parent of start node but not access it', async ({umbracoApi, umbracoUi}) => {
|
||||
// Arrange
|
||||
await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId, [childDocumentOneId]);
|
||||
testUserCookieAndToken = await umbracoApi.user.loginToUser(testUser.name, testUser.email, testUser.password);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {ConstantHelper, NotificationConstantHelper, test} from '@umbraco/playwright-testhelpers';
|
||||
import {ConstantHelper, test} from '@umbraco/playwright-testhelpers';
|
||||
|
||||
const testUser = ConstantHelper.testUserCredentials;
|
||||
let testUserCookieAndToken = {cookie: "", accessToken: "", refreshToken: ""};
|
||||
@@ -50,7 +50,8 @@ test('can see root media start node and children', async ({umbracoApi, umbracoUi
|
||||
await umbracoUi.media.isChildMediaVisible(rootFolderName, childFolderTwoName);
|
||||
});
|
||||
|
||||
test('can see parent of start node but not access it', async ({umbracoApi, umbracoUi}) => {
|
||||
// Skip this test due to this issue: https://github.com/umbraco/Umbraco-CMS/issues/20505
|
||||
test.skip('can see parent of start node but not access it', async ({umbracoApi, umbracoUi}) => {
|
||||
// Arrange
|
||||
await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId, [], false, [childFolderOneId]);
|
||||
testUserCookieAndToken = await umbracoApi.user.loginToUser(testUser.name, testUser.email, testUser.password);
|
||||
@@ -62,6 +63,7 @@ test('can see parent of start node but not access it', async ({umbracoApi, umbra
|
||||
// Assert
|
||||
await umbracoUi.media.isMediaTreeItemVisible(rootFolderName);
|
||||
await umbracoUi.media.goToMediaWithName(rootFolderName);
|
||||
await umbracoUi.waitForTimeout(500); // Wait for workspace to load
|
||||
await umbracoUi.media.doesMediaWorkspaceHaveText('Access denied');
|
||||
await umbracoUi.media.openMediaCaretButtonForName(rootFolderName);
|
||||
await umbracoUi.media.isChildMediaVisible(rootFolderName, childFolderOneName);
|
||||
|
||||
@@ -58,7 +58,8 @@ test('can see root start node and children', async ({umbracoApi, umbracoUi}) =>
|
||||
await umbracoUi.content.isChildContentInTreeVisible(rootDocumentName, childDocumentTwoName);
|
||||
});
|
||||
|
||||
test('can see parent of start node but not access it', async ({umbracoApi, umbracoUi}) => {
|
||||
// Skip this test due to this issue: https://github.com/umbraco/Umbraco-CMS/issues/20505
|
||||
test.skip('can see parent of start node but not access it', async ({umbracoApi, umbracoUi}) => {
|
||||
// Arrange
|
||||
userGroupId = await umbracoApi.userGroup.createUserGroupWithDocumentStartNode(userGroupName, childDocumentOneId);
|
||||
await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId);
|
||||
|
||||
@@ -71,7 +71,8 @@ test('can read content node with permission enabled', {tag: '@release'}, async (
|
||||
await umbracoUi.content.doesDocumentHaveName(rootDocumentName);
|
||||
});
|
||||
|
||||
test('can not read content node with permission disabled', async ({umbracoApi, umbracoUi}) => {
|
||||
// Skip this test due to this issue: https://github.com/umbraco/Umbraco-CMS/issues/20505
|
||||
test.skip('can not read content node with permission disabled', async ({umbracoApi, umbracoUi}) => {
|
||||
// Arrange
|
||||
userGroupId = await umbracoApi.userGroup.createUserGroupWithReadPermission(userGroupName, false);
|
||||
await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId);
|
||||
@@ -161,6 +162,7 @@ test('can empty recycle bin with delete permission enabled', {tag: '@release'},
|
||||
|
||||
// Act
|
||||
await umbracoUi.content.clickRecycleBinButton();
|
||||
await umbracoUi.waitForTimeout(700);
|
||||
await umbracoUi.content.clickEmptyRecycleBinButton();
|
||||
await umbracoUi.content.clickConfirmEmptyRecycleBinButton();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {expect} from '@playwright/test';
|
||||
import {AliasHelper, ConstantHelper, NotificationConstantHelper, test} from '@umbraco/playwright-testhelpers';
|
||||
import {AliasHelper, ConstantHelper, test} from '@umbraco/playwright-testhelpers';
|
||||
|
||||
const testUser = ConstantHelper.testUserCredentials;
|
||||
let testUserCookieAndToken = {cookie: "", accessToken: "", refreshToken: ""};
|
||||
@@ -35,7 +35,8 @@ test.afterEach(async ({umbracoApi}) => {
|
||||
await umbracoApi.userGroup.ensureNameNotExists(userGroupName);
|
||||
});
|
||||
|
||||
test('can only see property values for specific document with read UI enabled', {tag: '@release'}, async ({umbracoApi, umbracoUi}) => {
|
||||
// Skip this test due to this issue: https://github.com/umbraco/Umbraco-CMS/issues/20505
|
||||
test.skip('can only see property values for specific document with read UI enabled', {tag: '@release'}, async ({umbracoApi, umbracoUi}) => {
|
||||
// Arrange
|
||||
userGroupId = await umbracoApi.userGroup.createUserGroupWithPermissionsForSpecificDocumentAndTwoPropertyValues(userGroupName, firstDocumentId, documentTypeId, firstPropertyName[0], true, false, secondPropertyName[0], true, false);
|
||||
await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId);
|
||||
|
||||
@@ -58,7 +58,8 @@ test('can see property values with UI read but not UI write permission', {tag: '
|
||||
await umbracoUi.content.isPropertyEditorUiWithNameReadOnly('text-box');
|
||||
});
|
||||
|
||||
test('cannot open content without document read permission even with UI read permission', {tag: '@release'}, async ({umbracoApi, umbracoUi}) => {
|
||||
// Skip this test due to this issue: https://github.com/umbraco/Umbraco-CMS/issues/20505
|
||||
test.skip('cannot open content without document read permission even with UI read permission', {tag: '@release'}, async ({umbracoApi, umbracoUi}) => {
|
||||
// Arrange
|
||||
userGroupId = await umbracoApi.userGroup.createUserGroupWithReadPermissionAndReadPropertyValuePermission(userGroupName, false, true);
|
||||
await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId);
|
||||
|
||||
@@ -43,6 +43,7 @@ test.beforeEach(async ({umbracoApi}) => {
|
||||
documentTypeId = await umbracoApi.documentType.createDocumentTypeWithAllowedChildNodeAndDataType(documentTypeName, childDocumentTypeId, dataTypeName, dataTypeId);
|
||||
firstDocumentId = await umbracoApi.document.createDocumentWithTextContent(firstDocumentName, documentTypeId, documentText, dataTypeName);
|
||||
secondDocumentId = await umbracoApi.document.createDocumentWithTextContent(secondDocumentName, documentTypeId, documentText, dataTypeName);
|
||||
await umbracoApi.language.createDanishLanguage();
|
||||
});
|
||||
|
||||
test.afterEach(async ({umbracoApi}) => {
|
||||
@@ -54,9 +55,11 @@ test.afterEach(async ({umbracoApi}) => {
|
||||
await umbracoApi.documentType.ensureNameNotExists(childDocumentTypeName);
|
||||
await umbracoApi.documentBlueprint.ensureNameNotExists(documentBlueprintName);
|
||||
await umbracoApi.userGroup.ensureNameNotExists(userGroupName);
|
||||
await umbracoApi.language.ensureIsoCodeNotExists('da');
|
||||
});
|
||||
|
||||
test('can read a specific document with read permission enabled', async ({umbracoApi, umbracoUi}) => {
|
||||
// Skip this test due to this issue: https://github.com/umbraco/Umbraco-CMS/issues/20505
|
||||
test.skip('can read a specific document with read permission enabled', async ({umbracoApi, umbracoUi}) => {
|
||||
// Arrange
|
||||
userGroupId = await umbracoApi.userGroup.createUserGroupWithReadPermissionForSpecificDocument(userGroupName, firstDocumentId);
|
||||
await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId);
|
||||
@@ -254,6 +257,7 @@ test('can sort children with sort children permission enabled', async ({umbracoA
|
||||
test('can set culture and hostnames for a specific content with culture and hostnames permission enabled', async ({umbracoApi, umbracoUi}) => {
|
||||
// Arrange
|
||||
const domainName = '/domain';
|
||||
const languageName = 'Danish';
|
||||
userGroupId = await umbracoApi.userGroup.createUserGroupWithCultureAndHostnamesPermissionForSpecificDocument(userGroupName, firstDocumentId);
|
||||
await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId);
|
||||
testUserCookieAndToken = await umbracoApi.user.loginToUser(testUser.name, testUser.email, testUser.password);
|
||||
@@ -264,16 +268,17 @@ test('can set culture and hostnames for a specific content with culture and host
|
||||
await umbracoUi.content.clickActionsMenuForContent(firstDocumentName);
|
||||
await umbracoUi.content.clickCultureAndHostnamesActionMenuOption();
|
||||
await umbracoUi.content.clickAddNewDomainButton();
|
||||
await umbracoUi.content.enterDomain(domainName);
|
||||
await umbracoUi.content.enterDomain(domainName, 0);
|
||||
await umbracoUi.content.selectDomainLanguageOption(languageName, 0);
|
||||
await umbracoUi.content.clickSaveModalButton();
|
||||
|
||||
// Assert
|
||||
await umbracoUi.content.waitForDomainToBeCreated();
|
||||
await umbracoUi.waitForTimeout(500); // Wait for the domain to be set
|
||||
await umbracoUi.waitForTimeout(1000); // Wait for the domain to be set
|
||||
const document = await umbracoApi.document.getByName(firstDocumentName);
|
||||
const domains = await umbracoApi.document.getDomains(document.id);
|
||||
expect(domains.domains[0].domainName).toEqual(domainName);
|
||||
expect(domains.domains[0].isoCode).toEqual('en-US');
|
||||
expect(domains.domains[0].isoCode).toEqual('da');
|
||||
await umbracoUi.content.isActionsMenuForNameVisible(secondDocumentName, false);
|
||||
});
|
||||
|
||||
@@ -322,6 +327,7 @@ test('can rollback a specific content with rollback permission enabled', async (
|
||||
await umbracoUi.content.clickRollbackContainerButton();
|
||||
|
||||
// Assert
|
||||
await umbracoUi.content.isSuccessNotificationVisible();
|
||||
await umbracoUi.content.goToContentWithName(firstDocumentName);
|
||||
await umbracoUi.content.doesDocumentPropertyHaveValue(dataTypeName, documentText);
|
||||
await umbracoUi.content.isActionsMenuForNameVisible(secondDocumentName, false);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {ConstantHelper, NotificationConstantHelper, test} from '@umbraco/playwright-testhelpers';
|
||||
import {ConstantHelper, test} from '@umbraco/playwright-testhelpers';
|
||||
|
||||
const testUser = ConstantHelper.testUserCredentials;
|
||||
let testUserCookieAndToken = {cookie: "", accessToken: "", refreshToken: ""};
|
||||
@@ -50,7 +50,8 @@ test('can see root media start node and children', {tag: '@release'}, async ({um
|
||||
await umbracoUi.media.isChildMediaVisible(rootFolderName, childFolderTwoName);
|
||||
});
|
||||
|
||||
test('can see parent of start node but not access it', async ({umbracoApi, umbracoUi}) => {
|
||||
// Skip this test due to this issue: https://github.com/umbraco/Umbraco-CMS/issues/20505
|
||||
test.skip('can see parent of start node but not access it', async ({umbracoApi, umbracoUi}) => {
|
||||
// Arrange
|
||||
userGroupId = await umbracoApi.userGroup.createUserGroupWithMediaStartNode(userGroupName, childFolderOneId);
|
||||
await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId);
|
||||
@@ -63,6 +64,7 @@ test('can see parent of start node but not access it', async ({umbracoApi, umbra
|
||||
// Assert
|
||||
await umbracoUi.media.isMediaTreeItemVisible(rootFolderName);
|
||||
await umbracoUi.media.goToMediaWithName(rootFolderName);
|
||||
await umbracoUi.waitForTimeout(500); // Wait for workspace to load
|
||||
await umbracoUi.media.doesMediaWorkspaceHaveText('Access denied');
|
||||
await umbracoUi.media.openMediaCaretButtonForName(rootFolderName);
|
||||
await umbracoUi.media.isChildMediaVisible(rootFolderName, childFolderOneName);
|
||||
|
||||
Reference in New Issue
Block a user