From 288b2e71c28ddff1ae6372bc8256d9f972aa6c27 Mon Sep 17 00:00:00 2001 From: Tim Zallmann Date: Tue, 6 Jun 2017 16:46:30 +0200 Subject: [PATCH] Added First Test for top right menu --- features/dashboard/new_project_menu.feature | 11 +++++++++++ features/steps/dashboard/new_project.rb | 6 ++++++ 2 files changed, 17 insertions(+) create mode 100644 features/dashboard/new_project_menu.feature diff --git a/features/dashboard/new_project_menu.feature b/features/dashboard/new_project_menu.feature new file mode 100644 index 00000000000..c339fb0e897 --- /dev/null +++ b/features/dashboard/new_project_menu.feature @@ -0,0 +1,11 @@ +@dashboard +Feature: New Project through top menu +Background: + Given I sign in as a user + And I own project "Shop" + And I visit dashboard page + And I click "New project" in top right menu + + @javascript + Scenario: I should see New Projects page + Then I see "New Project" page diff --git a/features/steps/dashboard/new_project.rb b/features/steps/dashboard/new_project.rb index 766aa9b0468..530fd6f7bdb 100644 --- a/features/steps/dashboard/new_project.rb +++ b/features/steps/dashboard/new_project.rb @@ -9,6 +9,12 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps end end + step 'I click "New project" in top right menu' do + page.within '.header-content' do + click_link "New project" + end + end + step 'I see "New Project" page' do expect(page).to have_content('Project path') expect(page).to have_content('Project name')