Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
76 lines
4.3 KiB
TypeScript
76 lines
4.3 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
||||
|
|
import fs from "node:fs";
|
|||
|
|
import path from "node:path";
|
|||
|
|
|
|||
|
|
const readSrc = (...segments: string[]) =>
|
|||
|
|
fs.readFileSync(path.resolve(__dirname, "../../apps/web/src", ...segments), "utf-8");
|
|||
|
|
|
|||
|
|
describe("ARIA accessibility labels & role hygiene", () => {
|
|||
|
|
it("keeps SketchUpMenuBar role='menubar' strictly on menu triggers without repeating 'Menü Çubuğu' or 'alt menüsü'", () => {
|
|||
|
|
const src = readSrc("components/snapcad/SketchUpMenuBar.tsx");
|
|||
|
|
|
|||
|
|
expect(src).toContain('<div className="sketchup-menubar-items" role="menubar" aria-label="Klasik CAD">');
|
|||
|
|
expect(src).not.toMatch(/aria-label="[^"]*Menü Çubuğu[^"]*"/i);
|
|||
|
|
expect(src).not.toMatch(/aria-label=\{`\$\{menu\.label\} alt menüsü`\}/i);
|
|||
|
|
expect(src).toContain('<div className="sketchup-menu-dropdown" role="menu" aria-label={menu.label}>');
|
|||
|
|
expect(src).toContain('role={isCheckable ? "menuitemcheckbox" : "menuitem"}');
|
|||
|
|
expect(src).toContain('aria-checked={isCheckable ? item.checked : undefined}');
|
|||
|
|
expect(src).toContain('<div className="sketchup-menubar-right" role="group" aria-label="Hızlı Panel ve Kısayol Ayarları">');
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
it("avoids repeating ARIA/semantic role nouns in aria-label across studio components and pages", () => {
|
|||
|
|
const topBar = readSrc("components/snapcad/EnterpriseTopBar.tsx");
|
|||
|
|
expect(topBar).not.toContain('aria-label="SnapCAD Studio Başlık Çubuğu"');
|
|||
|
|
expect(topBar).toContain('aria-label="SnapCAD Studio Üst Alanı"');
|
|||
|
|
expect(topBar).toContain('role="tablist" aria-label="Stüdyolar"');
|
|||
|
|
|
|||
|
|
const footer = readSrc("components/snapcad/PlatformFooter.tsx");
|
|||
|
|
expect(footer).not.toContain('aria-label="SnapCAD Studio Kurumsal Altbilgi"');
|
|||
|
|
expect(footer).toContain('aria-label="SnapCAD Studio Kurumsal"');
|
|||
|
|
|
|||
|
|
const classrooms = readSrc("components/snapcad/ClassroomsStudio.tsx");
|
|||
|
|
expect(classrooms).not.toContain('aria-label="Sınıf alt sekmeleri"');
|
|||
|
|
expect(classrooms).toContain('aria-label="Sınıf Bölümleri"');
|
|||
|
|
|
|||
|
|
const codeblocks = readSrc("components/snapcad/CodeblocksStudio.tsx");
|
|||
|
|
expect(codeblocks).not.toContain('aria-label="Kod blokları adım adım yürütme sürgüsü"');
|
|||
|
|
expect(codeblocks).toContain('aria-label="Kod blokları adım adım yürütme"');
|
|||
|
|
|
|||
|
|
const a11yCenter = readSrc("components/snapcad/AccessibilityCenter.tsx");
|
|||
|
|
expect(a11yCenter).not.toContain('aria-label="Hızlı Erişilebilirlik ve Komut Çubuğu"');
|
|||
|
|
expect(a11yCenter).toContain('role="group" aria-label="Komut Sonuçları"');
|
|||
|
|
|
|||
|
|
const precisionBar = readSrc("components/snapcad/EnterprisePrecisionBar.tsx");
|
|||
|
|
expect(precisionBar).not.toContain("<footer");
|
|||
|
|
expect(precisionBar).toContain('role="region"');
|
|||
|
|
expect(precisionBar).toContain('aria-label="Hassas Çizim ve Ölçü Girişi"');
|
|||
|
|
|
|||
|
|
const cloudBar = readSrc("components/snapcad/YakNetCloudBar.tsx");
|
|||
|
|
expect(cloudBar).not.toContain('aria-label="YakNet Hesabı ve Ekosistem Menüsü"');
|
|||
|
|
|
|||
|
|
const editor = readSrc("components/SketchForgeEditor.tsx");
|
|||
|
|
expect(editor).not.toContain('aria-label="Sketch toolbar"');
|
|||
|
|
expect(editor).toContain('className="sketch-toolbar-ribbon" role="toolbar" aria-label="Eskiz Araçları"');
|
|||
|
|
|
|||
|
|
for (const slug of ["hakkimizda", "iletisim", "kullanim-kosullari", "kurumsal-guvenlik", "kvkk"]) {
|
|||
|
|
const pageSrc = readSrc("app", slug, "page.tsx");
|
|||
|
|
expect(pageSrc).not.toContain('aria-label="Sayfa içi Gezinme"');
|
|||
|
|
expect(pageSrc).toContain('<nav className="navbar-nav" aria-label="Sayfa İçi Bağlantılar">');
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
it("provides descriptive Turkish aria-labels on abbreviated toolset buttons and tray tabs", () => {
|
|||
|
|
const toolset = readSrc("components/snapcad/SketchUpToolset.tsx");
|
|||
|
|
expect(toolset).toContain('aria-label="Büyük Araç Seti"');
|
|||
|
|
expect(toolset).toContain('aria-label="Tel Kafes"');
|
|||
|
|
expect(toolset).toContain('aria-label="Gizli Çizgi"');
|
|||
|
|
expect(toolset).toContain('aria-label="Dokulu ve Gölgeli"');
|
|||
|
|
expect(toolset).toContain('aria-label="Monokrom"');
|
|||
|
|
expect(toolset).toContain('aria-label="Arka Kenarlar (K)"');
|
|||
|
|
expect(toolset).toContain('aria-label="Röntgen Modu (X)"');
|
|||
|
|
|
|||
|
|
const tray = readSrc("components/snapcad/SketchUpDefaultTray.tsx");
|
|||
|
|
expect(tray).toContain('aria-label="Varsayılan Tepsi"');
|
|||
|
|
expect(tray).toContain('<div className="tray-seg-tabs" role="tablist" aria-label="Bileşen Kaynağı">');
|
|||
|
|
});
|
|||
|
|
});
|