Commit 98a52270 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch 'replace-GldeprecatedBadge-for-geo-node-form-app' into 'master'

Replace GlDeprecated Badge for geo app & Update Tests accordingly

See merge request gitlab-org/gitlab!46225
parents 8c504717 ea8ab7d9
<script>
import { GlDeprecatedBadge as GlBadge } from '@gitlab/ui';
import { GlBadge } from '@gitlab/ui';
import { __ } from '~/locale';
import GeoNodeForm from './geo_node_form.vue';
......@@ -33,7 +33,7 @@ export default {
},
pillDetails() {
return {
variant: this.isNodePrimary ? 'primary' : 'light',
variant: this.isNodePrimary ? 'info' : 'muted',
label: this.isNodePrimary ? __('Primary') : __('Secondary'),
};
},
......
---
title: Replace GlDeprecated Badge in ee/app/assets/javascripts/geo_node_form/components/app.vue
merge_request: 46225
author:
type: changed
import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedBadge as GlBadge } from '@gitlab/ui';
import { GlBadge } from '@gitlab/ui';
import GeoNodeFormApp from 'ee/geo_node_form/components/app.vue';
import GeoNodeForm from 'ee/geo_node_form/components/geo_node_form.vue';
import { MOCK_SELECTIVE_SYNC_TYPES, MOCK_SYNC_SHARDS } from '../mock_data';
......@@ -34,9 +34,9 @@ describe('GeoNodeFormApp', () => {
describe.each`
formType | node | title | pillTitle | variant
${'create a secondary node'} | ${null} | ${'Add New Node'} | ${'Secondary'} | ${'light'}
${'update a secondary node'} | ${{ primary: false }} | ${'Edit Geo Node'} | ${'Secondary'} | ${'light'}
${'update a primary node'} | ${{ primary: true }} | ${'Edit Geo Node'} | ${'Primary'} | ${'primary'}
${'create a secondary node'} | ${null} | ${'Add New Node'} | ${'Secondary'} | ${'muted'}
${'update a secondary node'} | ${{ primary: false }} | ${'Edit Geo Node'} | ${'Secondary'} | ${'muted'}
${'update a primary node'} | ${{ primary: true }} | ${'Edit Geo Node'} | ${'Primary'} | ${'info'}
`(`form header`, ({ formType, node, title, pillTitle, variant }) => {
describe(`when node form is to ${formType}`, () => {
beforeEach(() => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment