diff options
author | Suzanne Selhorn <sselhorn@gitlab.com> | 2020-10-29 08:41:07 +0300 |
---|---|---|
committer | Evan Read <eread@gitlab.com> | 2020-10-29 08:41:07 +0300 |
commit | 12f377142a361b905f00606c5fcaccda6b7b3e5d (patch) | |
tree | 1f07655f92870d2918b78d0bd3c64a06db25bea9 | |
parent | 174b38b7f5ce67555bb68b8b86c4c155bced16b4 (diff) |
Removed line above help
Related to: https://gitlab.com/gitlab-org/gitlab-docs/-/issues/866
4 files changed, 9 insertions, 64 deletions
diff --git a/content/assets/stylesheets/toc.scss b/content/assets/stylesheets/toc.scss index 09ec06ec..f01e5238 100644 --- a/content/assets/stylesheets/toc.scss +++ b/content/assets/stylesheets/toc.scss @@ -125,10 +125,4 @@ $nav-link-font-size: 14px; .toc-sm { display: none; } - - .toc-separator { - border-top: 1px solid $gds-gray-200; - padding-top: 1rem; - margin-top: 1rem; - } } diff --git a/content/frontend/default/components/table_of_contents_list.vue b/content/frontend/default/components/table_of_contents_list.vue index 7fe874f8..9c28d4be 100644 --- a/content/frontend/default/components/table_of_contents_list.vue +++ b/content/frontend/default/components/table_of_contents_list.vue @@ -29,11 +29,7 @@ export default { </script> <template> <ul class="nav nav-pills flex-column"> - <li - v-for="(item, index) in allItems" - :key="`${item.text}_${index}`" - :class="{ 'toc-separator': item.withSeparator }" - > + <li v-for="(item, index) in allItems" :key="`${item.text}_${index}`"> <a :id="item.id" class="nav-link d-block" :href="item.href" :class="item.levelClass">{{ item.text }}</a> diff --git a/spec/frontend/default/components/__snapshots__/table_of_contents_spec.js.snap b/spec/frontend/default/components/__snapshots__/table_of_contents_spec.js.snap index 37c9400b..3be5a882 100644 --- a/spec/frontend/default/components/__snapshots__/table_of_contents_spec.js.snap +++ b/spec/frontend/default/components/__snapshots__/table_of_contents_spec.js.snap @@ -43,9 +43,7 @@ exports[`frontend/default/components/table_of_contents matches snapshot 1`] = ` class="nav nav-pills flex-column my-0" data-testid="main-list" > - <li - class="" - > + <li> <a class="nav-link d-block toc-level-0" href="#lorem" @@ -56,9 +54,7 @@ exports[`frontend/default/components/table_of_contents matches snapshot 1`] = ` <!----> </li> - <li - class="" - > + <li> <a class="nav-link d-block toc-level-1" href="#lorem-" @@ -69,9 +65,7 @@ exports[`frontend/default/components/table_of_contents matches snapshot 1`] = ` <!----> </li> - <li - class="" - > + <li> <a class="nav-link d-block toc-level-0" href="#ipsum" @@ -82,9 +76,7 @@ exports[`frontend/default/components/table_of_contents matches snapshot 1`] = ` <!----> </li> - <li - class="" - > + <li> <a class="nav-link d-block toc-level-1" href="#dolar" @@ -95,9 +87,7 @@ exports[`frontend/default/components/table_of_contents matches snapshot 1`] = ` <!----> </li> - <li - class="" - > + <li> <a class="nav-link d-block toc-level-2" href="#sit" @@ -108,9 +98,7 @@ exports[`frontend/default/components/table_of_contents matches snapshot 1`] = ` <!----> </li> - <li - class="" - > + <li> <a class="nav-link d-block toc-level-2" href="#amit" @@ -121,9 +109,7 @@ exports[`frontend/default/components/table_of_contents matches snapshot 1`] = ` <!----> </li> - <li - class="" - > + <li> <a class="nav-link d-block toc-level-2" href="#test" @@ -134,9 +120,7 @@ exports[`frontend/default/components/table_of_contents matches snapshot 1`] = ` <!----> </li> - <li - class="toc-separator" - > + <li> <a class="nav-link d-block toc-level-0" href="#test-help-and-feedback" diff --git a/spec/frontend/default/components/table_of_contents_list_spec.js b/spec/frontend/default/components/table_of_contents_list_spec.js index 17a14a75..93d8993a 100644 --- a/spec/frontend/default/components/table_of_contents_list_spec.js +++ b/spec/frontend/default/components/table_of_contents_list_spec.js @@ -16,7 +16,6 @@ describe('frontend/default/components/table_of_contents_list', () => { const findItemsData = () => parseTOC(wrapper.element); const findLinks = () => wrapper.findAll('a'); - const findListItems = () => wrapper.findAll('li'); afterEach(() => { wrapper.destroy(); @@ -88,32 +87,4 @@ describe('frontend/default/components/table_of_contents_list', () => { }); }); }); - - describe('with separator', () => { - beforeEach(() => { - createComponent({ - items: [ - { - text: 'Lorem', - }, - { - text: 'Ipsum', - withSeparator: true, - }, - ], - }); - }); - - it('has separator class for separator item', () => { - const data = findListItems().wrappers.map((x) => ({ - text: x.text(), - hasSeparator: x.classes('toc-separator'), - })); - - expect(data).toEqual([ - { text: 'Lorem', hasSeparator: false }, - { text: 'Ipsum', hasSeparator: true }, - ]); - }); - }); }); |