Skip to content

Commit

Permalink
Merge pull request #195 from Lombiq/issue/OSOE-175
Browse files Browse the repository at this point in the history
OSOE-175: Adding shortcuts to go to the content types list and content type editor of a given content type
  • Loading branch information
sarahelsaig authored Aug 22, 2022
2 parents 09d2cd2 + 581ca87 commit e3f0424
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 e3f0424

Please sign in to comment.