From aff7b4a54f2af8cdcf374dd79c17b73f8932bfab Mon Sep 17 00:00:00 2001
From: jboyson <jboyson@gitlab.com>
Date: Thu, 18 Jun 2020 15:22:17 -0500
Subject: [PATCH] Use getByText to find expansion link

---
 spec/frontend/diffs/components/diff_expansion_cell_spec.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/spec/frontend/diffs/components/diff_expansion_cell_spec.js b/spec/frontend/diffs/components/diff_expansion_cell_spec.js
index 0504f3933e0cc..ef2e0dfe59b00 100644
--- a/spec/frontend/diffs/components/diff_expansion_cell_spec.js
+++ b/spec/frontend/diffs/components/diff_expansion_cell_spec.js
@@ -6,10 +6,10 @@ import DiffExpansionCell from '~/diffs/components/diff_expansion_cell.vue';
 import { getPreviousLineIndex } from '~/diffs/store/utils';
 import { INLINE_DIFF_VIEW_TYPE, PARALLEL_DIFF_VIEW_TYPE } from '~/diffs/constants';
 import diffFileMockData from '../mock_data/diff_file';
+import { getByText } from '@testing-library/dom';
 
 const EXPAND_UP_CLASS = '.js-unfold';
 const EXPAND_DOWN_CLASS = '.js-unfold-down';
-const EXPAND_ALL_CLASS = '.js-unfold-all';
 const LINE_TO_USE = 5;
 const lineSources = {
   [INLINE_DIFF_VIEW_TYPE]: 'highlighted_diff_lines',
@@ -88,7 +88,7 @@ describe('DiffExpansionCell', () => {
 
   const findExpandUp = () => vm.$el.querySelector(EXPAND_UP_CLASS);
   const findExpandDown = () => vm.$el.querySelector(EXPAND_DOWN_CLASS);
-  const findExpandAll = () => vm.$el.querySelector(EXPAND_ALL_CLASS);
+  const findExpandAll = () => getByText(vm.$el, 'Show unchanged lines');
 
   describe('top row', () => {
     it('should have "expand up" and "show all" option', () => {
-- 
GitLab