fix: lint and build
Some checks failed
Build & Deploy / 🔍 Prepare Environment (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Successful in 1m21s
Build & Deploy / 🏗️ Build (push) Failing after 4m36s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🔔 Notifications (push) Successful in 2s
Some checks failed
Build & Deploy / 🔍 Prepare Environment (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Successful in 1m21s
Build & Deploy / 🏗️ Build (push) Failing after 4m36s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🔔 Notifications (push) Successful in 2s
This commit is contained in:
27
tests_bak/home.test.tsx
Normal file
27
tests_bak/home.test.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import { describe, it, expect } from "vitest";
|
||||
import Home from "../app/page";
|
||||
|
||||
describe("Home Page", () => {
|
||||
it("renders the hero section with correct title", () => {
|
||||
render(<Home />);
|
||||
expect(
|
||||
screen.getByText(/Spezialisierter Partner für Energiekabelprojekte/i),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("contains the CTA button", () => {
|
||||
render(<Home />);
|
||||
const ctaButton = screen.getByRole("link", { name: /Projekt anfragen/i });
|
||||
expect(ctaButton).toBeInTheDocument();
|
||||
expect(ctaButton).toHaveAttribute("href", "/kontakt");
|
||||
});
|
||||
|
||||
it("renders the portfolio section", () => {
|
||||
render(<Home />);
|
||||
expect(screen.getByText(/Unsere Leistungen/i)).toBeInTheDocument();
|
||||
// Use getAllByText because it appears in both hero description and card title
|
||||
const elements = screen.getAllByText(/Technische Beratung/i);
|
||||
expect(elements.length).toBeGreaterThan(0);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user