From 581ca87fc37a68dfd278273c0a8e67830b784944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Mon, 22 Aug 2022 15:26:22 +0200 Subject: [PATCH] Adding shortcuts to go to the content types list and content type editor of a given content type --- .../OrchardCoreDashboardUITestContextExtensions.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Lombiq.Tests.UI/Extensions/OrchardCoreDashboardUITestContextExtensions.cs b/Lombiq.Tests.UI/Extensions/OrchardCoreDashboardUITestContextExtensions.cs index 3604f20d5..321b758ef 100644 --- a/Lombiq.Tests.UI/Extensions/OrchardCoreDashboardUITestContextExtensions.cs +++ b/Lombiq.Tests.UI/Extensions/OrchardCoreDashboardUITestContextExtensions.cs @@ -77,6 +77,19 @@ public static async Task GoToContentItemListAndCreateNewAsync(this UITestContext public static Task CreateNewContentItemAsync(this UITestContext context, string contentType, bool onlyIfNotAlreadyThere = true) => context.GoToRelativeUrlAsync($"/Admin/Contents/ContentTypes/{contentType}/Create", onlyIfNotAlreadyThere); + /// + /// Navigates to the Content Types page of the Orchard dashboard. + /// + public static Task GoToContentTypesListAsync(this UITestContext context) => + context.GoToRelativeUrlAsync("/Admin/ContentTypes/List"); + + /// + /// Navigates to the editor page of a content type on the Orchard dashboard. + /// + /// The technical name of the content type to open the editor of. + public static Task GoToContentTypeEditorAsync(this UITestContext context, string contentType) => + context.GoToRelativeUrlAsync($"/Admin/ContentTypes/Edit/{contentType}"); + public static async Task ClickNewContentItemAsync(this UITestContext context, string contentItemName, bool dropdown = true) { if (dropdown)