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-733: Adding default value for the browser used during UI testing #76

Merged
merged 5 commits into from
Nov 26, 2023
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 @@ -28,7 +28,7 @@
</ItemGroup>

<ItemGroup Condition="'$(NuGetBuild)' == 'true'">
<PackageReference Include="Lombiq.Tests.UI" Version="8.1.0-alpha.1.osoe-638" />
<PackageReference Include="Lombiq.Tests.UI" Version="8.2.1-alpha.1.osoe-733" />
<PackageReference Include="Lombiq.Privacy.Tests.UI" Version="7.0.2-alpha.2.osoe-638" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,17 @@ public static class ApplicationInsightsTestCases
{
public static Task ApplicationInsightsTrackingInOfflineOperationShouldWorkAsync(
ExecuteTestAfterSetupAsync executeTestAfterSetupAsync,
Browser browser,
Browser browser = default,
Func<OrchardCoreUITestExecutorConfiguration, Task> changeConfigurationAsync = null) =>
executeTestAfterSetupAsync(
async context =>
{
await context.EnableFeatureDirectlyAsync("Lombiq.Hosting.Azure.ApplicationInsights");

await context.EnablePrivacyConsentBannerFeatureAndAcceptPrivacyConsentAsync();

var appInsightsExist = context.ExecuteScript("return window.appInsights === 'enabled'") as bool?;

// Our custom message helps debugging, otherwise from the test output you could only tell that a value should be
// true but is false which is less than helpful.
// Our custom message helps debugging, otherwise from the test output you could only tell that a value
// should be true but is false which is less than helpful.
appInsightsExist.ShouldBe(expected: true, "The Application Insights module is not working or is not in offline mode.");
},
browser,
Expand Down