-
Notifications
You must be signed in to change notification settings - Fork 6
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-771: Adding more navigation methods #342
Conversation
WalkthroughWalkthroughThe recent update introduces a new method for more efficient navigation testing by combining two existing functionalities, streamlining the process of clicking an element and waiting for a URL change. It also includes a method renaming that clarifies its purpose and adds a new method dedicated to waiting for a URL change post-click, enhancing the intuitiveness and efficiency of automated UI tests. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
…oo, not just wait for the URL change, thus also renaming to ClickReliablyUntilUrlChangeAsync
Lombiq.Tests.UI/Extensions/NavigationUITestContextExtensions.cs
Outdated
Show resolved
Hide resolved
context.Scope.AtataContext.Log.Info("Log section {0} started.", section.Message); | ||
var result = await functionAsync(); | ||
context.Scope.AtataContext.Log.Info("Log section {0} ended.", section.Message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of logging statements to indicate the start and end of a log section enhances the visibility of operations within tests. However, consider adding error logging within the catch block for StaleElementReferenceException
to provide insights into failures that trigger retries.
catch (StaleElementReferenceException) when (notLast)
{
+ context.Scope.AtataContext.Log.Warn("Encountered a StaleElementReferenceException, retrying...");
await Task.Delay(TimeSpan.FromSeconds(1));
}
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
context.Scope.AtataContext.Log.Info("Log section {0} started.", section.Message); | |
var result = await functionAsync(); | |
context.Scope.AtataContext.Log.Info("Log section {0} ended.", section.Message); | |
context.Scope.AtataContext.Log.Info("Log section {0} started.", section.Message); | |
var result = await functionAsync(); | |
context.Scope.AtataContext.Log.Info("Log section {0} ended.", section.Message); | |
catch (StaleElementReferenceException) when (notLast) | |
{ | |
context.Scope.AtataContext.Log.Warn("Encountered a StaleElementReferenceException, retrying..."); | |
await Task.Delay(TimeSpan.FromSeconds(1)); | |
} |
…sample test so it doesn't take too much time
OSOE-771