diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-04 18:08:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-04 18:08:40 +0300 |
commit | 001c23394e75d0e797261527779294ad11542f6d (patch) | |
tree | 20d27fcee25e14242ee85cdb0b9ad794ecc0c103 /spec/frontend/vue_merge_request_widget/components/states/mr_widget_merged_spec.js | |
parent | 25f102516f8d77c397c768baa2e550779cc9c60b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_merge_request_widget/components/states/mr_widget_merged_spec.js')
-rw-r--r-- | spec/frontend/vue_merge_request_widget/components/states/mr_widget_merged_spec.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_merged_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_merged_spec.js index e44e2834a0e..5efb1dcce42 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_merged_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_merged_spec.js @@ -1,4 +1,4 @@ -import { getByRole } from '@testing-library/dom'; +import { getAllByRole } from '@testing-library/dom'; import { nextTick } from 'vue'; import { mount } from '@vue/test-utils'; import waitForPromises from 'helpers/wait_for_promises'; @@ -132,7 +132,7 @@ describe('MRWidgetMerged', () => { createComponent(); const eventHubSpy = jest.spyOn(modalEventHub, '$emit'); - getByRole(wrapper.element, 'button', { name: /Revert/i }).click(); + getAllByRole(wrapper.element, 'button', { name: /Revert/i })[0].click(); expect(eventHubSpy).toHaveBeenCalledWith(OPEN_REVERT_MODAL); }); @@ -141,7 +141,7 @@ describe('MRWidgetMerged', () => { createComponent(); const eventHubSpy = jest.spyOn(modalEventHub, '$emit'); - getByRole(wrapper.element, 'button', { name: /Cherry-pick/i }).click(); + getAllByRole(wrapper.element, 'button', { name: /Cherry-pick/i })[0].click(); expect(eventHubSpy).toHaveBeenCalledWith(OPEN_CHERRY_PICK_MODAL); }); |