Commit b9d0eeb5 authored by Semyon Pupkov's avatar Semyon Pupkov

Move dashboard help spinach test to rspec

https://gitlab.com/gitlab-org/gitlab-ce/issues/23036
parent 115aac77
@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
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
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment