Files
snapcad-studio/tests/unit/interactiveTutorial.test.ts
Enes Yakıştır 33b0940012
Build and Push Docker Images / build (push) Canceled after 0s
CI / Typecheck and unit tests (push) Canceled after 0s
feat: SnapCAD Studio'yu YakHub deposuna taşı
- DWG/DXF içe aktarma ve .skf yeniden açma düzeltmeleri

- YakNet Bulut eşitlemede boş/eski kopya koruması ve yerel-only proje bildirimi

- Panelden içe aktarma duyuruları ve erişilebilir Türkçe hata mesajları

- AGPL-3.0 lisansı, README ve YakHub bağlantıları
2026-10-25 18:20:21 +03:00

49 lines
2.4 KiB
TypeScript

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { describe, expect, it } from "vitest";
import { TUTORIAL_STEPS } from "@/lib/academyTutorialData";
describe("Interactive Tutorial (SnapCAD Akademi) Unit Tests", () => {
it("has exactly 10 comprehensive hands-on tutorial steps", () => {
expect(TUTORIAL_STEPS.length).toBe(10);
});
it("covers all essential architectural and modeling skills", () => {
const titles = TUTORIAL_STEPS.map((s) => s.title);
expect(titles.some((t) => t.includes("Gezinti") || t.includes("Kamera"))).toBe(true);
expect(titles.some((t) => t.includes("Duvar") || t.includes("Kütle"))).toBe(true);
expect(titles.some((t) => t.includes("İt / Çek") || t.includes("Push/Pull"))).toBe(true);
expect(titles.some((t) => t.includes("Akıllı Çarpışmasız") || t.includes("Çatı"))).toBe(true);
expect(titles.some((t) => t.includes("Boya Kovası") || t.includes("Dokular"))).toBe(true);
expect(titles.some((t) => t.includes("Bileşenler") || t.includes("Components"))).toBe(true);
expect(titles.some((t) => t.includes("Röntgen") || t.includes("X-Ray"))).toBe(true);
expect(titles.some((t) => t.includes("Yürüme") || t.includes("WASD"))).toBe(true);
expect(titles.some((t) => t.includes("Fizik") || t.includes("Deprem"))).toBe(true);
expect(titles.some((t) => t.includes("Masamda Gör") || t.includes("AR"))).toBe(true);
});
it("has action buttons on interactive steps", () => {
const stepsWithActions = TUTORIAL_STEPS.filter((s) => Boolean(s.actionButton));
expect(stepsWithActions.length).toBeGreaterThanOrEqual(8);
const actionTypes = stepsWithActions.map((s) => s.actionButton?.actionType);
expect(actionTypes).toContain("add_sample_wall");
expect(actionTypes).toContain("trigger_push_pull");
expect(actionTypes).toContain("add_sample_roof");
expect(actionTypes).toContain("open_paint_bucket");
expect(actionTypes).toContain("create_component_sample");
expect(actionTypes).toContain("toggle_xray");
expect(actionTypes).toContain("start_walk_mode");
expect(actionTypes).toContain("trigger_structural_test");
expect(actionTypes).toContain("open_ar_preview");
});
it("ensures step numbers and identifiers are sequential and unique", () => {
const ids = new Set<string>();
TUTORIAL_STEPS.forEach((step, index) => {
expect(step.stepNumber).toBe(index + 1);
expect(ids.has(step.id)).toBe(false);
ids.add(step.id);
expect(step.body.length).toBeGreaterThan(0);
});
});
});