Skip to content

Fix main-jh order summary promotional offer text

Fixed jest pipeline https://jihulab.com/gitlab-cn/gitlab/-/jobs/7592715

Sync upstream code.

Summary of all failing tests
FAIL ee/spec/frontend/subscriptions/new/components/checkout/order_summary_spec.js
  ● Order Summary › promotional offer text › shows promotional offer text when present
          Expected to be: "Pricing reflective of limited-time offer."
          Received:       "Promotional Offer Text"
      763 |       await waitForPromises();
      764 |
    > 765 |       expect(findPromotionalOfferText().text()).toMatchInterpolatedText(PROMO_CODE_OFFER_TEXT);
          |                                                 ^
      766 |     });
      767 |
      768 |     it('shows promotional offer link when present', async () => {
            
      at Object.toMatchInterpolatedText (ee/spec/frontend/subscriptions/new/components/checkout/order_summary_spec.js:765:49)
  ● Order Summary › promotional offer text › shows promotional offer link when present
    [vue-test-utils]: find did not return Component, cannot call attributes() on empty Wrapper
      772 |       await waitForPromises();
      773 |
    > 774 |       expect(findPromotionalOfferText().findComponent(GlLink).attributes('href')).toEqual(
          |                                                               ^
      775 |         PROMO_CODE_TERMS_LINK,
      776 |       );
      777 |     });
      at throwError (node_modules/@vue/test-utils/dist/vue-test-utils.js:1700:9)
      at ErrorWrapper.attributes (node_modules/@vue/test-utils/dist/vue-test-utils.js:8764:3)
      at Object.attributes (ee/spec/frontend/subscriptions/new/components/checkout/order_summary_spec.js:774:63)
  ● Order Summary › promotional offer text › shows promotional offer link when present
    expect.hasAssertions()
    Expected at least one assertion to be called but received none.
      71 |   // see https://jestjs.io/docs/en/expect#expecthasassertions
      72 |   // eslint-disable-next-line jest/no-standalone-expect
    > 73 |   expect.hasAssertions();
         |          ^
      74 |
      75 |   // Reset globals: This ensures tests don't interfere with
      76 |   // each other, and removes the need to tidy up if it was
      at Object.hasAssertions (spec/frontend/__helpers__/shared_test_setup.js:73:10)
Test Suites: 1 failed, 548 passed, 549 total
Tests:       2 failed, 15 skipped, 6295 passed, 6312 total
Snapshots:   54 passed, 54 total
Time:        1234.929 s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
TianLu 编辑于

合并请求报告

加载中