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

fix(#602): fix errors with validate functions #604

Merged
merged 2 commits into from
Jan 31, 2024
Merged

fix(#602): fix errors with validate functions #604

merged 2 commits into from
Jan 31, 2024

Conversation

1yuv
Copy link
Member

@1yuv 1yuv commented Jan 24, 2024

Description

Fixes issue with #602, which was cause by recent change in apiUrl

#602

Code review items

  • Readable: Concise, well named, follows the style guide, documented if necessary.
  • Documented: Configuration and user documentation on cht-docs
  • Tested: Unit and/or integration tests where appropriate
  • Backwards compatible: Works with existing data and configuration. Any breaking changes documented in the release notes.

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

@dianabarsan
Copy link
Member

@1yuv it looks like all your builds are failing, and it seems like your change is causing it :(

Copy link
Member

@dianabarsan dianabarsan left a comment

Choose a reason for hiding this comment

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

@1yuv
I've been looking at this failing test and it's completely broken. On main, the error that makes the test pass is not the one that is expected, a form validation error, instead it's assuming the environment is initialized when it's not.
You can easily check this by throwing or logging the error.

I'm not even sure how this test came to be, it doesn't seem we even run validations on upload anymore. I think it's safe to disable this test and create an issue to check which tests should actually run for upload-forms.

@@ -17,6 +17,13 @@ describe('environment', () => {
});
});

describe('apiUrl initialize empty', ()=>{
it('undefined apiUrl remains undefined', ()=>{
Copy link
Member

Choose a reason for hiding this comment

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

Upon further checks, the value that comes when the instance is not required is Boolean false, not undefined, so I think this test should reflect this.

@1yuv 1yuv merged commit 24f66bf into main Jan 31, 2024
13 checks passed
@1yuv 1yuv deleted the 602 branch January 31, 2024 01:42
@medic-ci
Copy link
Collaborator

🎉 This PR is included in version 3.21.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants