Skip to content

Commit a72ffc8

Browse files
committedDec 12, 2024··
Merge branch 'v15/dev' into contrib
2 parents f139aae + 89061f1 commit a72ffc8

29 files changed

+172
-86
lines changed
 

‎.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
*.xml text=auto
4747
*.resx text=auto
4848
*.yml text eol=lf core.whitespace whitespace=tab-in-indent,trailing-space,tabwidth=2
49+
*.sh eol=lf
4950

5051
*.csproj text=auto merge=union
5152
*.vbproj text=auto merge=union

‎build/azure-pipelines.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ stages:
117117
- checkout: self
118118
submodules: false
119119
lfs: false,
120-
fetchDepth: 1
121-
fetchFilter: tree:0
120+
fetchDepth: 500
122121
- template: templates/backoffice-install.yml
123122
- script: npm run build:for:npm
124123
displayName: Run build:for:npm
@@ -936,6 +935,7 @@ stages:
936935
inputs:
937936
archiveFilePatterns: $(Build.SourcesDirectory)/csharp-docs.zip
938937
destinationFolder: $(Build.ArtifactStagingDirectory)/csharp-docs
938+
overwriteExistingFiles: true
939939
- task: AzureFileCopy@4
940940
displayName: "Copy C# Docs to blob storage"
941941
inputs:
@@ -959,6 +959,7 @@ stages:
959959
inputs:
960960
archiveFilePatterns: $(Build.SourcesDirectory)/ui-docs.zip
961961
destinationFolder: $(Build.ArtifactStagingDirectory)/ui-docs
962+
overwriteExistingFiles: true
962963
- task: AzureFileCopy@4
963964
displayName: "Copy Storybook to blob storage"
964965
inputs:
@@ -982,6 +983,7 @@ stages:
982983
inputs:
983984
archiveFilePatterns: $(Build.SourcesDirectory)/ui-api-docs.zip
984985
destinationFolder: $(Build.ArtifactStagingDirectory)/ui-api-docs
986+
overwriteExistingFiles: true
985987
- task: AzureFileCopy@4
986988
displayName: "Copy UI API Docs to blob storage"
987989
inputs:

‎src/Umbraco.Web.UI.Client/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Umbraco.Web.UI.Client/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@umbraco-cms/backoffice",
33
"license": "MIT",
4-
"version": "15.1.0",
4+
"version": "15.2.0-rc",
55
"type": "module",
66
"exports": {
77
".": null,

‎src/Umbraco.Web.UI.Client/src/mocks/browser-handlers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { handlers as backofficeHandlers } from './handlers/backoffice.handlers.js';
1+
import { handlers as backofficeHandlers } from './handlers/backoffice/backoffice.handlers.js';
22
import { handlers as configHandlers } from './handlers/config.handlers.js';
33
import { handlers as cultureHandlers } from './handlers/culture.handlers.js';
44
import { handlers as dataTypeHandlers } from './handlers/data-type/index.js';
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,46 @@
11
const { rest } = window.MockServiceWorker;
22
import { umbracoPath } from '@umbraco-cms/backoffice/utils';
33

4-
import logoUrl from '../../../../Umbraco.Cms.StaticAssets/wwwroot/umbraco/assets/logo.svg';
5-
import loginLogoUrl from '../../../../Umbraco.Cms.StaticAssets/wwwroot/umbraco/assets/logo_light.svg';
6-
import loginLogoAlternativeUrl from '../../../../Umbraco.Cms.StaticAssets/wwwroot/umbraco/assets/logo_dark.svg';
7-
import loginBackgroundUrl from '../../../../Umbraco.Cms.StaticAssets/wwwroot/umbraco/assets/login.jpg';
4+
const logoUrl = './src/mocks/handlers/backoffice/assets/logo.svg';
5+
const loginLogoUrl = './src/mocks/handlers/backoffice/assets/logo_light.svg';
6+
const loginLogoAlternativeUrl = './src/mocks/handlers/backoffice/assets/logo_dark.svg';
7+
const loginBackgroundUrl = './src/mocks/handlers/backoffice/assets/login.jpg';
88

99
export const handlers = [
1010
rest.get(umbracoPath('/security/back-office/graphics/logo'), async (req, res, ctx) => {
11-
const imageBuffer = await fetch(logoUrl)
12-
.then((res) => res.arrayBuffer());
11+
const imageBuffer = await fetch(logoUrl).then((res) => res.arrayBuffer());
1312

1413
return res(
1514
ctx.set('Content-Length', imageBuffer.byteLength.toString()),
1615
ctx.set('Content-Type', 'image/svg+xml'),
17-
ctx.body(imageBuffer)
16+
ctx.body(imageBuffer),
1817
);
1918
}),
2019
rest.get(umbracoPath('/security/back-office/graphics/login-logo'), async (req, res, ctx) => {
21-
const imageBuffer = await fetch(loginLogoUrl)
22-
.then((res) => res.arrayBuffer());
20+
const imageBuffer = await fetch(loginLogoUrl).then((res) => res.arrayBuffer());
2321

2422
return res(
2523
ctx.set('Content-Length', imageBuffer.byteLength.toString()),
2624
ctx.set('Content-Type', 'image/svg+xml'),
27-
ctx.body(imageBuffer)
25+
ctx.body(imageBuffer),
2826
);
2927
}),
3028
rest.get(umbracoPath('/security/back-office/graphics/login-logo-alternative'), async (req, res, ctx) => {
31-
const imageBuffer = await fetch(loginLogoAlternativeUrl)
32-
.then((res) => res.arrayBuffer());
29+
const imageBuffer = await fetch(loginLogoAlternativeUrl).then((res) => res.arrayBuffer());
3330

3431
return res(
3532
ctx.set('Content-Length', imageBuffer.byteLength.toString()),
3633
ctx.set('Content-Type', 'image/svg+xml'),
37-
ctx.body(imageBuffer)
34+
ctx.body(imageBuffer),
3835
);
3936
}),
4037
rest.get(umbracoPath('/security/back-office/graphics/login-background'), async (req, res, ctx) => {
41-
const imageBuffer = await fetch(loginBackgroundUrl)
42-
.then((res) => res.arrayBuffer());
38+
const imageBuffer = await fetch(loginBackgroundUrl).then((res) => res.arrayBuffer());
4339

4440
return res(
4541
ctx.set('Content-Length', imageBuffer.byteLength.toString()),
4642
ctx.set('Content-Type', 'image/jpeg'),
47-
ctx.body(imageBuffer)
43+
ctx.body(imageBuffer),
4844
);
4945
}),
5046
];

‎src/Umbraco.Web.UI.Client/utils/all-umb-consts/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const foundConsts = [{
9696
},
9797
{
9898
path: '@umbraco-cms/backoffice/content',
99-
consts: ["UMB_CONTENT_COLLECTION_WORKSPACE_CONTEXT","UMB_CONTENT_HAS_PROPERTIES_WORKSPACE_CONDITION","UMB_CONTENT_SECTION_ALIAS","UMB_CONTENT_PROPERTY_CONTEXT","UMB_CONTENT_WORKSPACE_CONTEXT"]
99+
consts: ["UMB_CONTENT_COLLECTION_WORKSPACE_CONTEXT","UMB_CONTENT_HAS_PROPERTIES_WORKSPACE_CONDITION","UMB_CONTENT_SECTION_ALIAS","UMB_CONTENT_PROPERTY_CONTEXT","UMB_CONTENT_PROPERTY_DATASET_CONTEXT","UMB_CONTENT_WORKSPACE_CONTEXT"]
100100
},
101101
{
102102
path: '@umbraco-cms/backoffice/culture',
@@ -216,7 +216,7 @@ export const foundConsts = [{
216216
},
217217
{
218218
path: '@umbraco-cms/backoffice/member',
219-
consts: ["UMB_MEMBER_COLLECTION_ALIAS","UMB_MEMBER_COLLECTION_CONTEXT","UMB_MEMBER_COLLECTION_REPOSITORY_ALIAS","UMB_MEMBER_TABLE_COLLECTION_VIEW_ALIAS","UMB_MEMBER_PICKER_MODAL","UMB_MEMBER_CREATE_OPTIONS_MODAL","UMB_MEMBER_ENTITY_TYPE","UMB_MEMBER_ROOT_ENTITY_TYPE","UMB_MEMBER_WORKSPACE_PATH","UMB_MEMBER_ROOT_WORKSPACE_PATH","UMB_CREATE_MEMBER_WORKSPACE_PATH_PATTERN","UMB_MEMBER_VARIANT_CONTEXT","UMB_MEMBER_DETAIL_REPOSITORY_ALIAS","UMB_MEMBER_DETAIL_STORE_ALIAS","UMB_MEMBER_DETAIL_STORE_CONTEXT","UMB_MEMBER_ITEM_REPOSITORY_ALIAS","UMB_MEMBER_STORE_ALIAS","UMB_MEMBER_ITEM_STORE_CONTEXT","UMB_MEMBER_SEARCH_PROVIDER_ALIAS","UMB_MEMBER_DETAIL_MODEL_VARIANT_SCAFFOLD","UMB_MEMBER_WORKSPACE_ALIAS","UMB_MEMBER_WORKSPACE_CONTEXT","UMB_MEMBER_ROOT_WORKSPACE_ALIAS"]
219+
consts: ["UMB_MEMBER_COLLECTION_ALIAS","UMB_MEMBER_COLLECTION_CONTEXT","UMB_MEMBER_COLLECTION_REPOSITORY_ALIAS","UMB_MEMBER_TABLE_COLLECTION_VIEW_ALIAS","UMB_MEMBER_PICKER_MODAL","UMB_MEMBER_CREATE_OPTIONS_MODAL","UMB_MEMBER_ENTITY_TYPE","UMB_MEMBER_ROOT_ENTITY_TYPE","UMB_MEMBER_WORKSPACE_PATH","UMB_MEMBER_ROOT_WORKSPACE_PATH","UMB_CREATE_MEMBER_WORKSPACE_PATH_PATTERN","UMB_MEMBER_VARIANT_CONTEXT","UMB_MEMBER_DETAIL_REPOSITORY_ALIAS","UMB_MEMBER_DETAIL_STORE_ALIAS","UMB_MEMBER_DETAIL_STORE_CONTEXT","UMB_MEMBER_ITEM_REPOSITORY_ALIAS","UMB_MEMBER_STORE_ALIAS","UMB_MEMBER_ITEM_STORE_CONTEXT","UMB_MEMBER_VALIDATION_REPOSITORY_ALIAS","UMB_MEMBER_SEARCH_PROVIDER_ALIAS","UMB_MEMBER_DETAIL_MODEL_VARIANT_SCAFFOLD","UMB_MEMBER_WORKSPACE_ALIAS","UMB_MEMBER_WORKSPACE_CONTEXT","UMB_MEMBER_ROOT_WORKSPACE_ALIAS"]
220220
},
221221
{
222222
path: '@umbraco-cms/backoffice/menu',

‎src/Umbraco.Web.UI.Client/web-test-runner.index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { handlers } from './src/mocks/browser-handlers.js';
22
import { onUnhandledRequest } from './src/mocks/index.js';
33

4-
const { setupWorker, rest } = window.MockServiceWorker;
4+
const { setupWorker } = window.MockServiceWorker;
55

66
const worker = setupWorker(...handlers);
77

‎templates/UmbracoProject/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
1+
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
22
USER $APP_UID
33
WORKDIR /app
44
EXPOSE 8080
55
EXPOSE 8081
66

7-
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
7+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
88
ARG BUILD_CONFIGURATION=Release
99
WORKDIR /src
1010
COPY ["UmbracoProject/UmbracoProject.csproj", "UmbracoProject/"]

‎tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithImageMediaPicker.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ test('can add an image to the image media picker', async ({umbracoApi, umbracoUi
7272

7373
// Act
7474
await umbracoUi.content.goToContentWithName(contentName);
75-
await umbracoUi.content.selectMediaByName(mediaName);
75+
await umbracoUi.content.clickChooseButtonAndSelectMediaWithName(mediaName);
7676
await umbracoUi.content.clickSubmitButton();
7777
await umbracoUi.content.clickSaveButton();
7878

@@ -141,7 +141,7 @@ test.skip('image count can not be more than max amount set in image media picker
141141

142142
// Act
143143
await umbracoUi.content.goToContentWithName(contentName);
144-
await umbracoUi.content.selectMediaByName(mediaName);
144+
await umbracoUi.content.clickChooseButtonAndSelectMediaWithName(mediaName);
145145
await umbracoUi.content.clickSubmitButton();
146146
await umbracoUi.content.clickSaveButton();
147147

@@ -167,7 +167,7 @@ test('can add an image from the image media picker with a start node', async ({u
167167

168168
// Act
169169
await umbracoUi.content.goToContentWithName(contentName);
170-
await umbracoUi.content.selectMediaByName(mediaName);
170+
await umbracoUi.content.clickChooseButtonAndSelectMediaWithName(mediaName);
171171
await umbracoUi.content.clickSubmitButton();
172172
await umbracoUi.content.clickSaveButton();
173173

‎tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithMediaPicker.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ test('can create content with the media picker data type', {tag: '@smoke'}, asyn
3434
await umbracoUi.content.clickCreateButton();
3535
await umbracoUi.content.chooseDocumentType(documentTypeName);
3636
await umbracoUi.content.enterContentName(contentName);
37-
await umbracoUi.content.selectMediaByName(mediaFileName);
37+
await umbracoUi.content.clickChooseButtonAndSelectMediaWithName(mediaFileName);
3838
await umbracoUi.content.clickSubmitButton();
3939
await umbracoUi.content.clickSaveButton();
4040

@@ -63,7 +63,7 @@ test('can publish content with the media picker data type', async ({umbracoApi,
6363
await umbracoUi.content.clickCreateButton();
6464
await umbracoUi.content.chooseDocumentType(documentTypeName);
6565
await umbracoUi.content.enterContentName(contentName);
66-
await umbracoUi.content.selectMediaByName(mediaFileName);
66+
await umbracoUi.content.clickChooseButtonAndSelectMediaWithName(mediaFileName);
6767
await umbracoUi.content.clickSubmitButton();
6868
await umbracoUi.content.clickSaveAndPublishButton();
6969

‎tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithMultiURLPicker.spec.ts

+4-8
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ test('can create content with the document link', {tag: '@smoke'}, async ({page,
5555
expect(contentData.values[0].value[0].icon).toEqual('icon-document');
5656
expect(contentData.values[0].value[0].target).toBeNull();
5757
expect(contentData.values[0].value[0].unique).toEqual(linkedDocumentId);
58-
// Uncomment this when the front-end is ready. Currently the link title is not auto filled after choosing document to link
59-
//expect(contentData.values[0].value[0].name).toEqual(linkedDocumentId);
58+
expect(contentData.values[0].value[0].name).toEqual(linkedDocumentName);
6059

6160
// Clean
6261
await umbracoApi.documentType.ensureNameNotExists(documentTypeForLinkedDocumentName);
@@ -99,8 +98,7 @@ test('can publish content with the document link', async ({umbracoApi, umbracoUi
9998
expect(contentData.values[0].value[0].icon).toEqual('icon-document');
10099
expect(contentData.values[0].value[0].target).toBeNull();
101100
expect(contentData.values[0].value[0].unique).toEqual(linkedDocumentId);
102-
// Uncomment this when the front-end is ready. Currently the link title is not auto filled after choosing document to link
103-
//expect(contentData.values[0].value[0].name).toEqual(linkedDocumentId);
101+
expect(contentData.values[0].value[0].name).toEqual(linkedDocumentName);
104102

105103
// Clean
106104
await umbracoApi.documentType.ensureNameNotExists(documentTypeForLinkedDocumentName);
@@ -166,8 +164,7 @@ test('can create content with the media link', async ({umbracoApi, umbracoUi}) =
166164
expect(contentData.values[0].value[0].type).toEqual('media');
167165
expect(contentData.values[0].value[0].icon).toEqual('icon-picture');
168166
expect(contentData.values[0].value[0].unique).toEqual(mediaFileId);
169-
// Uncomment this when the front-end is ready. Currently the link title is not auto filled after choosing media to link
170-
//expect(contentData.values[0].value[0].name).toEqual(mediaFileName);
167+
expect(contentData.values[0].value[0].name).toEqual(mediaFileName);
171168

172169
// Clean
173170
await umbracoApi.media.ensureNameNotExists(mediaFileName);
@@ -211,8 +208,7 @@ test('can add multiple links in the content', async ({umbracoApi, umbracoUi}) =>
211208
expect(contentData.values[0].value[0].type).toEqual('media');
212209
expect(contentData.values[0].value[0].icon).toEqual('icon-picture');
213210
expect(contentData.values[0].value[0].unique).toEqual(mediaFileId);
214-
// Uncomment this when the front-end is ready. Currently the link title is not auto filled after choosing media to link
215-
//expect(contentData.values[0].value[0].name).toEqual(mediaFileName);
211+
expect(contentData.values[0].value[0].name).toEqual(mediaFileName);
216212
// Verify the information of the second URL picker
217213
expect(contentData.values[0].value[1].type).toEqual('external');
218214
expect(contentData.values[0].value[1].icon).toEqual('icon-link');

‎tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithMultipleImageMediaPicker.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ test('can add multiple images to the multiple image media picker', async ({umbra
7979
// Act
8080
await umbracoUi.content.goToContentWithName(contentName);
8181
await umbracoUi.content.clickChooseMediaPickerButton();
82-
await umbracoUi.content.clickMediaByNameInMediaPicker(firstMediaFileName);
83-
await umbracoUi.content.clickMediaByNameInMediaPicker(secondMediaFileName);
82+
await umbracoUi.content.selectMediaWithName(firstMediaFileName);
83+
await umbracoUi.content.selectMediaWithName(secondMediaFileName);
8484
await umbracoUi.content.clickSubmitButton();
8585
await umbracoUi.content.clickSaveButton();
8686

‎tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithMultipleMediaPicker.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ test('can add multiple media files to the multiple media picker', async ({umbrac
8080
// Act
8181
await umbracoUi.content.goToContentWithName(contentName);
8282
await umbracoUi.content.clickChooseMediaPickerButton();
83-
await umbracoUi.content.clickMediaByNameInMediaPicker(firstMediaFileName);
84-
await umbracoUi.content.clickMediaByNameInMediaPicker(secondMediaFileName);
83+
await umbracoUi.content.selectMediaWithName(firstMediaFileName);
84+
await umbracoUi.content.selectMediaWithName(secondMediaFileName);
8585
await umbracoUi.content.clickSubmitButton();
8686
await umbracoUi.content.clickSaveButton();
8787

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

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ test('can add culture and hostname for multiple languages', async ({umbracoApi,
117117
await umbracoUi.content.enterDomain(secondDomainName, 1);
118118
await umbracoUi.content.selectDomainLanguageOption(secondLanguageName, 1);
119119
await umbracoUi.content.clickSaveModalButton();
120+
await umbracoUi.waitForTimeout(500);
120121

121122
// Assert
122123
const domainsData = await umbracoApi.document.getDomains(contentId);

‎tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/ListView.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ for (const listViewType of listViewTypes) {
192192
expect(dataTypeData.values).toContainEqual(expectedDataTypeValues);
193193
});
194194

195-
test('can update bulk action permission', async ({umbracoApi, umbracoUi}) => {
195+
// Skip this test as currently there is no setting for bulk action permission
196+
test.skip('can update bulk action permission', async ({umbracoApi, umbracoUi}) => {
196197
// Arrange
197198
const bulkActionPermissionValue = 'Allow bulk trash';
198199
const expectedDataTypeValues = {

‎tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/ListViewMedia.spec.ts

+6-23
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,10 @@ test('can disable one view in the media section', async ({umbracoApi, umbracoUi}
100100
});
101101

102102
test('can allow bulk trash in the media section', async ({umbracoApi, umbracoUi}) => {
103-
// Arrange
104-
const updatedValue = {
105-
"allowBulkPublish": false,
106-
"allowBulkUnpublish": false,
107-
"allowBulkCopy": false,
108-
"allowBulkDelete": true,
109-
"allowBulkMove": false
110-
};
111-
112103
// Act
113-
await umbracoApi.dataType.updateListViewMediaDataType('bulkActionPermissions', updatedValue);
114104
await umbracoUi.media.goToSection(ConstantHelper.sections.media);
115-
await umbracoUi.media.selectMediaByName(firstMediaFileName);
116-
await umbracoUi.media.selectMediaByName(secondMediaFileName);
105+
await umbracoUi.media.selectMediaWithName(firstMediaFileName);
106+
await umbracoUi.media.selectMediaWithName(secondMediaFileName);
117107
await umbracoUi.media.clickBulkTrashButton();
118108
await umbracoUi.media.clickConfirmTrashButton();
119109

@@ -127,24 +117,17 @@ test('can allow bulk trash in the media section', async ({umbracoApi, umbracoUi}
127117
await umbracoUi.media.isItemVisibleInRecycleBin(secondMediaFileName, true, false);
128118
});
129119

130-
test('can allow bulk move in the media section', async ({umbracoApi, umbracoUi}) => {
120+
// TODO: Remove skip when update code to select media successfully.
121+
test.skip('can allow bulk move in the media section', async ({umbracoApi, umbracoUi}) => {
131122
// Arrange
132123
const mediaFolderName = 'Test Folder Name';
133-
const updatedValue = {
134-
"allowBulkPublish": false,
135-
"allowBulkUnpublish": false,
136-
"allowBulkCopy": false,
137-
"allowBulkDelete": false,
138-
"allowBulkMove": true
139-
};
140124
await umbracoApi.media.ensureNameNotExists(mediaFolderName);
141125
const mediaFolderId = await umbracoApi.media.createDefaultMediaFolder(mediaFolderName);
142126

143127
// Act
144-
await umbracoApi.dataType.updateListViewMediaDataType('bulkActionPermissions', updatedValue);
145128
await umbracoUi.media.goToSection(ConstantHelper.sections.media);
146-
await umbracoUi.media.selectMediaByName(firstMediaFileName);
147-
await umbracoUi.media.selectMediaByName(secondMediaFileName);
129+
await umbracoUi.media.selectMediaWithName(firstMediaFileName);
130+
await umbracoUi.media.selectMediaWithName(secondMediaFileName);
148131
await umbracoUi.media.clickBulkMoveToButton();
149132
await umbracoUi.media.clickCaretButtonForName('Media');
150133
await umbracoUi.media.clickModalTextByName(mediaFolderName);

‎tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/Media.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ test('can trash a folder', async ({umbracoApi, umbracoUi}) => {
116116
await umbracoUi.media.clickConfirmTrashButton();
117117

118118
// Assert
119-
await umbracoUi.media.doesSuccessNotificationHaveText(NotificationConstantHelper.success.folderDeleted);
119+
await umbracoUi.media.doesSuccessNotificationHaveText(NotificationConstantHelper.success.movedToRecycleBin);
120120
await umbracoUi.media.isTreeItemVisible(folderName, false);
121121
expect(await umbracoApi.media.doesNameExist(folderName)).toBeFalsy();
122122
});
@@ -155,11 +155,11 @@ test('can search for a media file', async ({umbracoApi, umbracoUi}) => {
155155
await umbracoUi.media.goToSection(ConstantHelper.sections.media);
156156

157157
// Act
158-
await umbracoUi.media.searchForMediaItemByName(mediaFileName);
158+
await umbracoUi.media.searchForMediaItemByName(secondMediaFile);
159159

160160
// Assert
161161
await umbracoUi.media.doesMediaCardsContainAmount(1);
162-
await umbracoUi.media.doesMediaCardContainText(mediaFileName);
162+
await umbracoUi.media.doesMediaCardContainText(secondMediaFile);
163163

164164
// Clean
165165
await umbracoApi.media.ensureNameNotExists(secondMediaFile);

‎tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Packages/CreatedPackages.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
// await umbracoUi.package.clickCreatePackageButton();
101101
// await umbracoUi.package.enterPackageName(packageName);
102102
// await umbracoUi.package.clickAddMediaToPackageButton();
103-
// await umbracoUi.media.selectMediaByName(mediaName);
103+
// await umbracoUi.media.selectMediaWithName(mediaName);
104104
// await umbracoUi.package.clickSubmitButton();
105105
// await umbracoUi.package.clickCreateButton();
106106
//

‎tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/Dashboard/Welcome.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ test.beforeEach(async ({umbracoUi}) => {
77

88
test('can click on buttons', async ({umbracoUi}) => {
99
// Arrange
10-
const getTheHelpYouNeedDocumentationUrl = 'https://docs.umbraco.com/umbraco-cms/umbraco-cms';
11-
const goToTheForumUrl = 'https://our.umbraco.com/forum';
10+
const getTheHelpYouNeedDocumentationUrl = 'https://docs.umbraco.com/umbraco-cms';
11+
const goToTheForumUrl = 'https://our.umbraco.com/forum/';
1212
const chatWithTheCommunityUrl = 'https://discord.umbraco.com';
1313
const getCertifiedUrl = 'https://umbraco.com/training/';
1414
const getTheHelpYouNeedSupportUrl = 'https://umbraco.com/support/';

‎tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeDesignTab.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,11 @@ test('can delete a tab in a document type', async ({umbracoApi, umbracoUi}) => {
107107
await umbracoUi.documentType.clickConfirmToDeleteButton();
108108
await umbracoUi.documentType.clickSaveButton();
109109

110-
await umbracoApi.documentType.getByName(documentTypeName);
111110
// Assert
112111
await umbracoUi.documentType.isSuccessNotificationVisible();
113112
expect(await umbracoApi.documentType.doesNameExist(documentTypeName)).toBeTruthy();
113+
const documentTypeData = await umbracoApi.documentType.getByName(documentTypeName);
114+
expect(documentTypeData.containers.length).toBe(0);
114115
});
115116

116117
test('can delete a property editor in a document type', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) => {

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,23 @@ test('can create an empty partial view', {tag: '@smoke'}, async ({umbracoApi, um
3434

3535
test('can create a partial view from snippet', async ({umbracoApi, umbracoUi}) => {
3636
// Arrange
37-
const expectedPartialViewContentWindows = '@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage\r\n@using Umbraco.Cms.Core.Routing\r\n@using Umbraco.Extensions\r\n\n@inject IPublishedUrlProvider PublishedUrlProvider\r\n@*\r\n This snippet makes a breadcrumb of parents using an unordered HTML list.\r\n\r\n How it works:\r\n - It uses the Ancestors() method to get all parents and then generates links so the visitor can go back\r\n - Finally it outputs the name of the current page (without a link)\r\n*@\r\n\r\n@{ var selection = Model.Ancestors().ToArray(); }\r\n\r\n@if (selection?.Length > 0)\r\n{\r\n <ul class=\"breadcrumb\">\r\n @* For each page in the ancestors collection which have been ordered by Level (so we start with the highest top node first) *@\r\n @foreach (var item in selection.OrderBy(x => x.Level))\r\n {\r\n <li><a href=\"@item.Url(PublishedUrlProvider)\">@item.Name</a> <span class=\"divider\">/</span></li>\r\n }\r\n\r\n @* Display the current page as the last item in the list *@\r\n <li class=\"active\">@Model.Name</li>\r\n </ul>\r\n}';
38-
const expectedPartialViewContentLinux = '@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage\n@using Umbraco.Cms.Core.Routing\n@using Umbraco.Extensions\n\n@inject IPublishedUrlProvider PublishedUrlProvider\n@*\n This snippet makes a breadcrumb of parents using an unordered HTML list.\n\n How it works:\n - It uses the Ancestors() method to get all parents and then generates links so the visitor can go back\n - Finally it outputs the name of the current page (without a link)\n*@\n\n@{ var selection = Model.Ancestors().ToArray(); }\n\n@if (selection?.Length > 0)\n{\n <ul class=\"breadcrumb\">\n @* For each page in the ancestors collection which have been ordered by Level (so we start with the highest top node first) *@\n @foreach (var item in selection.OrderBy(x => x.Level))\n {\n <li><a href=\"@item.Url(PublishedUrlProvider)\">@item.Name</a> <span class=\"divider\">/</span></li>\n }\n\n @* Display the current page as the last item in the list *@\n <li class=\"active\">@Model.Name</li>\n </ul>\n}';
37+
const expectedPartialViewContentWindows = '@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage\r\n@using Umbraco.Cms.Core.PublishedCache\r\n@using Umbraco.Cms.Core.Routing\r\n@using Umbraco.Cms.Core.Services.Navigation\r\n\n@inject IPublishedContentCache PublishedContentCache\r\n@inject IDocumentNavigationQueryService DocumentNavigationQueryService\r\n@inject IPublishedUrlProvider PublishedUrlProvider\r\n@*\r\n This snippet makes a breadcrumb of parents using an unordered HTML list.\r\n\r\n How it works:\r\n - It uses the Ancestors method to get all parents and then generates links so the visitor can go back\r\n - Finally it outputs the name of the current page (without a link)\r\n*@\r\n\r\n@{ var selection = Model.Ancestors(PublishedContentCache, DocumentNavigationQueryService).ToArray(); }\r\n\r\n@if (selection?.Length > 0)\r\n{\r\n <ul class=\"breadcrumb\">\r\n @* For each page in the ancestors collection which have been ordered by Level (so we start with the highest top node first) *@\r\n @foreach (var item in selection.OrderBy(x => x.Level))\r\n {\r\n <li><a href=\"@item.Url(PublishedUrlProvider)\">@item.Name</a> <span class=\"divider\">/</span></li>\r\n }\r\n\r\n @* Display the current page as the last item in the list *@\r\n <li class=\"active\">@Model.Name</li>\r\n </ul>\r\n}';
38+
const expectedPartialViewContentLinux = '@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage\n@using Umbraco.Cms.Core.PublishedCache\n@using Umbraco.Cms.Core.Routing\n@using Umbraco.Cms.Core.Services.Navigation\n\n@inject IPublishedContentCache PublishedContentCache\n@inject IDocumentNavigationQueryService DocumentNavigationQueryService\n@inject IPublishedUrlProvider PublishedUrlProvider\n@*\n This snippet makes a breadcrumb of parents using an unordered HTML list.\n\n How it works:\n - It uses the Ancestors method to get all parents and then generates links so the visitor can go back\n - Finally it outputs the name of the current page (without a link)\n*@\n\n@{ var selection = Model.Ancestors(PublishedContentCache, DocumentNavigationQueryService).ToArray(); }\n\n@if (selection?.Length > 0)\n{\n <ul class=\"breadcrumb\">\n @* For each page in the ancestors collection which have been ordered by Level (so we start with the highest top node first) *@\n @foreach (var item in selection.OrderBy(x => x.Level))\n {\n <li><a href=\"@item.Url(PublishedUrlProvider)\">@item.Name</a> <span class=\"divider\">/</span></li>\n }\n\n @* Display the current page as the last item in the list *@\n <li class=\"active\">@Model.Name</li>\n </ul>\n}';
3939

4040
// Act
4141
await umbracoUi.partialView.clickActionsMenuAtRoot();
4242
await umbracoUi.partialView.clickCreateButton();
4343
await umbracoUi.partialView.clickNewPartialViewFromSnippetButton();
4444
await umbracoUi.partialView.clickBreadcrumbButton();
4545
await umbracoUi.partialView.enterPartialViewName(partialViewName);
46+
await umbracoUi.waitForTimeout(500);
4647
await umbracoUi.partialView.clickSaveButton();
4748

4849
// Assert
4950
await umbracoUi.partialView.doesSuccessNotificationHaveText(NotificationConstantHelper.success.created);
5051
expect(await umbracoApi.partialView.doesExist(partialViewFileName)).toBeTruthy();
5152
const partialViewData = await umbracoApi.partialView.getByName(partialViewFileName);
53+
console.log(partialViewData.content);
5254

5355
switch (process.platform) {
5456
case 'win32':

‎tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/Stylesheet/Stylesheet.spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ test.skip('can update a stylesheet', {tag: '@smoke'}, async ({umbracoApi, umbrac
9494

9595
test('can delete a stylesheet', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) => {
9696
// Arrange
97-
await umbracoApi.stylesheet.create(stylesheetName, '', '/');
97+
await umbracoApi.stylesheet.createDefaultStylesheet(stylesheetName);
9898
await umbracoUi.stylesheet.goToSection(ConstantHelper.sections.settings);
9999

100100
//Act
@@ -112,7 +112,7 @@ test('can rename a stylesheet', {tag: '@smoke'}, async ({umbracoApi, umbracoUi})
112112
// Arrange
113113
const wrongStylesheetName = 'WrongStylesheetName.css';
114114
await umbracoApi.stylesheet.ensureNameNotExists(wrongStylesheetName);
115-
await umbracoApi.stylesheet.create(wrongStylesheetName, '', '/');
115+
await umbracoApi.stylesheet.createDefaultStylesheet(wrongStylesheetName);
116116
await umbracoUi.stylesheet.goToSection(ConstantHelper.sections.settings);
117117

118118
//Act
@@ -133,7 +133,7 @@ test('can edit rich text editor styles', async ({umbracoApi, umbracoUi}) => {
133133
const newStyleStyles = 'color: white';
134134
const newStylesheetContent = '/**umb_name:' + newStyleName + '*/\n' + newStyleSelector + ' {\n\t' + newStyleStyles + '\n}';
135135
const stylesheetContent = '/**umb_name:' + styleName + '*/\n' + styleSelector + ' {\n\t' + styleStyles + '\n}';
136-
await umbracoApi.stylesheet.create(stylesheetName, stylesheetContent, '/');
136+
await umbracoApi.stylesheet.create(stylesheetName, stylesheetContent);
137137
expect(await umbracoApi.stylesheet.doesExist(stylesheetName)).toBeTruthy();
138138
await umbracoUi.stylesheet.goToSection(ConstantHelper.sections.settings);
139139

@@ -151,7 +151,7 @@ test('can edit rich text editor styles', async ({umbracoApi, umbracoUi}) => {
151151
test('can remove rich text editor styles', async ({umbracoApi, umbracoUi}) => {
152152
// Arrange
153153
const stylesheetContent = '/**umb_name:' + styleName + '*/\n' + styleSelector + ' {\n\t' + styleStyles + '\n}';
154-
await umbracoApi.stylesheet.create(stylesheetName, stylesheetContent, '/');
154+
await umbracoApi.stylesheet.create(stylesheetName, stylesheetContent);
155155
expect(await umbracoApi.stylesheet.doesExist(stylesheetName)).toBeTruthy();
156156
await umbracoUi.stylesheet.goToSection(ConstantHelper.sections.settings);
157157

‎tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/User.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ test('can add media start nodes for a user', {tag: '@smoke'}, async ({umbracoApi
238238
// Act
239239
await umbracoUi.user.clickUserWithName(nameOfTheUser);
240240
await umbracoUi.user.clickChooseMediaStartNodeButton();
241-
await umbracoUi.user.clickMediaCardWithName(mediaName);
241+
await umbracoUi.user.selectMediaWithName(mediaName);
242242
await umbracoUi.user.clickSubmitButton();
243243
await umbracoUi.user.clickSaveButton();
244244

@@ -270,7 +270,7 @@ test('can add multiple media start nodes for a user', async ({umbracoApi, umbrac
270270
// Act
271271
await umbracoUi.user.clickUserWithName(nameOfTheUser);
272272
await umbracoUi.user.clickChooseMediaStartNodeButton();
273-
await umbracoUi.user.clickMediaCardWithName(secondMediaName);
273+
await umbracoUi.user.selectMediaWithName(secondMediaName);
274274
await umbracoUi.user.clickSubmitButton();
275275
await umbracoUi.user.clickSaveButton();
276276

‎tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/UserGroups.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ test.afterEach(async ({umbracoApi}) => {
5454
test('can create an empty user group', async ({umbracoApi, umbracoUi}) => {
5555
// Act
5656
await umbracoUi.userGroup.clickUserGroupsButton();
57-
await umbracoUi.userGroup.clickCreateLabelButton();
57+
await umbracoUi.userGroup.clickCreateLink();
5858
await umbracoUi.userGroup.enterUserGroupName(userGroupName);
5959
await umbracoUi.userGroup.clickSaveButton();
6060

@@ -113,7 +113,7 @@ test('can delete a user group', async ({umbracoApi, umbracoUi}) => {
113113

114114
// Act
115115
await umbracoUi.userGroup.clickActionsButton();
116-
await umbracoUi.userGroup.clickDeleteLabelThreeDotsButton();
116+
await umbracoUi.userGroup.clickDeleteButton();
117117
await umbracoUi.userGroup.clickConfirmToDeleteButton();
118118

119119
// Assert
@@ -327,7 +327,7 @@ test('can add a media start node to a user group', async ({umbracoApi, umbracoUi
327327

328328
// Act
329329
await umbracoUi.userGroup.clickChooseMediaStartNodeButton();
330-
await umbracoUi.userGroup.clickMediaCardWithName(mediaName);
330+
await umbracoUi.userGroup.selectMediaWithName(mediaName);
331331
await umbracoUi.userGroup.clickSubmitButton();
332332
await umbracoUi.userGroup.clickSaveButton();
333333

0 commit comments

Comments
 (0)
Please sign in to comment.