V15 QA updated E2E tests to match changes (#17625)
* Updated locators * Added waits * Updated clickDeleteButton * Bumped version
This commit is contained in:
@@ -67,6 +67,7 @@ test('can create child content in a collection', async ({umbracoApi, umbracoUi})
|
||||
await umbracoUi.content.clickActionsMenuForContent(contentName);
|
||||
await umbracoUi.content.clickReloadButton();
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
await umbracoUi.waitForTimeout(500);
|
||||
await umbracoUi.content.doesDocumentTableColumnNameValuesMatch(expectedNames);
|
||||
|
||||
// Clean
|
||||
@@ -103,6 +104,7 @@ test('can create multiple child nodes in a collection', async ({umbracoApi, umbr
|
||||
await umbracoUi.content.clickActionsMenuForContent(contentName);
|
||||
await umbracoUi.content.clickReloadButton();
|
||||
await umbracoUi.content.goToContentWithName(contentName);
|
||||
await umbracoUi.waitForTimeout(500);
|
||||
await umbracoUi.content.doesDocumentTableColumnNameValuesMatch(expectedNames);
|
||||
|
||||
// Clean
|
||||
|
||||
@@ -34,6 +34,7 @@ test('can create a dictionary item', async ({umbracoApi, umbracoUi}) => {
|
||||
test('can delete a dictionary item', async ({umbracoApi, umbracoUi}) => {
|
||||
// Arrange
|
||||
await umbracoApi.dictionary.ensureNameNotExists(dictionaryName);
|
||||
await umbracoApi.dictionary.ensureNameNotExists(parentDictionaryName);
|
||||
await umbracoApi.dictionary.create(dictionaryName);
|
||||
await umbracoUi.dictionary.goToSection(ConstantHelper.sections.dictionary);
|
||||
|
||||
@@ -47,7 +48,7 @@ test('can delete a dictionary item', async ({umbracoApi, umbracoUi}) => {
|
||||
// Verify the dictionary item does not display in the tree
|
||||
await umbracoUi.dictionary.isDictionaryTreeItemVisible(dictionaryName, false);
|
||||
// Verify the dictionary item does not display in the list
|
||||
await umbracoUi.goBackPage();
|
||||
await umbracoUi.reloadPage();
|
||||
await umbracoUi.dictionary.doesDictionaryCollectionContainText('No items');
|
||||
});
|
||||
|
||||
@@ -88,7 +89,7 @@ test('can export a dictionary item', async ({umbracoApi, umbracoUi}) => {
|
||||
|
||||
// Act
|
||||
await umbracoUi.dictionary.clickActionsMenuForDictionary(dictionaryName);
|
||||
await umbracoUi.dictionary.clickExportMenu();
|
||||
await umbracoUi.dictionary.clickExportButton();
|
||||
const exportData = await umbracoUi.dictionary.exportDictionary(false);
|
||||
|
||||
// Assert
|
||||
@@ -104,7 +105,7 @@ test('can export a dictionary item with descendants', {tag: '@smoke'}, async ({u
|
||||
|
||||
// Act
|
||||
await umbracoUi.dictionary.clickActionsMenuForDictionary(parentDictionaryName);
|
||||
await umbracoUi.dictionary.clickExportMenu();
|
||||
await umbracoUi.dictionary.clickExportButton();
|
||||
const exportData = await umbracoUi.dictionary.exportDictionary(true);
|
||||
|
||||
// Assert
|
||||
@@ -125,12 +126,12 @@ test('can import a dictionary item', async ({umbracoApi, umbracoUi}) => {
|
||||
|
||||
// Act
|
||||
await umbracoUi.dictionary.clickActionsMenuForDictionary(dictionaryName);
|
||||
await umbracoUi.dictionary.clickImportMenu();
|
||||
await umbracoUi.dictionary.clickImportButton();
|
||||
await umbracoUi.dictionary.importDictionary(udtFilePath);
|
||||
|
||||
// Assert
|
||||
// Verify the imported dictionary item displays in the list
|
||||
await umbracoUi.goBackPage();
|
||||
await umbracoUi.reloadPage();
|
||||
expect(await umbracoUi.dictionary.doesDictionaryListHaveText(importDictionaryName)).toBeTruthy();
|
||||
// Verify the imported dictionary item displays in the tree
|
||||
await umbracoUi.dictionary.reloadTree(dictionaryName);
|
||||
@@ -149,12 +150,12 @@ test('can import a dictionary item with descendants', {tag: '@smoke'}, async ({u
|
||||
|
||||
// Act
|
||||
await umbracoUi.dictionary.clickActionsMenuForDictionary(dictionaryName);
|
||||
await umbracoUi.dictionary.clickImportMenu();
|
||||
await umbracoUi.dictionary.clickImportButton();
|
||||
await umbracoUi.dictionary.importDictionary(udtFilePath);
|
||||
|
||||
// Assert
|
||||
// Verify the imported dictionary items display in the list
|
||||
await umbracoUi.goBackPage();
|
||||
await umbracoUi.reloadPage();
|
||||
expect(await umbracoUi.dictionary.doesDictionaryListHaveText(importParentDictionaryName)).toBeTruthy();
|
||||
expect(await umbracoUi.dictionary.doesDictionaryListHaveText(importChildDictionaryName)).toBeTruthy();
|
||||
// Verify the imported dictionary items display in the tree
|
||||
|
||||
@@ -89,7 +89,7 @@ test.skip('can delete a relation type', async ({umbracoApi, umbracoUi}) => {
|
||||
// Act
|
||||
await umbracoUi.relationType.clickRootFolderCaretButton();
|
||||
await umbracoUi.relationType.clickActionsMenuForRelationType(relationTypeName);
|
||||
await umbracoUi.relationType.clickDeleteExactLabel();
|
||||
await umbracoUi.relationType.clickDeleteButton();
|
||||
await umbracoUi.relationType.clickConfirmToDeleteButton();
|
||||
|
||||
// Assert
|
||||
|
||||
@@ -122,6 +122,7 @@ test('can add an icon for a document type', {tag: '@smoke'}, async ({umbracoApi,
|
||||
|
||||
// Act
|
||||
await umbracoUi.documentType.goToDocumentType(documentTypeName);
|
||||
await umbracoUi.waitForTimeout(500);
|
||||
await umbracoUi.documentType.updateIcon(bugIcon);
|
||||
await umbracoUi.documentType.clickSaveButton();
|
||||
|
||||
@@ -146,4 +147,4 @@ test('can delete a document type', {tag: '@smoke'}, async ({umbracoApi, umbracoU
|
||||
// Assert
|
||||
await umbracoUi.documentType.doesSuccessNotificationHaveText(NotificationConstantHelper.success.deleted);
|
||||
expect(await umbracoApi.documentType.doesNameExist(documentTypeName)).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -55,6 +55,9 @@ test('can set an allowed template as default for document type', async ({umbraco
|
||||
const documentTypeData = await umbracoApi.documentType.getByName(documentTypeName);
|
||||
expect(documentTypeData.allowedTemplates).toHaveLength(2);
|
||||
expect(documentTypeData.defaultTemplate.id).toBe(secondTemplateId);
|
||||
|
||||
// Clean
|
||||
await umbracoApi.template.ensureNameNotExists(secondTemplateName);
|
||||
});
|
||||
|
||||
// TODO: Remove skip when the front-end is ready. Currently the error displays when remove an allowed template
|
||||
|
||||
@@ -68,6 +68,7 @@ test('can add an icon for a media type', {tag: '@smoke'}, async ({umbracoApi, um
|
||||
|
||||
// Act
|
||||
await umbracoUi.mediaType.goToMediaType(mediaTypeName);
|
||||
await umbracoUi.waitForTimeout(500);
|
||||
await umbracoUi.mediaType.updateIcon(bugIcon);
|
||||
await umbracoUi.mediaType.clickSaveButton();
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ test('can create a folder in a folder in a folder', {tag: '@smoke'}, async ({umb
|
||||
await umbracoUi.stylesheet.clickActionsMenuForStylesheet(childFolderName);
|
||||
await umbracoUi.stylesheet.createFolder(childOfChildFolderName);
|
||||
|
||||
//Assert
|
||||
// Assert
|
||||
await umbracoUi.stylesheet.doesSuccessNotificationHaveText(NotificationConstantHelper.success.created);
|
||||
expect(await umbracoApi.stylesheet.doesNameExist(childOfChildFolderName)).toBeTruthy();
|
||||
const styleChildren = await umbracoApi.stylesheet.getChildren('/' + stylesheetFolderName + '/' + childFolderName);
|
||||
|
||||
@@ -80,6 +80,7 @@ test('can delete a template', async ({umbracoApi, umbracoUi}) => {
|
||||
|
||||
// Assert
|
||||
await umbracoUi.template.doesSuccessNotificationHaveText(NotificationConstantHelper.success.deleted);
|
||||
await umbracoUi.template.reloadTemplateTree();
|
||||
expect(await umbracoApi.template.doesNameExist(templateName)).toBeFalsy();
|
||||
await umbracoUi.template.isTemplateRootTreeItemVisible(templateName, false);
|
||||
});
|
||||
|
||||
@@ -51,11 +51,10 @@ test.afterEach(async ({umbracoApi}) => {
|
||||
await umbracoApi.userGroup.ensureNameNotExists(userGroupName);
|
||||
});
|
||||
|
||||
test('can create an empty user group', async ({page, umbracoApi, umbracoUi}) => {
|
||||
test('can create an empty user group', async ({umbracoApi, umbracoUi}) => {
|
||||
// Act
|
||||
await umbracoUi.userGroup.clickUserGroupsButton();
|
||||
await page.pause();
|
||||
await umbracoUi.userGroup.clickCreateButton();
|
||||
await umbracoUi.userGroup.clickCreateLabelButton();
|
||||
await umbracoUi.userGroup.enterUserGroupName(userGroupName);
|
||||
await umbracoUi.userGroup.clickSaveButton();
|
||||
|
||||
@@ -114,7 +113,7 @@ test('can delete a user group', async ({umbracoApi, umbracoUi}) => {
|
||||
|
||||
// Act
|
||||
await umbracoUi.userGroup.clickActionsButton();
|
||||
await umbracoUi.userGroup.clickDeleteThreeDotsButton();
|
||||
await umbracoUi.userGroup.clickDeleteLabelThreeDotsButton();
|
||||
await umbracoUi.userGroup.clickConfirmToDeleteButton();
|
||||
|
||||
// Assert
|
||||
|
||||
Reference in New Issue
Block a user