E2E: Updated exisiting acceptance tests to match updates from front end (#20525)
* Updated tests * E2E: Updated acceptance tests to match changes (#20493) * Updated tests to match changes * More updates * Bumped version * Reverted change
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@umbraco/json-models-builders": "^2.0.40",
|
||||
"@umbraco/playwright-testhelpers": "^17.0.0-beta.1",
|
||||
"@umbraco/playwright-testhelpers": "^17.0.0-beta.4",
|
||||
"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.1",
|
||||
"resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-17.0.0-beta.1.tgz",
|
||||
"integrity": "sha512-EhS4j5ARDcR3tI7ArTmLuBHW+e49qyWq3Ts8ckCXvFjkPgR3u/Z5JPOIFWUZ+rTahNZi3axs3i+dVcWWA4Fyjw==",
|
||||
"version": "17.0.0-beta.4",
|
||||
"resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-17.0.0-beta.4.tgz",
|
||||
"integrity": "sha512-+OE1A2oAdFel4myf5T/jJLuw0aLvSOUBplkUfsYFj2ACeLygfAp/MM7q2RQ+YlCym/wdF+jAqJM3g+zsKEDjaQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@umbraco/json-models-builders": "2.0.40",
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@umbraco/json-models-builders": "^2.0.40",
|
||||
"@umbraco/playwright-testhelpers": "^17.0.0-beta.1",
|
||||
"@umbraco/playwright-testhelpers": "^17.0.0-beta.4",
|
||||
"camelize": "^1.0.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"node-fetch": "^2.6.7"
|
||||
|
||||
@@ -234,8 +234,8 @@ test('can duplicate a content node to other parent', async ({umbracoApi, umbraco
|
||||
await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.duplicated);
|
||||
await umbracoUi.content.isContentInTreeVisible(contentName);
|
||||
await umbracoUi.content.isContentInTreeVisible(parentContentName);
|
||||
await umbracoUi.content.openContentCaretButtonForName(parentContentName);
|
||||
await umbracoUi.content.isChildContentInTreeVisible(parentContentName, contentName);
|
||||
await umbracoUi.content.goToContentWithName(parentContentName);
|
||||
await umbracoUi.content.isContentWithNameVisibleInList(contentName);
|
||||
|
||||
// Clean
|
||||
await umbracoApi.document.ensureNameNotExists(parentContentName);
|
||||
|
||||
@@ -17,7 +17,7 @@ test.afterEach(async ({umbracoApi}) => {
|
||||
|
||||
test('can see correct information when published', async ({umbracoApi, umbracoUi}) => {
|
||||
// Arrange
|
||||
const notPublishContentLink = 'This item is not published';
|
||||
const notPublishContentLink = 'Not created';
|
||||
const dataTypeName = 'Textstring';
|
||||
const contentText = 'This is test content text';
|
||||
const dataTypeData = await umbracoApi.dataType.getByName(dataTypeName);
|
||||
|
||||
@@ -51,7 +51,7 @@ test('cannot create child content if allowed child node is disabled', async ({um
|
||||
|
||||
// Assert
|
||||
await umbracoUi.content.isDocumentTypeNameVisible(documentTypeName, false);
|
||||
await umbracoUi.content.doesModalHaveText(noAllowedDocumentTypeAvailableMessage);
|
||||
await umbracoUi.content.doesDocumentModalHaveText(noAllowedDocumentTypeAvailableMessage);
|
||||
});
|
||||
|
||||
test('can create multiple child nodes with different document types', async ({umbracoApi, umbracoUi}) => {
|
||||
|
||||
@@ -58,7 +58,7 @@ test('can publish content with the true/false data type', async ({umbracoApi, um
|
||||
expect(await umbracoApi.document.doesNameExist(contentName)).toBeTruthy();
|
||||
const contentData = await umbracoApi.document.getByName(contentName);
|
||||
expect(contentData.variants[0].state).toBe(expectedState);
|
||||
expect(contentData.values).toEqual([]);
|
||||
expect(contentData.values[0].value).toEqual(false);
|
||||
});
|
||||
|
||||
test('can toggle the true/false value in the content', {tag: '@release'}, async ({umbracoApi, umbracoUi}) => {
|
||||
|
||||
@@ -51,7 +51,7 @@ test('can create content using an invariant document blueprint', async ({umbraco
|
||||
await umbracoUi.content.clickActionsMenuAtRoot();
|
||||
await umbracoUi.content.clickCreateActionMenuOption();
|
||||
await umbracoUi.content.chooseDocumentType(documentTypeName);
|
||||
await umbracoUi.content.clickModalMenuItemWithName(documentBlueprintName);
|
||||
await umbracoUi.content.selectDocumentBlueprintWithName(documentBlueprintName);
|
||||
await umbracoUi.content.clickSaveButtonForContent();
|
||||
|
||||
// Assert
|
||||
@@ -75,7 +75,7 @@ test('can create content using a variant document blueprint', async ({umbracoApi
|
||||
await umbracoUi.content.clickActionsMenuAtRoot();
|
||||
await umbracoUi.content.clickCreateActionMenuOption();
|
||||
await umbracoUi.content.chooseDocumentType(documentTypeName);
|
||||
await umbracoUi.content.clickModalMenuItemWithName(documentBlueprintName);
|
||||
await umbracoUi.content.selectDocumentBlueprintWithName(documentBlueprintName);
|
||||
await umbracoUi.content.clickSaveButtonForContent();
|
||||
await umbracoUi.content.clickSaveButton();
|
||||
|
||||
@@ -104,7 +104,7 @@ test('can create content with different name using an invariant document bluepri
|
||||
await umbracoUi.content.clickActionsMenuAtRoot();
|
||||
await umbracoUi.content.clickCreateActionMenuOption();
|
||||
await umbracoUi.content.chooseDocumentType(documentTypeName);
|
||||
await umbracoUi.content.clickModalMenuItemWithName(documentBlueprintName);
|
||||
await umbracoUi.content.selectDocumentBlueprintWithName(documentBlueprintName);
|
||||
await umbracoUi.content.enterContentName(contentName);
|
||||
await umbracoUi.content.clickSaveButtonForContent();
|
||||
|
||||
@@ -130,7 +130,7 @@ test('can create content with different name using a variant document blueprint'
|
||||
await umbracoUi.content.clickActionsMenuAtRoot();
|
||||
await umbracoUi.content.clickCreateActionMenuOption();
|
||||
await umbracoUi.content.chooseDocumentType(documentTypeName);
|
||||
await umbracoUi.content.clickModalMenuItemWithName(documentBlueprintName);
|
||||
await umbracoUi.content.selectDocumentBlueprintWithName(documentBlueprintName);
|
||||
await umbracoUi.content.enterContentName(contentName);
|
||||
await umbracoUi.content.clickSaveButtonForContent();
|
||||
await umbracoUi.content.clickSaveButton();
|
||||
@@ -161,7 +161,7 @@ test('can create content using a document blueprint with block list', async ({um
|
||||
await umbracoUi.content.clickActionsMenuAtRoot();
|
||||
await umbracoUi.content.clickCreateActionMenuOption();
|
||||
await umbracoUi.content.chooseDocumentType(documentTypeName);
|
||||
await umbracoUi.content.clickModalMenuItemWithName(documentBlueprintName);
|
||||
await umbracoUi.content.selectDocumentBlueprintWithName(documentBlueprintName);
|
||||
await umbracoUi.content.clickSaveButtonForContent();
|
||||
|
||||
// Assert
|
||||
@@ -187,7 +187,7 @@ test('can create content using a document blueprint with block grid', async ({um
|
||||
await umbracoUi.content.clickActionsMenuAtRoot();
|
||||
await umbracoUi.content.clickCreateActionMenuOption();
|
||||
await umbracoUi.content.chooseDocumentType(documentTypeName);
|
||||
await umbracoUi.content.clickModalMenuItemWithName(documentBlueprintName);
|
||||
await umbracoUi.content.selectDocumentBlueprintWithName(documentBlueprintName);
|
||||
await umbracoUi.content.clickSaveButtonForContent();
|
||||
|
||||
// Assert
|
||||
@@ -197,4 +197,4 @@ test('can create content using a document blueprint with block grid', async ({um
|
||||
expect(contentData.values[0].value.contentData[0].values[0].value.markup).toEqual(textContent);
|
||||
const blockListValue = contentData.values.find(item => item.editorAlias === "Umbraco.BlockGrid")?.value;
|
||||
expect(blockListValue).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -275,7 +275,7 @@ test('max can not be less than min in a block grid editor', async ({umbracoApi,
|
||||
|
||||
// Assert
|
||||
await umbracoUi.dataType.isFailedStateButtonVisible();
|
||||
await umbracoUi.dataType.doesAmountContainErrorMessageWithText('The low value must not be exceed the high value');
|
||||
await umbracoUi.dataType.doesAmountContainErrorMessageWithText('The low value must not exceed the high value.');
|
||||
const dataTypeData = await umbracoApi.dataType.getByName(blockGridEditorName);
|
||||
expect(dataTypeData.values[0].value.min).toBe(minAmount);
|
||||
// The max value should not be updated
|
||||
|
||||
@@ -173,7 +173,7 @@ test('max can not be less than min', async ({umbracoApi, umbracoUi}) => {
|
||||
// Assert
|
||||
await umbracoUi.dataType.isFailedStateButtonVisible();
|
||||
const dataTypeData = await umbracoApi.dataType.getByName(blockListEditorName);
|
||||
await umbracoUi.dataType.doesAmountContainErrorMessageWithText('The low value must not be exceed the high value');
|
||||
await umbracoUi.dataType.doesAmountContainErrorMessageWithText('The low value must not exceed the high value.');
|
||||
expect(dataTypeData.values[0].value.min).toBe(minAmount);
|
||||
// The max value should not be updated
|
||||
expect(dataTypeData.values[0].value.max).toBe(oldMaxAmount);
|
||||
|
||||
@@ -73,6 +73,7 @@ for (const mediaFileType of mediaFileTypes) {
|
||||
|
||||
// Assert
|
||||
await umbracoUi.media.waitForMediaItemToBeCreated();
|
||||
await umbracoUi.media.goToSection(ConstantHelper.sections.media);
|
||||
const mediaData = await umbracoApi.media.getByName(mediaFileType.fileName);
|
||||
const mediaUrl = await umbracoApi.media.getFullMediaUrl(mediaData.id);
|
||||
await umbracoUi.media.doesMediaHaveThumbnail(mediaData.id, mediaFileType.thumbnail, mediaUrl);
|
||||
|
||||
@@ -173,7 +173,7 @@ test('can remove a header from a webhook', async ({umbracoApi, umbracoUi}) => {
|
||||
expect(await umbracoApi.webhook.doesWebhookHaveHeader(webhookName, headerName, headerValue)).toBeFalsy();
|
||||
});
|
||||
|
||||
test('cannot add both content event and media event for a webhook', {tag: '@release'}, async ({umbracoApi, umbracoUi}) => {
|
||||
test('cannot add both content event and media event for a webhook', async ({umbracoApi, umbracoUi}) => {
|
||||
// Arrange
|
||||
const event = 'Content Published';
|
||||
await umbracoApi.webhook.createDefaultWebhook(webhookName, webhookSiteToken, event);
|
||||
@@ -185,4 +185,4 @@ test('cannot add both content event and media event for a webhook', {tag: '@rele
|
||||
// Assert
|
||||
await umbracoUi.webhook.isModalMenuItemWithNameDisabled('Media Saved');
|
||||
await umbracoUi.webhook.isModalMenuItemWithNameDisabled('Media Deleted');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -27,7 +27,7 @@ test.afterEach(async ({umbracoApi}) => {
|
||||
await umbracoApi.media.ensureNameNotExists(mediaName);
|
||||
});
|
||||
|
||||
test('can trigger when content is published', {tag: '@release'}, async ({umbracoApi, umbracoUi}) => {
|
||||
test('can trigger when content is published', async ({umbracoApi, umbracoUi}) => {
|
||||
test.slow();
|
||||
|
||||
// Arrange
|
||||
|
||||
Reference in New Issue
Block a user