Skip to content
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

Adding Test in frontend components #1684

Closed
wants to merge 33 commits into from
Closed

Adding Test in frontend components #1684

wants to merge 33 commits into from

Conversation

Claudio-code
Copy link

@Claudio-code Claudio-code commented Jul 14, 2023

Issue #1184

Flows to be tested

  • Login redirect component
  • Logout Button in header

@Claudio-code Claudio-code marked this pull request as ready for review July 22, 2023 07:42
@razzeee
Copy link
Contributor

razzeee commented Jul 23, 2023

Great work, other then the mentioned comments, I think this misses one crucial thing. It needs to be added to the github pipeline. Maybe as a new pipeline step, so that we can validate these pass on every merge.

@Claudio-code
Copy link
Author

Claudio-code commented Jul 24, 2023

Cool i make adjustments during the week

  • We could also check for the avatar icon with user name here
  • Check the error test on the component
  • Add mock global to react-i18next
  • Remove all @ts-ignore
  • In logout test add check if have login button
  • Add tests in github pipeline

@Claudio-code
Copy link
Author

@razzeee I made the adjustments if you can review again

@razzeee
Copy link
Contributor

razzeee commented Jul 31, 2023

Hrm, seems like it's not running on our CI

@Claudio-code
Copy link
Author

Claudio-code commented Jul 31, 2023

it seems that jest is giving an error because of the typescript, I will try to adjust the configuration.

jestjs/jest#11453

i dont know how resolve it, tried rollback version and all settings but not work

@razzeee
Copy link
Contributor

razzeee commented Jul 31, 2023

I guess we're running into vercel/next.js#40183

@Claudio-code
Copy link
Author

I'm trying to apply the issue solution, but it's hard to find packages that use esm

@razzeee
Copy link
Contributor

razzeee commented Aug 2, 2023

It also makes it sound like it's an regression on their end, so maybe if they fix it upstream we could wait for it.
I guess we should test if the downgrade like someone suggests in the issue helps in our case.

@Claudio-code
Copy link
Author

I tried downgrading jest to 27 and next to 13.2 and 13.1 don't work, but I if you remove node_modules and yarn.lock works but if you remove just remove node_modules not works, I don't know why

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.

None yet

2 participants