@@ -1,12 +1,10 @@
|
||||
using System.Net;
|
||||
using System.Text.Json;
|
||||
using Tiku.Application.Backoffice;
|
||||
using Tiku.Application.Security;
|
||||
using Tiku.Domain.Common;
|
||||
using Tiku.Domain.Identity;
|
||||
using Tiku.Domain.Operations;
|
||||
using Tiku.Domain.Tenancy;
|
||||
using Tiku.Infrastructure.Auth;
|
||||
|
||||
namespace Tiku.IntegrationTests.Api;
|
||||
|
||||
@@ -85,7 +83,8 @@ public sealed class BackofficeUiBootstrapTests
|
||||
bootstrap.RootElement.GetProperty("permissionCodes").EnumerateArray().Select(item => item.GetString()));
|
||||
Assert.Equal(
|
||||
["tenant.dashboard"],
|
||||
bootstrap.RootElement.GetProperty("menus").EnumerateArray().Select(item => item.GetProperty("code").GetString()));
|
||||
bootstrap.RootElement.GetProperty("menus").EnumerateArray()
|
||||
.Select(item => item.GetProperty("code").GetString()));
|
||||
Assert.True(
|
||||
firstRequestCommands.Count is >= 1 and <= 10,
|
||||
$"Expected at most 10 SQL commands, but captured {firstRequestCommands.Count}:{Environment.NewLine}{string.Join($"{Environment.NewLine}---{Environment.NewLine}", firstRequestCommands)}");
|
||||
@@ -153,7 +152,8 @@ public sealed class BackofficeUiBootstrapTests
|
||||
bootstrap.RootElement.GetProperty("permissionCodes").EnumerateArray().Select(item => item.GetString()));
|
||||
Assert.Equal(
|
||||
["platform.dashboard"],
|
||||
bootstrap.RootElement.GetProperty("menus").EnumerateArray().Select(item => item.GetProperty("code").GetString()));
|
||||
bootstrap.RootElement.GetProperty("menus").EnumerateArray()
|
||||
.Select(item => item.GetProperty("code").GetString()));
|
||||
Assert.InRange(commands.Count, 1, 10);
|
||||
AssertNoPerCodeCatalogExistenceQueries(commands);
|
||||
}
|
||||
@@ -165,4 +165,4 @@ public sealed class BackofficeUiBootstrapTests
|
||||
command.TrimStart().StartsWith("SELECT EXISTS", StringComparison.OrdinalIgnoreCase) &&
|
||||
catalogTables.Any(table => command.Contains(table, StringComparison.OrdinalIgnoreCase)));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user