Skip to content

Commit e87cd0a

Browse files
committed
V15 QA updated E2E tests to match changes (#17625)
* Updated locators * Added waits * Updated clickDeleteButton * Bumped version (cherry picked from commit 01a19b8)
1 parent 2f388b3 commit e87cd0a

File tree

9 files changed

+22
-14
lines changed

9 files changed

+22
-14
lines changed

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithDocumentTypeProperties/ContentWithCollections.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ test('can create child content in a collection', async ({umbracoApi, umbracoUi})
6767
await umbracoUi.content.clickActionsMenuForContent(contentName);
6868
await umbracoUi.content.clickReloadButton();
6969
await umbracoUi.content.goToContentWithName(contentName);
70+
await umbracoUi.waitForTimeout(500);
7071
await umbracoUi.content.doesDocumentTableColumnNameValuesMatch(expectedNames);
7172

7273
// Clean
@@ -103,6 +104,7 @@ test('can create multiple child nodes in a collection', async ({umbracoApi, umbr
103104
await umbracoUi.content.clickActionsMenuForContent(contentName);
104105
await umbracoUi.content.clickReloadButton();
105106
await umbracoUi.content.goToContentWithName(contentName);
107+
await umbracoUi.waitForTimeout(500);
106108
await umbracoUi.content.doesDocumentTableColumnNameValuesMatch(expectedNames);
107109

108110
// Clean

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Dictionary/Dictionary.spec.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ test('can create a dictionary item', async ({umbracoApi, umbracoUi}) => {
3434
test('can delete a dictionary item', async ({umbracoApi, umbracoUi}) => {
3535
// Arrange
3636
await umbracoApi.dictionary.ensureNameNotExists(dictionaryName);
37+
await umbracoApi.dictionary.ensureNameNotExists(parentDictionaryName);
3738
await umbracoApi.dictionary.create(dictionaryName);
3839
await umbracoUi.dictionary.goToSection(ConstantHelper.sections.dictionary);
3940

@@ -47,7 +48,7 @@ test('can delete a dictionary item', async ({umbracoApi, umbracoUi}) => {
4748
// Verify the dictionary item does not display in the tree
4849
await umbracoUi.dictionary.isDictionaryTreeItemVisible(dictionaryName, false);
4950
// Verify the dictionary item does not display in the list
50-
await umbracoUi.goBackPage();
51+
await umbracoUi.reloadPage();
5152
await umbracoUi.dictionary.doesDictionaryCollectionContainText('No items');
5253
});
5354

@@ -88,7 +89,7 @@ test('can export a dictionary item', async ({umbracoApi, umbracoUi}) => {
8889

8990
// Act
9091
await umbracoUi.dictionary.clickActionsMenuForDictionary(dictionaryName);
91-
await umbracoUi.dictionary.clickExportMenu();
92+
await umbracoUi.dictionary.clickExportButton();
9293
const exportData = await umbracoUi.dictionary.exportDictionary(false);
9394

9495
// Assert
@@ -104,7 +105,7 @@ test('can export a dictionary item with descendants', {tag: '@smoke'}, async ({u
104105

105106
// Act
106107
await umbracoUi.dictionary.clickActionsMenuForDictionary(parentDictionaryName);
107-
await umbracoUi.dictionary.clickExportMenu();
108+
await umbracoUi.dictionary.clickExportButton();
108109
const exportData = await umbracoUi.dictionary.exportDictionary(true);
109110

110111
// Assert
@@ -125,12 +126,12 @@ test('can import a dictionary item', async ({umbracoApi, umbracoUi}) => {
125126

126127
// Act
127128
await umbracoUi.dictionary.clickActionsMenuForDictionary(dictionaryName);
128-
await umbracoUi.dictionary.clickImportMenu();
129+
await umbracoUi.dictionary.clickImportButton();
129130
await umbracoUi.dictionary.importDictionary(udtFilePath);
130131

131132
// Assert
132133
// Verify the imported dictionary item displays in the list
133-
await umbracoUi.goBackPage();
134+
await umbracoUi.reloadPage();
134135
expect(await umbracoUi.dictionary.doesDictionaryListHaveText(importDictionaryName)).toBeTruthy();
135136
// Verify the imported dictionary item displays in the tree
136137
await umbracoUi.dictionary.reloadTree(dictionaryName);
@@ -149,12 +150,12 @@ test('can import a dictionary item with descendants', {tag: '@smoke'}, async ({u
149150

150151
// Act
151152
await umbracoUi.dictionary.clickActionsMenuForDictionary(dictionaryName);
152-
await umbracoUi.dictionary.clickImportMenu();
153+
await umbracoUi.dictionary.clickImportButton();
153154
await umbracoUi.dictionary.importDictionary(udtFilePath);
154155

155156
// Assert
156157
// Verify the imported dictionary items display in the list
157-
await umbracoUi.goBackPage();
158+
await umbracoUi.reloadPage();
158159
expect(await umbracoUi.dictionary.doesDictionaryListHaveText(importParentDictionaryName)).toBeTruthy();
159160
expect(await umbracoUi.dictionary.doesDictionaryListHaveText(importChildDictionaryName)).toBeTruthy();
160161
// Verify the imported dictionary items display in the tree

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Relation Types/RelationTypes.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ test.skip('can delete a relation type', async ({umbracoApi, umbracoUi}) => {
8989
// Act
9090
await umbracoUi.relationType.clickRootFolderCaretButton();
9191
await umbracoUi.relationType.clickActionsMenuForRelationType(relationTypeName);
92-
await umbracoUi.relationType.clickDeleteExactLabel();
92+
await umbracoUi.relationType.clickDeleteButton();
9393
await umbracoUi.relationType.clickConfirmToDeleteButton();
9494

9595
// Assert

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentType.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ test('can add an icon for a document type', {tag: '@smoke'}, async ({umbracoApi,
122122

123123
// Act
124124
await umbracoUi.documentType.goToDocumentType(documentTypeName);
125+
await umbracoUi.waitForTimeout(500);
125126
await umbracoUi.documentType.updateIcon(bugIcon);
126127
await umbracoUi.documentType.clickSaveButton();
127128

@@ -146,4 +147,4 @@ test('can delete a document type', {tag: '@smoke'}, async ({umbracoApi, umbracoU
146147
// Assert
147148
await umbracoUi.documentType.doesSuccessNotificationHaveText(NotificationConstantHelper.success.deleted);
148149
expect(await umbracoApi.documentType.doesNameExist(documentTypeName)).toBeFalsy();
149-
});
150+
});

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeTemplatesTab.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ test('can set an allowed template as default for document type', async ({umbraco
5555
const documentTypeData = await umbracoApi.documentType.getByName(documentTypeName);
5656
expect(documentTypeData.allowedTemplates).toHaveLength(2);
5757
expect(documentTypeData.defaultTemplate.id).toBe(secondTemplateId);
58+
59+
// Clean
60+
await umbracoApi.template.ensureNameNotExists(secondTemplateName);
5861
});
5962

6063
// TODO: Remove skip when the front-end is ready. Currently the error displays when remove an allowed template

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/MediaType/MediaType.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ test('can add an icon for a media type', {tag: '@smoke'}, async ({umbracoApi, um
6868

6969
// Act
7070
await umbracoUi.mediaType.goToMediaType(mediaTypeName);
71+
await umbracoUi.waitForTimeout(500);
7172
await umbracoUi.mediaType.updateIcon(bugIcon);
7273
await umbracoUi.mediaType.clickSaveButton();
7374

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/Stylesheet/StylesheetFolder.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ test('can create a folder in a folder in a folder', {tag: '@smoke'}, async ({umb
7878
await umbracoUi.stylesheet.clickActionsMenuForStylesheet(childFolderName);
7979
await umbracoUi.stylesheet.createFolder(childOfChildFolderName);
8080

81-
//Assert
81+
// Assert
8282
await umbracoUi.stylesheet.doesSuccessNotificationHaveText(NotificationConstantHelper.success.created);
8383
expect(await umbracoApi.stylesheet.doesNameExist(childOfChildFolderName)).toBeTruthy();
8484
const styleChildren = await umbracoApi.stylesheet.getChildren('/' + stylesheetFolderName + '/' + childFolderName);

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/Template/Templates.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ test('can delete a template', async ({umbracoApi, umbracoUi}) => {
8080

8181
// Assert
8282
await umbracoUi.template.doesSuccessNotificationHaveText(NotificationConstantHelper.success.deleted);
83+
await umbracoUi.template.reloadTemplateTree();
8384
expect(await umbracoApi.template.doesNameExist(templateName)).toBeFalsy();
8485
await umbracoUi.template.isTemplateRootTreeItemVisible(templateName, false);
8586
});

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/UserGroups.spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,10 @@ test.afterEach(async ({umbracoApi}) => {
5151
await umbracoApi.userGroup.ensureNameNotExists(userGroupName);
5252
});
5353

54-
test('can create an empty user group', async ({page, umbracoApi, umbracoUi}) => {
54+
test('can create an empty user group', async ({umbracoApi, umbracoUi}) => {
5555
// Act
5656
await umbracoUi.userGroup.clickUserGroupsButton();
57-
await page.pause();
58-
await umbracoUi.userGroup.clickCreateButton();
57+
await umbracoUi.userGroup.clickCreateLabelButton();
5958
await umbracoUi.userGroup.enterUserGroupName(userGroupName);
6059
await umbracoUi.userGroup.clickSaveButton();
6160

@@ -114,7 +113,7 @@ test('can delete a user group', async ({umbracoApi, umbracoUi}) => {
114113

115114
// Act
116115
await umbracoUi.userGroup.clickActionsButton();
117-
await umbracoUi.userGroup.clickDeleteThreeDotsButton();
116+
await umbracoUi.userGroup.clickDeleteLabelThreeDotsButton();
118117
await umbracoUi.userGroup.clickConfirmToDeleteButton();
119118

120119
// Assert

0 commit comments

Comments
 (0)