Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V14 QA Fixing the failing acceptance tests in the pipeline v14 #17214

Merged
merged 10 commits into from
Oct 11, 2024
19 changes: 9 additions & 10 deletions tests/Umbraco.Tests.AcceptanceTest/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/Umbraco.Tests.AcceptanceTest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"typescript": "^4.8.3"
},
"dependencies": {
"@umbraco/json-models-builders": "^2.0.20",
"@umbraco/playwright-testhelpers": "^2.0.0-beta.86",
"@umbraco/json-models-builders": "^2.0.21",
"@umbraco/playwright-testhelpers": "^2.0.0-beta.90",
"camelize": "^1.0.0",
"dotenv": "^16.3.1",
"node-fetch": "^2.6.7"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ test.afterEach(async ({umbracoApi}) => {

test('cannot create content if allow at root is disabled', async ({umbracoApi, umbracoUi}) => {
// Arrange
const noAllowedDocumentTypeAvailableMessage = 'There are no allowed Document Types available for creating content here';
await umbracoApi.documentType.createDefaultDocumentType(documentTypeName);
await umbracoUi.content.goToSection(ConstantHelper.sections.content);

Expand All @@ -23,5 +22,4 @@ test('cannot create content if allow at root is disabled', async ({umbracoApi, u

// Assert
await umbracoUi.content.isDocumentTypeNameVisible(documentTypeName, false);
await umbracoUi.content.doesModalHaveText(noAllowedDocumentTypeAvailableMessage);
});
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ test('can add culture and hostname for multiple languages', async ({umbracoApi,
// Act
await umbracoUi.content.clickActionsMenuForContent(contentName);
await umbracoUi.content.clickCultureAndHostnamesButton();
await umbracoUi.waitForTimeout(500);
await umbracoUi.content.clickAddNewDomainButton();
await umbracoUi.content.enterDomain(domainName, 0);
await umbracoUi.content.selectDomainLanguageOption(languageName, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test('can create a data type folder', async ({umbracoApi, umbracoUi}) => {
await umbracoUi.dataType.createFolder(dataTypeFolderName);

// Assert
expect(await umbracoApi.dataType.doesNameExist(dataTypeFolderName)).toBeTruthy();
expect(await umbracoApi.dataType.doesFolderExist(dataTypeFolderName)).toBeTruthy();
});

test('can rename a data type folder', async ({umbracoApi, umbracoUi}) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ test('can see the marketplace', async ({umbracoUi}) => {
await umbracoUi.package.clickPackagesTab();

// Assert
await umbracoUi.waitForTimeout(1000);
await umbracoUi.package.isMarketPlaceIFrameVisible();
});
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ test.afterEach(async ({umbracoApi}) => {
test('can add an allowed template to a document type', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) => {
// Arrange
await umbracoApi.documentType.createDefaultDocumentType(documentTypeName);
await umbracoApi.template.ensureNameNotExists(templateName);
const templateId = await umbracoApi.template.createDefaultTemplate(templateName);
await umbracoUi.documentType.goToSection(ConstantHelper.sections.settings);

Expand All @@ -39,28 +38,27 @@ test('can add an allowed template to a document type', {tag: '@smoke'}, async ({

test('can set an allowed template as default for document type', async ({umbracoApi, umbracoUi}) => {
// Arrange
await umbracoApi.template.ensureNameNotExists(templateName);
const templateId = await umbracoApi.template.createDefaultTemplate(templateName);
await umbracoApi.documentType.createDocumentTypeWithAllowedTemplate(documentTypeName, templateId);
const secondTemplateName = 'Test Second Template';
const firstTemplateId = await umbracoApi.template.createDefaultTemplate(templateName);
const secondTemplateId = await umbracoApi.template.createDefaultTemplate(secondTemplateName);
await umbracoApi.documentType.createDocumentTypeWithTwoAllowedTemplates(documentTypeName, firstTemplateId, secondTemplateId, true, firstTemplateId);
await umbracoUi.documentType.goToSection(ConstantHelper.sections.settings);

// Act
await umbracoUi.documentType.goToDocumentType(documentTypeName);
await umbracoUi.documentType.clickDocumentTypeTemplatesTab();
await umbracoUi.documentType.clickDefaultTemplateButton();
await umbracoUi.documentType.clickSetAsDefaultButton();
await umbracoUi.documentType.clickSaveButton();

// Assert
await umbracoUi.documentType.isSuccessNotificationVisible();
const documentTypeData = await umbracoApi.documentType.getByName(documentTypeName);
expect(documentTypeData.allowedTemplates[0].id).toBe(templateId);
expect(documentTypeData.defaultTemplate.id).toBe(templateId);
expect(documentTypeData.defaultTemplate.id).toBe(secondTemplateId);
});

// When removing a template, the defaultTemplateId is set to "" which is not correct
test.skip('can remove an allowed template from a document type', async ({umbracoApi, umbracoUi}) => {
// Arrange
await umbracoApi.template.ensureNameNotExists(templateName);
const templateId = await umbracoApi.template.createDefaultTemplate(templateName);
await umbracoApi.documentType.createDocumentTypeWithAllowedTemplate(documentTypeName, templateId);
await umbracoUi.documentType.goToSection(ConstantHelper.sections.settings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ test('can use query builder with Where statement for a partial view', async ({um

// Act
await umbracoUi.partialView.openPartialViewAtRoot(partialViewFileName);
await umbracoUi.waitForTimeout(500);
await umbracoUi.partialView.addQueryBuilderWithWhereStatement(propertyAliasValue, operatorValue, constrainValue);
// Verify that the code is shown
await umbracoUi.partialView.isQueryBuilderCodeShown(expectedCode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ test('can use query builder with Where statement for a template', async ({umbrac

// Act
await umbracoUi.template.goToTemplate(templateName);
await umbracoUi.waitForTimeout(500);
await umbracoUi.template.addQueryBuilderWithWhereStatement(propertyAliasValue, operatorValue, constrainValue);
// Verify that the code is shown
await umbracoUi.template.isQueryBuilderCodeShown(expectedCode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ test('can update culture for a user', async ({umbracoApi, umbracoUi}) => {

// Act
await umbracoUi.user.clickUserWithName(nameOfTheUser);
await umbracoUi.user.selectUserLanguage('Dansk');
await umbracoUi.user.selectUserLanguage('Dansk (Danmark)');
await umbracoUi.user.clickSaveButton();

// Assert
Expand Down
Loading