From 482d644b2f5dd196aa48daa49c23b15bff63f0fc Mon Sep 17 00:00:00 2001 From: vladislavkeblysh Date: Thu, 26 Oct 2023 13:50:06 +0300 Subject: [PATCH] feat: fixed displaying field and visibility forms --- src/profile/ProfilePage.test.jsx | 28 - .../__snapshots__/ProfilePage.test.jsx.snap | 714 ++++-------------- 2 files changed, 143 insertions(+), 599 deletions(-) diff --git a/src/profile/ProfilePage.test.jsx b/src/profile/ProfilePage.test.jsx index 024d776e7..411ca4536 100644 --- a/src/profile/ProfilePage.test.jsx +++ b/src/profile/ProfilePage.test.jsx @@ -148,34 +148,6 @@ describe('', () => { expect(tree).toMatchSnapshot(); }); - it('viewing other profile with name and country', () => { - const contextValue = { - authenticatedUser: { userId: 123, username: 'staff', administrator: true }, - config: getConfig(), - }; - - const component = ( - - ); - const tree = renderer.create(component).toJSON(); - expect(tree).toMatchSnapshot(); - }); - it('while saving an edited bio', () => { const contextValue = { authenticatedUser: { userId: 123, username: 'staff', administrator: true }, diff --git a/src/profile/__snapshots__/ProfilePage.test.jsx.snap b/src/profile/__snapshots__/ProfilePage.test.jsx.snap index 0100236ed..28229bb4e 100644 --- a/src/profile/__snapshots__/ProfilePage.test.jsx.snap +++ b/src/profile/__snapshots__/ProfilePage.test.jsx.snap @@ -5643,7 +5643,7 @@ exports[` Renders correctly in various states test preferreded la `; -exports[` Renders correctly in various states viewing other profile 1`] = ` +exports[` Renders correctly in various states viewing other profile with all fields 1`] = `
@@ -5704,7 +5704,7 @@ exports[` Renders correctly in various states viewing other profi

- verified + staff

Renders correctly in various states viewing other profi

Renders correctly in various states viewing other profi

- verified + staff

Renders correctly in various states viewing other profi

Renders correctly in various states viewing other profi

- -
Renders correctly in various states viewing other profi className="edit-section-header" id={null} > - About Me + Social Links
-

- bio -

+
- - - -`; - -exports[` Renders correctly in various states viewing other profile with all fields 1`] = ` -
-
-
-
- +

+ About Me +

-
- -
+ bio +

-
-
- -

- verified -

-

- Member since - 2017 -

- - - - - -
- Your profile information is only visible to you. Only your username is visible to others on localhost. -
+ My Certificates +
-
-
+ You don't have any certificates yet. +
-
-
-
-
- -

- verified -

-

- Member since - 2017 -

-
- - - - - -
- Your profile information is only visible to you. Only your username is visible to others on localhost. -
-
-
-
-
-
-
-
-
-

- Full Name -

-
-

- user -

-
-
-
-
-
-

- Location -

-
-

-

-
-
-
-
-

- Primary Language Spoken -

-
-

-

-
-
-
-
-

- Education -

-
-

- Other education -

-
-
-
-
-
-
-
-

- About Me -

-
-

- bio -

-
-
-
-
-
-
-`; - -exports[` Renders correctly in various states viewing other profile with name and country 1`] = ` -
-
-
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -

- verified -

-

- Member since - 2017 -

-
- - - - - -
- Your profile information is only visible to you. Only your username is visible to others on localhost. -
-
-
-
-
-
-
-
-
-
-
- -

- verified -

-

- Member since - 2017 -

-
- - - - - -
- Your profile information is only visible to you. Only your username is visible to others on localhost. -
-
-
-
-
-
-
-
-
-

- Full Name -

-
-

- user -

-
-
-
-
-
-

- Location -

-
-

-

-
-
-
-
`;