Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSOE-79: Using new async functions #85

Merged
merged 1 commit into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,30 +45,30 @@ public static async Task TestDataTableTagHelperAsync(this UITestContext context)
await context.GoToDataTableTagHelperAsync();
context.VerifyDataTablePager(pageCount: 6);
VerifyText(context, _oldest);
context.ClickReliablyOn(By.CssSelector("th[data-name='Name']"));
await context.ClickReliablyOnAsync(By.CssSelector("th[data-name='Name']"));
VerifyText(context, _alphabeticallyFirst);
}

public static async Task TestDataTableProviderWithShapeAsync(this UITestContext context)
{
await context.GoToDataTableProviderWithShapeAsync();
context.TestDataTableProvider();
await context.TestDataTableProviderAsync();
}

public static async Task TestDataTableIndexBasedProviderAsync(this UITestContext context)
{
await context.GoToAdminDataTableAsync<SampleIndexBasedDataTableDataProvider>();
context.TestDataTableProvider();
await context.TestDataTableProviderAsync();
}

public static void TestDataTableProvider(this UITestContext context)
public static async Task TestDataTableProviderAsync(this UITestContext context)
{
context.VerifyDataTablePager(pageCount: 6);
VerifyText(context, AdjustForProvider(_alphabeticallyFirst));

var ageColumnHeader = By.CssSelector("th[data-name='Age']");
context.ClickAndWaitForTableChange(ageColumnHeader);
context.ClickAndWaitForTableChange(ageColumnHeader);
await context.ClickAndWaitForTableChangeAsync(ageColumnHeader);
await context.ClickAndWaitForTableChangeAsync(ageColumnHeader);

VerifyText(context, AdjustForProvider(_oldest));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ static void VerifyNavigation(UITestContext context, string className, bool exist
VerifyNavigation(context, "next", currentPage < pageCount);
}

public static void ClickAndWaitForTableChange(this UITestContext context, By selector)
public static async Task ClickAndWaitForTableChangeAsync(this UITestContext context, By selector)
{
var state = new TableDrawState(context);
context.ClickReliablyOn(selector);
await context.ClickReliablyOnAsync(selector);
state.Wait();
}
}
Expand Down