fix: resolve CI failures from integrations onboarding step

- Fix TypeScript error: InitIntegrations returning null by transitioning
  to done phase instead
- Fix TypeScript error: Object.fromEntries cast in integration grids by
  typing the array elements
- Update E2E onboarding tests to process the new integrations step
  (skip for now) and increase finish assertion timeout for async mutation
This commit is contained in:
Thomas Camlong committed 2026-05-01 10:12:14 +02:00
1 parent 1c6782a102
commit e0c2978f52
6 files changed
+14 -6

No files matched your search

@@ -57,7 +57,8 @@ export const InitIntegrations = () => {
if (phase === "configure") {
const currentKind = selectedKinds[currentIndex];
if (currentKind === undefined) {
return null;
setPhase("done");
return <></>;
}
return (
@@ -16,8 +16,8 @@ interface IntegrationMultiSelectGridProps {
}
const getWidgetsByIntegration = () => {
const map: Record<IntegrationKind, WidgetKind[]> = Object.fromEntries(
integrationKinds.map((kind) => [kind, []]),
const map = Object.fromEntries(
integrationKinds.map((kind) => [kind, [] as WidgetKind[]]),
) as Record<IntegrationKind, WidgetKind[]>;
for (const [widgetKind, widget] of Object.entries(widgetImports) as [
@@ -16,8 +16,8 @@ interface IntegrationSelectGridProps {
}
const getWidgetsByIntegration = () => {
const map: Record<IntegrationKind, WidgetKind[]> = Object.fromEntries(
integrationKinds.map((kind) => [kind, []]),
const map = Object.fromEntries(
integrationKinds.map((kind) => [kind, [] as WidgetKind[]]),
) as Record<IntegrationKind, WidgetKind[]>;
for (const [widgetKind, widget] of Object.entries(widgetImports) as [
+2
View File
@@ -31,6 +31,7 @@ describe("Onboarding", () => {
confirmPassword: "Comp(exP4sswOrd",
});
await actions.processSettingsStepAsync();
await actions.processIntegrationsStepAsync();
// Assert
await assertions.assertFinishStepVisibleAsync();
@@ -72,6 +73,7 @@ describe("Onboarding", () => {
name: externalGroupName,
});
await actions.processSettingsStepAsync();
await actions.processIntegrationsStepAsync();
// Assert
await assertions.assertFinishStepVisibleAsync();
+5
View File
@@ -51,4 +51,9 @@ export class OnboardingActions {
await this.page.waitForSelector("text=Analytics");
await this.page.locator("css=button[type='submit']").click();
}
public async processIntegrationsStepAsync() {
await this.page.waitForSelector("text=integrations you'd like to connect");
await this.page.locator("button", { hasText: "Skip for now" }).click();
}
}
@@ -57,6 +57,6 @@ export class OnboardingAssertions {
}
public async assertFinishStepVisibleAsync() {
await this.page.waitForSelector("text=completed the setup", { timeout: 5000 });
await this.page.waitForSelector("text=completed the setup", { timeout: 15000 });
}
}