diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Tests/IdentityPagesTests.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Tests/IdentityPagesTests.cs index 5d3344678c..3d4e5fcef9 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Tests/IdentityPagesTests.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Tests/IdentityPagesTests.cs @@ -36,7 +36,7 @@ public async Task SignIn_Should_WorkAsExpected() await Page.GetByPlaceholder(AppStrings.EmailPlaceholder).FillAsync(email); await Page.GetByPlaceholder(AppStrings.PasswordPlaceholder).FillAsync(password); - await Page.GetByRole(AriaRole.Button, new() { Name = AppStrings.SignIn }).ClickAsync(); + await Page.GetByRole(AriaRole.Button, new() { Name = AppStrings.SignIn, Exact = true }).ClickAsync(); await Expect(Page).ToHaveURLAsync(server.WebAppServerAddress.ToString()); await Expect(Page.GetByRole(AriaRole.Button, new() { Name = userFullName })).ToBeVisibleAsync(); diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Tests/TestsInitializer.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Tests/TestsInitializer.cs index 61d123179b..f406a10993 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Tests/TestsInitializer.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Tests/TestsInitializer.cs @@ -54,12 +54,16 @@ private static async Task InitializeDatabase(AppTestServer testServer) await using var scope = testServer.WebApp.Services.CreateAsyncScope(); var dbContext = scope.ServiceProvider.GetRequiredService(); //#if (database == 'Sqlite') + //#if (IsInsideProjectTemplate == true) if (dbContext.Database.ProviderName!.EndsWith("Sqlite", StringComparison.InvariantCulture)) { + //#endif connection = new SqliteConnection(dbContext.Database.GetConnectionString()); await connection.OpenAsync(); + //#if (IsInsideProjectTemplate == true) } //#endif + //#endif await dbContext.Database.MigrateAsync(); } }