Merge branch 'move-dashboard-help-spinach-to-rspec' into 'master'
Move dashboard help spinach test to rspec See merge request !8436
This commit is contained in:
commit
2159802c5f
3 changed files with 17 additions and 30 deletions
|
@ -1,9 +0,0 @@
|
|||
@dashboard
|
||||
Feature: Dashboard Help
|
||||
Background:
|
||||
Given I sign in as a user
|
||||
And I visit the "Rake Tasks" help page
|
||||
|
||||
Scenario: The markdown should be rendered correctly
|
||||
Then I should see "Rake Tasks" page markdown rendered
|
||||
And Header "Rebuild project satellites" should have correct ids and links
|
|
@ -1,21 +0,0 @@
|
|||
class Spinach::Features::DashboardHelp < Spinach::FeatureSteps
|
||||
include SharedAuthentication
|
||||
include SharedPaths
|
||||
include SharedMarkdown
|
||||
|
||||
step 'I visit the help page' do
|
||||
visit help_path
|
||||
end
|
||||
|
||||
step 'I visit the "Rake Tasks" help page' do
|
||||
visit help_page_path("administration/raketasks/maintenance")
|
||||
end
|
||||
|
||||
step 'I should see "Rake Tasks" page markdown rendered' do
|
||||
expect(page).to have_content "Gather information about GitLab and the system it runs on"
|
||||
end
|
||||
|
||||
step 'Header "Rebuild project satellites" should have correct ids and links' do
|
||||
header_should_have_correct_id_and_link(2, 'Check GitLab configuration', 'check-gitlab-configuration', '.documentation')
|
||||
end
|
||||
end
|
17
spec/features/dashboard/help_spec.rb
Normal file
17
spec/features/dashboard/help_spec.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
require 'spec_helper'
|
||||
|
||||
RSpec.describe 'Dashboard Help', feature: true do
|
||||
before do
|
||||
login_as(:user)
|
||||
end
|
||||
|
||||
it 'renders correctly markdown' do
|
||||
visit help_page_path("administration/raketasks/maintenance")
|
||||
|
||||
expect(page).to have_content('Gather information about GitLab and the system it runs on')
|
||||
|
||||
node = find('.documentation h2 a#user-content-check-gitlab-configuration')
|
||||
expect(node[:href]).to eq '#check-gitlab-configuration'
|
||||
expect(find(:xpath, "#{node.path}/..").text).to eq 'Check GitLab configuration'
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue