Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: add the preferences/account page #999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 35 commits into from
Apr 15, 2022
Merged

Conversation

BrunoQuaresma
Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma commented Apr 13, 2022

Hey folks, I added some components and “helper” functions on this PR that could be useful for the team:

  • renderWithAuth - test helper to render authenticated pages
  • <FormStack> - to make the spacing between the fields consistent
  • getFormErrorsFromApiError - map API errors to formik errors

Closes #755

@BrunoQuaresma BrunoQuaresma self-assigned this Apr 13, 2022
@BrunoQuaresma BrunoQuaresma requested review from presleyp and a team as code owners April 13, 2022 21:56
@codecov
Copy link

codecov bot commented Apr 13, 2022

Codecov Report

Merging #999 (59bac76) into main (1c55572) will increase coverage by 9.99%.
The diff coverage is 86.25%.

@@            Coverage Diff             @@
##             main     #999      +/-   ##
==========================================
+ Coverage   57.35%   67.35%   +9.99%     
==========================================
  Files         256      259       +3     
  Lines       14987    15059      +72     
  Branches      136      151      +15     
==========================================
+ Hits         8596    10143    +1547     
+ Misses       5473     3896    -1577     
- Partials      918     1020     +102     
Flag Coverage Δ
unittest-go-macos-latest 53.63% <ø> (-0.13%) ⬇️
unittest-go-postgres- 66.62% <ø> (?)
unittest-go-ubuntu-latest 56.01% <ø> (-0.16%) ⬇️
unittest-go-windows-2022 52.98% <ø> (-0.09%) ⬇️
unittest-js 68.20% <86.25%> (+5.22%) ⬆️
Impacted Files Coverage Δ
site/src/components/Page/RequireAuth.tsx 87.50% <0.00%> (+87.50%) ⬆️
site/src/test_helpers/entities.ts 100.00% <ø> (ø)
site/src/api/index.ts 62.79% <50.00%> (-2.21%) ⬇️
site/src/xServices/auth/authXService.ts 80.00% <77.77%> (-1.82%) ⬇️
site/src/test_helpers/index.tsx 94.44% <83.33%> (-5.56%) ⬇️
site/src/api/errors.ts 85.71% <85.71%> (ø)
site/src/components/Stack/Stack.tsx 85.71% <85.71%> (ø)
site/src/pages/preferences/account.tsx 89.47% <88.23%> (+89.47%) ⬆️
site/src/components/Form/index.ts 100.00% <100.00%> (ø)
site/src/components/Preferences/AccountForm.tsx 100.00% <100.00%> (ø)
... and 24 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c55572...59bac76. Read the comment docs.

@BrunoQuaresma BrunoQuaresma enabled auto-merge (squash) April 15, 2022 14:17
expect(
mapApiErrorToFieldErrors({
message: "Invalid entry",
errors: [{ detail: "Username is already in use", field: "username" }],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love having these tests because it helps me see what the data structure looks like :)

Copy link
Contributor

@presleyp presleyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User Preferences Account page
4 participants