Skip to content

Commit

Permalink
test: ProfilePage.cy.tsx
Browse files Browse the repository at this point in the history
  GIVEN profile component
  WHEN render the component
  THEN see it
  • Loading branch information
akovylyaeva committed Jun 28, 2024
1 parent 83e7371 commit 0509fec
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions src/features/profile/ProfilePage.cy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { ProfilePage } from './ProfilePage';

describe('ProfilePage', () => {
it(`
GIVEN profile component
WHEN render the component
THEN see it
`, () => {
mountComponent();

cy
.getByData('profile')
.should('exist');
});
});

function mountComponent() {
cy.mount(
<ProfilePage />,
);
}
2 changes: 1 addition & 1 deletion src/features/profile/ProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function ProfilePage() {
}, []);

return (
<div className="profile">
<div className="profile" data-cy="profile">
<div className="profile__inner">
<div className="profile__box">
<h2 className="profile__head">General information</h2>
Expand Down

0 comments on commit 0509fec

Please sign in to comment.