Skip to content

Commit

Permalink
Adding shortcuts to go to the content types list and content type edi…
Browse files Browse the repository at this point in the history
…tor of a given content type
  • Loading branch information
Piedone committed Aug 22, 2022
1 parent 09d2cd2 commit 581ca87
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/// <summary>
/// Navigates to the Content Types page of the Orchard dashboard.
/// </summary>
public static Task GoToContentTypesListAsync(this UITestContext context) =>
context.GoToRelativeUrlAsync("/Admin/ContentTypes/List");

/// <summary>
/// Navigates to the editor page of a content type on the Orchard dashboard.
/// </summary>
/// <param name="contentType">The technical name of the content type to open the editor of.</param>
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)
Expand Down

0 comments on commit 581ca87

Please sign in to comment.