V16 QA added acceptance test for issue 10431 (#19999)
* Added test * Bumped version
This commit is contained in:
16
tests/Umbraco.Tests.AcceptanceTest/package-lock.json
generated
16
tests/Umbraco.Tests.AcceptanceTest/package-lock.json
generated
@@ -8,7 +8,7 @@
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@umbraco/json-models-builders": "^2.0.37",
|
||||
"@umbraco/playwright-testhelpers": "^16.0.39",
|
||||
"@umbraco/playwright-testhelpers": "^16.0.41",
|
||||
"camelize": "^1.0.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"node-fetch": "^2.6.7"
|
||||
@@ -58,21 +58,21 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@umbraco/json-models-builders": {
|
||||
"version": "2.0.37",
|
||||
"resolved": "https://registry.npmjs.org/@umbraco/json-models-builders/-/json-models-builders-2.0.37.tgz",
|
||||
"integrity": "sha512-97cRUrD+oeEno9I+qFjq7lWVS0+aDEK44lQQYWmVPAkCuAG1HMpBTEblS45CflrmLtgrDuZx68WIVVGpk9JzgQ==",
|
||||
"version": "2.0.38",
|
||||
"resolved": "https://registry.npmjs.org/@umbraco/json-models-builders/-/json-models-builders-2.0.38.tgz",
|
||||
"integrity": "sha512-6nC1Y1xn+8zyqU3iqHubRo18L53TdZkhHIY4z68VSLcA6YoAzdxtjw+zx7yDIMV+epoQ4NCG2ooAa0gBhHqQgg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"camelize": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@umbraco/playwright-testhelpers": {
|
||||
"version": "16.0.39",
|
||||
"resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-16.0.39.tgz",
|
||||
"integrity": "sha512-rZ/e3Kc9Dzkd7L+V5J3VyGlODnUNLye4kksnaKdRM4PKAsSW6U1f8t3402+lywtTo0oot7JNrVvooJuLwuwc+w==",
|
||||
"version": "16.0.41",
|
||||
"resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-16.0.41.tgz",
|
||||
"integrity": "sha512-FmpL3ucj+3lZKxuL1JWyFJeU5DBL6nRsREejhQd/gUMtoJJpXhPUJ/jorqnWEwPYcvGWSBS/Inly0q+Akuf9Ow==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@umbraco/json-models-builders": "2.0.37",
|
||||
"@umbraco/json-models-builders": "2.0.38",
|
||||
"node-fetch": "^2.6.7"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@umbraco/json-models-builders": "^2.0.37",
|
||||
"@umbraco/playwright-testhelpers": "^16.0.39",
|
||||
"@umbraco/playwright-testhelpers": "^16.0.41",
|
||||
"camelize": "^1.0.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"node-fetch": "^2.6.7"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,3 +158,35 @@ test.fixme('can not publish a mandatory media picker with an empty value', async
|
||||
expect(contentData.values[0].value[0].focalPoint).toBeNull();
|
||||
expect(contentData.values[0].value[0].crops).toEqual([]);
|
||||
});
|
||||
|
||||
// This is a test for the regression issue #10431
|
||||
test('can add a media image to a media picker in variant content, remove it and then add it again', async ({umbracoApi, umbracoUi}) => {
|
||||
// Arrange
|
||||
const dataTypeData = await umbracoApi.dataType.getByName(dataTypeName);
|
||||
const documentTypeId = await umbracoApi.documentType.createDocumentTypeWithPropertyEditor(documentTypeName, dataTypeName, dataTypeData.id, 'Test Group', true, true, false);
|
||||
await umbracoApi.document.createDefaultDocumentWithEnglishCulture(contentName, documentTypeId);
|
||||
const mediaFileId = await umbracoApi.media.createDefaultMediaWithImage(mediaFileName);
|
||||
await umbracoUi.goToBackOffice();
|
||||
await umbracoUi.content.goToSection(ConstantHelper.sections.content);
|
||||
|
||||
// Act
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
// Adds media item to a media picker
|
||||
await umbracoUi.content.clickChooseButtonAndSelectMediaWithKey(mediaFileId);
|
||||
await umbracoUi.content.clickChooseModalButton();
|
||||
await umbracoUi.content.clickSaveAndPublishButton();
|
||||
await umbracoUi.content.clickContainerSaveAndPublishButton();
|
||||
await umbracoUi.content.isSuccessStateVisibleForSaveAndPublishButton();
|
||||
// Removes media item from the media picker
|
||||
await umbracoUi.content.removeMediaPickerByName(mediaFileName);
|
||||
await umbracoUi.content.clickSaveAndPublishButton();
|
||||
await umbracoUi.content.clickContainerSaveAndPublishButton();
|
||||
await umbracoUi.content.isSuccessStateVisibleForSaveAndPublishButton();
|
||||
|
||||
// Adds media item to a media picker again
|
||||
await umbracoUi.content.clickChooseButtonAndSelectMediaWithKey(mediaFileId);
|
||||
await umbracoUi.content.clickChooseModalButton();
|
||||
|
||||
// Assert
|
||||
await umbracoUi.content.isMediaNameVisible(mediaFileName);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user