Skip to content

Conversation

@AlexJacksonDS
Copy link
Contributor

JIRA link

https://softwiretech.atlassian.net/browse/HEEDLS-711

Description

Filtering of resources where the delegate answer falls outside the range of results specified in CompetencyResourceAssessmentQuestionParameters. Refactored and added new unit tests to accommodate these changes.

Screenshots

No visual changes


Developer checks

(Leave tasks unticked if they haven't been appropriate for your ticket.)

I have:

  • Run the formatter and made sure there are no IDE errors.
  • Written tests for the changes (accessibility tests, unit tests for controller, data services, services, view models, etc)
  • Manually tested my work with and without JavaScript. Full manual testing guidelines can be found here: https://softwiretech.atlassian.net/wiki/spaces/HEE/pages/6703648740/Testing
  • Updated/added documentation in Swiki and/or Readme. Links (if any) are below:
  • Updated my Jira ticket with information about other parts of the system that were touched as part of the MR and have to be sanity tested to ensure nothing’s broken.
  • Scanned over my own MR to ensure everything is as expected.

Copy link
Contributor

@DanBloxham-sw DanBloxham-sw left a comment

Choose a reason for hiding this comment

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

Looks just about how I was expecting, though I've left a few comments to tackle.

[TestCase(2.4, 184.6)]
[TestCase(5, 195)]
public async Task
GetRecommendedLearningForSelfAssessment_returns_correct_recommendation_score_for_resource_with_learning_hub_ratings_only(
Copy link
Contributor

Choose a reason for hiding this comment

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

This test title mentions "...correct score for {factor} only" but the expected scores seem to be higher than just the individual factor's contribution, so might be worth renaming.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a consequence of me not realising the relationship was 1-1-0 (The Single comment above)
We now have 2 basic situations, either we can only calc the score from the LH rating, or we can have the LH rating + attempt both other values (req adj may be 0).
Restored these back to just the LH calculation, dropping the QuestionParameters setup.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see, the case where no QuestionParameters are set up is handled here. I think given that that case is specifically considered in the logic for determining what to hide, it might be good to specify it in the title here then. Just will make it easier to see that it has indeed be tested from a quickly glance.
Maybe something like "...for_resource_only_with_learning_hub_rating_and_no_question_parameters"?

Copy link
Contributor

@DanBloxham-sw DanBloxham-sw left a comment

Choose a reason for hiding this comment

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

Nice, think this covers everything now.

Copy link
Contributor

@livzorn livzorn 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!

@AlexJacksonDS AlexJacksonDS merged commit dfa400b into master Jan 18, 2022
@AlexJacksonDS AlexJacksonDS deleted the HEEDLS-711-filter-results-outside-range branch January 18, 2022 09:59
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.

5 participants