Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix frontend test errors and remove logs #462

Conversation

jean-the-coder
Copy link
Contributor

Description

The frontend tests have a lot of import/declaration errors and a lot of log output that make it hard to see any import/declaration errors since this type of error doesn't cause the test to actually fail.

The excess of logs also makes it hard to see new console logs in the browser when testing new functionality.

This PR fixes all the test errors and removes all the console logs from the current test output and most console logs from the frontend.

Changes

  • added karma verbose reporter. Though I have it commented out by default. Useful when trying to find specific tests having issues but rather noisy to have on all the time imo
  • removed most console.log statements.
  • fixed test imports/declarations
  • moved fontawesome imports into a separate module to make it easier to import fontawesome stuff for tests that need it

Copy link
Member

@AnalogJ AnalogJ left a comment

Choose a reason for hiding this comment

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

wow, you really weren't kidding when you said you were getting rid of all the console.log calls :D

One thing to note, I noticed the removal of .then() calls as part of your cleanup in a couple of places. As noted, .then is required, otherwise promise will not be fulfilled or executed.

Can you skim your changes again and check that there's no other .then() calls removed that I missed?

frontend/src/app/pages/dashboard/dashboard.component.ts Outdated Show resolved Hide resolved
@AnalogJ AnalogJ merged commit 3b6d262 into fastenhealth:main May 1, 2024
4 checks passed
@jean-the-coder jean-the-coder deleted the fix-frontend-test-errors-and-remove-logs branch May 5, 2024 20:08
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants