Skip to content

Commit 41bf741

Browse files
authored
V16 QA Fixing the failing E2E tests (#19318)
* Updated nightly E2E pipeline * Fixed failing E2E tests * Skipped content tests wirh list view content due to an issue * Updated tests due to UI changes * Bumped version * Added more waits
1 parent d239849 commit 41bf741

29 files changed

+121
-108
lines changed

build/nightly-E2E-test-pipelines.yml

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ schedules:
1010
include:
1111
- v14/dev
1212
- v15/dev
13-
- v16/dev
13+
- main
1414

1515
variables:
1616
nodeVersion: 20
@@ -33,25 +33,17 @@ stages:
3333
- job: A
3434
displayName: Build Umbraco CMS
3535
pool:
36-
vmImage: 'ubuntu-latest'
36+
vmImage: "windows-latest"
3737
steps:
3838
- checkout: self
39-
fetchDepth: 0
40-
submodules: true
39+
submodules: false
40+
lfs: false,
41+
fetchDepth: 500
42+
- template: templates/backoffice-install.yml
4143
- task: UseDotNet@2
4244
displayName: Use .NET SDK from global.json
4345
inputs:
4446
useGlobalJson: true
45-
- template: templates/backoffice-install.yml
46-
- script: npm run build:for:cms
47-
displayName: Run build (Bellissima)
48-
workingDirectory: src/Umbraco.Web.UI.Client
49-
- script: npm ci --no-fund --no-audit --prefer-offline
50-
displayName: Run npm ci (Login)
51-
workingDirectory: src/Umbraco.Web.UI.Login
52-
- script: npm run build
53-
displayName: Run npm build (Login)
54-
workingDirectory: src/Umbraco.Web.UI.Login
5547
- task: DotNetCoreCLI@2
5648
displayName: Run dotnet restore
5749
inputs:
@@ -63,7 +55,7 @@ stages:
6355
inputs:
6456
command: build
6557
projects: $(solution)
66-
arguments: '--configuration $(buildConfiguration) --no-restore --property:ContinuousIntegrationBuild=true --property:GeneratePackageOnBuild=true --property:PackageOutputPath=$(Build.ArtifactStagingDirectory)/nupkg'
58+
arguments: "--configuration $(buildConfiguration) --no-restore --property:ContinuousIntegrationBuild=true --property:GeneratePackageOnBuild=true --property:PackageOutputPath=$(Build.ArtifactStagingDirectory)/nupkg"
6759
- task: PublishPipelineArtifact@1
6860
displayName: Publish nupkg
6961
inputs:
@@ -75,6 +67,33 @@ stages:
7567
targetPath: $(Build.SourcesDirectory)
7668
artifactName: build_output
7769

70+
- job: B
71+
displayName: Build Bellissima Package
72+
pool:
73+
vmImage: "ubuntu-latest"
74+
steps:
75+
- checkout: self
76+
submodules: false
77+
lfs: false,
78+
fetchDepth: 500
79+
- template: templates/backoffice-install.yml
80+
- script: npm run build:for:npm
81+
displayName: Run build:for:npm
82+
workingDirectory: src/Umbraco.Web.UI.Client
83+
- bash: |
84+
echo "##[command]Running npm pack"
85+
echo "##[debug]Output directory: $(Build.ArtifactStagingDirectory)"
86+
mkdir $(Build.ArtifactStagingDirectory)/npm
87+
npm pack --pack-destination $(Build.ArtifactStagingDirectory)/npm
88+
mv .npmrc $(Build.ArtifactStagingDirectory)/npm/
89+
displayName: Run npm pack
90+
workingDirectory: src/Umbraco.Web.UI.Client
91+
- task: PublishPipelineArtifact@1
92+
displayName: Publish Bellissima npm artifact
93+
inputs:
94+
targetPath: $(Build.ArtifactStagingDirectory)/npm
95+
artifactName: npm
96+
7897
- stage: E2E
7998
displayName: E2E Tests
8099
dependsOn: Build
@@ -209,9 +228,9 @@ stages:
209228
displayName: Wait for application
210229
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
211230

212-
# Install Playwright and dependencies
213-
- pwsh: npx playwright install --with-deps
214-
displayName: Install Playwright
231+
# Install Playwright and dependencies
232+
- pwsh: npx playwright install chromium
233+
displayName: Install Playwright only with Chromium browser
215234
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
216235

217236
# Test
@@ -382,8 +401,8 @@ stages:
382401
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
383402

384403
# Install Playwright and dependencies
385-
- pwsh: npx playwright install --with-deps
386-
displayName: Install Playwright
404+
- pwsh: npx playwright install chromium
405+
displayName: Install Playwright only with Chromium browser
387406
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
388407

389408
# Test
@@ -438,4 +457,4 @@ stages:
438457
testResultsFormat: 'JUnit'
439458
testResultsFiles: '*.xml'
440459
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
441-
testRunTitle: "$(Agent.JobName)"
460+
testRunTitle: "$(Agent.JobName)"

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockGrid/VariantBlockGrid.spec.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ test('invariant document type with invariant block grid with invariant block wit
5757

5858
// Assert
5959
//await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.saved);
60-
await umbracoUi.content.isErrorNotificationVisible(false);
6160
await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.published);
6261

6362
await umbracoUi.reloadPage();
@@ -79,8 +78,6 @@ test('can not create unsupported invariant document type with invariant block gr
7978
await umbracoUi.content.clickSaveAndPublishButton();
8079

8180
// Assert
82-
//await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.saved);
83-
await umbracoUi.content.isErrorNotificationVisible(false);
8481
await umbracoUi.content.doesErrorNotificationHaveText(NotificationConstantHelper.error.documentCouldNotBePublished);
8582
});
8683

