Skip to content

Commit 2ae903e

Browse files
authored
V15 QA fixed failing nightly acceptance tests (#18340)
* Start updates * Fixed tests * Another fix * Bumped version * Updated pipeline * Removed and * Cleaned up
1 parent 66cf087 commit 2ae903e

File tree

13 files changed

+58
-48
lines changed

13 files changed

+58
-48
lines changed

build/azure-pipelines.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -499,22 +499,22 @@ stages:
499499
matrix:
500500
LinuxPart1Of3:
501501
vmImage: "ubuntu-latest"
502-
testCommand: "npm run smokeTest -- --shard=1/3"
502+
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
503503
LinuxPart2Of3:
504504
vmImage: "ubuntu-latest"
505-
testCommand: "npm run smokeTest -- --shard=2/3"
505+
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
506506
LinuxPart3Of3:
507507
vmImage: "ubuntu-latest"
508-
testCommand: "npm run smokeTest -- --shard=3/3"
508+
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
509509
WindowsPart1Of3:
510510
vmImage: "windows-latest"
511-
testCommand: "npm run smokeTest -- --shard=1/3"
511+
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
512512
WindowsPart2Of3:
513513
vmImage: "windows-latest"
514-
testCommand: "npm run smokeTest -- --shard=2/3"
514+
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
515515
WindowsPart3Of3:
516516
vmImage: "windows-latest"
517-
testCommand: "npm run smokeTest -- --shard=3/3"
517+
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
518518
pool:
519519
vmImage: $(vmImage)
520520
steps:
@@ -609,11 +609,11 @@ stages:
609609
# Stop application
610610
- bash: kill -15 $(AcceptanceTestProcessId)
611611
displayName: Stop application (Linux)
612-
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
612+
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
613613

614614
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
615615
displayName: Stop application (Windows)
616-
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
616+
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
617617

618618
# Copy artifacts
619619
- pwsh: |
@@ -640,29 +640,29 @@ stages:
640640
matrix:
641641
${{ if eq(parameters.sqlServerLinuxAcceptanceTests, True) }}:
642642
LinuxPart1Of3:
643-
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
643+
testCommand: "npm run smokeTest -- --shard=1/3"
644644
vmImage: "ubuntu-latest"
645645
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
646646
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
647647
LinuxPart2Of3:
648-
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
648+
testCommand: "npm run smokeTest -- --shard=2/3"
649649
vmImage: "ubuntu-latest"
650650
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
651651
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
652652
LinuxPart3Of3:
653-
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
653+
testCommand: "npm run smokeTest -- --shard=3/3"
654654
vmImage: "ubuntu-latest"
655655
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
656656
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
657657
WindowsPart1Of3:
658658
vmImage: "windows-latest"
659-
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
659+
testCommand: "npm run smokeTest -- --shard=1/3"
660660
WindowsPart2Of3:
661661
vmImage: "windows-latest"
662-
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
662+
testCommand: "npm run smokeTest -- --shard=2/3"
663663
WindowsPart3Of3:
664664
vmImage: "windows-latest"
665-
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
665+
testCommand: "npm run smokeTest -- --shard=3/3"
666666
pool:
667667
vmImage: $(vmImage)
668668
steps:
@@ -765,20 +765,20 @@ stages:
765765
# Stop application
766766
- bash: kill -15 $(AcceptanceTestProcessId)
767767
displayName: Stop application (Linux)
768-
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
768+
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
769769

770770
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
771771
displayName: Stop application (Windows)
772-
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
772+
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
773773

774774
# Stop SQL Server
775775
- pwsh: docker stop mssql
776776
displayName: Stop SQL Server Docker image (Linux)
777-
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
777+
condition: eq(variables['Agent.OS'], 'Linux')
778778

779779
- pwsh: SqlLocalDB stop MSSQLLocalDB
780780
displayName: Stop SQL Server LocalDB (Windows)
781-
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
781+
condition: eq(variables['Agent.OS'], 'Windows_NT')
782782

783783
# Copy artifacts
784784
- pwsh: |

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.29",
24-
"@umbraco/playwright-testhelpers": "^15.0.20",
24+
"@umbraco/playwright-testhelpers": "^15.0.21",
2525
"camelize": "^1.0.0",
2626
"dotenv": "^16.3.1",
2727
"node-fetch": "^2.6.7"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ test('can set the label of create button in root', async ({umbracoApi, umbracoUi
180180
await umbracoUi.content.goToContentWithName(contentName);
181181

182182
// Assert
183-
await umbracoUi.content.isAddBlockElementButtonWithLabelVisible(createButtonLabel);
183+
await umbracoUi.content.isAddBlockElementButtonWithLabelVisible(customDataTypeName, createButtonLabel);
184184
});
185185

186186
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
264264

265265
test.skip('can move blocks in the content', async ({umbracoApi, umbracoUi}) => {
266266
// TODO: Implement it later
267-
});
267+
});

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ test('can set the label of block element in the content', async ({umbracoApi, um
166166
// Act
167167
await umbracoUi.content.goToContentWithName(contentName);
168168
await umbracoUi.content.clickAddBlockElementButton();
169+
await umbracoUi.content.clickTextButtonWithName(elementTypeName);
169170
await umbracoUi.content.clickCreateModalButton();
170171
await umbracoUi.content.clickSaveButton();
171172

@@ -210,4 +211,4 @@ test.skip('can add settings model for the block in the content', async ({umbraco
210211

211212
test.skip('can move blocks in the content', async ({umbracoApi, umbracoUi}) => {
212213
// TODO: Implement it later
213-
});
214+
});

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test.beforeEach(async ({umbracoApi}) => {
1313
});
1414

1515
test.afterEach(async ({umbracoApi}) => {
16-
await umbracoApi.document.ensureNameNotExists(contentName);
16+
await umbracoApi.document.ensureNameNotExists(contentName);
1717
await umbracoApi.documentType.ensureNameNotExists(documentTypeName);
1818
await umbracoApi.language.ensureNameNotExists(secondLanguageName);
1919
});
@@ -29,9 +29,9 @@ test('can create content with allow vary by culture enabled', async ({umbracoApi
2929
await umbracoUi.content.clickCreateButton();
3030
await umbracoUi.content.chooseDocumentType(documentTypeName);
3131
await umbracoUi.content.enterContentName(contentName);
32-
await umbracoUi.content.clickSaveButton();
32+
await umbracoUi.content.clickSaveButtonForContent();
3333
await umbracoUi.content.clickSaveAndCloseButton();
34-
34+
3535
// Assert
3636
await umbracoUi.content.isSuccessNotificationVisible();
3737
expect(await umbracoApi.document.doesNameExist(contentName)).toBeTruthy();
@@ -50,9 +50,9 @@ test('can create content with names that vary by culture', async ({umbracoApi, u
5050
await umbracoUi.content.clickVariantSelectorButton();
5151
await umbracoUi.content.clickVariantAddModeButton();
5252
await umbracoUi.content.enterContentName(danishContentName);
53-
await umbracoUi.content.clickSaveButton();
53+
await umbracoUi.content.clickSaveButtonForContent();
5454
await umbracoUi.content.clickSaveAndCloseButton();
55-
55+
5656
// Assert
5757
await umbracoUi.content.isSuccessNotificationVisible();
5858
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
8080
await umbracoUi.content.clickVariantAddModeButton();
8181
await umbracoUi.content.enterContentName(danishContentName);
8282
await umbracoUi.content.enterTextstring(danishTextContent);
83-
await umbracoUi.content.clickSaveButton();
83+
await umbracoUi.content.clickSaveButtonForContent();
8484
await umbracoUi.content.clickSaveAndCloseButton();
85-
85+
8686
// Assert
8787
await umbracoUi.content.isSuccessNotificationVisible();
8888
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
112112
await umbracoUi.content.clickVariantAddModeButton();
113113
await umbracoUi.content.enterContentName(danishContentName);
114114
await umbracoUi.content.enterTextstring(danishTextContent);
115-
await umbracoUi.content.clickSaveButton();
115+
await umbracoUi.content.clickSaveButtonForContent();
116116
await umbracoUi.content.clickSaveAndCloseButton();
117-
117+
118118
// Assert
119119
await umbracoUi.content.isSuccessNotificationVisible();
120120
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
125125
expect(contentData.values.length).toBe(2);
126126
expect(contentData.values[0].value).toBe(textContent);
127127
expect(contentData.values[1].value).toBe(danishTextContent);
128-
});
128+
});

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ test('can publish content with a child in the list', async ({umbracoApi, umbraco
102102
await umbracoUi.content.goToContentWithName(contentName);
103103

104104
// Act
105+
// Currently necessary
106+
await umbracoUi.waitForTimeout(500);
105107
await umbracoUi.content.clickSaveAndPublishButton();
106108
await umbracoUi.content.doesSuccessNotificationsHaveCount(2);
107109
await umbracoUi.content.goToContentInListViewWithName(childContentName);

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,19 @@ test('can add a culture', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) => {
4545
expect(domainsData.defaultIsoCode).toEqual(isoCode);
4646
});
4747

48-
test('can add a domain', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) => {
48+
// Really flaky tests, only occurs on pipeline
49+
test('can add a domain', async ({umbracoApi, umbracoUi}) => {
4950
// Act
5051
await umbracoUi.content.clickActionsMenuForContent(contentName);
5152
await umbracoUi.content.clickCultureAndHostnamesButton();
5253
await umbracoUi.content.clickAddNewDomainButton();
54+
await umbracoUi.waitForTimeout(500);
5355
await umbracoUi.content.enterDomain(domainName);
56+
await umbracoUi.waitForTimeout(500);
5457
await umbracoUi.content.selectDomainLanguageOption(languageName);
58+
await umbracoUi.waitForTimeout(500);
5559
await umbracoUi.content.clickSaveModalButton();
60+
await umbracoUi.waitForTimeout(500);
5661

5762
// Assert
5863
await umbracoUi.content.isSuccessNotificationVisible();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ test.afterEach(async ({umbracoApi}) => {
1818
}
1919
});
2020

21-
test('can update initial state', async ({umbracoApi, umbracoUi}) => {
21+
test('can update preset value state', async ({umbracoApi, umbracoUi}) => {
2222
// Arrange
2323
const expectedDataTypeValues = {
2424
"alias": "default",
2525
"value": true
2626
};
2727

2828
// Act
29-
await umbracoUi.dataType.clickInitialStateSlider();
29+
await umbracoUi.dataType.clickPresetValueSlider();
3030
await umbracoUi.dataType.clickSaveButton();
3131

3232
// Assert

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/PartialView/PartialViewFolder.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test('can create a folder', async ({umbracoApi, umbracoUi}) => {
2020

2121
// Act
2222
await umbracoUi.partialView.clickActionsMenuAtRoot();
23-
await umbracoUi.partialView.createFolder(folderName);
23+
await umbracoUi.partialView.createPartialViewFolder(folderName);
2424

2525
// Assert
2626
await umbracoUi.partialView.doesSuccessNotificationHaveText(NotificationConstantHelper.success.created);
@@ -111,7 +111,7 @@ test('can create a folder in a folder', async ({umbracoApi, umbracoUi}) => {
111111
// Act
112112
await umbracoUi.partialView.reloadPartialViewTree();
113113
await umbracoUi.partialView.clickActionsMenuForPartialView(folderName);
114-
await umbracoUi.partialView.createFolder(childFolderName);
114+
await umbracoUi.partialView.createPartialViewFolder(childFolderName);
115115

116116
// Assert
117117
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
134134
await umbracoUi.partialView.reloadPartialViewTree();
135135
await umbracoUi.partialView.clickCaretButtonForName(folderName);
136136
await umbracoUi.partialView.clickActionsMenuForPartialView(childFolderName);
137-
await umbracoUi.partialView.createFolder(childOfChildFolderName);
137+
await umbracoUi.partialView.createPartialViewFolder(childOfChildFolderName);
138138

139139
// Assert
140140
await umbracoUi.partialView.doesSuccessNotificationHaveText(NotificationConstantHelper.success.created);

0 commit comments

Comments
 (0)