Improve cypress

This commit is contained in:
2024-10-17 11:16:28 +02:00
parent 0c361cd013
commit 60464eb821
2 changed files with 5 additions and 1 deletions

View File

@@ -15,4 +15,8 @@ describe('App Component', () => {
failureThresholdType: 'percent', // type de tolérance (peut être 'pixel' ou 'percent') failureThresholdType: 'percent', // type de tolérance (peut être 'pixel' ou 'percent')
}); });
}); });
it('should render the Card component', () => {
cy.get('[data-testid="card"]').should('exist');
});
}); });

View File

@@ -20,7 +20,7 @@ function Card({name, social: {github, twitter, linkedin, mail}}: CardProps){
const profile = `https://1.gravatar.com/avatar/4d43af207280d1d23e2a2905577c7b6167723fec2d33f946cc86f114c1a85b8d?size=256`; const profile = `https://1.gravatar.com/avatar/4d43af207280d1d23e2a2905577c7b6167723fec2d33f946cc86f114c1a85b8d?size=256`;
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
<div className="w-full" id="top"> <div className="w-full" id="top" data-testid="card">
<div className="flex flex-col items-center justify-center max-w-xs mx-auto bg-white shadow-xl rounded-xl p-5 dark:bg-gray-800"> <div className="flex flex-col items-center justify-center max-w-xs mx-auto bg-white shadow-xl rounded-xl p-5 dark:bg-gray-800">
<div className=""> <div className="">
<img <img