Skip to content

Commit a954051

Browse files
authored
V15 QA updated flaky E2E tests (#17845)
* Updated tests * More cleanup * Removed log * Bumped version * Update tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithMultiURLPicker.spec.ts * Update tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeDesignTab.spec.ts * Update tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeDesignTab.spec.ts * Update tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/DefaultPermissionsInContent.spec.ts
1 parent a582732 commit a954051

21 files changed

+55
-32
lines changed

tests/Umbraco.Tests.AcceptanceTest/package-lock.json

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/Umbraco.Tests.AcceptanceTest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
"dependencies": {
2323
"@umbraco/json-models-builders": "^2.0.26",
24-
"@umbraco/playwright-testhelpers": "^15.0.6",
24+
"@umbraco/playwright-testhelpers": "^15.0.7",
2525
"camelize": "^1.0.0",
2626
"dotenv": "^16.3.1",
2727
"node-fetch": "^2.6.7"

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentInfoTab.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ test('can see correct information when published', async ({umbracoApi, umbracoUi
3333
await umbracoUi.content.clickSaveAndPublishButton();
3434

3535
// Assert
36+
await umbracoUi.content.isSuccessNotificationVisible();
3637
await umbracoUi.waitForTimeout(2000);
3738
const contentData = await umbracoApi.document.getByName(contentName);
3839
await umbracoUi.content.doesIdHaveText(contentData.id);
@@ -106,6 +107,7 @@ test('can change template', async ({umbracoApi, umbracoUi}) => {
106107
await umbracoUi.content.clickSaveButton();
107108

108109
// Assert
110+
await umbracoUi.content.isSuccessNotificationVisible();
109111
const contentData = await umbracoApi.document.getByName(contentName);
110112
expect(contentData.template.id).toBe(secondTemplateId);
111113

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithContentPicker.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ test('can choose start node for the content picker in the content', async ({umbr
120120
// Clean
121121
await umbracoApi.dataType.ensureNameNotExists(customDataTypeName);
122122
await umbracoApi.document.ensureNameNotExists(childContentPickerName);
123+
await umbracoApi.documentType.ensureNameNotExists(childContentPickerDocumentTypeName);
123124
});
124125

125126
test.skip('can ignore user start node for the content picker in the content', async ({umbracoApi, umbracoUi}) => {
@@ -150,6 +151,7 @@ test.skip('can ignore user start node for the content picker in the content', as
150151
// Clean
151152
await umbracoApi.dataType.ensureNameNotExists(customDataTypeName);
152153
await umbracoApi.document.ensureNameNotExists(childContentPickerName);
154+
await umbracoApi.documentType.ensureNameNotExists(childContentPickerDocumentTypeName);
153155
});
154156

155157
test('can remove content picker in the content', async ({umbracoApi, umbracoUi}) => {

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithListViewContent.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ test('can publish content with a child in the list', async ({umbracoApi, umbraco
103103

104104
// Act
105105
await umbracoUi.content.clickSaveAndPublishButton();
106+
await umbracoUi.content.doesSuccessNotificationsHaveCount(2);
106107
await umbracoUi.content.goToContentInListViewWithName(childContentName);
107108
await umbracoUi.content.clickContainerSaveAndPublishButton();
108109

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithMultiURLPicker.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ test.afterEach(async ({umbracoApi}) => {
1717
await umbracoApi.documentType.ensureNameNotExists(documentTypeName);
1818
});
1919

20-
test('can create content with the document link', {tag: '@smoke'}, async ({page, umbracoApi, umbracoUi}) => {
20+
test('can create content with the document link', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) => {
2121
// Arrange
2222
const expectedState = 'Draft';
2323
const dataTypeData = await umbracoApi.dataType.getByName(dataTypeName);
@@ -27,7 +27,6 @@ test('can create content with the document link', {tag: '@smoke'}, async ({page,
2727
const documentTypeForLinkedDocumentId = await umbracoApi.documentType.createDefaultDocumentTypeWithAllowAsRoot(documentTypeForLinkedDocumentName);
2828
const linkedDocumentName = 'LinkedDocument';
2929
const linkedDocumentId = await umbracoApi.document.createDefaultDocument(linkedDocumentName, documentTypeForLinkedDocumentId);
30-
await umbracoUi.waitForTimeout(2000);
3130
await umbracoApi.document.publish(linkedDocumentId);
3231
await umbracoUi.goToBackOffice();
3332
await umbracoUi.content.goToSection(ConstantHelper.sections.content);

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/CultureAndHostnames.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ test('can add a culture', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) => {
4040
await umbracoUi.content.clickSaveModalButton();
4141

4242
// Assert
43+
await umbracoUi.content.isSuccessNotificationVisible();
4344
await umbracoUi.waitForTimeout(2000);
4445
const domainsData = await umbracoApi.document.getDomains(contentId);
4546
expect(domainsData.defaultIsoCode).toEqual(isoCode);
@@ -56,6 +57,7 @@ test('can add a domain', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) => {
5657
await umbracoUi.content.clickSaveModalButton();
5758

5859
// Assert
60+
await umbracoUi.content.isSuccessNotificationVisible();
5961
const domainsData = await umbracoApi.document.getDomains(contentId);
6062
expect(domainsData.domains.length).toBe(1);
6163
expect(domainsData.domains[0].domainName).toEqual(domainName);
@@ -76,6 +78,7 @@ test('can update culture and hostname', async ({umbracoApi, umbracoUi}) => {
7678
await umbracoUi.content.clickSaveModalButton();
7779

7880
// Assert
81+
await umbracoUi.content.isSuccessNotificationVisible();
7982
domainsData = await umbracoApi.document.getDomains(contentId);
8083
expect(domainsData.domains[0].domainName).toEqual(updatedDomainName);
8184
expect(domainsData.domains[0].isoCode).toEqual(isoCode);
@@ -94,6 +97,7 @@ test('can delete culture and hostname', async ({umbracoApi, umbracoUi}) => {
9497
await umbracoUi.content.clickSaveModalButton();
9598

9699
// Assert
100+
await umbracoUi.content.isSuccessNotificationVisible();
97101
domainsData = await umbracoApi.document.getDomains(contentId);
98102
expect(domainsData.domains.length).toBe(0);
99103
});
@@ -120,6 +124,7 @@ test('can add culture and hostname for multiple languages', async ({umbracoApi,
120124
await umbracoUi.waitForTimeout(500);
121125

122126
// Assert
127+
await umbracoUi.content.isSuccessNotificationVisible();
123128
const domainsData = await umbracoApi.document.getDomains(contentId);
124129
expect(domainsData.domains.length).toBe(2);
125130
expect(domainsData.domains[0].domainName).toEqual(domainName);

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/ApprovedColor.spec.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {expect} from "@playwright/test";
33

44
const dataTypeName = 'Approved Color';
55
let dataTypeDefaultData = null;
6-
let dataTypeData = null;
6+
let dataTypeData = null;
77
const colorValue = 'ffffff';
88
const colorLabel = '';
99

@@ -38,6 +38,7 @@ test('can include label', async ({umbracoApi, umbracoUi}) => {
3838
await umbracoUi.dataType.clickSaveButton();
3939

4040
// Assert
41+
await umbracoUi.dataType.isSuccessNotificationVisible();
4142
dataTypeData = await umbracoApi.dataType.getByName(dataTypeName);
4243
expect(dataTypeData.values).toEqual(expectedDataTypeValues);
4344
});
@@ -66,11 +67,12 @@ test('can add color', async ({umbracoApi, umbracoUi}) => {
6667
await umbracoUi.dataType.clickSaveButton();
6768

6869
// Assert
70+
await umbracoUi.dataType.isSuccessNotificationVisible();
6971
dataTypeData = await umbracoApi.dataType.getByName(dataTypeName);
7072
expect(dataTypeData.values).toEqual(expectedDataTypeValues);
7173
});
7274

73-
test('can remove color', async ({umbracoApi, umbracoUi}) => {
75+
test('can remove color', async ({umbracoApi, umbracoUi}) => {
7476
// Arrange
7577
const removedDataTypeValues = [
7678
{
@@ -94,6 +96,7 @@ test('can remove color', async ({umbracoApi, umbracoUi}) => {
9496
await umbracoUi.dataType.clickSaveButton();
9597

9698
// Assert
99+
await umbracoUi.dataType.isSuccessNotificationVisible();
97100
dataTypeData = await umbracoApi.dataType.getByName(dataTypeName);
98101
expect(dataTypeData.values).toEqual([]);
99102
});

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/BlockGrid/BlockGridEditor.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ test('can add multiple blocks to a group in a block grid editor', async ({umbrac
186186
await umbracoApi.documentType.ensureNameNotExists(secondElementName);
187187
});
188188

189-
test('can delete a block in a group from a block grid editor', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) => {
189+
test('can remove a block in a group from a block grid editor', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) => {
190190
// Arrange
191191
const textStringData = await umbracoApi.dataType.getByName(dataTypeName);
192192
const elementTypeId = await umbracoApi.documentType.createDefaultElementType(elementTypeName, groupName, dataTypeName, textStringData.id);

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/BlockListEditor/BlockListBlocks.spec.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ test('can add a settings model to a block', {tag: '@smoke'}, async ({umbracoApi,
147147
// Assert
148148
await umbracoUi.dataType.isSuccessNotificationVisible();
149149
expect(await umbracoApi.dataType.doesBlockEditorContainBlocksWithSettingsTypeIds(blockListEditorName, [settingsElementTypeId])).toBeTruthy();
150+
151+
// Clean
152+
await umbracoApi.documentType.ensureNameNotExists(secondElementName);
150153
});
151154

152155
test('can remove a settings model from a block', async ({umbracoApi, umbracoUi}) => {
@@ -169,6 +172,9 @@ test('can remove a settings model from a block', async ({umbracoApi, umbracoUi})
169172
// Assert
170173
await umbracoUi.dataType.isSuccessNotificationVisible();
171174
expect(await umbracoApi.dataType.doesBlockEditorContainBlocksWithSettingsTypeIds(blockListEditorName, [settingsElementTypeId])).toBeFalsy();
175+
176+
// Clean
177+
await umbracoApi.documentType.ensureNameNotExists(secondElementName);
172178
});
173179

174180
test('can add a background color to a block', async ({umbracoApi, umbracoUi}) => {
@@ -408,11 +414,11 @@ test('can disable hide content editor in a block', async ({umbracoApi, umbracoUi
408414
});
409415

410416
// TODO: Thumbnails are not showing in the UI
411-
test.skip('can add a thumbnail to a block ', {tag: '@smoke'}, async ({page, umbracoApi, umbracoUi}) => {
417+
test.skip('can add a thumbnail to a block ', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) => {
412418

413419
});
414420

415421
// TODO: Thumbnails are not showing in the UI
416-
test.skip('can remove a thumbnail to a block ', {tag: '@smoke'}, async ({page, umbracoApi, umbracoUi}) => {
422+
test.skip('can remove a thumbnail to a block ', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) => {
417423

418-
});
424+
});

0 commit comments

Comments
 (0)