@@ -99,8 +96,6 @@ test('can not create unsupported invariant document type with invariant block gr
9996
await umbracoUi.content.clickSaveAndPublishButton();
10097

10198
// Assert
102-
//await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.saved);
103-
await umbracoUi.content.isErrorNotificationVisible(false);
10499
await umbracoUi.content.doesErrorNotificationHaveText(NotificationConstantHelper.error.documentCouldNotBePublished);
105100
});
106101

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockList/VariantBlockList.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ test('can not create unsupported invariant document type with invariant block li
7979
await umbracoUi.content.clickSaveAndPublishButton();
8080

8181
// Assert
82-
//await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.saved);
83-
await umbracoUi.content.isErrorNotificationVisible(false);
8482
await umbracoUi.content.doesErrorNotificationHaveText(NotificationConstantHelper.error.documentCouldNotBePublished);
8583
});
8684

@@ -98,8 +96,6 @@ test('can not create unsupported invariant document type with invariant block li
9896
await umbracoUi.content.clickSaveAndPublishButton();
9997

10098
// Assert
101-
//await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.saved);
102-
await umbracoUi.content.isErrorNotificationVisible(false);
10399
await umbracoUi.content.doesErrorNotificationHaveText(NotificationConstantHelper.error.documentCouldNotBePublished);
104100
});
105101

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/Clipboard/ClipboardBlockGridBlocks.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ test('can replace multiple blocks', async ({umbracoApi, umbracoUi}) => {
267267
await umbracoUi.content.clickPasteButton();
268268
await umbracoUi.content.goToBlockGridBlockWithName(groupName, blockGridDataTypeName, elementTypeName, 0);
269269
await umbracoUi.content.doesBlockEditorBlockWithNameContainValue(elementGroupName, elementPropertyName, ConstantHelper.inputTypes.tipTap, blockPropertyValue);
270-
await umbracoUi.content.clickCreateButton();
270+
await umbracoUi.content.clickCreateModalButton();
271271
await umbracoUi.content.clickSaveButton();
272272

273273
// Assert

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/Clipboard/ClipboardBlockListBlocks.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ test('can replace multiple blocks', async ({umbracoApi, umbracoUi}) => {
267267
await umbracoUi.content.clickPasteButton();
268268
await umbracoUi.content.goToBlockListBlockWithName(groupName, blockListDataTypeName, elementTypeName, 0);
269269
await umbracoUi.content.doesBlockEditorBlockWithNameContainValue(elementGroupName, elementPropertyName, ConstantHelper.inputTypes.tipTap, blockPropertyValue);
270-
await umbracoUi.content.clickCreateButton();
270+
await umbracoUi.content.clickCreateModalButton();
271271
await umbracoUi.content.clickSaveButton();
272272

273273
// Assert

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ test('can see correct information when published', async ({umbracoApi, umbracoUi
4747
hour12: true,
4848
});
4949
await umbracoUi.content.doesCreatedDateHaveText(expectedCreatedDate);
50-
await umbracoUi.content.doesDocumentHaveLink(contentData.urls[0].url ? contentData.urls[0].url : '/');
50+
const contentUrl = await umbracoApi.document.getDocumentUrl(contentId);
51+
await umbracoUi.content.doesDocumentHaveLink(contentUrl);
5152
// TODO: Uncomment this when front-end is ready. Currently the publication status of content is not changed to "Published" immediately after publishing it
5253
//await umbracoUi.content.doesPublicationStatusHaveText(contentData.variants[0].state === 'Draft' ? 'Unpublished' : contentData.variants[0].state);
5354
});

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,13 @@ test('can not publish a mandatory checkbox list with an empty value', async ({um
9999
// Do not select any checkbox list values and the validation error appears
100100
await umbracoUi.content.clickSaveAndPublishButton();
101101
await umbracoUi.content.isValidationMessageVisible(ConstantHelper.validationMessages.emptyValue);
102-
//await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.saved);
103-
await umbracoUi.content.isErrorNotificationVisible(false);
104102
await umbracoUi.content.doesErrorNotificationHaveText(NotificationConstantHelper.error.documentCouldNotBePublished);
105103
// Select a checkbox list value and the validation error disappears
106104
await umbracoUi.content.chooseCheckboxListOption(optionValues[0]);
107105
await umbracoUi.content.isValidationMessageVisible(ConstantHelper.validationMessages.emptyValue, false);
108106
await umbracoUi.content.clickSaveAndPublishButton();
109107

110108
// Assert
111-
//await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.saved);
112-
await umbracoUi.content.isErrorNotificationVisible(false);
113109
await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.published);
114110
const contentData = await umbracoApi.document.getByName(contentName);
115111
expect(contentData.values[0].alias).toEqual(AliasHelper.toAlias(customDataTypeName));

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ test('can create content with the custom data type with decimal property editor'
8383
await umbracoUi.content.isErrorNotificationVisible(false);
8484
expect(await umbracoApi.document.doesNameExist(contentName)).toBeTruthy();
8585
const contentData = await umbracoApi.document.getByName(contentName);
86-
expect(contentData.values).toEqual([]);
86+
expect(contentData.values[0].alias).toEqual(AliasHelper.toAlias(customDataTypeName));
87+
expect(contentData.values[0].value).toEqual(0);
8788
});
8889

8990
test('can add decimal number to the decimal in the content section', async ({umbracoApi, umbracoUi}) => {

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

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test('can create content with allow vary by culture enabled', async ({umbracoApi
3030
await umbracoUi.content.chooseDocumentType(documentTypeName);
3131
await umbracoUi.content.enterContentName(contentName);
3232
await umbracoUi.content.clickSaveButtonForContent();
33-
await umbracoUi.content.clickSaveAndCloseButton();
33+
await umbracoUi.content.clickSaveButton();
3434

3535
// Assert
3636
//await umbracoUi.content.isSuccessNotificationVisible();
@@ -48,14 +48,13 @@ test('can create content with names that vary by culture', async ({umbracoApi, u
4848

4949
// Act
5050
await umbracoUi.content.goToContentWithName(contentName);
51-
await umbracoUi.content.clickVariantSelectorButton();
52-
await umbracoUi.content.clickVariantAddModeButton();
51+
await umbracoUi.content.clickSelectVariantButton();
52+
await umbracoUi.content.clickVariantAddModeButtonForLanguageName(secondLanguageName);
5353
await umbracoUi.content.enterContentName(danishContentName);
5454
await umbracoUi.content.clickSaveButtonForContent();
55-
await umbracoUi.content.clickSaveAndCloseButton();
55+
await umbracoUi.content.clickSaveButton();
5656

5757
// Assert
58-
//await umbracoUi.content.isSuccessNotificationVisible();
5958
await umbracoUi.content.isErrorNotificationVisible(false);
6059
expect(await umbracoApi.document.doesNameExist(danishContentName)).toBeTruthy();
6160
const contentData = await umbracoApi.document.getByName(danishContentName);
@@ -68,7 +67,6 @@ test('can create content with names that vary by culture and content that is inv
6867
// Arrange
6968
const danishContentName = 'Test indhold';
7069
const textContent = 'This is a test text';
71-
const danishTextContent = 'Dette er testtekst';
7270
const dataTypeName = 'Textstring';
7371
const dataTypeData = await umbracoApi.dataType.getByName(dataTypeName);
7472
const documentTypeId = await umbracoApi.documentType.createDocumentTypeWithPropertyEditor(documentTypeName, dataTypeName, dataTypeData.id, 'Test Group', true, false);
@@ -78,23 +76,21 @@ test('can create content with names that vary by culture and content that is inv
7876

7977
// Act
8078
await umbracoUi.content.goToContentWithName(contentName);
81-
await umbracoUi.content.clickVariantSelectorButton();
82-
await umbracoUi.content.clickVariantAddModeButton();
79+
await umbracoUi.content.clickSelectVariantButton();
80+
await umbracoUi.content.clickVariantAddModeButtonForLanguageName(secondLanguageName);
8381
await umbracoUi.content.enterContentName(danishContentName);
84-
await umbracoUi.content.enterTextstring(danishTextContent);
8582
await umbracoUi.content.clickSaveButtonForContent();
86-
await umbracoUi.content.clickSaveAndCloseButton();
83+
await umbracoUi.content.clickSaveButton();
8784

8885
// Assert
89-
//await umbracoUi.content.isSuccessNotificationVisible();
9086
await umbracoUi.content.isErrorNotificationVisible(false);
9187
expect(await umbracoApi.document.doesNameExist(danishContentName)).toBeTruthy();
9288
const contentData = await umbracoApi.document.getByName(danishContentName);
9389
expect(contentData.variants.length).toBe(2);
9490
expect(contentData.variants[0].name).toBe(contentName);
9591
expect(contentData.variants[1].name).toBe(danishContentName);
9692
expect(contentData.values.length).toBe(1);
97-
expect(contentData.values[0].value).toBe(danishTextContent);
93+
expect(contentData.values[0].value).toBe(textContent);
9894
});
9995

10096
test('can create content with names and content that vary by culture', async ({umbracoApi, umbracoUi}) => {
@@ -111,12 +107,12 @@ test('can create content with names and content that vary by culture', async ({u
111107

112108
// Act
113109
await umbracoUi.content.goToContentWithName(contentName);
114-
await umbracoUi.content.clickVariantSelectorButton();
115-
await umbracoUi.content.clickVariantAddModeButton();
110+
await umbracoUi.content.clickSelectVariantButton();
111+
await umbracoUi.content.clickVariantAddModeButtonForLanguageName(secondLanguageName);
116112
await umbracoUi.content.enterContentName(danishContentName);
117113
await umbracoUi.content.enterTextstring(danishTextContent);
118114
await umbracoUi.content.clickSaveButtonForContent();
119-
await umbracoUi.content.clickSaveAndCloseButton();
115+
await umbracoUi.content.clickSaveButton();
120116

121117
// Assert
122118
//await umbracoUi.content.isSuccessNotificationVisible();

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,13 @@ test('can not publish a mandatory dropdown with an empty value', async ({umbraco
103103
// Do not select any dropdown values and the validation error appears
104104
await umbracoUi.content.clickSaveAndPublishButton();
105105
await umbracoUi.content.isValidationMessageVisible(ConstantHelper.validationMessages.emptyValue);
106-
//await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.saved);
107-
await umbracoUi.content.isErrorNotificationVisible(false);
108106
await umbracoUi.content.doesErrorNotificationHaveText(NotificationConstantHelper.error.documentCouldNotBePublished);
109107
// Select a dropdown value and the validation error disappears
110108
await umbracoUi.content.chooseDropdownOption([optionValues[0]]);
111109
await umbracoUi.content.isValidationMessageVisible(ConstantHelper.validationMessages.emptyValue, false);
112110
await umbracoUi.content.clickSaveAndPublishButton();
113111

114112
// Assert
115-
//await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.saved);
116-
await umbracoUi.content.isErrorNotificationVisible(false);
117113
await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.published);
118114
const contentData = await umbracoApi.document.getByName(contentName);
119115
expect(contentData.values[0].alias).toEqual(AliasHelper.toAlias(customDataTypeName));

0 commit comments

Comments
 (0)