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

Port spec for Dialog #75

Merged
merged 1 commit into from
Sep 16, 2023
Merged

Port spec for Dialog #75

merged 1 commit into from
Sep 16, 2023

Conversation

kikuomax
Copy link
Collaborator

@kikuomax kikuomax commented Sep 4, 2023

Part of the series of PRs to port unit tests.

The following command should pass:

npx jest src/components/dialog

Related to:

Proposed Changes

  • Port spec for Dialog

- Updates the unit tests (spec) of `Dialog` so that they can work with
  `@vue/test-utils` V2 and the breaking change:
    - Renames `onConfirm` prop to `confirmCallback` because Buefy for
      Vue 3 replaced it to avoid conflict with event listeners.
    - The following test cases also verify if a "confirm" event is
      emitted:
        - "close on confirm"
        - "closeOnConfirm prop equals false"
    - Awaits `wrapper.setProps` to make sure the subsequent tests verify
      the updated state.
    - Replaces a legacy async test case with an async function.
    - Replaces `wrapper.name()` with `wrapper.vm.$options.name` because
      `wrapper.name` no longer exists in `@vue/test-utils` V2.
    - Replaces the test on `wrapper.isVueInstance()` with presence of
      `wrapper.vm` because `wrapper.isVueInstance` no longer exists in
      `@vue/test-utils` V2.

issue ntohq#1
@wesdevpro wesdevpro merged commit b4381ac into ntohq:dev Sep 16, 2023
@kikuomax kikuomax deleted the test-dialog branch September 18, 2023 01:40
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.

2 participants