Fix CI errors in SaaS (#6662)

# Description of Changes
Fix CI errors in #6578 to make SaaS branch ready for merge into main
This commit is contained in:
James Brunton
2026-06-15 11:26:29 +01:00
committed by GitHub
parent eefa8eff61
commit c1a637d764
8 changed files with 27 additions and 13 deletions
@@ -16,6 +16,7 @@ import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.core.env.Environment;
import org.springframework.test.util.ReflectionTestUtils;
import stirling.software.common.model.ApplicationProperties;
@@ -36,6 +37,7 @@ class InitialSecuritySetupTest {
@Mock private TeamService teamService;
@Mock private DatabaseServiceInterface databaseService;
@Mock private UserLicenseSettingsService licenseSettingsService;
@Mock private Environment environment;
private ApplicationProperties applicationProperties;
private InitialSecuritySetup initialSecuritySetup;
@@ -53,13 +55,15 @@ class InitialSecuritySetupTest {
when(userService.findByUsernameIgnoreCase(Role.INTERNAL_API_USER.getRoleId()))
.thenReturn(Optional.of(internalUser));
when(teamService.getOrCreateInternalTeam()).thenReturn(internalTeam);
when(environment.getActiveProfiles()).thenReturn(new String[] {});
initialSecuritySetup =
new InitialSecuritySetup(
userService,
teamService,
applicationProperties,
databaseService,
licenseSettingsService);
licenseSettingsService,
environment);
}
@Test
@@ -2714,6 +2714,7 @@ need_clarification = "Could you clarify your request?"
not_found = "I couldn't find the requested information."
processing = "Processing ({{outcome}})..."
unsupported_capability = "Unsupported capability: {{capability}}"
usage_limit_reached = "You've reached your usage limit. Check your plan options to keep going."
[chat.toolsUsed]
summary = "Ran {{count}} tools"
@@ -183,7 +183,7 @@ export async function mockAppApis(
// Current user — anonymous by default, configurable for authenticated flows
await page.route("**/api/v1/auth/me", (route: Route) =>
route.fulfill({ json: user }),
route.fulfill({ json: { user } }),
);
// Tool availability — every tool enabled unless overridden
@@ -141,7 +141,14 @@ async function settle(page: Page, ms = 350): Promise<void> {
}
test.describe("Files page screenshots", () => {
test.use({ autoGoto: false, viewport: { width: 1600, height: 900 } });
// Seed a logged-in session: the cloud-folder surfaces (move-dialog
// create-folder, the seeded "Reports" folder) only render once a confirmed,
// non-anonymous user triggers the folder pull (see FolderContext gating).
test.use({
autoGoto: false,
viewport: { width: 1600, height: 900 },
seedJwt: true,
});
test("01_empty_state_ctas", async ({ page }) => {
await stubStorageApis(page);
@@ -539,7 +539,10 @@ test.describe("Files page", () => {
});
test.describe("Move dialog inline create-folder", () => {
test.use({ autoGoto: false });
// The inline create-folder affordance is gated on `serverReachable`, which
// only flips true once a confirmed, non-anonymous user triggers the folder
// pull (see FolderContext). Seed a JWT so the stubbed session is logged-in.
test.use({ autoGoto: false, seedJwt: true });
test("Move dialog shows Create new folder affordance", async ({ page }) => {
await stubStorageApis(page);
@@ -16,7 +16,7 @@ import { test, expect } from "@app/tests/helpers/stub-test-base";
*/
const LOCKED_TITLE = "Managed by your organization";
const LOCKED_DESC = "Contact an admin to change this policy.";
const LOCKED_DESC = "Contact a team leader to change this policy.";
/** Open the Security policy from the right-sidebar Policies list. */
async function openSecurityPolicy(page: import("@playwright/test").Page) {
@@ -16,11 +16,11 @@ export function AppProviders({
appConfigProviderProps,
}: AppProvidersProps) {
return (
<AuthProvider>
<CoreAppProviders
appConfigRetryOptions={appConfigRetryOptions}
appConfigProviderProps={appConfigProviderProps}
>
<AuthProvider>
<LicenseProvider>
<UpdateSeatsProvider>
<ServerExperienceProvider>
@@ -31,7 +31,7 @@ export function AppProviders({
</ServerExperienceProvider>
</UpdateSeatsProvider>
</LicenseProvider>
</AuthProvider>
</CoreAppProviders>
</AuthProvider>
);
}
-1
View File
@@ -100,7 +100,6 @@ _RE = {
# Calibre (the e-book conversion tool), not the British caliber.
"sombre": "somber", "spectre": "specter", "lustre": "luster",
"theatre": "theater", "theatres": "theaters",
"metre": "meter",
"centimetre": "centimeter", "centimetres": "centimeters",
"millimetre": "millimeter", "millimetres": "millimeters",
"kilometre": "kilometer", "kilometres": "kilometers",