AccountButton done
This commit is contained in:
parent
dd16f42995
commit
33c8f863a1
@ -3,9 +3,9 @@ import { render, screen } from '@testing-library/react';
|
|||||||
import AccountButtons from '../src/components/account/AccountButtons.jsx';
|
import AccountButtons from '../src/components/account/AccountButtons.jsx';
|
||||||
|
|
||||||
describe('AccountButtons Component', () => {
|
describe('AccountButtons Component', () => {
|
||||||
it('should render the AccountButtons component', () => {
|
it('should render the Back link', () => {
|
||||||
render(<AccountButtons registered={false} />);
|
render(<AccountButtons registered={false} />);
|
||||||
const accountButtonsElement = screen.getByRole('button', { name: /register/i });
|
const backLinkElement = screen.getByRole('link', { name: /back/i });
|
||||||
expect(accountButtonsElement).toBeInTheDocument();
|
expect(backLinkElement).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
@ -5,7 +5,7 @@ import Card from '../src/components/home/Card.jsx';
|
|||||||
describe('Card Component', () => {
|
describe('Card Component', () => {
|
||||||
it('should render the Card component with the given ID', () => {
|
it('should render the Card component with the given ID', () => {
|
||||||
const testId = '123';
|
const testId = '123';
|
||||||
render(<Card id={testId} />);
|
render(<Card id={testId} color={"FFA500FF"}/>);
|
||||||
|
|
||||||
const cardElement = screen.getByText(/123/i);
|
const cardElement = screen.getByText(/123/i);
|
||||||
expect(cardElement).toBeInTheDocument();
|
expect(cardElement).toBeInTheDocument();
|
||||||
@ -13,7 +13,7 @@ describe('Card Component', () => {
|
|||||||
|
|
||||||
it('should store the ID in local storage when clicked', () => {
|
it('should store the ID in local storage when clicked', () => {
|
||||||
const testId = '456';
|
const testId = '456';
|
||||||
render(<Card id={testId} />);
|
render(<Card id={testId} color={"FFA500FF"}/>);
|
||||||
|
|
||||||
const cardElement = screen.getByText(/456/i);
|
const cardElement = screen.getByText(/456/i);
|
||||||
fireEvent.click(cardElement);
|
fireEvent.click(cardElement);
|
||||||
|
@ -6,6 +6,7 @@ const config: Config = {
|
|||||||
collectCoverage: true,
|
collectCoverage: true,
|
||||||
collectCoverageFrom: [
|
collectCoverageFrom: [
|
||||||
"src/components/**/*.{js,jsx,ts,tsx}", // Include all components
|
"src/components/**/*.{js,jsx,ts,tsx}", // Include all components
|
||||||
|
"src/pages/**/*.{js,jsx,ts,tsx}",
|
||||||
"!src/**/*.test.{js,jsx,ts,tsx}", // Exclude test files
|
"!src/**/*.test.{js,jsx,ts,tsx}", // Exclude test files
|
||||||
"!src/**/index.{js,jsx,ts,tsx}", // Optionally exclude index files
|
"!src/**/index.{js,jsx,ts,tsx}", // Optionally exclude index files
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user