Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

Fix CI errors in SaaS (#6662)

James Bruntonc1a637d7648c
diff --git a/app/proprietary/src/test/java/stirling/software/proprietary/security/InitialSecuritySetupTest.java b/app/proprietary/src/test/java/stirling/software/proprietary/security/InitialSecuritySetupTest.java
index 12620b6e85..adf9486094 100644
--- a/app/proprietary/src/test/java/stirling/software/proprietary/security/InitialSecuritySetupTest.java
+++ b/app/proprietary/src/test/java/stirling/software/proprietary/security/InitialSecuritySetupTest.java
@@ -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
diff --git a/frontend/editor/public/locales/en-US/translation.toml b/frontend/editor/public/locales/en-US/translation.toml
index 9bf3af7183..5b22c30644 100644
--- a/frontend/editor/public/locales/en-US/translation.toml
+++ b/frontend/editor/public/locales/en-US/translation.toml
@@ -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"
diff --git a/frontend/editor/src/core/tests/helpers/api-stubs.ts b/frontend/editor/src/core/tests/helpers/api-stubs.ts
index 510798c455..c87cdfa54b 100644
--- a/frontend/editor/src/core/tests/helpers/api-stubs.ts
+++ b/frontend/editor/src/core/tests/helpers/api-stubs.ts
@@ -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
diff --git a/frontend/editor/src/core/tests/stubbed/files-page-screenshots.spec.ts b/frontend/editor/src/core/tests/stubbed/files-page-screenshots.spec.ts
index da4d889a9d..fffa1b4b65 100644
--- a/frontend/editor/src/core/tests/stubbed/files-page-screenshots.spec.ts
+++ b/frontend/editor/src/core/tests/stubbed/files-page-screenshots.spec.ts
@@ -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);
diff --git a/frontend/editor/src/core/tests/stubbed/files-page.spec.ts b/frontend/editor/src/core/tests/stubbed/files-page.spec.ts
index 081d1c83f1..7c08d943bb 100644
--- a/frontend/editor/src/core/tests/stubbed/files-page.spec.ts
+++ b/frontend/editor/src/core/tests/stubbed/files-page.spec.ts
@@ -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);
diff --git a/frontend/editor/src/core/tests/stubbed/policy-admin-gate.spec.ts b/frontend/editor/src/core/tests/stubbed/policy-admin-gate.spec.ts
index 20f77cae6c..d8bd307465 100644
--- a/frontend/editor/src/core/tests/stubbed/policy-admin-gate.spec.ts
+++ b/frontend/editor/src/core/tests/stubbed/policy-admin-gate.spec.ts
@@ -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) {
diff --git a/frontend/editor/src/proprietary/components/AppProviders.tsx b/frontend/editor/src/proprietary/components/AppProviders.tsx
index 06b5ddb692..f937d3cfe4 100644
--- a/frontend/editor/src/proprietary/components/AppProviders.tsx
+++ b/frontend/editor/src/proprietary/components/AppProviders.tsx
@@ -16,11 +16,11 @@ export function AppProviders({
appConfigProviderProps,
}: AppProvidersProps) {
return (
- <CoreAppProviders
- appConfigRetryOptions={appConfigRetryOptions}
- appConfigProviderProps={appConfigProviderProps}
- >
- <AuthProvider>
+ <AuthProvider>
+ <CoreAppProviders
+ appConfigRetryOptions={appConfigRetryOptions}
+ appConfigProviderProps={appConfigProviderProps}
+ >
<LicenseProvider>
<UpdateSeatsProvider>
<ServerExperienceProvider>
@@ -31,7 +31,7 @@ export function AppProviders({
</ServerExperienceProvider>
</UpdateSeatsProvider>
</LicenseProvider>
- </AuthProvider>
- </CoreAppProviders>
+ </CoreAppProviders>
+ </AuthProvider>
);
}
diff --git a/scripts/sync_en_us_spelling.py b/scripts/sync_en_us_spelling.py
index e60f170fcd..221aefc9b8 100644
--- a/scripts/sync_en_us_spelling.py
+++ b/scripts/sync_en_us_spelling.py
@@ -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",