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

feat(cb2-12001): paginate AD results for test users #27

Merged
merged 5 commits into from
Jun 7, 2024

Conversation

LGin-BJSS
Copy link

Paginate tester results from AD

adds pagination when fetching tester results from AD
link to ticket number

Checklist

  • Code has been tested manually
  • PR title includes the JIRA ticket number
  • Branch is rebased against the latest develop
  • Squashed commit contains the JIRA ticket number

@naathanbrown naathanbrown changed the title Feature/cb2 12001 feat(cb2-12001): paginate AD results for test users May 31, 2024
let users = response.data.value

while (response.data['@nextlink']) {
const nextlink = response.data['@nextlink'].replace('accountEnabled+eq+true', 'accountEnabled eq true')
Copy link
Author

Choose a reason for hiding this comment

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

This pretty ugly line is because the nextlink value that MS sends back from AD converts the spaces to + signs. The plus signs then in turn break the filter (which would mean we'd only ever do the first fetch).

Choose a reason for hiding this comment

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

I love microsoft

Choose a reason for hiding this comment

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

Is there a unit test in here that validates that the + are replaced?

Copy link
Author

Choose a reason for hiding this comment

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

the unit test added in the last commit verifies it implicitly

let users = response.data.value

while (response.data['@nextlink']) {
const nextlink = response.data['@nextlink'].replace('accountEnabled+eq+true', 'accountEnabled eq true')

Choose a reason for hiding this comment

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

I love microsoft

Copy link

@naathanbrown naathanbrown left a comment

Choose a reason for hiding this comment

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

I LOVE MICROSOFT

@LGin-BJSS LGin-BJSS merged commit 09d1944 into develop Jun 7, 2024
1 of 2 checks passed
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.

4 participants