forge
Explore
Log in

Don't you dare go Hollow

🧪 restore deploy test gate

Browse files at this commit

38b2f34d87964ba6808f34b62ec3f5324b429548Burak BoduroğluParent: 67be128
  • fix
    • 🧪 restore deploy test gate
Show full message
fix: 🧪 restore deploy test gate

- align insight report and course-detail tests with the refined inline and panel flows
- wait for podcast capabilities before interacting with the Suspense-backed form
- bring the notification count badge back within the minimum text-size rule
src/components/insights/insight-detail.test.tsxmodified+26 -16
@@ -278,6 +278,12 @@ const renderInsight = (value: StudentInsight) =>
278 </PreferencesProvider>278 </PreferencesProvider>
279 ));279 ));
280 280
281+const openMarksCourse = () => {
282+ const courseRow = screen.getByRole("cell", { name: "Matematik" }).closest("tr") as HTMLElement;
283+ fireEvent.click(courseRow);
284+ return screen.getByRole("dialog", { name: "Matematik" });
285+};
286+
281 /** The fixture's single course with its `trend` member swapped. */287 /** The fixture's single course with its `trend` member swapped. */
282 const marksWith = (trend: UnknownRecord): StudentInsight => {288 const marksWith = (trend: UnknownRecord): StudentInsight => {
283 const summary = insight.summary ?? { confidence: "none", computed_at: NOW, retain_until: NOW + WEEK };289 const summary = insight.summary ?? { confidence: "none", computed_at: NOW, retain_until: NOW + WEEK };
@@ -296,6 +302,8 @@ describe("InsightDetail", () => {
296 it("labels every module member in Turkish instead of echoing payload keys", () => {302 it("labels every module member in Turkish instead of echoing payload keys", () => {
297 renderDrawer();303 renderDrawer();
298 const human = screen.getByTestId("insight-human").textContent ?? "";304 const human = screen.getByTestId("insight-human").textContent ?? "";
305+ const marksDetail = openMarksCourse().textContent ?? "";
306+ const visible = `${human} ${marksDetail}`;
299 307
300 for (const label of [308 for (const label of [
301 "Devam oranı",309 "Devam oranı",
@@ -306,7 +314,7 @@ describe("InsightDetail", () => {
306 "Şubedeki konumu",314 "Şubedeki konumu",
307 "Yeterli veri yok",315 "Yeterli veri yok",
308 ]) {316 ]) {
309- expect(human, `label ${label}`).toContain(label);317+ expect(visible, `label ${label}`).toContain(label);
310 }318 }
311 expect(human).toContain("Dersler arası denge");319 expect(human).toContain("Dersler arası denge");
312 expect(human).toContain("Yaklaşan teslimler");320 expect(human).toContain("Yaklaşan teslimler");
@@ -326,7 +334,7 @@ describe("InsightDetail", () => {
326 "n_marks",334 "n_marks",
327 "within_student_contrast",335 "within_student_contrast",
328 ]) {336 ]) {
329- expect(human, `raw key ${rawKey}`).not.toContain(rawKey);337+ expect(visible, `raw key ${rawKey}`).not.toContain(rawKey);
330 }338 }
331 });339 });
332 340
@@ -345,17 +353,19 @@ describe("InsightDetail", () => {
345 it("renders the service's honest reasons as sentences", () => {353 it("renders the service's honest reasons as sentences", () => {
346 renderDrawer();354 renderDrawer();
347 const human = screen.getByTestId("insight-human").textContent ?? "";355 const human = screen.getByTestId("insight-human").textContent ?? "";
356+ const marksDetail = openMarksCourse().textContent ?? "";
357+ const visible = `${human} ${marksDetail}`;
348 358
349- expect(human).toContain("eğilim için en az 6 not gerekir");359+ expect(visible).toContain("eğilim için en az 6 not gerekir");
350- expect(human).toContain("Veri toplanıyor (2/3)");360+ expect(visible).toContain("Veri toplanıyor (2/3)");
351- expect(human).toContain("kontrast için bantlanmış en az 3 ders gerekir");361+ expect(visible).toContain("kontrast için bantlanmış en az 3 ders gerekir");
352- expect(human).toContain("Isı haritası için 3/5 oturum");362+ expect(visible).toContain("Isı haritası için 3/5 oturum");
353- expect(human).toContain("Erteleme profili submitted_at gerektirir");363+ expect(visible).toContain("Erteleme profili submitted_at gerektirir");
354- expect(human).toContain("Dönem kümülatifi; son 30 gün penceresi yok.");364+ expect(visible).toContain("Dönem kümülatifi; son 30 gün penceresi yok.");
355 // A rate-space difference is percentage points: -0.16 is "-16 puan", not365 // A rate-space difference is percentage points: -0.16 is "-16 puan", not
356 // "-0,2 puan" — the raw number must never leak through unconverted.366 // "-0,2 puan" — the raw number must never leak through unconverted.
357- expect(human).toContain("-16 puan");367+ expect(visible).toContain("-16 puan");
358- expect(human).toContain("-4 puan");368+ expect(visible).toContain("-4 puan");
359 });369 });
360 370
361 it("keeps the whole raw payload in the collapsed technical disclosure", () => {371 it("keeps the whole raw payload in the collapsed technical disclosure", () => {
@@ -428,10 +438,10 @@ describe("InsightDetail", () => {
428 rising: false,438 rising: false,
429 }),439 }),
430 );440 );
431- const human = screen.getByTestId("insight-human").textContent ?? "";441+ const marksDetail = openMarksCourse().textContent ?? "";
432 442
433- expect(human).toContain(reason);443+ expect(marksDetail).toContain(reason);
434- expect(human).not.toContain("/ 30 gün");444+ expect(marksDetail).not.toContain("/ 30 gün");
435 });445 });
436 446
437 it("shows the slope row when the trend computed one", () => {447 it("shows the slope row when the trend computed one", () => {
@@ -448,10 +458,10 @@ describe("InsightDetail", () => {
448 rising: false,458 rising: false,
449 }),459 }),
450 );460 );
451- const human = screen.getByTestId("insight-human").textContent ?? "";461+ const marksDetail = openMarksCourse().textContent ?? "";
452 462
453- expect(human).toContain("+3,4 puan / 30 gün");463+ expect(marksDetail).toContain("+3,4 puan / 30 gün");
454- expect(human).not.toContain("eğim hesaplanmadı");464+ expect(marksDetail).not.toContain("eğim hesaplanmadı");
455 });465 });
456 466
457 it("keeps the cards-only mode free of the drawer's full-view sections", () => {467 it("keeps the cards-only mode free of the drawer's full-view sections", () => {
src/components/insights/insight-run-report.test.tsxmodified+1 -1
@@ -147,7 +147,7 @@ const INSIGHT_S2: StudentInsight = {
147 147
148 const INSIGHT_S3: StudentInsight = { user_id: "s3", summary: null, attention: [], cards: [], segments: [] };148 const INSIGHT_S3: StudentInsight = { user_id: "s3", summary: null, attention: [], cards: [], segments: [] };
149 149
150-const panel = () => within(document.querySelector(".side-panel-body") as HTMLElement);150+const panel = () => within(screen.getByRole("region", { name: /^Çalıştırma günü / }));
151 151
152 async function openReport(runDay: string) {152 async function openReport(runDay: string) {
153 render(() => (153 render(() => (
src/components/layout/notification-center.tsxmodified+1 -1
@@ -353,7 +353,7 @@ export function NotificationCenter() {
353 {notificationGroupLabel(group.type)}353 {notificationGroupLabel(group.type)}
354 </span>354 </span>
355 </div>355 </div>
356- <span class="shrink-0 rounded-full bg-background/70 px-1.5 py-0.5 font-mono text-[10px] font-bold text-text-subtle">356+ <span class="shrink-0 rounded-full bg-background/70 px-1.5 py-0.5 font-mono text-[11px] font-bold text-text-subtle">
357 {group.items.length}357 {group.items.length}
358 </span>358 </span>
359 </div>359 </div>
src/components/notes/podcast-panel.test.tsxmodified+1 -1
@@ -42,7 +42,7 @@ describe("PodcastPanel", () => {
42 </PreferencesProvider>42 </PreferencesProvider>
43 ));43 ));
44 44
45- fireEvent.change(screen.getByLabelText("Narration style"), { target: { value: "tek_ogretici" } });45+ fireEvent.change(await screen.findByLabelText("Narration style"), { target: { value: "tek_ogretici" } });
46 fireEvent.click(screen.getByRole("button", { name: "Create podcast" }));46 fireEvent.click(screen.getByRole("button", { name: "Create podcast" }));
47 47
48 await waitFor(() => {48 await waitFor(() => {