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(loginByAPI): update loginByApi cypress command to support v42 #402

Merged
merged 2 commits into from
May 24, 2024

Conversation

d-rita
Copy link
Contributor

@d-rita d-rita commented May 16, 2024


Description:

  • From the discussion in the above ticket, app versions 41+ can make use of the new endpoints.
  • The implementation in this PR checks for the loginConfig, and if it exists (v41+), login happens via the new login endpoint.
  • If it does not (v40 and below), login happens via the old login endpoint.

How to test:

To test, run yarn cy:local

@d-rita d-rita force-pushed the DHIS2-17212/loginByAPI-command branch from c03f7ca to df24f1a Compare May 16, 2024 05:16
@d-rita d-rita changed the title fix(loginByAPI-command): update loginByApi Cypress command to support v41+ fix(loginByAPI-command): update loginByApi Cypress command to support v42 May 16, 2024
@d-rita d-rita force-pushed the DHIS2-17212/loginByAPI-command branch from df24f1a to 37386ee Compare May 16, 2024 05:19
@d-rita d-rita marked this pull request as ready for review May 16, 2024 05:26
@d-rita d-rita requested review from Mohammer5 and tomzemp May 16, 2024 05:26
@d-rita d-rita changed the title fix(loginByAPI-command): update loginByApi Cypress command to support v42 fix(loginByAPI): update loginByApi Cypress command to support v42 May 16, 2024
@d-rita d-rita changed the title fix(loginByAPI): update loginByApi Cypress command to support v42 fix(loginByAPI): update loginByApi cypress command to support v42 May 16, 2024
@d-rita d-rita force-pushed the DHIS2-17212/loginByAPI-command branch from 37386ee to 3aff814 Compare May 16, 2024 11:36
Copy link
Member

@tomzemp tomzemp left a comment

Choose a reason for hiding this comment

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

Looks good! 🚀

url: `${baseUrl}/api/loginConfig`,
method: 'GET',
}).then((response) => {
// Versions <= 41
Copy link
Member

Choose a reason for hiding this comment

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

I think this comment should be // Versions >= 41

},
})
} else {
// Versions >=40
Copy link
Member

Choose a reason for hiding this comment

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

// Versions <= 40?

@d-rita d-rita merged commit 6109ee5 into master May 24, 2024
7 checks passed
@d-rita d-rita deleted the DHIS2-17212/loginByAPI-command branch May 24, 2024 06:36
dhis2-bot added a commit that referenced this pull request May 24, 2024
## [10.0.6](v10.0.5...v10.0.6) (2024-05-24)

### Bug Fixes

* **loginByAPI:** update loginByApi cypress command to support v42 ([#402](#402)) ([6109ee5](6109ee5))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 10.0.6 🎉

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