Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/Umbraco.Tests.AcceptanceTest/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/Umbraco.Tests.AcceptanceTest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"testSqlite": "npx playwright test DefaultConfig --grep-invert \"Users\"",
"all": "npx playwright test",
"createTest": "node createTest.js",
"smokeTest": "npx playwright test DefaultConfig --grep \"@smoke\"",
"smokeTest": "npx playwright test DefaultConfig --grep \"a not-found content picker\"",
"smokeTestSqlite": "npx playwright test DefaultConfig --grep \"@smoke\" --grep-invert \"Users\"",
"releaseTest": "npx playwright test DefaultConfig --grep \"@release\"",
"testWindows": "npx playwright test DefaultConfig --grep-invert \"RelationType\""
Expand All @@ -23,7 +23,7 @@
},
"dependencies": {
"@umbraco/json-models-builders": "^2.0.42",
"@umbraco/playwright-testhelpers": "^17.0.21",
"@umbraco/playwright-testhelpers": "^17.0.22",
"camelize": "^1.0.0",
"dotenv": "^16.3.1",
"node-fetch": "^2.6.7"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,28 @@ test('can remove content picker in the content', async ({umbracoApi, umbracoUi})
await umbracoUi.content.removeContentPicker(contentPickerName);
await umbracoUi.content.clickSaveButton();

// Assert
await umbracoUi.content.isSuccessStateVisibleForSaveButton();
const contentData = await umbracoApi.document.getByName(contentName);
expect(contentData.values).toEqual([]);
});

// This test for regression issue: https://github.com/umbraco/Umbraco-CMS/issues/21130
test('can remove a not-found content picker', {tag: '@release'}, async ({umbracoApi, umbracoUi}) => {
// Arrange
const dataTypeData = await umbracoApi.dataType.getByName(dataTypeName);
const documentTypeId = await umbracoApi.documentType.createDocumentTypeWithPropertyEditor(documentTypeName, dataTypeName, dataTypeData.id);
const contentPickerId = await umbracoApi.document.createDefaultDocument(contentPickerName, contentPickerDocumentTypeId);
await umbracoApi.document.createDocumentWithContentPicker(contentName, documentTypeId, contentPickerId);
await umbracoApi.document.delete(contentPickerId);
await umbracoUi.goToBackOffice();
await umbracoUi.content.goToSection(ConstantHelper.sections.content);

// Act
await umbracoUi.content.goToContentWithName(contentName);
await umbracoUi.content.removeNotFoundContentPickerWithId(contentPickerId);
await umbracoUi.content.clickSaveButton();

// Assert
await umbracoUi.content.isSuccessStateVisibleForSaveButton();
const contentData = await umbracoApi.document.getByName(contentName);
Expand Down
Loading