Project

General

Profile

Bug #28446

React UI Snapshot Tests are failing and out of date

Added by Eric Helms 6 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tests
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:

Description

Summary of all failing tests
 FAIL  webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
  ● subscriptionTypeFormatter › renders link to a host

    expect(received).toMatchSnapshot()

    Snapshot name: `subscriptionTypeFormatter renders link to a host 1`

    - Snapshot
    + Received

    @@ -1,11 +1,10 @@
      <td>
        <span>
          Guests of

          <Link
    -       replace={false}
            to="/content_hosts/83/" 
          >
            host.example.com
          </Link>
        </span>

      29 |     const formatter = subscriptionTypeFormatter(null, data({ hypervisor: { name: 'host.example.com', id: 83 } }));
      30 | 
    > 31 |     expect(toJson(shallow(formatter))).toMatchSnapshot();
         |                                        ^
      32 |   });
      33 | });
      34 | 

      at _callee4$ (webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js:31:40)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:271:22)
      at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
      at invoke (node_modules/regenerator-runtime/runtime.js:135:20)
      at node_modules/regenerator-runtime/runtime.js:170:11
      at callInvokeWithMethodAndArg (node_modules/regenerator-runtime/runtime.js:169:16)
      at AsyncIterator.enqueue (node_modules/regenerator-runtime/runtime.js:192:13)
      at AsyncIterator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
      at Object.<anonymous>.exports.async (node_modules/regenerator-runtime/runtime.js:216:14)
      at Object._callee4 (webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js:28:32)

 FAIL  webpack/components/Content/Details/__tests__/ContentDetails.test.js
  ● Content Details Info › should render and contain appropriate components

    expect(received).toMatchSnapshot()

    Snapshot name: `Content Details Info should render and contain appropriate components 1`

    - Snapshot
    + Received

    @@ -2,11 +2,11 @@
        <LoadingState
          loading={true}
          loadingText="Loading" 
          timeout={300}
        >
    -     <ForwardRef
    +     <Uncontrolled(TabContainer)
            defaultActiveKey={1}
            id="content-tabs-container" 
          >
            <Grid
              bsClass="container-fluid" 
    @@ -126,8 +126,8 @@
                    </Col>
                  </Row>
                </TabPane>
              </TabContent>
            </Grid>
    -     </ForwardRef>
    +     </Uncontrolled(TabContainer)>
        </LoadingState>
      </div>

      58 |     />);
      59 | 
    > 60 |     expect(toJson(wrapper)).toMatchSnapshot();
         |                             ^
      61 |     expect(wrapper.find(ContentDetailInfo)).toHaveLength(1);
      62 |     expect(wrapper.find(ContentDetailRepositories)).toHaveLength(1);
      63 |   });

      at _callee$ (webpack/components/Content/Details/__tests__/ContentDetails.test.js:60:29)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:271:22)
      at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
      at invoke (node_modules/regenerator-runtime/runtime.js:135:20)
      at node_modules/regenerator-runtime/runtime.js:170:11
      at callInvokeWithMethodAndArg (node_modules/regenerator-runtime/runtime.js:169:16)
      at AsyncIterator.enqueue (node_modules/regenerator-runtime/runtime.js:192:13)
      at AsyncIterator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
      at Object.<anonymous>.exports.async (node_modules/regenerator-runtime/runtime.js:216:14)
      at Object._callee (webpack/components/Content/Details/__tests__/ContentDetails.test.js:12:58)

 FAIL  webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
  ● subscriptions details page › should render and contain appropiate components

    expect(received).toMatchSnapshot()

    Snapshot name: `subscriptions details page should render and contain appropiate components 1`

    - Snapshot
    + Received

    @@ -19,11 +19,11 @@
              },
            }
          }
          onSwitcherItemClick={[Function]}
        />
    -   <ForwardRef
    +   <Uncontrolled(TabContainer)
          defaultActiveKey={1}
          id="subscription-tabs-container" 
        >
          <div>
            <LoadingState
    @@ -526,7 +526,7 @@
                  </TabPane>
                </TabContent>
              </Grid>
            </LoadingState>
          </div>
    -   </ForwardRef>
    +   </Uncontrolled(TabContainer)>
      </div>

      28 |     expect(wrapper.find(SubscriptionDetailProducts)).toHaveLength(1);
      29 |     expect(wrapper.find(SubscriptionDetailProductContent)).toHaveLength(1);
    > 30 |     expect(toJson(wrapper)).toMatchSnapshot();
         |                             ^
      31 |   });
      32 | });
      33 | 

      at _callee$ (webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js:30:29)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:271:22)
      at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
      at invoke (node_modules/regenerator-runtime/runtime.js:135:20)
      at node_modules/regenerator-runtime/runtime.js:170:11
      at callInvokeWithMethodAndArg (node_modules/regenerator-runtime/runtime.js:169:16)
      at AsyncIterator.enqueue (node_modules/regenerator-runtime/runtime.js:192:13)
      at AsyncIterator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
      at Object.<anonymous>.exports.async (node_modules/regenerator-runtime/runtime.js:216:14)
      at Object._callee (webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js:15:57)

Snapshot Summary
 › 3 snapshots failed from 3 test suites. Inspect your code changes or run `npm test -- -u` to update them.

Test Suites: 3 failed, 80 passed, 83 total
Tests:       3 failed, 285 passed, 288 total
Snapshots:   3 failed, 162 passed, 165 total
Time:        14.857s
Ran all test suites matching /webpack/i.
npm ERR! Test failed.  See above for more details.

Associated revisions

Revision 38bcdd15 (diff)
Added by Eric Helms 6 months ago

Fixes #28446: Fix out of date react snapshots

Revision d3ce6ce9 (diff)
Added by James Jeffers 6 months ago

Fixes #28446 - reverting snap update (#8480)

History

#1 Updated by The Foreman Bot 6 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8464 added

#2 Updated by The Foreman Bot 6 months ago

  • Fixed in Releases Katello 3.15.0 added

#3 Updated by Eric Helms 6 months ago

  • Status changed from Ready For Testing to Closed

#4 Updated by James Jeffers 6 months ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.15.0

#5 Updated by The Foreman Bot 6 months ago

  • Pull request https://github.com/Katello/katello/pull/8480 added

#6 Updated by Jonathon Turel 3 months ago

  • Category set to Tests

Also available in: Atom PDF