From 22bcc9b0542ab8123bdb1d2079b649ed32bc6878 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Thu, 17 Nov 2022 09:27:47 +0100 Subject: [PATCH 01/10] V11: add test flakyness reporting (#13386) * update json-models-builders * Add reporting to all before each loops * Add commitId to env for pipelines * Test reports correctly * Bumb testhelper version * Update playwright-testhelpers version * Bumb playwright test-helper version * Bumb playwright-testhelpers version * Add AgentOs to yaml env * Bumb playwright-testhelper version * Try different AgentOS * Revert "Try different AgentOS" This reverts commit fc90620aef7af01ceffcdfbea7c9ef4dd02007f3. * Revert logo test * Add missing semicolons * Update package-lock.json * Add reports to Blocklist tests Co-authored-by: Zeegaan --- build/azure-pipelines.yml | 2 ++ .../Umbraco.Tests.AcceptanceTest/package-lock.json | 14 +++++++------- tests/Umbraco.Tests.AcceptanceTest/package.json | 2 +- .../BlockListEditor/blockListEditorContent.spec.ts | 3 ++- .../blockListEditorDataType.spec.ts | 3 ++- .../blockListEditorDocument.spec.ts | 3 ++- .../tests/DefaultConfig/Branding/logo.spec.ts | 6 ++---- .../tests/DefaultConfig/Content/content.spec.ts | 3 ++- .../tests/DefaultConfig/Content/recycleBin.spec.ts | 3 ++- .../tests/DefaultConfig/Content/routing.spec.ts | 3 ++- .../DefaultConfig/DataTypes/dataTypes.spec.ts | 3 ++- .../DataTypes/textBoxVariation.spec.ts | 3 ++- .../HelpPanel/systemInformation.spec.ts | 3 ++- .../DefaultConfig/Languages/languages.spec.ts | 3 ++- .../tests/DefaultConfig/Login/login.spec.ts | 7 +++++-- .../tests/DefaultConfig/Media/mediaFiles.spec.ts | 3 ++- .../tests/DefaultConfig/Media/mediaSection.spec.ts | 3 ++- .../DefaultConfig/Members/memberGroups.spec.ts | 3 ++- .../tests/DefaultConfig/Members/members.spec.ts | 3 ++- .../ModelsBuilder/modelsbuilder.spec.ts | 3 ++- .../tests/DefaultConfig/Packages/packages.spec.ts | 3 ++- .../tests/DefaultConfig/Settings/dataType.spec.ts | 5 +++-- .../DefaultConfig/Settings/documentTypes.spec.ts | 3 ++- .../tests/DefaultConfig/Settings/languages.spec.ts | 3 ++- .../tests/DefaultConfig/Settings/macro.spec.ts | 3 ++- .../tests/DefaultConfig/Settings/mediaTypes.ts | 3 ++- .../DefaultConfig/Settings/memberTypes.spec.ts | 3 ++- .../Settings/partialViewMacroFiles.spec.ts | 3 ++- .../DefaultConfig/Settings/partialViews.spec.ts | 3 ++- .../DefaultConfig/Settings/relationTypes.spec.ts | 3 ++- .../tests/DefaultConfig/Settings/scripts.spec.ts | 3 ++- .../DefaultConfig/Settings/stylesheets.spec.ts | 3 ++- .../tests/DefaultConfig/Settings/templates.spec.ts | 3 ++- .../tests/DefaultConfig/Tabs/tabs.spec.ts | 5 +++-- .../tests/DefaultConfig/Tour/tours.spec.ts | 3 ++- .../DefaultConfig/Translation/translation.spec.ts | 6 ++---- .../tests/DefaultConfig/Users/userGroups.spec.ts | 3 ++- .../tests/DefaultConfig/Users/users.spec.ts | 5 +++-- 38 files changed, 86 insertions(+), 53 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index e2abf8767d40..345e3bde885e 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -452,6 +452,8 @@ stages: workingDirectory: tests/Umbraco.Tests.AcceptanceTest env: CI: true + CommitId: $(Build.SourceVersion) + AgentOs: $(Agent.OS) - pwsh: | docker logs $(dockerImageName) > $(Build.ArtifactStagingDirectory)/playwright.log 2>&1 docker stop $(dockerImageName) diff --git a/tests/Umbraco.Tests.AcceptanceTest/package-lock.json b/tests/Umbraco.Tests.AcceptanceTest/package-lock.json index 92b51216402b..0c44f7f6cc78 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/package-lock.json +++ b/tests/Umbraco.Tests.AcceptanceTest/package-lock.json @@ -8,7 +8,7 @@ "hasInstallScript": true, "dependencies": { "@umbraco/json-models-builders": "^1.0.2", - "@umbraco/playwright-testhelpers": "^1.0.12", + "@umbraco/playwright-testhelpers": "^1.0.18", "camelize": "^1.0.0", "dotenv": "^16.0.2", "faker": "^4.1.0", @@ -138,9 +138,9 @@ } }, "node_modules/@umbraco/playwright-testhelpers": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-1.0.12.tgz", - "integrity": "sha512-O6P307ocTaBzaNE0QjFS100w94DalTx9nXUGczpwku3oAZZyoNaG//A7xh5zmlmgAGHqyKnAMQBoH/RX3t8C6g==", + "version": "1.0.18", + "resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-1.0.18.tgz", + "integrity": "sha512-SLtZqs3IxtuBfKBp25ZgAxjrXTIoR/mWQ8qfEFTpsebdQcnZVXxPXbCe2CwPT3zdTpjdjdh/HOfn/ONjtpL8Cw==", "dependencies": { "@umbraco/json-models-builders": "^1.0.2", "camelize": "^1.0.0", @@ -1064,9 +1064,9 @@ } }, "@umbraco/playwright-testhelpers": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-1.0.12.tgz", - "integrity": "sha512-O6P307ocTaBzaNE0QjFS100w94DalTx9nXUGczpwku3oAZZyoNaG//A7xh5zmlmgAGHqyKnAMQBoH/RX3t8C6g==", + "version": "1.0.18", + "resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-1.0.18.tgz", + "integrity": "sha512-SLtZqs3IxtuBfKBp25ZgAxjrXTIoR/mWQ8qfEFTpsebdQcnZVXxPXbCe2CwPT3zdTpjdjdh/HOfn/ONjtpL8Cw==", "requires": { "@umbraco/json-models-builders": "^1.0.2", "camelize": "^1.0.0", diff --git a/tests/Umbraco.Tests.AcceptanceTest/package.json b/tests/Umbraco.Tests.AcceptanceTest/package.json index 997514c4702e..72a314a06077 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/package.json +++ b/tests/Umbraco.Tests.AcceptanceTest/package.json @@ -20,7 +20,7 @@ }, "dependencies": { "@umbraco/json-models-builders": "^1.0.2", - "@umbraco/playwright-testhelpers": "^1.0.12", + "@umbraco/playwright-testhelpers": "^1.0.18", "camelize": "^1.0.0", "faker": "^4.1.0", "form-data": "^4.0.0", diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockListEditor/blockListEditorContent.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockListEditor/blockListEditorContent.spec.ts index ffc14e1a1861..242f93d6cee8 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockListEditor/blockListEditorContent.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockListEditor/blockListEditorContent.spec.ts @@ -14,7 +14,8 @@ test.describe('BlockListEditorContent', () => { // Won't work if I use the to alias for the elementAlias const elementAlias = 'testElement'; - test.beforeEach(async ({page, umbracoApi, umbracoUi}) => { + test.beforeEach(async ({page, umbracoApi, umbracoUi}, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); await umbracoApi.documentTypes.ensureNameNotExists(documentName); await umbracoApi.documentTypes.ensureNameNotExists(elementName); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockListEditor/blockListEditorDataType.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockListEditor/blockListEditorDataType.spec.ts index 70c4112c2525..0c2c7d9a8f4b 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockListEditor/blockListEditorDataType.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockListEditor/blockListEditorDataType.spec.ts @@ -10,7 +10,8 @@ test.describe('BlockListEditorDataType', () => { const elementAlias = AliasHelper.toAlias(elementName); - test.beforeEach(async ({page, umbracoApi, umbracoUi}) => { + test.beforeEach(async ({page, umbracoApi, umbracoUi}, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); await umbracoApi.documentTypes.ensureNameNotExists(documentName); await umbracoApi.dataTypes.ensureNameNotExists(blockListName); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockListEditor/blockListEditorDocument.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockListEditor/blockListEditorDocument.spec.ts index e38236f3ddab..55588a2848df 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockListEditor/blockListEditorDocument.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockListEditor/blockListEditorDocument.spec.ts @@ -11,7 +11,8 @@ test.describe('BlockListEditorDocument', () => { const blockListAlias = AliasHelper.toAlias(blockListName); const elementAlias = AliasHelper.toAlias(elementName); - test.beforeEach(async ({page, umbracoApi, umbracoUi}) => { + test.beforeEach(async ({page, umbracoApi, umbracoUi}, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); await umbracoApi.documentTypes.ensureNameNotExists(documentName); await umbracoApi.dataTypes.ensureNameNotExists(blockListName); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Branding/logo.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Branding/logo.spec.ts index c9e28e69a660..eaa8f4a72a63 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Branding/logo.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Branding/logo.spec.ts @@ -3,10 +3,8 @@ import { expect } from "@playwright/test"; test.describe('Umbraco Logo Information', () => { - test.beforeEach(async ({ page, umbracoApi }) => { - // TODO: REMOVE THIS WHEN SQLITE IS FIXED - // Wait so we don't bombard the API - await page.waitForTimeout(1000); + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/content.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/content.spec.ts index 16033e17ccbd..25aff1c6e8b4 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/content.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/content.spec.ts @@ -10,7 +10,8 @@ import { test.describe('Content tests', () => { - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/recycleBin.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/recycleBin.spec.ts index 135a7ade07f6..f55ea4379b9d 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/recycleBin.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/recycleBin.spec.ts @@ -4,7 +4,8 @@ import {ContentBuilder, DocumentTypeBuilder} from "@umbraco/json-models-builders test.describe('Recycle bin', () => { - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/routing.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/routing.spec.ts index 0838b5acde73..2a40de0c6fbd 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/routing.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/routing.spec.ts @@ -11,7 +11,8 @@ test.describe('Routing', () => { const grandChildNodeName = "Grandchild"; const rootDocTypeName = "Test document type"; - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); await umbracoApi.content.deleteAllContent(); await umbracoApi.documentTypes.ensureNameNotExists(rootDocTypeName); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataTypes/dataTypes.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataTypes/dataTypes.spec.ts index ba6637c693fe..208f2b270859 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataTypes/dataTypes.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataTypes/dataTypes.spec.ts @@ -8,7 +8,8 @@ import { test.describe('DataTypes', () => { - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataTypes/textBoxVariation.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataTypes/textBoxVariation.spec.ts index 9222301db18e..cbdd445e20fd 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataTypes/textBoxVariation.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataTypes/textBoxVariation.spec.ts @@ -4,7 +4,8 @@ import {ContentBuilder, DocumentTypeBuilder, DomainBuilder} from "@umbraco/json- test.describe('Vary by culture for TextBox', () => { - test.beforeEach(async ({page, umbracoApi, umbracoUi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/HelpPanel/systemInformation.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/HelpPanel/systemInformation.spec.ts index 76199001a64a..fb46e6ee5246 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/HelpPanel/systemInformation.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/HelpPanel/systemInformation.spec.ts @@ -5,7 +5,8 @@ test.describe('System Information', () => { const enCulture = "en-US"; const dkCulture = "da-DK"; - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); await umbracoApi.users.setCurrentLanguage(enCulture); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Languages/languages.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Languages/languages.spec.ts index 6e6c2bf4e0ff..d12ca7367804 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Languages/languages.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Languages/languages.spec.ts @@ -3,7 +3,8 @@ import {expect} from "@playwright/test"; test.describe('Languages', () => { - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts index 3d3000b5b022..25eaa34ae580 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts @@ -1,7 +1,10 @@ -import { test, expect } from '@playwright/test'; +import {expect } from '@playwright/test'; +import {test} from "@umbraco/playwright-testhelpers"; + test.describe('Login', () => { - test.beforeEach(async ({ page }) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await page.goto(process.env.URL + '/umbraco'); }); test('Login with correct username and password', async ({page}) => { diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/mediaFiles.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/mediaFiles.spec.ts index 847cdaca5986..e6c7faa0e6af 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/mediaFiles.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/mediaFiles.spec.ts @@ -3,7 +3,8 @@ import {ConstantHelper, test} from '@umbraco/playwright-testhelpers'; test.describe('media File Types', () => { - test.beforeEach(async ({page, umbracoApi, umbracoUi}) => { + test.beforeEach(async ({page, umbracoApi, umbracoUi}, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); await umbracoUi.goToSection(ConstantHelper.sections.media); await umbracoApi.media.deleteAllMedia(); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/mediaSection.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/mediaSection.spec.ts index 2620e21a34bc..2e55aa82b042 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/mediaSection.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/mediaSection.spec.ts @@ -3,7 +3,8 @@ import {ConstantHelper, test} from '@umbraco/playwright-testhelpers'; test.describe('Media', () => { - test.beforeEach(async ({page, umbracoApi, umbracoUi}) => { + test.beforeEach(async ({page, umbracoApi, umbracoUi}, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); await umbracoUi.goToSection(ConstantHelper.sections.media); await umbracoApi.media.deleteAllMedia() diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Members/memberGroups.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Members/memberGroups.spec.ts index 7b12ffbc9c0b..11b2062d9d58 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Members/memberGroups.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Members/memberGroups.spec.ts @@ -2,7 +2,8 @@ import {ConstantHelper, test} from '@umbraco/playwright-testhelpers'; test.describe('Packages', () => { - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Members/members.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Members/members.spec.ts index 2d0589cafc4c..7fdd55d9f59b 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Members/members.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Members/members.spec.ts @@ -2,7 +2,8 @@ import {ConstantHelper, test} from '@umbraco/playwright-testhelpers'; test.describe('Packages', () => { - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/ModelsBuilder/modelsbuilder.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/ModelsBuilder/modelsbuilder.spec.ts index 998a738e2fb3..0215d617eefa 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/ModelsBuilder/modelsbuilder.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/ModelsBuilder/modelsbuilder.spec.ts @@ -6,7 +6,8 @@ import { test.describe('Modelsbuilder tests', () => { - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Packages/packages.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Packages/packages.spec.ts index a6acdee170cd..07bd1812e80a 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Packages/packages.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Packages/packages.spec.ts @@ -7,7 +7,8 @@ test.describe('Packages', () => { const packageName = "TestPackage"; const rootDocTypeName = "Test document type"; const nodeName = "1) Home"; - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/dataType.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/dataType.spec.ts index 70c12486a99f..4f719deab995 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/dataType.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/dataType.spec.ts @@ -3,8 +3,9 @@ import {expect} from "@playwright/test"; import {LabelDataTypeBuilder} from "@umbraco/json-models-builders"; test.describe('Data Types', () => { - - test.beforeEach(async ({page, umbracoApi}) => { + + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/documentTypes.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/documentTypes.spec.ts index 7ab96953d320..99f578dbd6fd 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/documentTypes.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/documentTypes.spec.ts @@ -3,7 +3,8 @@ import {ConstantHelper, test} from '@umbraco/playwright-testhelpers'; import {DocumentTypeBuilder} from "@umbraco/json-models-builders"; test.describe('Document types', () => { - test.beforeEach(async ({ page, umbracoApi }) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/languages.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/languages.spec.ts index 879c696f65bf..41b4f4d0a797 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/languages.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/languages.spec.ts @@ -2,7 +2,8 @@ import {test, ApiHelpers, UiHelpers, ConstantHelper} from '@umbraco/playwright-t import {expect} from "@playwright/test"; test.describe('Languages', () => { - test.beforeEach(async ({ page, umbracoApi }) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/macro.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/macro.spec.ts index c54907d3151a..11f99b3a9541 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/macro.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/macro.spec.ts @@ -3,7 +3,8 @@ import {PartialViewMacroBuilder} from "@umbraco/json-models-builders"; test.describe('Macros', () => { - test.beforeEach(async ({ page, umbracoApi }) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/mediaTypes.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/mediaTypes.ts index 1db083cd13e0..e92f4fb6243d 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/mediaTypes.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/mediaTypes.ts @@ -3,7 +3,8 @@ import {expect} from "@playwright/test"; test.describe('Media types', () => { - test.beforeEach(async ({ page, umbracoApi }) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/memberTypes.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/memberTypes.spec.ts index 661c4c842bfc..609116c11263 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/memberTypes.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/memberTypes.spec.ts @@ -1,7 +1,8 @@ import {ConstantHelper, test} from '@umbraco/playwright-testhelpers'; test.describe('Member Types', () => { - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/partialViewMacroFiles.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/partialViewMacroFiles.spec.ts index 88939ab10fbc..15b9202e28f7 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/partialViewMacroFiles.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/partialViewMacroFiles.spec.ts @@ -4,7 +4,8 @@ import {PartialViewMacroBuilder} from "@umbraco/json-models-builders"; test.describe('Partial View Macro Files', () => { - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/partialViews.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/partialViews.spec.ts index c8dc16b51d20..56fbe936a91f 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/partialViews.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/partialViews.spec.ts @@ -4,7 +4,8 @@ import {PartialViewBuilder} from "@umbraco/json-models-builders"; test.describe('Partial Views', () => { - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/relationTypes.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/relationTypes.spec.ts index 6ba20a619c7d..34b00c7fc379 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/relationTypes.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/relationTypes.spec.ts @@ -3,7 +3,8 @@ import {ConstantHelper, test} from '@umbraco/playwright-testhelpers'; test.describe('Relation Types', () => { - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/scripts.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/scripts.spec.ts index 5f8d93a6db06..b6ca8a09ee70 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/scripts.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/scripts.spec.ts @@ -3,7 +3,8 @@ import {expect} from "@playwright/test"; import {ScriptBuilder} from "@umbraco/json-models-builders"; test.describe('Scripts', () => { - test.beforeEach(async ({ page, umbracoApi }) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/stylesheets.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/stylesheets.spec.ts index 6c82a851659b..9639de65537b 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/stylesheets.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/stylesheets.spec.ts @@ -7,7 +7,8 @@ test.describe('Stylesheets', () => { const name = "TestStylesheet"; const fileName = name + ".css"; - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/templates.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/templates.spec.ts index e3d5c7c94312..bef67819d650 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/templates.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/templates.spec.ts @@ -3,7 +3,8 @@ import {ConstantHelper, test} from '@umbraco/playwright-testhelpers'; import {TemplateBuilder} from "@umbraco/json-models-builders"; test.describe('Templates', () => { - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tabs/tabs.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tabs/tabs.spec.ts index e9b0e42c83d2..8ffeb6c685f0 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tabs/tabs.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tabs/tabs.spec.ts @@ -6,8 +6,9 @@ const tabsDocTypeName = 'Tabs Test Document'; const tabsDocTypeAlias = AliasHelper.toAlias(tabsDocTypeName); test.describe('Tabs', () => { - - test.beforeEach(async ({ umbracoApi, page }) => { + + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tour/tours.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tour/tours.spec.ts index e0512acbc26b..560be634aa10 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tour/tours.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tour/tours.spec.ts @@ -3,7 +3,8 @@ import {test} from '@umbraco/playwright-testhelpers'; test.describe('Tours', () => { const timeout = 60000; - test.beforeEach(async ({page, umbracoApi}) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); await resetTourData(umbracoApi); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Translation/translation.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Translation/translation.spec.ts index e3c3bc2adaf5..80e55daae98d 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Translation/translation.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Translation/translation.spec.ts @@ -2,10 +2,8 @@ import {ConstantHelper, test} from '@umbraco/playwright-testhelpers'; test.describe('Translation', () => { - test.beforeEach(async ({page, umbracoApi}) => { - // TODO: REMOVE THIS WHEN SQLITE IS FIXED - // Wait so we don't bombard the API - await page.waitForTimeout(1000); + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/userGroups.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/userGroups.spec.ts index 86a94ec14471..0edce122b585 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/userGroups.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/userGroups.spec.ts @@ -9,7 +9,8 @@ test.describe('User groups', () => { await page.locator('[data-element="sub-view-userGroups"]').click(); } - test.beforeEach(async ({ umbracoApi, page }) => { + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/users.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/users.spec.ts index 164f778e62d7..fa8829bd07a6 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/users.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/users.spec.ts @@ -22,8 +22,9 @@ test.describe('Users', () => { "userGroups": userGroups, "message": "" }; - - test.beforeEach(async ({ umbracoApi, page }) => { + + test.beforeEach(async ({ page, umbracoApi }, testInfo) => { + await umbracoApi.report.report(testInfo); await umbracoApi.login(); }); From d545c1fa1e7ef2d93b78a9c45be5cc039047d1f3 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Thu, 17 Nov 2022 09:43:57 +0100 Subject: [PATCH 02/10] V10: AllowedUploadFiles appsetting not working (#13408) * Add new Settings * Use new settings instead of old ones * Implement AllowedUploadedFiles value to be copied to AllowedUplayedFileExtensions * Obsolete old settings * Rename DisallowedUploadFileExtensions * Implement same fix for DisallowedUploadFiles * Use new settings for backoffice server variables * Update the correct setting Co-authored-by: Zeegaan --- .../ContentSettingsExtensions.cs | 6 ++--- .../Configuration/Models/ContentSettings.cs | 13 ++++++++++ .../UmbracoBuilder.Configuration.cs | 26 +++++++++++++++++++ .../Controllers/BackOfficeServerVariables.cs | 4 +-- 4 files changed, 44 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Core/Configuration/ContentSettingsExtensions.cs b/src/Umbraco.Core/Configuration/ContentSettingsExtensions.cs index 315cee462780..23a67f3267bc 100644 --- a/src/Umbraco.Core/Configuration/ContentSettingsExtensions.cs +++ b/src/Umbraco.Core/Configuration/ContentSettingsExtensions.cs @@ -10,9 +10,9 @@ public static class ContentSettingsExtensions /// Allow upload if extension is whitelisted OR if there is no whitelist and extension is NOT blacklisted. /// public static bool IsFileAllowedForUpload(this ContentSettings contentSettings, string extension) => - contentSettings.AllowedUploadFiles.Any(x => x.InvariantEquals(extension)) || - (contentSettings.AllowedUploadFiles.Any() == false && - contentSettings.DisallowedUploadFiles.Any(x => x.InvariantEquals(extension)) == false); + contentSettings.AllowedUploadedFileExtensions.Any(x => x.InvariantEquals(extension)) || + (contentSettings.AllowedUploadedFileExtensions.Any() == false && + contentSettings.DisallowedUploadedFileExtensions.Any(x => x.InvariantEquals(extension)) == false); /// /// Gets the auto-fill configuration for a specified property alias. diff --git a/src/Umbraco.Core/Configuration/Models/ContentSettings.cs b/src/Umbraco.Core/Configuration/Models/ContentSettings.cs index f4f3040b7985..4014930a5c7d 100644 --- a/src/Umbraco.Core/Configuration/Models/ContentSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/ContentSettings.cs @@ -196,11 +196,13 @@ @keyframes umbraco-preview-badge--effect {{ /// Gets or sets a value for the collection of file extensions that are disallowed for upload. /// [DefaultValue(StaticDisallowedUploadFiles)] + [Obsolete("Please use DisAllowedUploadedFileExtensions instead, scheduled for removal in V13")] public IEnumerable DisallowedUploadFiles { get; set; } = StaticDisallowedUploadFiles.Split(','); /// /// Gets or sets a value for the collection of file extensions that are allowed for upload. /// + [Obsolete("Please use AllowedUploadedFileExtensions instead, scheduled for removal in V13")] public IEnumerable AllowedUploadFiles { get; set; } = Array.Empty(); /// @@ -249,4 +251,15 @@ @keyframes umbraco-preview-badge--effect {{ /// [DefaultValue(StaticAllowEditInvariantFromNonDefault)] public bool AllowEditInvariantFromNonDefault { get; set; } = StaticAllowEditInvariantFromNonDefault; + + /// + /// Gets or sets a value for the collection of file extensions that are allowed for upload. + /// + public string[] AllowedUploadedFileExtensions { get; set; } = Array.Empty(); + + /// + /// Gets or sets a value for the collection of file extensions that are disallowed for upload. + /// + [DefaultValue(StaticDisallowedUploadFiles)] + public string[] DisallowedUploadedFileExtensions { get; set; } = StaticDisallowedUploadFiles.Split(','); } diff --git a/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs b/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs index 3be3815afa47..28fc05907e0f 100644 --- a/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs +++ b/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs @@ -117,6 +117,32 @@ public static IUmbracoBuilder AddConfiguration(this IUmbracoBuilder builder) } }); + // TODO: Remove this in V13 + // This is to avoid a breaking change in ContentSettings, if the old AllowedFileUploads has a value, and the new + // AllowedFileUploadExtensions does not, copy the value over, if the new has a value, use that instead. + builder.Services.Configure(settings => + { + // We have to use Config.GetSection().Get, as the GetSection.GetValue simply cannot retrieve a string array + var allowedUploadedFileExtensionsValue = builder.Config.GetSection($"{Constants.Configuration.ConfigContent}:{nameof(ContentSettings.AllowedUploadedFileExtensions)}").Get(); + var allowedUploadFilesValue = builder.Config.GetSection($"{Constants.Configuration.ConfigContent}:{nameof(ContentSettings.AllowedUploadFiles)}").Get(); + + if (allowedUploadedFileExtensionsValue is null && allowedUploadFilesValue is not null) + { + settings.AllowedUploadedFileExtensions = allowedUploadFilesValue; + } + }); + + // TODO: Remove this in V13 + builder.Services.Configure(settings => + { + var disallowedUploadedFileExtensionsValue = builder.Config.GetSection($"{Constants.Configuration.ConfigContent}:{nameof(ContentSettings.DisallowedUploadedFileExtensions)}").Get(); + var disallowedUploadFilesValue = builder.Config.GetSection($"{Constants.Configuration.ConfigContent}:{nameof(ContentSettings.DisallowedUploadFiles)}").Get(); + + if (disallowedUploadedFileExtensionsValue is null && disallowedUploadFilesValue is not null) + { + settings.DisallowedUploadedFileExtensions = disallowedUploadFilesValue; + } + }); return builder; } } diff --git a/src/Umbraco.Web.BackOffice/Controllers/BackOfficeServerVariables.cs b/src/Umbraco.Web.BackOffice/Controllers/BackOfficeServerVariables.cs index c8a3c710ec37..768fe382f993 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/BackOfficeServerVariables.cs @@ -543,11 +543,11 @@ internal async Task> GetServerVariablesAsync() }, { "disallowedUploadFiles", - string.Join(",", _contentSettings.DisallowedUploadFiles) + string.Join(",", _contentSettings.DisallowedUploadedFileExtensions) }, { "allowedUploadFiles", - string.Join(",", _contentSettings.AllowedUploadFiles) + string.Join(",", _contentSettings.AllowedUploadedFileExtensions) }, { "maxFileSize", From 0042343e0b3bca3f1cad16c8eb3edbad6ff5a537 Mon Sep 17 00:00:00 2001 From: Mole Date: Thu, 17 Nov 2022 13:54:14 +0100 Subject: [PATCH 03/10] V11: Add compatibility suppressions (#13425) * Add suprressions * Revert "Add suprressions" This reverts commit 1c924ee967375870b6d86be9e9480ced0e22f8c7. * Update CompatibilitySuppressions.xml Co-authored-by: Ronald Barendse --- .../CompatibilitySuppressions.xml | 28 +++++++++++++++++++ .../CompatibilitySuppressions.xml | 28 +++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/src/Umbraco.Core/CompatibilitySuppressions.xml b/src/Umbraco.Core/CompatibilitySuppressions.xml index e34b117b9a2e..f580fa945884 100644 --- a/src/Umbraco.Core/CompatibilitySuppressions.xml +++ b/src/Umbraco.Core/CompatibilitySuppressions.xml @@ -1,5 +1,33 @@  + + CP0002 + M:Umbraco.Cms.Core.Models.Blocks.BlockGridItem.get_ForceLeft + lib/net7.0/Umbraco.Core.dll + lib/net7.0/Umbraco.Core.dll + true + + + CP0002 + M:Umbraco.Cms.Core.Models.Blocks.BlockGridItem.get_ForceRight + lib/net7.0/Umbraco.Core.dll + lib/net7.0/Umbraco.Core.dll + true + + + CP0002 + M:Umbraco.Cms.Core.Models.Blocks.BlockGridItem.set_ForceLeft(System.Boolean) + lib/net7.0/Umbraco.Core.dll + lib/net7.0/Umbraco.Core.dll + true + + + CP0002 + M:Umbraco.Cms.Core.Models.Blocks.BlockGridItem.set_ForceRight(System.Boolean) + lib/net7.0/Umbraco.Core.dll + lib/net7.0/Umbraco.Core.dll + true + CP0006 M:Umbraco.Cms.Core.Deploy.IDataTypeConfigurationConnector.FromArtifact(Umbraco.Cms.Core.Models.IDataType,System.String,Umbraco.Cms.Core.Deploy.IContextCache) diff --git a/src/Umbraco.Infrastructure/CompatibilitySuppressions.xml b/src/Umbraco.Infrastructure/CompatibilitySuppressions.xml index 2095a0c798dd..f48f36124414 100644 --- a/src/Umbraco.Infrastructure/CompatibilitySuppressions.xml +++ b/src/Umbraco.Infrastructure/CompatibilitySuppressions.xml @@ -1,5 +1,33 @@  + + CP0002 + M:Umbraco.Cms.Core.Models.Blocks.BlockGridLayoutItem.get_ForceLeft + lib/net7.0/Umbraco.Infrastructure.dll + lib/net7.0/Umbraco.Infrastructure.dll + true + + + CP0002 + M:Umbraco.Cms.Core.Models.Blocks.BlockGridLayoutItem.get_ForceRight + lib/net7.0/Umbraco.Infrastructure.dll + lib/net7.0/Umbraco.Infrastructure.dll + true + + + CP0002 + M:Umbraco.Cms.Core.Models.Blocks.BlockGridLayoutItem.set_ForceLeft(System.Boolean) + lib/net7.0/Umbraco.Infrastructure.dll + lib/net7.0/Umbraco.Infrastructure.dll + true + + + CP0002 + M:Umbraco.Cms.Core.Models.Blocks.BlockGridLayoutItem.set_ForceRight(System.Boolean) + lib/net7.0/Umbraco.Infrastructure.dll + lib/net7.0/Umbraco.Infrastructure.dll + true + CP0006 M:Umbraco.Cms.Core.Deploy.IGridCellValueConnector.GetValue(Umbraco.Cms.Core.Models.GridValue.GridControl,System.Collections.Generic.ICollection{Umbraco.Cms.Core.Deploy.ArtifactDependency},Umbraco.Cms.Core.Deploy.IContextCache) From 9ec7b1ce4975fff760d463d9c158a16420a95485 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Nov 2022 01:18:51 +0000 Subject: [PATCH 04/10] Bump socket.io-parser from 4.0.4 to 4.0.5 in /src/Umbraco.Web.UI.Client Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.0.4 to 4.0.5. - [Release notes](https://github.com/socketio/socket.io-parser/releases) - [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md) - [Commits](https://github.com/socketio/socket.io-parser/compare/4.0.4...4.0.5) --- updated-dependencies: - dependency-name: socket.io-parser dependency-type: indirect ... Signed-off-by: dependabot[bot] --- src/Umbraco.Web.UI.Client/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index 23ed392f8290..bf9fd3d5f0e3 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -15152,9 +15152,9 @@ "dev": true }, "node_modules/socket.io-parser": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.4.tgz", - "integrity": "sha512-t+b0SS+IxG7Rxzda2EVvyBZbvFPBCjJoyHuE0P//7OAsN23GItzDRdWa6ALxZI/8R5ygK7jAR6t028/z+7295g==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.5.tgz", + "integrity": "sha512-sNjbT9dX63nqUFIOv95tTVm6elyIU4RvB1m8dOeZt+IgWwcWklFDOdmGcfo3zSiRsnR/3pJkjY5lfoGqEe4Eig==", "dev": true, "dependencies": { "@types/component-emitter": "^1.2.10", @@ -29080,9 +29080,9 @@ "dev": true }, "socket.io-parser": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.4.tgz", - "integrity": "sha512-t+b0SS+IxG7Rxzda2EVvyBZbvFPBCjJoyHuE0P//7OAsN23GItzDRdWa6ALxZI/8R5ygK7jAR6t028/z+7295g==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.5.tgz", + "integrity": "sha512-sNjbT9dX63nqUFIOv95tTVm6elyIU4RvB1m8dOeZt+IgWwcWklFDOdmGcfo3zSiRsnR/3pJkjY5lfoGqEe4Eig==", "dev": true, "requires": { "@types/component-emitter": "^1.2.10", From 3b08f4a964d8ef03ca4184a40804aca2251acd1d Mon Sep 17 00:00:00 2001 From: Blake Watt Date: Thu, 17 Nov 2022 05:10:37 -0800 Subject: [PATCH 05/10] update block grid panel name (#13325) Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> --- src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml | 2 +- .../prevalue/blockgrid.blockconfiguration.overlay.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml b/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml index 1099795a739c..7e1aa9525ace 100644 --- a/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml +++ b/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml @@ -2914,7 +2914,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont Settings Areas Advanced - permissions + Permissions Install Sample Configuration Install diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.html index 27c1a2f0062e..4d398844ed9f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.html @@ -200,7 +200,7 @@
- Allowance + Permissions
From ba8d2e87d58408280077e2ceca628e69ded55707 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Oct 2022 14:43:54 +0000 Subject: [PATCH 06/10] Bump async from 2.6.3 to 2.6.4 in /src/Umbraco.Web.UI.Client Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4. - [Release notes](https://github.com/caolan/async/releases) - [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md) - [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4) --- updated-dependencies: - dependency-name: async dependency-type: indirect ... Signed-off-by: dependabot[bot] --- src/Umbraco.Web.UI.Client/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index bf9fd3d5f0e3..bc5d34d9150a 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -3333,9 +3333,9 @@ } }, "node_modules/async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dev": true, "dependencies": { "lodash": "^4.17.14" @@ -19845,9 +19845,9 @@ "dev": true }, "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dev": true, "requires": { "lodash": "^4.17.14" From 8048a1194498695ebf618c0116e25c20c5b6c8c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Oct 2022 13:38:14 +0000 Subject: [PATCH 07/10] Bump eventsource from 1.1.0 to 1.1.2 in /src/Umbraco.Web.UI.Client Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.2. - [Release notes](https://github.com/EventSource/eventsource/releases) - [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md) - [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.2) --- updated-dependencies: - dependency-name: eventsource dependency-type: indirect ... Signed-off-by: dependabot[bot] --- src/Umbraco.Web.UI.Client/package-lock.json | 68 +++------------------ 1 file changed, 10 insertions(+), 58 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index bc5d34d9150a..678b353720db 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -6660,12 +6660,9 @@ "dev": true }, "node_modules/eventsource": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.1.0.tgz", - "integrity": "sha512-VSJjT5oCNrFvCS6igjzPAt5hBzQ2qPBFIbJ03zLI9SE0mxwZpMw6BfJrbFHm1a141AavMEB8JHmBhWAd66PfCg==", - "dependencies": { - "original": "^1.0.0" - }, + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.1.2.tgz", + "integrity": "sha512-xAH3zWhgO2/3KIniEKYPr8plNSzlGINOUqYj0m0u7AB81iRw8b/3E73W6AuU+6klLbaSFmZnaETQ2lXPfAydrA==", "engines": { "node": ">=0.12.0" } @@ -12746,14 +12743,6 @@ "readable-stream": "^2.0.1" } }, - "node_modules/original": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", - "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", - "dependencies": { - "url-parse": "^1.4.3" - } - }, "node_modules/os-filter-obj": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-2.0.0.tgz", @@ -14015,11 +14004,6 @@ "node": ">=0.10.0" } }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -14454,7 +14438,8 @@ "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true }, "node_modules/resolve": { "version": "1.20.0", @@ -16619,15 +16604,6 @@ "deprecated": "Please see https://github.com/lydell/urix#deprecated", "dev": true }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, "node_modules/url-parse-lax": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", @@ -22556,12 +22532,9 @@ "dev": true }, "eventsource": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.1.0.tgz", - "integrity": "sha512-VSJjT5oCNrFvCS6igjzPAt5hBzQ2qPBFIbJ03zLI9SE0mxwZpMw6BfJrbFHm1a141AavMEB8JHmBhWAd66PfCg==", - "requires": { - "original": "^1.0.0" - } + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.1.2.tgz", + "integrity": "sha512-xAH3zWhgO2/3KIniEKYPr8plNSzlGINOUqYj0m0u7AB81iRw8b/3E73W6AuU+6klLbaSFmZnaETQ2lXPfAydrA==" }, "exec-buffer": { "version": "3.2.0", @@ -27292,14 +27265,6 @@ "readable-stream": "^2.0.1" } }, - "original": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", - "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", - "requires": { - "url-parse": "^1.4.3" - } - }, "os-filter-obj": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-2.0.0.tgz", @@ -28176,11 +28141,6 @@ "strict-uri-encode": "^1.0.0" } }, - "querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" - }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -28519,7 +28479,8 @@ "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true }, "resolve": { "version": "1.20.0", @@ -30251,15 +30212,6 @@ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, - "url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "requires": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, "url-parse-lax": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", From a4098ce0b1f537d44bb38c363f487afe0796039b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Oct 2022 14:43:36 +0000 Subject: [PATCH 08/10] Bump minimist from 1.2.5 to 1.2.7 in /src/Umbraco.Web.UI.Client Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.7. - [Release notes](https://github.com/minimistjs/minimist/releases) - [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md) - [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.7) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] --- src/Umbraco.Web.UI.Client/package-lock.json | 40 ++++++--------------- 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index 678b353720db..d7f97debde24 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -11864,10 +11864,13 @@ } }, "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/minimize": { "version": "2.2.0", @@ -12382,7 +12385,6 @@ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", "dev": true, - "optional": true, "dependencies": { "boolbase": "^1.0.0" }, @@ -13764,18 +13766,6 @@ "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", "dev": true }, - "node_modules/postcss-svgo/node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, "node_modules/postcss-svgo/node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -26579,9 +26569,9 @@ } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", "dev": true }, "minimize": { @@ -26992,7 +26982,6 @@ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", "dev": true, - "optional": true, "requires": { "boolbase": "^1.0.0" } @@ -27955,15 +27944,6 @@ "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", "dev": true }, - "nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "requires": { - "boolbase": "^1.0.0" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", From 267656d7932ed5686c8ed20d3f4b43d84bca7061 Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Thu, 17 Nov 2022 14:46:42 +0100 Subject: [PATCH 09/10] Management API: SearchController improvements (#13420) * remove typo of double PagedViewModel in response * add providerProperties with custom formatter * use a more descriptive variable name * use a more descriptive variable name for property types * generate new schema Co-authored-by: Zeegaan --- .../Search/SearcherSearchSearchController.cs | 2 +- .../Factories/IndexViewModelFactory.cs | 16 ++++++++ src/Umbraco.Cms.ManagementApi/OpenApi.json | 38 ++++++++----------- .../ViewModels/Search/IndexViewModel.cs | 11 +++++- 4 files changed, 42 insertions(+), 25 deletions(-) diff --git a/src/Umbraco.Cms.ManagementApi/Controllers/Search/SearcherSearchSearchController.cs b/src/Umbraco.Cms.ManagementApi/Controllers/Search/SearcherSearchSearchController.cs index 36463ac3d8ed..3b9f7f6f8510 100644 --- a/src/Umbraco.Cms.ManagementApi/Controllers/Search/SearcherSearchSearchController.cs +++ b/src/Umbraco.Cms.ManagementApi/Controllers/Search/SearcherSearchSearchController.cs @@ -19,7 +19,7 @@ public class SearcherSearchSearchController : SearchControllerBase [HttpGet("searcher/{searcherName}/search")] [MapToApiVersion("1.0")] - [ProducesResponseType(typeof(PagedViewModel>), StatusCodes.Status200OK)] + [ProducesResponseType(typeof(PagedViewModel), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] public async Task>> GetSearchResults(string searcherName, string? query, int skip, int take) { diff --git a/src/Umbraco.Cms.ManagementApi/Factories/IndexViewModelFactory.cs b/src/Umbraco.Cms.ManagementApi/Factories/IndexViewModelFactory.cs index 902d05a9cd8f..a23e22156e1b 100644 --- a/src/Umbraco.Cms.ManagementApi/Factories/IndexViewModelFactory.cs +++ b/src/Umbraco.Cms.ManagementApi/Factories/IndexViewModelFactory.cs @@ -37,6 +37,21 @@ public IndexViewModel Create(IIndex index) Attempt isHealthy = indexDiag.IsHealthy(); + var properties = new Dictionary(); + + foreach (var property in indexDiag.Metadata) + { + if (property.Value is null) + { + properties[property.Key] = null; + } + else + { + var propertyType = property.Value.GetType(); + properties[property.Key] = propertyType.IsClass && !propertyType.IsArray ? property.Value?.ToString() : property.Value; + } + } + var indexerModel = new IndexViewModel { Name = index.Name, @@ -45,6 +60,7 @@ public IndexViewModel Create(IIndex index) SearcherName = index.Searcher.Name, DocumentCount = indexDiag.GetDocumentCount(), FieldCount = indexDiag.GetFieldNames().Count(), + ProviderProperties = properties, }; return indexerModel; diff --git a/src/Umbraco.Cms.ManagementApi/OpenApi.json b/src/Umbraco.Cms.ManagementApi/OpenApi.json index 1e5a80b5a173..d2c27c5746bd 100644 --- a/src/Umbraco.Cms.ManagementApi/OpenApi.json +++ b/src/Umbraco.Cms.ManagementApi/OpenApi.json @@ -2827,7 +2827,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedPaged" + "$ref": "#/components/schemas/PagedSearchResult" } } } @@ -4854,11 +4854,18 @@ "additionalProperties": false }, "Index": { + "required": [ + "canRebuild", + "documentCount", + "fieldCount", + "isHealthy", + "name" + ], "type": "object", "properties": { "name": { - "type": "string", - "nullable": true + "minLength": 1, + "type": "string" }, "healthStatus": { "type": "string", @@ -4882,6 +4889,11 @@ "fieldCount": { "type": "integer", "format": "int32" + }, + "providerProperties": { + "type": "object", + "additionalProperties": {}, + "nullable": true } }, "additionalProperties": false @@ -5754,26 +5766,6 @@ }, "additionalProperties": false }, - "PagedPaged": { - "required": [ - "items", - "total" - ], - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PagedSearchResult" - } - } - }, - "additionalProperties": false - }, "PagedRecycleBinItem": { "required": [ "items", diff --git a/src/Umbraco.Cms.ManagementApi/ViewModels/Search/IndexViewModel.cs b/src/Umbraco.Cms.ManagementApi/ViewModels/Search/IndexViewModel.cs index c28b6c5e025b..9a63bc88862c 100644 --- a/src/Umbraco.Cms.ManagementApi/ViewModels/Search/IndexViewModel.cs +++ b/src/Umbraco.Cms.ManagementApi/ViewModels/Search/IndexViewModel.cs @@ -1,18 +1,27 @@ -namespace Umbraco.Cms.ManagementApi.ViewModels.Search; +using System.ComponentModel.DataAnnotations; + +namespace Umbraco.Cms.ManagementApi.ViewModels.Search; public class IndexViewModel { + [Required] public string Name { get; init; } = null!; public string? HealthStatus { get; init; } + [Required] public bool IsHealthy => HealthStatus == "Healthy"; + [Required] public bool CanRebuild { get; init; } public string SearcherName { get; init; } = null!; + [Required] public long DocumentCount { get; init; } + [Required] public int FieldCount { get; init; } + + public IReadOnlyDictionary? ProviderProperties { get; init; } } From 7281c6ba26639a076542bd41acf77018c4057d63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Nov 2022 14:07:42 +0000 Subject: [PATCH 10/10] Bump minimatch from 3.0.4 to 3.1.2 in /src/Umbraco.Web.UI.Client Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. - [Release notes](https://github.com/isaacs/minimatch/releases) - [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect ... Signed-off-by: dependabot[bot] --- src/Umbraco.Web.UI.Client/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index d7f97debde24..aa0d0c856eac 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -11852,9 +11852,9 @@ } }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -26560,9 +26560,9 @@ "optional": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7"