V15 QA fixed failing nightly acceptance tests (#18340)

* Start updates

* Fixed tests

* Another fix

* Bumped version

* Updated pipeline

* Removed and

* Cleaned up
This commit is contained in:
Andreas Zerbst
2025-02-14 14:49:14 +01:00
committed by GitHub
parent 66cf0874bb
commit 2ae903ef1b
13 changed files with 58 additions and 48 deletions

View File

@@ -499,22 +499,22 @@ stages:
matrix:
LinuxPart1Of3:
vmImage: "ubuntu-latest"
testCommand: "npm run smokeTest -- --shard=1/3"
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
LinuxPart2Of3:
vmImage: "ubuntu-latest"
testCommand: "npm run smokeTest -- --shard=2/3"
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
LinuxPart3Of3:
vmImage: "ubuntu-latest"
testCommand: "npm run smokeTest -- --shard=3/3"
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
WindowsPart1Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTest -- --shard=1/3"
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTest -- --shard=2/3"
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTest -- --shard=3/3"
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
@@ -609,11 +609,11 @@ stages:
# Stop application
- bash: kill -15 $(AcceptanceTestProcessId)
displayName: Stop application (Linux)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
displayName: Stop application (Windows)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
# Copy artifacts
- pwsh: |
@@ -640,29 +640,29 @@ stages:
matrix:
${{ if eq(parameters.sqlServerLinuxAcceptanceTests, True) }}:
LinuxPart1Of3:
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
testCommand: "npm run smokeTest -- --shard=1/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
LinuxPart2Of3:
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
testCommand: "npm run smokeTest -- --shard=2/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
LinuxPart3Of3:
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
testCommand: "npm run smokeTest -- --shard=3/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
WindowsPart1Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
testCommand: "npm run smokeTest -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
testCommand: "npm run smokeTest -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
testCommand: "npm run smokeTest -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
@@ -765,20 +765,20 @@ stages:
# Stop application
- bash: kill -15 $(AcceptanceTestProcessId)
displayName: Stop application (Linux)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
displayName: Stop application (Windows)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
# Stop SQL Server
- pwsh: docker stop mssql
displayName: Stop SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
condition: eq(variables['Agent.OS'], 'Linux')
- pwsh: SqlLocalDB stop MSSQLLocalDB
displayName: Stop SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
condition: eq(variables['Agent.OS'], 'Windows_NT')
# Copy artifacts
- pwsh: |

View File

@@ -8,7 +8,7 @@
"hasInstallScript": true,
"dependencies": {
"@umbraco/json-models-builders": "^2.0.29",
"@umbraco/playwright-testhelpers": "^15.0.20",
"@umbraco/playwright-testhelpers": "^15.0.21",
"camelize": "^1.0.0",
"dotenv": "^16.3.1",
"node-fetch": "^2.6.7"
@@ -66,9 +66,10 @@
}
},
"node_modules/@umbraco/playwright-testhelpers": {
"version": "15.0.20",
"resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-15.0.20.tgz",
"integrity": "sha512-rk2DaFZYRNb1wmB2qgy3bbLLhncVVQn92UjEbOP6zsdCdc7SrXULJJq7R4aXI8pFNUK8NskntaYPqBBsutpBlA==",
"version": "15.0.21",
"resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-15.0.21.tgz",
"integrity": "sha512-R5b59dLMJiCB7fEUz3zyKBjF1XetII1FspkpL6Q1INEz0OBzibU9oKKjueMj/HxrhpeszK+8I3OrfZ87mYwuTQ==",
"license": "MIT",
"dependencies": {
"@umbraco/json-models-builders": "2.0.29",
"node-fetch": "^2.6.7"

View File

@@ -21,7 +21,7 @@
},
"dependencies": {
"@umbraco/json-models-builders": "^2.0.29",
"@umbraco/playwright-testhelpers": "^15.0.20",
"@umbraco/playwright-testhelpers": "^15.0.21",
"camelize": "^1.0.0",
"dotenv": "^16.3.1",
"node-fetch": "^2.6.7"

View File

@@ -180,7 +180,7 @@ test('can set the label of create button in root', async ({umbracoApi, umbracoUi
await umbracoUi.content.goToContentWithName(contentName);
// Assert
await umbracoUi.content.isAddBlockElementButtonWithLabelVisible(createButtonLabel);
await umbracoUi.content.isAddBlockElementButtonWithLabelVisible(customDataTypeName, createButtonLabel);
});
test('can set the label of block element in the content', async ({umbracoApi, umbracoUi}) => {
@@ -264,4 +264,4 @@ test.skip('can add settings model for the block in the content', async ({umbraco
test.skip('can move blocks in the content', async ({umbracoApi, umbracoUi}) => {
// TODO: Implement it later
});
});

View File

@@ -166,6 +166,7 @@ test('can set the label of block element in the content', async ({umbracoApi, um
// Act
await umbracoUi.content.goToContentWithName(contentName);
await umbracoUi.content.clickAddBlockElementButton();
await umbracoUi.content.clickTextButtonWithName(elementTypeName);
await umbracoUi.content.clickCreateModalButton();
await umbracoUi.content.clickSaveButton();
@@ -210,4 +211,4 @@ test.skip('can add settings model for the block in the content', async ({umbraco
test.skip('can move blocks in the content', async ({umbracoApi, umbracoUi}) => {
// TODO: Implement it later
});
});

View File

@@ -13,7 +13,7 @@ test.beforeEach(async ({umbracoApi}) => {
});
test.afterEach(async ({umbracoApi}) => {
await umbracoApi.document.ensureNameNotExists(contentName);
await umbracoApi.document.ensureNameNotExists(contentName);
await umbracoApi.documentType.ensureNameNotExists(documentTypeName);
await umbracoApi.language.ensureNameNotExists(secondLanguageName);
});
@@ -29,9 +29,9 @@ test('can create content with allow vary by culture enabled', async ({umbracoApi
await umbracoUi.content.clickCreateButton();
await umbracoUi.content.chooseDocumentType(documentTypeName);
await umbracoUi.content.enterContentName(contentName);
await umbracoUi.content.clickSaveButton();
await umbracoUi.content.clickSaveButtonForContent();
await umbracoUi.content.clickSaveAndCloseButton();
// Assert
await umbracoUi.content.isSuccessNotificationVisible();
expect(await umbracoApi.document.doesNameExist(contentName)).toBeTruthy();
@@ -50,9 +50,9 @@ test('can create content with names that vary by culture', async ({umbracoApi, u
await umbracoUi.content.clickVariantSelectorButton();
await umbracoUi.content.clickVariantAddModeButton();
await umbracoUi.content.enterContentName(danishContentName);
await umbracoUi.content.clickSaveButton();
await umbracoUi.content.clickSaveButtonForContent();
await umbracoUi.content.clickSaveAndCloseButton();
// Assert
await umbracoUi.content.isSuccessNotificationVisible();
expect(await umbracoApi.document.doesNameExist(danishContentName)).toBeTruthy();
@@ -80,9 +80,9 @@ test('can create content with names that vary by culture and content that is inv
await umbracoUi.content.clickVariantAddModeButton();
await umbracoUi.content.enterContentName(danishContentName);
await umbracoUi.content.enterTextstring(danishTextContent);
await umbracoUi.content.clickSaveButton();
await umbracoUi.content.clickSaveButtonForContent();
await umbracoUi.content.clickSaveAndCloseButton();
// Assert
await umbracoUi.content.isSuccessNotificationVisible();
expect(await umbracoApi.document.doesNameExist(danishContentName)).toBeTruthy();
@@ -112,9 +112,9 @@ test('can create content with names and content that vary by culture', async ({u
await umbracoUi.content.clickVariantAddModeButton();
await umbracoUi.content.enterContentName(danishContentName);
await umbracoUi.content.enterTextstring(danishTextContent);
await umbracoUi.content.clickSaveButton();
await umbracoUi.content.clickSaveButtonForContent();
await umbracoUi.content.clickSaveAndCloseButton();
// Assert
await umbracoUi.content.isSuccessNotificationVisible();
expect(await umbracoApi.document.doesNameExist(danishContentName)).toBeTruthy();
@@ -125,4 +125,4 @@ test('can create content with names and content that vary by culture', async ({u
expect(contentData.values.length).toBe(2);
expect(contentData.values[0].value).toBe(textContent);
expect(contentData.values[1].value).toBe(danishTextContent);
});
});

View File

@@ -102,6 +102,8 @@ test('can publish content with a child in the list', async ({umbracoApi, umbraco
await umbracoUi.content.goToContentWithName(contentName);
// Act
// Currently necessary
await umbracoUi.waitForTimeout(500);
await umbracoUi.content.clickSaveAndPublishButton();
await umbracoUi.content.doesSuccessNotificationsHaveCount(2);
await umbracoUi.content.goToContentInListViewWithName(childContentName);

View File

@@ -45,14 +45,19 @@ test('can add a culture', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) => {
expect(domainsData.defaultIsoCode).toEqual(isoCode);
});
test('can add a domain', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) => {
// Really flaky tests, only occurs on pipeline
test('can add a domain', async ({umbracoApi, umbracoUi}) => {
// Act
await umbracoUi.content.clickActionsMenuForContent(contentName);
await umbracoUi.content.clickCultureAndHostnamesButton();
await umbracoUi.content.clickAddNewDomainButton();
await umbracoUi.waitForTimeout(500);
await umbracoUi.content.enterDomain(domainName);
await umbracoUi.waitForTimeout(500);
await umbracoUi.content.selectDomainLanguageOption(languageName);
await umbracoUi.waitForTimeout(500);
await umbracoUi.content.clickSaveModalButton();
await umbracoUi.waitForTimeout(500);
// Assert
await umbracoUi.content.isSuccessNotificationVisible();

View File

@@ -18,7 +18,7 @@ test.afterEach(async ({umbracoApi}) => {
}
});
test('can update initial state', async ({umbracoApi, umbracoUi}) => {
test('can update preset value state', async ({umbracoApi, umbracoUi}) => {
// Arrange
const expectedDataTypeValues = {
"alias": "default",
@@ -26,7 +26,7 @@ test('can update initial state', async ({umbracoApi, umbracoUi}) => {
};
// Act
await umbracoUi.dataType.clickInitialStateSlider();
await umbracoUi.dataType.clickPresetValueSlider();
await umbracoUi.dataType.clickSaveButton();
// Assert

View File

@@ -20,7 +20,7 @@ test('can create a folder', async ({umbracoApi, umbracoUi}) => {
// Act
await umbracoUi.partialView.clickActionsMenuAtRoot();
await umbracoUi.partialView.createFolder(folderName);
await umbracoUi.partialView.createPartialViewFolder(folderName);
// Assert
await umbracoUi.partialView.doesSuccessNotificationHaveText(NotificationConstantHelper.success.created);
@@ -111,7 +111,7 @@ test('can create a folder in a folder', async ({umbracoApi, umbracoUi}) => {
// Act
await umbracoUi.partialView.reloadPartialViewTree();
await umbracoUi.partialView.clickActionsMenuForPartialView(folderName);
await umbracoUi.partialView.createFolder(childFolderName);
await umbracoUi.partialView.createPartialViewFolder(childFolderName);
// Assert
await umbracoUi.partialView.doesSuccessNotificationHaveText(NotificationConstantHelper.success.created);
@@ -134,7 +134,7 @@ test('can create a folder in a folder in a folder', {tag: '@smoke'}, async ({umb
await umbracoUi.partialView.reloadPartialViewTree();
await umbracoUi.partialView.clickCaretButtonForName(folderName);
await umbracoUi.partialView.clickActionsMenuForPartialView(childFolderName);
await umbracoUi.partialView.createFolder(childOfChildFolderName);
await umbracoUi.partialView.createPartialViewFolder(childOfChildFolderName);
// Assert
await umbracoUi.partialView.doesSuccessNotificationHaveText(NotificationConstantHelper.success.created);

View File

@@ -19,7 +19,7 @@ test('can create a folder', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) =>
// Act
await umbracoUi.script.clickActionsMenuAtRoot();
await umbracoUi.script.createFolder(scriptFolderName);
await umbracoUi.script.createScriptFolder(scriptFolderName);
// Assert
await umbracoUi.script.doesSuccessNotificationHaveText(NotificationConstantHelper.success.created);
@@ -78,7 +78,7 @@ test('can create a folder in a folder', async ({umbracoApi, umbracoUi}) => {
// Act
await umbracoUi.script.reloadScriptTree();
await umbracoUi.script.clickActionsMenuForScript(scriptFolderName);
await umbracoUi.script.createFolder(childFolderName);
await umbracoUi.script.createScriptFolder(childFolderName);
// Assert
await umbracoUi.script.doesSuccessNotificationHaveText(NotificationConstantHelper.success.created);
@@ -101,7 +101,7 @@ test('can create a folder in a folder in a folder', {tag: '@smoke'}, async ({umb
await umbracoUi.script.reloadScriptTree();
await umbracoUi.script.clickCaretButtonForName(scriptFolderName);
await umbracoUi.script.clickActionsMenuForScript(childFolderName);
await umbracoUi.script.createFolder(childOfChildFolderName);
await umbracoUi.script.createScriptFolder(childOfChildFolderName);
// Assert
await umbracoUi.script.doesSuccessNotificationHaveText(NotificationConstantHelper.success.created);

View File

@@ -19,7 +19,7 @@ test('can create a folder', async ({umbracoApi, umbracoUi}) => {
// Act
await umbracoUi.stylesheet.clickActionsMenuAtRoot();
await umbracoUi.stylesheet.createFolder(stylesheetFolderName);
await umbracoUi.stylesheet.createStylesheetFolder(stylesheetFolderName);
// Assert
await umbracoUi.stylesheet.doesSuccessNotificationHaveText(NotificationConstantHelper.success.created);
@@ -52,7 +52,7 @@ test('can create a folder in a folder', async ({umbracoApi, umbracoUi}) => {
// Act
await umbracoUi.stylesheet.reloadStylesheetTree();
await umbracoUi.stylesheet.clickActionsMenuForStylesheet(stylesheetFolderName);
await umbracoUi.stylesheet.createFolder(childFolderName);
await umbracoUi.stylesheet.createStylesheetFolder(childFolderName);
//Assert
await umbracoUi.stylesheet.doesSuccessNotificationHaveText(NotificationConstantHelper.success.created);
@@ -75,7 +75,7 @@ test('can create a folder in a folder in a folder', {tag: '@smoke'}, async ({umb
await umbracoUi.stylesheet.reloadStylesheetTree();
await umbracoUi.stylesheet.clickCaretButtonForName(stylesheetFolderName);
await umbracoUi.stylesheet.clickActionsMenuForStylesheet(childFolderName);
await umbracoUi.stylesheet.createFolder(childOfChildFolderName);
await umbracoUi.stylesheet.createStylesheetFolder(childOfChildFolderName);
// Assert
await umbracoUi.stylesheet.doesSuccessNotificationHaveText(NotificationConstantHelper.success.created);

View File

@@ -583,6 +583,7 @@ test('can rollback content with rollback permission enabled', async ({umbracoApi
await umbracoUi.content.clickRollbackContainerButton();
// Assert
await umbracoUi.content.clickContentTab();
await umbracoUi.content.doesDocumentPropertyHaveValue(dataTypeName, documentText);
});