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

🧪 MissingSkills Jest Test Broken #7515

Closed
1 task
petertgiles opened this issue Aug 3, 2023 · 3 comments · Fixed by #7531
Closed
1 task

🧪 MissingSkills Jest Test Broken #7515

petertgiles opened this issue Aug 3, 2023 · 3 comments · Fixed by #7531
Assignees
Labels
tests Procedures intended to establish the quality, performance, or reliability of something.

Comments

@petertgiles
Copy link
Contributor

🧪 Tests

The "should ignore added skills with empty experienceSkillRecords detail field" test has broken with the upgrade to Faker V8. I think there were some assumptions about how the random data looked that are no longer valid. I spent some time trying to fix it in #7481 but gave up after a while.

✅ Acceptance Criteria

  • Test reliably passes with Faker at V8.
@petertgiles petertgiles added the tests Procedures intended to establish the quality, performance, or reliability of something. label Aug 3, 2023
@vd1992
Copy link
Contributor

vd1992 commented Aug 3, 2023

The Storybook also yields clues

image

@petertgiles
Copy link
Contributor Author

The Storybook also yields clues

Ooh, that's nice! Yeah, the first assertion that fails is "assert there are four lists" which this clearly shows. I got past that by ensuring there were both technical and behavioural skills seeded. The next assertion was around how many items are in each list and that's when I gave up. 😆 This screenshot is great, though. Super helpful!

@vd1992
Copy link
Contributor

vd1992 commented Aug 3, 2023

I suggest rewriting the relevant test and story to use more explicitly defined skills and skill families.
The component takes required, optional, and added skills that are random. Which in turn have random skill families which then have randomly set skill categories (behavioural, or technical, or if two skill families might have both).
Too much randomness makes this tricky. Rendering is impacted by required vs optional as well as technical vs behavioural.
And being in sync with the Jest tests using the same input data lets you visualize each test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Procedures intended to establish the quality, performance, or reliability of something.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants