package main

import (
	"os"
	"path/filepath"
	"testing"
)

func TestGenerateSiteWritesExpectedPages(t *testing.T) {
	outputDir := t.TempDir()

	if err := GenerateSite(outputDir); err != nil {
		t.Fatalf("generate site: %v", err)
	}

	for _, name := range []string{
		"index.html",
		"tokens.html",
		"buttons.html",
		"badges.html",
		"icon-buttons.html",
		"inputs.html",
		"form-fields.html",
		"modals.html",
		"spacing.html",
		"tables.html",
		"empty-states.html",
		"cards.html",
	} {
		path := filepath.Join(outputDir, name)
		if _, err := os.Stat(path); err != nil {
			t.Fatalf("expected generated file %q: %v", path, err)
		}
	}
}
