V11: merge dev to contrib (#13438)

* 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 <nge@umbraco.dk>

* 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 <nge@umbraco.dk>

* V11: Add  compatibility suppressions (#13425)

* Add suprressions

* Revert "Add suprressions"

This reverts commit 1c924ee967375870b6d86be9e9480ced0e22f8c7.

* Update CompatibilitySuppressions.xml

Co-authored-by: Ronald Barendse <ronald@barend.se>

* 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] <support@github.com>

* update block grid panel name (#13325)

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* 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] <support@github.com>

* 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] <support@github.com>

* 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] <support@github.com>

* 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 <nge@umbraco.dk>

* 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] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Blake Watt <bkclerke@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
This commit is contained in:
Nikolaj Geisle
2022-11-18 09:00:43 +01:00
committed by GitHub
parent 98da07cfb4
commit fb48ecb57f
48 changed files with 228 additions and 83 deletions

View File

@@ -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)

View File

@@ -19,7 +19,7 @@ public class SearcherSearchSearchController : SearchControllerBase
[HttpGet("searcher/{searcherName}/search")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<PagedViewModel<SearchResultViewModel>>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(PagedViewModel<SearchResultViewModel>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
public async Task<ActionResult<PagedViewModel<SearchResultViewModel>>> GetSearchResults(string searcherName, string? query, int skip, int take)
{

View File

@@ -37,6 +37,21 @@ public class IndexViewModelFactory : IIndexViewModelFactory
Attempt<string?> isHealthy = indexDiag.IsHealthy();
var properties = new Dictionary<string, object?>();
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 class IndexViewModelFactory : IIndexViewModelFactory
SearcherName = index.Searcher.Name,
DocumentCount = indexDiag.GetDocumentCount(),
FieldCount = indexDiag.GetFieldNames().Count(),
ProviderProperties = properties,
};
return indexerModel;

View File

@@ -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",

View File

@@ -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<string, object?>? ProviderProperties { get; init; }
}

View File

@@ -1,5 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Umbraco.Cms.Core.Models.Blocks.BlockGridItem.get_ForceLeft</Target>
<Left>lib/net7.0/Umbraco.Core.dll</Left>
<Right>lib/net7.0/Umbraco.Core.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Umbraco.Cms.Core.Models.Blocks.BlockGridItem.get_ForceRight</Target>
<Left>lib/net7.0/Umbraco.Core.dll</Left>
<Right>lib/net7.0/Umbraco.Core.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Umbraco.Cms.Core.Models.Blocks.BlockGridItem.set_ForceLeft(System.Boolean)</Target>
<Left>lib/net7.0/Umbraco.Core.dll</Left>
<Right>lib/net7.0/Umbraco.Core.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Umbraco.Cms.Core.Models.Blocks.BlockGridItem.set_ForceRight(System.Boolean)</Target>
<Left>lib/net7.0/Umbraco.Core.dll</Left>
<Right>lib/net7.0/Umbraco.Core.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0006</DiagnosticId>
<Target>M:Umbraco.Cms.Core.Deploy.IDataTypeConfigurationConnector.FromArtifact(Umbraco.Cms.Core.Models.IDataType,System.String,Umbraco.Cms.Core.Deploy.IContextCache)</Target>

View File

@@ -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.
/// </summary>
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);
/// <summary>
/// Gets the auto-fill configuration for a specified property alias.

View File

@@ -196,11 +196,13 @@ public class ContentSettings
/// Gets or sets a value for the collection of file extensions that are disallowed for upload.
/// </summary>
[DefaultValue(StaticDisallowedUploadFiles)]
[Obsolete("Please use DisAllowedUploadedFileExtensions instead, scheduled for removal in V13")]
public IEnumerable<string> DisallowedUploadFiles { get; set; } = StaticDisallowedUploadFiles.Split(',');
/// <summary>
/// Gets or sets a value for the collection of file extensions that are allowed for upload.
/// </summary>
[Obsolete("Please use AllowedUploadedFileExtensions instead, scheduled for removal in V13")]
public IEnumerable<string> AllowedUploadFiles { get; set; } = Array.Empty<string>();
/// <summary>
@@ -249,4 +251,15 @@ public class ContentSettings
/// </summary>
[DefaultValue(StaticAllowEditInvariantFromNonDefault)]
public bool AllowEditInvariantFromNonDefault { get; set; } = StaticAllowEditInvariantFromNonDefault;
/// <summary>
/// Gets or sets a value for the collection of file extensions that are allowed for upload.
/// </summary>
public string[] AllowedUploadedFileExtensions { get; set; } = Array.Empty<string>();
/// <summary>
/// Gets or sets a value for the collection of file extensions that are disallowed for upload.
/// </summary>
[DefaultValue(StaticDisallowedUploadFiles)]
public string[] DisallowedUploadedFileExtensions { get; set; } = StaticDisallowedUploadFiles.Split(',');
}

View File

@@ -117,6 +117,32 @@ public static partial class UmbracoBuilderExtensions
}
});
// 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<ContentSettings>(settings =>
{
// We have to use Config.GetSection().Get<string[]>, as the GetSection.GetValue<string[]> simply cannot retrieve a string array
var allowedUploadedFileExtensionsValue = builder.Config.GetSection($"{Constants.Configuration.ConfigContent}:{nameof(ContentSettings.AllowedUploadedFileExtensions)}").Get<string[]>();
var allowedUploadFilesValue = builder.Config.GetSection($"{Constants.Configuration.ConfigContent}:{nameof(ContentSettings.AllowedUploadFiles)}").Get<string[]>();
if (allowedUploadedFileExtensionsValue is null && allowedUploadFilesValue is not null)
{
settings.AllowedUploadedFileExtensions = allowedUploadFilesValue;
}
});
// TODO: Remove this in V13
builder.Services.Configure<ContentSettings>(settings =>
{
var disallowedUploadedFileExtensionsValue = builder.Config.GetSection($"{Constants.Configuration.ConfigContent}:{nameof(ContentSettings.DisallowedUploadedFileExtensions)}").Get<string[]>();
var disallowedUploadFilesValue = builder.Config.GetSection($"{Constants.Configuration.ConfigContent}:{nameof(ContentSettings.DisallowedUploadFiles)}").Get<string[]>();
if (disallowedUploadedFileExtensionsValue is null && disallowedUploadFilesValue is not null)
{
settings.DisallowedUploadedFileExtensions = disallowedUploadFilesValue;
}
});
return builder;
}
}

View File

@@ -1,5 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Umbraco.Cms.Core.Models.Blocks.BlockGridLayoutItem.get_ForceLeft</Target>
<Left>lib/net7.0/Umbraco.Infrastructure.dll</Left>
<Right>lib/net7.0/Umbraco.Infrastructure.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Umbraco.Cms.Core.Models.Blocks.BlockGridLayoutItem.get_ForceRight</Target>
<Left>lib/net7.0/Umbraco.Infrastructure.dll</Left>
<Right>lib/net7.0/Umbraco.Infrastructure.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Umbraco.Cms.Core.Models.Blocks.BlockGridLayoutItem.set_ForceLeft(System.Boolean)</Target>
<Left>lib/net7.0/Umbraco.Infrastructure.dll</Left>
<Right>lib/net7.0/Umbraco.Infrastructure.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Umbraco.Cms.Core.Models.Blocks.BlockGridLayoutItem.set_ForceRight(System.Boolean)</Target>
<Left>lib/net7.0/Umbraco.Infrastructure.dll</Left>
<Right>lib/net7.0/Umbraco.Infrastructure.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0006</DiagnosticId>
<Target>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)</Target>

View File

@@ -543,11 +543,11 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
},
{
"disallowedUploadFiles",
string.Join(",", _contentSettings.DisallowedUploadFiles)
string.Join(",", _contentSettings.DisallowedUploadedFileExtensions)
},
{
"allowedUploadFiles",
string.Join(",", _contentSettings.AllowedUploadFiles)
string.Join(",", _contentSettings.AllowedUploadedFileExtensions)
},
{
"maxFileSize",

View File

@@ -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",

View File

@@ -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",

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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);

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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);
});

View File

@@ -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();
});

View File

@@ -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}) => {

View File

@@ -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();

View File

@@ -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()

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -4,7 +4,8 @@ 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();
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -7,7 +7,8 @@ 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();
});

View File

@@ -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);
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -23,7 +23,8 @@ test.describe('Users', () => {
"message": ""
};
test.beforeEach(async ({ umbracoApi, page }) => {
test.beforeEach(async ({ page, umbracoApi }, testInfo) => {
await umbracoApi.report.report(testInfo);
await umbracoApi.login();
});