Skip to content

Commit 259e3b1

Browse files
author
iexitdev
committed
test(showcase): fix native qa launch env
1 parent 5ff9d2a commit 259e3b1

8 files changed

Lines changed: 38 additions & 13 deletions

apps/expo-showcase/src/showcaseNavigation.test.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,27 @@ describe("showcase navigation helpers", () => {
4040
expect(getPresetFromParams(params)).toBe("analytics");
4141
});
4242

43+
it("reads public Expo QA query params from process env by default", () => {
44+
const previousQuery = process.env.EXPO_PUBLIC_CHARTKIT_SHOWCASE_QA_QUERY;
45+
process.env.EXPO_PUBLIC_CHARTKIT_SHOWCASE_QA_QUERY =
46+
"view=charts&page=bar&theme=dark&preset=analytics";
47+
48+
try {
49+
const params = getShowcaseSearchParamsFromBuildEnv();
50+
51+
expect(params?.get("view")).toBe("charts");
52+
expect(params?.get("page")).toBe("bar");
53+
expect(getThemeModeFromParams(params)).toBe("dark");
54+
expect(getPresetFromParams(params)).toBe("analytics");
55+
} finally {
56+
if (previousQuery === undefined) {
57+
delete process.env.EXPO_PUBLIC_CHARTKIT_SHOWCASE_QA_QUERY;
58+
} else {
59+
process.env.EXPO_PUBLIC_CHARTKIT_SHOWCASE_QA_QUERY = previousQuery;
60+
}
61+
}
62+
});
63+
4364
it("parses full URLs from the build-time QA query env var", () => {
4465
const params = getShowcaseSearchParamsFromBuildEnv({
4566
EXPO_PUBLIC_CHARTKIT_SHOWCASE_QA_QUERY:

apps/expo-showcase/src/showcaseNavigation.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,14 @@ export const getShowcaseSearchParamsFromUrl = (
8484
};
8585

8686
export const getShowcaseSearchParamsFromBuildEnv = (
87-
env: ShowcaseBuildEnv | undefined = typeof process === "undefined"
88-
? undefined
89-
: process.env
87+
env?: ShowcaseBuildEnv
9088
): ShowcaseSearchParams | null => {
91-
const query = env?.EXPO_PUBLIC_CHARTKIT_SHOWCASE_QA_QUERY?.trim();
89+
const query = (
90+
env?.EXPO_PUBLIC_CHARTKIT_SHOWCASE_QA_QUERY ??
91+
(typeof process === "undefined"
92+
? undefined
93+
: process.env.EXPO_PUBLIC_CHARTKIT_SHOWCASE_QA_QUERY)
94+
)?.trim();
9295

9396
if (!query) {
9497
return null;
238 KB
Loading

docs/release/evidence/native-runtime-matrix.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@
124124
"id": "ios-bar-charts",
125125
"platform": "ios",
126126
"pageId": "bar-charts",
127-
"status": "pending",
128-
"evidence": []
127+
"status": "partial",
128+
"evidence": ["docs/release/artifacts/ios-runtime-bar-charts.png"],
129+
"notes": "Release simulator QA launch smoke: Bar page opened without red-screen error and grouped/selection bar chart content rendered; full gesture, rotation, and physical-device runtime checks still pending."
129130
},
130131
{
131132
"id": "ios-combined-preview",

docs/release/evidence/native-runtime-qa.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
],
4040
"missingEvidence": [
4141
"ios-line-charts is partial; evidence is required before this matrix can be complete.",
42-
"ios-bar-charts is pending; evidence is required before this matrix can be complete.",
42+
"ios-bar-charts is partial; evidence is required before this matrix can be complete.",
4343
"ios-combined-preview is pending; evidence is required before this matrix can be complete.",
4444
"ios-financial-preview is pending; evidence is required before this matrix can be complete.",
4545
"ios-pie-donut is pending; evidence is required before this matrix can be complete.",

docs/release/native-qa-checklists.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Generated from native and Skia evidence matrices last updated 2026-05-06. Regene
88

99
| Matrix | Rows | Pass | Partial | Pending | Blocked | Fail | Not Applicable |
1010
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
11-
| Runtime QA | 16 | 0 | 2 | 14 | 0 | 0 | 0 |
11+
| Runtime QA | 16 | 0 | 3 | 13 | 0 | 0 | 0 |
1212
| Accessibility QA | 16 | 0 | 0 | 16 | 0 | 0 | 0 |
1313
| Native Performance | 18 | 0 | 0 | 18 | 0 | 0 | 0 |
1414
| Skia Renderer | 8 | 0 | 0 | 8 | 0 | 0 | 0 |
@@ -74,7 +74,7 @@ Source: [docs/release/native-runtime-qa.md](native-runtime-qa.md) and [docs/rele
7474
| Row | Target | Build Surface | Showcase Page | Deep Link | Check Groups | Status | Evidence |
7575
| --- | --- | --- | --- | --- | --- | --- | --- |
7676
| `ios-line-charts` | iOS / Line Charts | Expo showcase and iOS release build | `line-area` | chartkitshowcase://showcase?view=charts&page=line-area | `global`, `line` | partial | `docs/release/artifacts/ios-runtime-smoke.png` |
77-
| `ios-bar-charts` | iOS / Bar Charts | Expo showcase and iOS release build | `bar` | chartkitshowcase://showcase?view=charts&page=bar | `global`, `bar` | pending | None |
77+
| `ios-bar-charts` | iOS / Bar Charts | Expo showcase and iOS release build | `bar` | chartkitshowcase://showcase?view=charts&page=bar | `global`, `bar` | partial | `docs/release/artifacts/ios-runtime-bar-charts.png` |
7878
| `ios-combined-preview` | iOS / Combined Preview | Expo showcase and iOS release build | `combined` | chartkitshowcase://showcase?view=charts&page=combined | `global`, `combinedFinancial` | pending | None |
7979
| `ios-financial-preview` | iOS / Financial Preview | Expo showcase and iOS release build | `financial` | chartkitshowcase://showcase?view=charts&page=financial | `global`, `combinedFinancial` | pending | None |
8080
| `ios-pie-donut` | iOS / Pie & Donut | Expo showcase and iOS release build | `pie-donut` | chartkitshowcase://showcase?view=charts&page=pie-donut | `global`, `radialHeatmap` | pending | None |

scripts/generate-native-qa-checklists.test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe("native QA checklist generator", () => {
1010
it("generates actionable checklist rows from all native evidence matrices", async () => {
1111
const markdown = await generateNativeQaChecklist({ repoRoot });
1212

13-
expect(markdown).toContain("| Runtime QA | 16 | 0 | 2 | 14 | 0 | 0 | 0 |");
13+
expect(markdown).toContain("| Runtime QA | 16 | 0 | 3 | 13 | 0 | 0 | 0 |");
1414
expect(markdown).toContain(
1515
"| Accessibility QA | 16 | 0 | 0 | 16 | 0 | 0 | 0 |"
1616
);

scripts/record-native-qa-evidence.test.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ describe("native QA evidence recorder", () => {
172172
notes: "Release simulator pass",
173173
status: "pass"
174174
});
175-
expect(checklist).toContain("| Runtime QA | 16 | 1 | 1 | 14 | 0 | 0 | 0 |");
175+
expect(checklist).toContain("| Runtime QA | 16 | 1 | 2 | 13 | 0 | 0 | 0 |");
176176
expect(checklist).toContain(
177177
"`docs/release/artifacts/ios-line-charts-runtime.md`"
178178
);
@@ -187,7 +187,7 @@ describe("native QA evidence recorder", () => {
187187
status: "partial"
188188
});
189189
expect(manifest.missingEvidence).toContain(
190-
"ios-bar-charts is pending; evidence is required before this matrix can be complete."
190+
"ios-bar-charts is partial; evidence is required before this matrix can be complete."
191191
);
192192
});
193193

@@ -226,7 +226,7 @@ describe("native QA evidence recorder", () => {
226226
notes: "Release simulator launch smoke only",
227227
status: "partial"
228228
});
229-
expect(checklist).toContain("| Runtime QA | 16 | 0 | 2 | 14 | 0 | 0 | 0 |");
229+
expect(checklist).toContain("| Runtime QA | 16 | 0 | 3 | 13 | 0 | 0 | 0 |");
230230
expect(checklist).toContain(
231231
"`docs/release/artifacts/ios-line-charts-smoke.png`"
232232
);

0 commit comments

Comments
 (0)