Commit b176818d authored by Coung Ngo's avatar Coung Ngo Committed by Mike Greiling

Remove refs from environment_picker.vue

Remove refs as they are not used in production code
parent 7ec12ca8
......@@ -42,7 +42,6 @@ export default {
>
<gl-dropdown
:id="$options.environmentFilterId"
ref="environmentsDropdown"
class="gl-display-flex"
toggle-class="gl-truncate"
:text="environmentName"
......@@ -51,16 +50,12 @@ export default {
<gl-dropdown-item
v-for="environment in environments"
:key="environment.id"
ref="environmentsDropdownItem"
@click="setCurrentEnvironmentId(environment.id)"
>{{ environment.name }}</gl-dropdown-item
>
<gl-dropdown-item
v-if="includeAll"
ref="environmentsDropdownItem"
@click="setAllEnvironments"
>{{ $options.ALL_ENVIRONMENT_NAME }}</gl-dropdown-item
>
<gl-dropdown-item v-if="includeAll" @click="setAllEnvironments">{{
$options.ALL_ENVIRONMENT_NAME
}}</gl-dropdown-item>
</gl-dropdown>
</gl-form-group>
</template>
import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import EnvironmentPicker from 'ee/threat_monitoring/components/environment_picker.vue';
import {
......@@ -25,8 +26,8 @@ describe('EnvironmentPicker component', () => {
});
};
const findEnvironmentsDropdown = () => wrapper.find({ ref: 'environmentsDropdown' });
const findEnvironmentsDropdownItems = () => wrapper.findAll({ ref: 'environmentsDropdownItem' });
const findEnvironmentsDropdown = () => wrapper.findComponent(GlDropdown);
const findEnvironmentsDropdownItems = () => wrapper.findAllComponents(GlDropdownItem);
afterEach(() => {
wrapper.destroy();
......
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