Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/merge_conflicts')
-rw-r--r--spec/frontend/merge_conflicts/components/merge_conflict_resolver_app_spec.js17
-rw-r--r--spec/frontend/merge_conflicts/store/actions_spec.js10
2 files changed, 22 insertions, 5 deletions
diff --git a/spec/frontend/merge_conflicts/components/merge_conflict_resolver_app_spec.js b/spec/frontend/merge_conflicts/components/merge_conflict_resolver_app_spec.js
index edd18c57f43..1a45ada98f9 100644
--- a/spec/frontend/merge_conflicts/components/merge_conflict_resolver_app_spec.js
+++ b/spec/frontend/merge_conflicts/components/merge_conflict_resolver_app_spec.js
@@ -6,6 +6,7 @@ import { shallowMountExtended, extendedWrapper } from 'helpers/vue_test_utils_he
import InlineConflictLines from '~/merge_conflicts/components/inline_conflict_lines.vue';
import ParallelConflictLines from '~/merge_conflicts/components/parallel_conflict_lines.vue';
import component from '~/merge_conflicts/merge_conflict_resolver_app.vue';
+import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import { createStore } from '~/merge_conflicts/store';
import { decorateFiles } from '~/merge_conflicts/utils';
import { conflictsMock } from '../mock_data';
@@ -49,6 +50,7 @@ describe('Merge Conflict Resolver App', () => {
const findInlineConflictLines = (w = wrapper) => w.findComponent(InlineConflictLines);
const findParallelConflictLines = (w = wrapper) => w.findComponent(ParallelConflictLines);
const findCommitMessageTextarea = () => wrapper.findByTestId('commit-message');
+ const findClipboardButton = (w = wrapper) => w.findComponent(ClipboardButton);
it('shows the amount of conflicts', () => {
mountComponent();
@@ -131,6 +133,21 @@ describe('Merge Conflict Resolver App', () => {
expect(parallelConflictLinesComponent.props('file')).toEqual(decoratedMockFiles[0]);
});
});
+
+ describe('clipboard button', () => {
+ it('exists', () => {
+ mountComponent();
+ expect(findClipboardButton().exists()).toBe(true);
+ });
+
+ it('has the correct props', () => {
+ mountComponent();
+ expect(findClipboardButton().attributes()).toMatchObject({
+ text: decoratedMockFiles[0].filePath,
+ title: 'Copy file path',
+ });
+ });
+ });
});
describe('submit form', () => {
diff --git a/spec/frontend/merge_conflicts/store/actions_spec.js b/spec/frontend/merge_conflicts/store/actions_spec.js
index d2c4c8b796c..6fbd17af5af 100644
--- a/spec/frontend/merge_conflicts/store/actions_spec.js
+++ b/spec/frontend/merge_conflicts/store/actions_spec.js
@@ -134,7 +134,7 @@ describe('merge conflicts actions', () => {
describe('setLoadingState', () => {
it('commits the right mutation', () => {
- testAction(
+ return testAction(
actions.setLoadingState,
true,
{},
@@ -151,7 +151,7 @@ describe('merge conflicts actions', () => {
describe('setErrorState', () => {
it('commits the right mutation', () => {
- testAction(
+ return testAction(
actions.setErrorState,
true,
{},
@@ -168,7 +168,7 @@ describe('merge conflicts actions', () => {
describe('setFailedRequest', () => {
it('commits the right mutation', () => {
- testAction(
+ return testAction(
actions.setFailedRequest,
'errors in the request',
{},
@@ -207,7 +207,7 @@ describe('merge conflicts actions', () => {
describe('setSubmitState', () => {
it('commits the right mutation', () => {
- testAction(
+ return testAction(
actions.setSubmitState,
true,
{},
@@ -224,7 +224,7 @@ describe('merge conflicts actions', () => {
describe('updateCommitMessage', () => {
it('commits the right mutation', () => {
- testAction(
+ return testAction(
actions.updateCommitMessage,
'some message',
{},