All files / app/assets/javascripts/vue_merge_request_widget/components/states sha_mismatch.vue

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53        3x                                                                                                
<script>
import { GlButton } from '@gitlab/ui';
import BoldText from '~/vue_merge_request_widget/components/bold_text.vue';
import { I18N_SHA_MISMATCH } from '../../i18n';
import StateContainer from '../state_container.vue';
 
export default {
  name: 'ShaMismatch',
  components: {
    BoldText,
    GlButton,
    StateContainer,
  },
  i18n: {
    I18N_SHA_MISMATCH,
  },
  props: {
    mr: {
      type: Object,
      required: true,
    },
  },
};
</script>
 
<template>
  <state-container
    status="failed"
    is-collapsible
    :collapsed="mr.mergeDetailsCollapsed"
    @toggle="() => mr.toggleMergeDetails()"
  >
    <span
      class="gl-md-mr-3 gl-flex-grow-1 gl-ml-0! gl-text-body!"
      data-testid="head-mismatch-content"
    >
      <bold-text :message="$options.i18n.I18N_SHA_MISMATCH.warningMessage" />
    </span>
    <template #actions>
      <gl-button
        data-testid="action-button"
        size="small"
        category="primary"
        variant="confirm"
        class="gl-align-self-start"
        :href="mr.mergeRequestDiffsPath"
      >
        {{ $options.i18n.I18N_SHA_MISMATCH.actionButtonLabel }}
      </gl-button>
    </template>
  </state-container>
</template>