Skip to content

chore: Enzyme replacement in test files- PR 3 of 6 for part 2 of 3#7210

Merged
v-viyada merged 43 commits intomicrosoft:mainfrom
SaanicaG:v-sghate/EnzymeReplacementPart2
Feb 13, 2024
Merged

chore: Enzyme replacement in test files- PR 3 of 6 for part 2 of 3#7210
v-viyada merged 43 commits intomicrosoft:mainfrom
SaanicaG:v-sghate/EnzymeReplacementPart2

Conversation

@SaanicaG
Copy link
Copy Markdown
Contributor

@SaanicaG SaanicaG commented Jan 19, 2024

Details

  • Enzyme replacement done for total 20 files.

File names are mentioned below-

src/tests/unit/tests/DetailsView/components/nav-link-button.test.tsx
src/tests/unit/tests/DetailsView/components/next-requirement-button.test.tsx
src/tests/unit/tests/DetailsView/components/no-displayable-preview-features-message.test.tsx
src/tests/unit/tests/DetailsView/components/preview-features-toggle-list.test.tsx
src/tests/unit/tests/DetailsView/components/quick-assess-command-bar.test.tsx
src/tests/unit/tests/DetailsView/components/quick-assess-to-assessment-dialog.test.tsx
src/tests/unit/tests/DetailsView/components/report-export-button.test.tsx
src/tests/unit/tests/DetailsView/components/report-export-component.test.tsx
src/tests/unit/tests/DetailsView/components/requirement-context-section-factory.test.tsx
src/tests/unit/tests/DetailsView/components/requirement-context-section.test.tsx
src/tests/unit/tests/DetailsView/components/requirement-instructions.test.tsx
src/tests/unit/tests/DetailsView/components/requirement-view-title-factory.test.tsx
src/tests/unit/tests/DetailsView/components/requirement-view.test.tsx
src/tests/unit/tests/DetailsView/components/restart-scan-visual-helper-toggle.test.tsx
src/tests/unit/tests/DetailsView/components/save-assessment-button.test.tsx
src/tests/unit/tests/DetailsView/components/scan-incomplete-warning.test.tsx
src/tests/unit/tests/DetailsView/components/start-over-component-factory.test.tsx
src/tests/unit/tests/DetailsView/components/start-over-dialog.test.tsx
src/tests/unit/tests/DetailsView/components/start-over-dropdown.test.tsx
src/tests/unit/tests/DetailsView/components/static-content-details-view.test.tsx

Motivation

enzyme replacement in files under src/tests/unit/tests/DetailsView/components

Associated User Story - https://dev.azure.com/mseng/1ES/_workitems/edit/2136485

Context
  • All changes are done in test files only and snapshots are updated.

Pull request checklist

  • [n/a ] Addresses an existing issue: #0000
  • Ran yarn fastpass
  • Added/updated relevant unit test(s) (and ran yarn test)
  • Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • PR title AND final merge commit title both start with a semantic tag (fix:, chore:, feat(feature-name):, refactor:). See CONTRIBUTING.md.
  • [ n/a ] (UI changes only) Added screenshots/GIFs to description above
  • [ n/a ] (UI changes only) Verified usability with NVDA/JAWS

@SaanicaG SaanicaG changed the title V sghate/enzyme replacement part2 chore: (enzyme replacement in test files) : User story 2136485 Jan 19, 2024
@SaanicaG SaanicaG marked this pull request as ready for review January 24, 2024 14:18
@SaanicaG SaanicaG requested a review from a team as a code owner January 24, 2024 14:18
Copy link
Copy Markdown
Contributor

@madalynrose madalynrose left a comment

Choose a reason for hiding this comment

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

You did so much heavy lifting here! This looks awesome. I just realized we can simplify a lot of these tests so I marked places where we can use mocks instead of actual elements.

@DaveTryon
Copy link
Copy Markdown
Contributor

General comment: Having a series of PR's titled "... user story ABC", "... user story DEF", "...user story GHI", etc., can be useful when tracking the implementation of the work, but once the PR is merged, its value drops dramatically, especially if the engineering system ever becomes unavailable. As an alternative, may I suggest a slightly different approach, with the intent to make it possible to understand the change even without access to the ADO system (which will be the case for any external contributor, or even internal contributors should we later change engineering systems)

  • The title should capture the fact that this is part of a broader set of tasks. All tasks in the set will ideally use the same pattern
  • The description should still point to the ADO item, but will also include the set of work included in this task. There will be some duplication with ADO--that's a good thing.

So a specific one of these tasks might have a title of "chore: Enzyme replacement in test files - part 3 of 12". The description might include something like:

Files in scope for this PR:

  • src/tests/unit/tests/DetailsView/components/awesome-class.test.tsx
  • src/tests/unit/tests/DetailsView/components/amazing-component.test.tsx
  • src/tests/unit/tests/DetailsView/components/incredible-navigation.test.tsx
    etc.

@SaanicaG SaanicaG changed the title chore: (enzyme replacement in test files) : User story 2136485 chore: Enzyme replacement in test files- PR 3 of 6 for part 2 of 3 Jan 30, 2024
Copy link
Copy Markdown
Contributor

@madalynrose madalynrose left a comment

Choose a reason for hiding this comment

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

A few more comments and then this looks awesome!

Copy link
Copy Markdown
Contributor

@madalynrose madalynrose left a comment

Choose a reason for hiding this comment

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

A few more small changes!

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f54c31a) 94.31% compared to head (08d8b80) 94.31%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7210   +/-   ##
=======================================
  Coverage   94.31%   94.31%           
=======================================
  Files        1224     1224           
  Lines       20696    20696           
  Branches     1308     1308           
=======================================
  Hits        19520    19520           
  Misses       1157     1157           
  Partials       19       19           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@v-viyada v-viyada merged commit 457a477 into microsoft:main Feb 13, 2024
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.

6 participants