Commit 698de628 authored by Paul Slaughter's avatar Paul Slaughter

Fix jest spec using old GlTab interface

This was caused by the [update to the GlTab component in gitlab-u][1]
and then [bumping our gitlab-ui version][2]. Unfortunately, we
only had a CE MR for bumping the gitlab-ui version. 😞

[1]: https://gitlab.com/gitlab-org/gitlab-ui/merge_requests/623
[2]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31242
parent a5521e40
......@@ -120,7 +120,6 @@ export default {
v-for="listType in listTypes"
:key="listType.namespace"
:disabled="isTabDisabled(listType.namespace)"
title-link-class="js-tab"
>
<template v-slot:title>
{{ listType.label }}
......
......@@ -308,7 +308,7 @@ describe('DependenciesApp component with dependencyListVulnerabilities feature f
const findJobFailedAlert = () => wrapper.find(DependencyListJobFailedAlert);
const findIncompleteListAlert = () => wrapper.find(DependencyListIncompleteAlert);
const findDependenciesTables = () => wrapper.findAll(PaginatedDependenciesTable);
const findTabControls = () => wrapper.findAll('.js-tab');
const findTabControls = () => wrapper.findAll('.gl-tab-nav-item');
const findVulnerableTabControl = () => findTabControls().at(1);
const findVulnerableTabComponent = () => wrapper.findAll(GlTab).at(1);
......@@ -426,6 +426,10 @@ describe('DependenciesApp component with dependencyListVulnerabilities feature f
});
});
it('has enabled vulnerable tab', () => {
expect(findVulnerableTabComponent().classes('disabled')).toBe(false);
});
describe('given there are no vulnerable dependencies', () => {
beforeEach(() => {
store.state[vulnerableNamespace].dependencies = [];
......@@ -435,11 +439,7 @@ describe('DependenciesApp component with dependencyListVulnerabilities feature f
});
it('disables the vulnerable tab', () => {
expect(findVulnerableTabComponent().props()).toEqual(
expect.objectContaining({
disabled: true,
}),
);
expect(findVulnerableTabComponent().classes('disabled')).toBe(true);
});
});
});
......
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