Update Lombiq packages to v13 (major) #64
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
12.1.1-alpha.15.osoe-1064
->13.0.0
12.1.1-alpha.15.osoe-1064
->13.0.0
12.1.1-alpha.15.osoe-1064
->13.0.0
@Lombiq/dotnest-sites-renovate-notification-recipients
Release Notes
Lombiq/UI-Testing-Toolbox (Lombiq.Tests.UI)
v13.0.0
Highlights
This is quite a large and impactful release. We've added a lot of improvements to make your tests rock-solid, but there are also a couple of breaking changes. See the details below, but here's a summary:
Breaking changes in browser log management
The browser log, i.e. what you also see in the developer console, is useful to pinpoint unhandled JavaScript exceptions, network errors, and other client-side issues. This is what in Selenium can be accessed via
IWebDriver.Manage().Logs.GetLog(LogType.Browser)
. In the UI Testing Toolbox it was accessible via various other ways, and was also automatically asserted after every page load.In this release, how you can access the browser log, and what objects represent the log, changed. This was necessary because the previous version actually only supported Chrome and Edge, it just silently failed under other browsers (notably Firefox). With a new Selenium version, it now fails with an exception (that's why we actually noticed it).
To overcome this, all browsers now use the new Selenium BiDirectional API to access the logs.
What changed
UITestContext.HistoricBrowserLog
is now calledCumulativeBrowserLog
to better reflect that it stores all browser log entries since the start of the test. Instead of containingOpenQA.Selenium.LogEntry
objects, it containsOpenQA.Selenium.BiDi.Modules.Log.Entry
ones. These have a slightly different interface, but work much the same: Most possibly, you'll only need to change references toLogEntry.Message
toEntry.Text
, andLogEntry.Level
toEntry.Level
, which uses a different, but very similar, enum. For the same reason,ClearHistoricBrowserLog()
is now calledClearCumulativeBrowserLog()
but behaves the same.UITestContext.BrowserLogFilter
, to determine what gets logged in the first place. If you need to ignore expected log entries (since a non-empty log fails the test by default), we recommend adjusting the filter instead of the assertion. The samples contain examples of this.OrchardCoreUITestExecutorConfiguration.AssertBrowserLog
now works withOpenQA.Selenium.BiDi.Modules.Log.Entry
objects too, as do all related helpers.UITestContext.UpdateHistoricBrowserLogAsync()
was removed. It's not necessary anymore since the logs are now updated not explicitly, but with events, whenever a new entry is added.UITestContext.AssertCurrentBrowserLogAsync()
and theIWebDriver
extensionGetAndEmptyBrowserLog()
were also removed for the same reason.LogEntry.IsNotFoundLogEntry()
was removed since it can't apply toEntry
objects. Instead, check outUITestContext.CumulativeResponseLog
andUITestContext.ResponseLogFilter
. This new behavior is demonstrated in the samples.context.SwitchToLastWindow()
orcontext.SwitchToLastWindow()
).How to adapt
Upgraded xUnit to v3 with breaking changes
This version of the UI Testing Toolbox uses v3 of xUnit, which brings many updates. However, it's also a breaking version, requiring you to adapt your test projects, see the official guide.
Migrating UI test projects consuming the UI Testing Toolbox should be simpler, though, with you requiring to do roughly the following steps:
xunit.runner.visualstudio
package reference to latest (currently 3.0.2).<OutputType>Exe</OutputType>
to the firstPropertyGroup
in the test project's csproj). These are all the projects withxunit.runner.visualstudio
references.xunit
package references toxunit.v3
with the latest version (currently 2.0.0). If a test project lacks such a reference then add it (currently<PackageReference Include="xunit.v3" Version="2.0.0" />
). Only test projects should referencexunit
, but they must reference it, otherwise tests won't be discovered.Microsoft.NET.Test.Sdk
references in the test projects to latest (currently 17.13.0) too while we're at it, or add it if it's missing (currently<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
).ITestOutputHelper
is now in theXunit
namespace instead ofXunit.Abstractions
. Fix the namespace imports inUITestBase
classes first and then anywhere else; they'll show up as build errors.xunit.v3
. You might need to do a recursive git clean to be sure to start with a clean slate.Complete changelog
HttpClient
-managing extensions by @Piedone in https://github.com/Lombiq/UI-Testing-Toolbox/pull/448Entry
->LogEntry
rename by @Piedone in https://github.com/Lombiq/UI-Testing-Toolbox/pull/513New Contributors
Full Changelog: Lombiq/UI-Testing-Toolbox@v12.0.0...v13.0.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Renovate Bot.