summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-02 18:07:23 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-02 18:07:23 +0000
commitaf833d9730dd367984b55ef02ccc3fe6eb83f0e4 (patch)
treef525dae9e43b8cb77d8eaad38f998ad06b8a769d /spec/support/shared_examples
parent20ddcb963c756f5c7df26046adb01a8e325a26cd (diff)
downloadgitlab-ce-af833d9730dd367984b55ef02ccc3fe6eb83f0e4.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples')
-rw-r--r--spec/support/shared_examples/features/content_editor_shared_examples.rb2
-rw-r--r--spec/support/shared_examples/features/sidebar/sidebar_labels_shared_examples.rb6
-rw-r--r--spec/support/shared_examples/features/sidebar/sidebar_milestone_shared_examples.rb6
-rw-r--r--spec/support/shared_examples/lib/gitlab/cycle_analytics/deployment_metrics.rb8
4 files changed, 11 insertions, 11 deletions
diff --git a/spec/support/shared_examples/features/content_editor_shared_examples.rb b/spec/support/shared_examples/features/content_editor_shared_examples.rb
index f01e3c88dad..efdf7513b2d 100644
--- a/spec/support/shared_examples/features/content_editor_shared_examples.rb
+++ b/spec/support/shared_examples/features/content_editor_shared_examples.rb
@@ -327,7 +327,7 @@ RSpec.shared_examples 'edits content using the content editor' do
end
def dropdown_scroll_top
- evaluate_script("document.querySelector('#{suggestions_dropdown} .gl-new-dropdown-inner').scrollTop")
+ evaluate_script("document.querySelector('#{suggestions_dropdown} .gl-dropdown-inner').scrollTop")
end
end
end
diff --git a/spec/support/shared_examples/features/sidebar/sidebar_labels_shared_examples.rb b/spec/support/shared_examples/features/sidebar/sidebar_labels_shared_examples.rb
index 281a70e46c4..95b306fdaaa 100644
--- a/spec/support/shared_examples/features/sidebar/sidebar_labels_shared_examples.rb
+++ b/spec/support/shared_examples/features/sidebar/sidebar_labels_shared_examples.rb
@@ -17,7 +17,7 @@ RSpec.shared_examples 'labels sidebar widget' do
end
it 'shows labels list in the dropdown' do
- expect(labels_widget.find('.gl-new-dropdown-contents')).to have_selector('li.gl-new-dropdown-item', count: 4)
+ expect(labels_widget.find('.gl-dropdown-contents')).to have_selector('li.gl-dropdown-item', count: 4)
end
it 'adds a label' do
@@ -57,8 +57,8 @@ RSpec.shared_examples 'labels sidebar widget' do
expect(page).to have_css('.labels-fetch-loading')
wait_for_all_requests
- expect(page).to have_css('[data-testid="dropdown-content"] .gl-new-dropdown-item')
- expect(page.all(:css, '[data-testid="dropdown-content"] .gl-new-dropdown-item').length).to eq(1)
+ expect(page).to have_css('[data-testid="dropdown-content"] .gl-dropdown-item')
+ expect(page.all(:css, '[data-testid="dropdown-content"] .gl-dropdown-item').length).to eq(1)
find_field('Search').native.send_keys(:enter)
click_button 'Close'
diff --git a/spec/support/shared_examples/features/sidebar/sidebar_milestone_shared_examples.rb b/spec/support/shared_examples/features/sidebar/sidebar_milestone_shared_examples.rb
index da730240e8e..f8982c242f8 100644
--- a/spec/support/shared_examples/features/sidebar/sidebar_milestone_shared_examples.rb
+++ b/spec/support/shared_examples/features/sidebar/sidebar_milestone_shared_examples.rb
@@ -20,15 +20,15 @@ RSpec.shared_examples 'milestone sidebar widget' do
it 'shows milestones list in the dropdown' do
# 5 milestones + "No milestone" = 6 items
- expect(milestone_widget.find('.gl-new-dropdown-contents')).to have_selector('li.gl-new-dropdown-item', count: 6)
+ expect(milestone_widget.find('.gl-dropdown-contents')).to have_selector('li.gl-dropdown-item', count: 6)
end
it 'shows expired milestone at the bottom of the list and milestone due earliest at the top of the list', :aggregate_failures do
- within(milestone_widget, '.gl-new-dropdown-contents') do
+ within(milestone_widget, '.gl-dropdown-contents') do
expect(page.find('li:last-child')).to have_content milestone_expired.title
[milestone3, milestone2, milestone1, milestone_no_duedate].each_with_index do |m, i|
- expect(page.all('li.gl-new-dropdown-item')[i + 1]).to have_content m.title
+ expect(page.all('li.gl-dropdown-item')[i + 1]).to have_content m.title
end
end
end
diff --git a/spec/support/shared_examples/lib/gitlab/cycle_analytics/deployment_metrics.rb b/spec/support/shared_examples/lib/gitlab/cycle_analytics/deployment_metrics.rb
index 9ffc55f7e7e..d471a758f3e 100644
--- a/spec/support/shared_examples/lib/gitlab/cycle_analytics/deployment_metrics.rb
+++ b/spec/support/shared_examples/lib/gitlab/cycle_analytics/deployment_metrics.rb
@@ -62,14 +62,14 @@ RSpec.shared_examples 'deployment metrics examples' do
describe '#deployment_frequency' do
subject { stage_summary.fourth[:value] }
- it 'includes the unit: `/day`' do
- expect(stage_summary.fourth[:unit]).to eq _('/day')
- end
-
before do
travel_to(5.days.ago) { create_deployment(project: project) }
end
+ it 'includes the unit: `/day`' do
+ expect(stage_summary.fourth[:unit]).to eq _('/day')
+ end
+
it 'returns 0.0 when there were deploys but the frequency was too low' do
options[:from] = 30.days.ago