Skip to content

Conversation

@jeffibm
Copy link
Member

@jeffibm jeffibm commented May 6, 2024

yarn run jest -t 'Attach / Detach form component' --testPathPattern app/javascript/spec/cloud-volume-form/attach-detach-cloud-volume-form.spec.js

Before

 PASS  app/javascript/spec/cloud-volume-form/attach-detach-cloud-volume-form.spec.js
  Attach / Detach form component
    ✓ should render form (9ms)
    ✓ should render Attach Selected Cloud Volume to an Instance form (84ms)
    ✓ should render Detach Selected Cloud Volume from an Instance form (14ms)
    ✓ should render Attach Cloud Volume to the Selected Instance form (19ms)
    ✓ should render Detach Cloud Volume from the Selected Instance form (12ms)
    ✓ should submit Attach API call (14ms)
    ✓ should submit Detach API call (17ms)

  console.error node_modules/react-dom/cjs/react-dom.development.js:88
    Warning: An update to AttachDetachCloudVolumeForm inside a test was not wrapped in act(...).
    
    When testing, code that causes React state updates should be wrapped into act(...):
    
    act(() => {
      /* fire events that update state */
    });
    /* assert on the output */
    
    This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act
        in AttachDetachCloudVolumeForm
        in Provider (created by WrapperComponent)
        in WrapperComponent

Test Suites: 1 passed, 1 total
Tests:       7 passed, 7 total
Snapshots:   7 passed, 7 total
Time:        3.811s

After

 PASS  app/javascript/spec/cloud-volume-form/attach-detach-cloud-volume-form.spec.js
  Attach / Detach form component
    ✓ should render form (12ms)
    ✓ should render Attach Selected Cloud Volume to an Instance form (90ms)
    ✓ should render Detach Selected Cloud Volume from an Instance form (15ms)
    ✓ should render Attach Cloud Volume to the Selected Instance form (26ms)
    ✓ should render Detach Cloud Volume from the Selected Instance form (14ms)
    ✓ should submit Attach API call (22ms)
    ✓ should submit Detach API call (13ms)

Test Suites: 1 passed, 1 total
Tests:       7 passed, 7 total
Snapshots:   7 passed, 7 total
Time:        4.649s, estimated 6s

@jeffibm jeffibm added the test label May 6, 2024
@jeffibm jeffibm requested a review from a team as a code owner May 6, 2024 12:27
@jeffibm jeffibm mentioned this pull request May 6, 2024
35 tasks
@GilbertCherrie
Copy link
Member

@jeffibm Please update the snapshots for this spec file, they are failing locally

@jeffibm jeffibm force-pushed the attach-detach-cloud-volume-form-test branch from 406b920 to 5b71b98 Compare May 16, 2024 06:20
@jeffibm jeffibm force-pushed the attach-detach-cloud-volume-form-test branch from 9960f09 to 7280c8b Compare May 16, 2024 06:22
@miq-bot
Copy link
Member

miq-bot commented May 16, 2024

Checked commit jeffbonson@7280c8b with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
0 files checked, 0 offenses detected
Everything looks fine. 👍

@GilbertCherrie GilbertCherrie merged commit ba709e0 into ManageIQ:master May 16, 2024
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