diff options
Diffstat (limited to 'features/steps/project/project_markdown_render.rb')
-rw-r--r-- | features/steps/project/project_markdown_render.rb | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/features/steps/project/project_markdown_render.rb b/features/steps/project/project_markdown_render.rb index 1209aae6434..89fbb7408c2 100644 --- a/features/steps/project/project_markdown_render.rb +++ b/features/steps/project/project_markdown_render.rb @@ -1,6 +1,7 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps include SharedAuthentication include SharedPaths + include SharedMarkdown And 'I own project "Delta"' do @project = Project.find_by(name: "Delta") @@ -44,7 +45,6 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps page.should have_content "maintenance.md" end - And 'I click on GitLab API doc directory in README' do click_link "GitLab API doc directory" end @@ -140,6 +140,16 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps page.should have_content "test GitLab API doc Rake tasks" end + step 'I add a header to the wiki page' do + fill_in "wiki[content]", with: "# Wiki header\n" + fill_in "wiki[message]", with: "Add header to wiki" + click_button "Create page" + end + + step 'Wiki header should have correct id and link' do + header_should_have_correct_id_and_link(1, 'Wiki header', 'wiki-header') + end + And 'I click on test link' do click_link "test" end @@ -173,18 +183,6 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps page.should have_content "maintenance.md" end - Given 'I visit to the help page' do - visit help_path - end - - And 'I select a page with markdown' do - click_link "Rake Tasks" - end - - Then 'I should see a help page with markdown' do - page.should have_content "GitLab provides some specific rake tasks to enable special features or perform maintenance tasks" - end - Given 'I go directory which contains README file' do visit project_tree_path(@project, "master/doc/api") current_path.should == project_tree_path(@project, "master/doc/api") @@ -198,4 +196,12 @@ class Spinach::Features::ProjectMarkdownRender < Spinach::FeatureSteps current_path.should == project_blob_path(@project, "master/doc/api/users.md") page.should have_content "List users" end + + step 'Header "Application details" should have correct id and link' do + header_should_have_correct_id_and_link(2, 'Application details', 'application-details') + end + + step 'Header "GitLab API" should have correct id and link' do + header_should_have_correct_id_and_link(1, 'GitLab API', 'gitlab-api') + end end |