Skip to content
代码片段 群组 项目
未验证 提交 676bd0f3 编辑于 作者: Vanessa Otto's avatar Vanessa Otto 提交者: GitLab
浏览文件

Tailwind migration ruby specs

上级 c7762a8a
No related branches found
No related tags found
无相关合并请求
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
using RSpec::Parameterized::TableSyntax using RSpec::Parameterized::TableSyntax
let(:proxy_response) do let(:proxy_response) do
[{ _source: { id: 1 }, highlight: 'test <span class="gl-font-weight-bold">highlight</span>' }] [{ _source: { id: 1 }, highlight: 'test <span class="gl-font-bold">highlight</span>' }]
end end
let(:es_empty_response) { ::Search::EmptySearchResults.new } let(:es_empty_response) { ::Search::EmptySearchResults.new }
let(:es_client_response) { instance_double(::Search::Elastic::ResponseMapper, highlight_map: map) } let(:es_client_response) { instance_double(::Search::Elastic::ResponseMapper, highlight_map: map) }
let(:results) { described_class.new(user, query, limit_project_ids) } let(:results) { described_class.new(user, query, limit_project_ids) }
let(:map) { { 1 => 'test <span class="gl-font-weight-bold">highlight</span>' } } let(:map) { { 1 => 'test <span class="gl-font-bold">highlight</span>' } }
where(:scope, :results_method, :results_response, :expected) do where(:scope, :results_method, :results_response, :expected) do
'projects' | :projects | ref(:proxy_response) | ref(:map) 'projects' | :projects | ref(:proxy_response) | ref(:map)
......
...@@ -63,8 +63,8 @@ ...@@ -63,8 +63,8 @@
describe '#highlight_map' do describe '#highlight_map' do
it 'returns the expected highlight map' do it 'returns the expected highlight map' do
expect(results).to receive(:snippet_titles).and_return([{ _source: { id: 1 }, highlight: 'test <span class="gl-text-gray-900 gl-font-weight-bold">highlight</span>' }]) expect(results).to receive(:snippet_titles).and_return([{ _source: { id: 1 }, highlight: 'test <span class="gl-text-gray-900 gl-font-bold">highlight</span>' }])
expect(results.highlight_map('snippet_titles')).to eq({ 1 => 'test <span class="gl-text-gray-900 gl-font-weight-bold">highlight</span>' }) expect(results.highlight_map('snippet_titles')).to eq({ 1 => 'test <span class="gl-text-gray-900 gl-font-bold">highlight</span>' })
end end
end end
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
within('[data-testid="deploy_key-dropdown-item"]') do within('[data-testid="deploy_key-dropdown-item"]') do
deploy_key_checkbox = find('[data-testid="dropdown-item-checkbox"]') deploy_key_checkbox = find('[data-testid="dropdown-item-checkbox"]')
expect(deploy_key_checkbox).to have_no_css("gl-visibility-hidden") expect(deploy_key_checkbox).to have_no_css("gl-invisible")
end end
end end
end end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册