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

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorSarah German <sgerman@gitlab.com>2022-12-12 20:12:59 +0300
committerSuzanne Selhorn <sselhorn@gitlab.com>2022-12-12 20:12:59 +0300
commit44a6968c0e93823b3a28a720a6214ae8d87cd903 (patch)
tree79ff0dc8efb9ea38d699555481dd97c8a4b8bed9 /spec
parent10a3e5f53b216baa7154894578d0a25ee81be738 (diff)
Add a breaking changes filter to the deprecations list
Diffstat (limited to 'spec')
-rw-r--r--spec/frontend/deprecations/deprecation_filters_spec.js26
1 files changed, 4 insertions, 22 deletions
diff --git a/spec/frontend/deprecations/deprecation_filters_spec.js b/spec/frontend/deprecations/deprecation_filters_spec.js
index d5149792..5cf28357 100644
--- a/spec/frontend/deprecations/deprecation_filters_spec.js
+++ b/spec/frontend/deprecations/deprecation_filters_spec.js
@@ -5,32 +5,14 @@
import { mount } from '@vue/test-utils';
import DeprecationFilters from '../../../content/frontend/deprecations/components/deprecation_filters.vue';
-const propsData = { showAllText: 'Show all', milestonesList: [{ value: '160', text: '16.0' }] };
+const propsData = { showAllText: 'Show all', milestonesOptions: [{ value: '160', text: '16.0' }] };
const removalsFilterSelector = '[data-testid="removal-milestone-filter"]';
+const breakingFilterSelector = '[data-testid="breaking-filter"]';
describe('component: Deprecations Filter', () => {
- it('Filter is visible', () => {
+ it('Filters are visible', () => {
const wrapper = mount(DeprecationFilters, { propsData });
expect(wrapper.find(removalsFilterSelector).isVisible()).toBe(true);
- });
-
- it('Validates a URL parameter', () => {
- const location = {
- ...window.location,
- search: '?removal_milestone=16.0',
- toString: () => {
- return 'http://localhost/ee/update/deprecations.html';
- },
- };
- Object.defineProperty(window, 'location', {
- writable: true,
- value: location,
- });
-
- const searchParams = new URLSearchParams(window.location.search);
- const versionValue = searchParams.get('removal_milestone').replace(/\./g, '');
-
- const wrapper = mount(DeprecationFilters, { propsData });
- expect(wrapper.vm.isValidVersion(versionValue)).toBe(true);
+ expect(wrapper.find(breakingFilterSelector).isVisible()).toBe(true);
});
});