Merge branch 'v13/dev' into v14/dev
# Conflicts: # Directory.Build.props # build/azure-pipelines.yml # src/Umbraco.Cms.Api.Common/DependencyInjection/UmbracoBuilderAuthExtensions.cs # src/Umbraco.Cms.Api.Common/OpenApi/SwaggerRouteTemplatePipelineFilter.cs # src/Umbraco.Cms.Api.Common/Security/Paths.cs # src/Umbraco.Cms.Api.Delivery/Controllers/Security/MemberController.cs # src/Umbraco.Cms.Api.Delivery/DependencyInjection/UmbracoBuilderExtensions.cs # src/Umbraco.Cms.Api.Delivery/Handlers/InitializeMemberApplicationNotificationHandler.cs # src/Umbraco.Cms.Api.Delivery/Handlers/RevokeMemberAuthenticationTokensNotificationHandler.cs # src/Umbraco.Cms.Api.Delivery/Security/MemberApplicationManager.cs # src/Umbraco.Cms.Api.Delivery/Services/RequestMemberAccessService.cs # src/Umbraco.Core/Constants-OAuthClaims.cs # src/Umbraco.Core/Constants-OAuthClientIds.cs # src/Umbraco.Core/DeliveryApi/IApiContentQueryProvider.cs # src/Umbraco.Core/DeliveryApi/IApiContentQueryService.cs # src/Umbraco.Core/DeliveryApi/IRequestMemberAccessService.cs # src/Umbraco.Core/DeliveryApi/NoopRequestMemberAccessService.cs # src/Umbraco.Core/Models/DeliveryApi/ProtectedAccess.cs # src/Umbraco.Core/Services/ITagService.cs # src/Umbraco.Core/Services/UserService.cs # src/Umbraco.Infrastructure/Security/IMemberApplicationManager.cs # src/Umbraco.Infrastructure/Security/OpenIdDictApplicationManagerBase.cs # src/Umbraco.Web.BackOffice/Controllers/MediaController.cs # tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/HelpPanel/systemInformation.spec.ts # version.json
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import { test } from '@umbraco/playwright-testhelpers';
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
test.describe("Help panel links", () => {
|
||||
const enCulture = "en-US";
|
||||
|
||||
test.beforeEach(async ({ umbracoApi }, testInfo) => {
|
||||
await umbracoApi.report.report(testInfo);
|
||||
await umbracoApi.login();
|
||||
await umbracoApi.users.setCurrentLanguage(enCulture);
|
||||
});
|
||||
|
||||
test.afterEach(async ({ umbracoApi }) => {
|
||||
await umbracoApi.users.setCurrentLanguage(enCulture);
|
||||
});
|
||||
|
||||
test("Check the youtube link works as expected", async ({ page, umbracoUi }) => {
|
||||
// Action
|
||||
await umbracoUi.clickElement(umbracoUi.getGlobalHelp());
|
||||
let watchVideoLink = await page.locator('[key="help_umbracoLearningBase"]');
|
||||
await watchVideoLink.click();
|
||||
|
||||
// Wait for a popup event
|
||||
const youtubeConsent = page.waitForEvent("popup");
|
||||
const youtubePopup = await youtubeConsent;
|
||||
|
||||
if (youtubePopup) {
|
||||
// If the YouTube consent popup is displayed, interact with it
|
||||
const rejectAllButton = await youtubePopup.locator('[aria-label="Reject all"]').first();
|
||||
await rejectAllButton.waitFor({ state: "visible" });
|
||||
await rejectAllButton.click();
|
||||
|
||||
// Assert the URL of the popup
|
||||
await expect(youtubePopup).toHaveURL(/.*UmbracoLearningBase/);
|
||||
await youtubePopup.close();
|
||||
|
||||
} else {
|
||||
await expect(page).toHaveURL(/.*UmbracoLearningBase/);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -12,6 +12,7 @@ using Umbraco.Cms.Core.PropertyEditors;
|
||||
using Umbraco.Cms.Core.Strings;
|
||||
using Umbraco.Cms.Infrastructure.PublishedCache;
|
||||
using Umbraco.Cms.Infrastructure.PublishedCache.DataSource;
|
||||
using Umbraco.Cms.Infrastructure.PublishedCache.Persistence;
|
||||
using Umbraco.Cms.Infrastructure.Serialization;
|
||||
using Umbraco.Cms.Tests.Common.Builders;
|
||||
using Umbraco.Cms.Tests.Common.Builders.Extensions;
|
||||
|
||||
@@ -16,7 +16,6 @@ public class UmbracoWebApplicationFactory<TStartup> : WebApplicationFactory<TSta
|
||||
/// Constructor to create a new WebApplicationFactory
|
||||
/// </summary>
|
||||
/// <param name="createHostBuilder">Method to create the IHostBuilder</param>
|
||||
/// <param name="beforeStart">Method to perform an action before IHost starts</param>
|
||||
public UmbracoWebApplicationFactory(Func<IHostBuilder> createHostBuilder) => _createHostBuilder = createHostBuilder;
|
||||
|
||||
protected override IHostBuilder CreateHostBuilder() => _createHostBuilder();
|
||||
|
||||
@@ -212,7 +212,7 @@ public class PublishedSnapshotServiceTestBase
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the <see cref="IPublishedSnapshotService'" /> with a source of data
|
||||
/// Initializes the <see cref="IPublishedSnapshotService" /> with a source of data.
|
||||
/// </summary>
|
||||
protected void InitializedCache(
|
||||
IEnumerable<ContentNodeKit> contentNodeKits,
|
||||
|
||||
@@ -205,6 +205,28 @@ public class UdiTests
|
||||
Assert.Throws<ArgumentException>(() => new UdiRange(guidUdi, "x"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TryParseTest()
|
||||
{
|
||||
// try parse to "Udi"
|
||||
var stringUdiString = "umb://document/b9a56165-6c4e-4e79-8277-620430174ad3";
|
||||
Assert.IsTrue(UdiParser.TryParse(stringUdiString, out Udi udi1));
|
||||
Assert.AreEqual("b9a56165-6c4e-4e79-8277-620430174ad3", udi1 is GuidUdi guidUdi1 ? guidUdi1.Guid.ToString() : string.Empty);
|
||||
|
||||
// try parse to "Udi"
|
||||
Assert.IsFalse(UdiParser.TryParse("nope", out Udi udi2));
|
||||
Assert.IsNull(udi2);
|
||||
|
||||
// try parse to "GuidUdi?"
|
||||
Assert.IsTrue(UdiParser.TryParse(stringUdiString, out GuidUdi? guidUdi3));
|
||||
Assert.AreEqual("b9a56165-6c4e-4e79-8277-620430174ad3", guidUdi3.Guid.ToString());
|
||||
|
||||
// try parse to "GuidUdi?"
|
||||
Assert.IsFalse(UdiParser.TryParse("nope", out GuidUdi? guidUdi4));
|
||||
Assert.IsNull(guidUdi4);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SerializationTest()
|
||||
{
|
||||
|
||||
@@ -118,6 +118,9 @@ public class VariationTests
|
||||
/// <summary>
|
||||
/// Asserts the result of <see cref="ContentVariationExtensions.ValidateVariation" />
|
||||
/// </summary>
|
||||
/// <param name="variation">The variation to validate</param>
|
||||
/// <param name="culture">The culture to validate</param>
|
||||
/// <param name="segment">The segment to validate</param>
|
||||
/// <param name="exactAndWildcards">Validate using Exact + Wildcards flags</param>
|
||||
/// <param name="nonExactAndNoWildcards">Validate using non Exact + no Wildcard flags</param>
|
||||
/// <param name="exactAndNoWildcards">Validate using Exact + no Wildcard flags</param>
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Scoping
|
||||
/// <summary>
|
||||
/// Creates a ScopeProvider with mocked internals.
|
||||
/// </summary>
|
||||
/// <param name="syntaxProviderMock">The mock of the ISqlSyntaxProvider2, used to count method calls.</param>
|
||||
/// <param name="lockingMechanism"></param>
|
||||
/// <returns></returns>
|
||||
private ScopeProvider GetScopeProvider(out Mock<IDistributedLockingMechanism> lockingMechanism)
|
||||
{
|
||||
|
||||
@@ -515,6 +515,7 @@ public class MemberControllerUnitTests
|
||||
/// <param name="backOfficeSecurityAccessor">Back office security accessor</param>
|
||||
/// <param name="passwordChanger">Password changer class</param>
|
||||
/// <param name="globalSettings">The global settings</param>
|
||||
/// <param name="twoFactorLoginService">The two factor login service</param>
|
||||
/// <returns>A member controller for the tests</returns>
|
||||
private MemberController CreateSut(
|
||||
IMemberService memberService,
|
||||
|
||||
@@ -70,7 +70,8 @@ public class MemberSignInManagerTests
|
||||
Mock.Of<IAuthenticationSchemeProvider>(),
|
||||
Mock.Of<IUserConfirmation<MemberIdentityUser>>(),
|
||||
Mock.Of<IMemberExternalLoginProviders>(),
|
||||
Mock.Of<IEventAggregator>());
|
||||
Mock.Of<IEventAggregator>(),
|
||||
Mock.Of<IOptions<SecuritySettings>>(x => x.Value == new SecuritySettings()));
|
||||
}
|
||||
|
||||
private static Mock<MemberManager> MockMemberManager()
|
||||
|
||||
Reference in New Issue
Block a user