From 75e872216c9e5baef3484656bef6c49c52326ebd Mon Sep 17 00:00:00 2001 From: Rafael Reggiani Manzo Date: Wed, 28 Aug 2013 13:18:16 -0300 Subject: [PATCH] Project acceptance tests refactored into several files --- features/project.feature | 98 -------------------------------------------------------------------------------------------------- features/project/create.feature | 21 +++++++++++++++++++++ features/project/deletion.feature | 14 ++++++++++++++ features/project/edition.feature | 35 +++++++++++++++++++++++++++++++++++ features/project/listing.feature | 40 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 110 insertions(+), 98 deletions(-) delete mode 100644 features/project.feature create mode 100644 features/project/create.feature create mode 100644 features/project/deletion.feature create mode 100644 features/project/edition.feature create mode 100644 features/project/listing.feature diff --git a/features/project.feature b/features/project.feature deleted file mode 100644 index 9c6c803..0000000 --- a/features/project.feature +++ /dev/null @@ -1,98 +0,0 @@ -Feature: Project - In Order to have a good interaction with the website - As a regular user - I should see and manage projects - - Scenario: Listing projects - Given I am at the homepage - When I click the All Projects link - Then I should see Listing Projects - And I should see Name - And I should see Description - - # This will fail until do the authentication to project. - @wip - Scenario: Should not create project without login - Given I am at the All Projects page - Then I should not see New Project - - @kalibro_restart - Scenario: project creation - Given I am a regular user - And I am signed in - And I am at the New Project page - And I fill the Name field with Kalibro - And I fill the Description field with Web Service to collect metrics - When I press the Create Project button - Then I should see Kalibro - And I should see Web Service to collect metrics - - @kalibro_restart - Scenario: Should list the existing projects - Given I am a regular user - And I am signed in - And I have a sample project - And I am at the All Projects page - Then the sample project should be there - - @kalibro_restart - Scenario: Should show the existing project - Given I am a regular user - And I am signed in - And I have a sample project - And I am at the All Projects page - When I click the Show link - Then I should see Name - And I should see Description - And I should see Back - And the sample project should be there - - @wip @kalibro_restart - Scenario: Should go back to the All Projects page from show project view - Given I am a regular user - And I am signed in - And I have a sample project - And I am at the Sample Project page - When I click the Back link - Then I should be in the All Projects page - - @kalibro_restart - Scenario: Should go to edit form from All Projects page - Given I am a regular user - And I am signed in - And I have a sample project - And I am at the All Projects page - When I click the Edit link - Then I should be in the Edit Project page - - @kalibro_restart - Scenario: Should delete a project - Given I am a regular user - And I am signed in - And I have a sample project - And I am at the Sample Project page - When I click the Destroy link - Then I should be in the All Projects page - And the sample project should not be there - - @kalibro_restart - Scenario: Should have the content filled in form - Given I am a regular user - And I am signed in - And I have a sample project - And I am at the All Projects page - When I click the Edit link - Then The field "project[name]" should be filled with the sample project "name" - And The field "project[description]" should be filled with the sample project "description" - - @kalibro_restart - Scenario: After project edition should update the information - Given I am a regular user - And I am signed in - And I have a sample project - And I am at the sample project edit page - And I fill the Name field with Kalibro - And I fill the Description field with Web Service to collect metrics - When I press the Update button - Then I should see Kalibro - And I should see Web Service to collect metrics \ No newline at end of file diff --git a/features/project/create.feature b/features/project/create.feature new file mode 100644 index 0000000..211db62 --- /dev/null +++ b/features/project/create.feature @@ -0,0 +1,21 @@ +Feature: Project Creation + In order to register my projects + As a regular user + I should be able to create projects + + # This will fail until do the authentication to project. + @wip + Scenario: Should not create project without login + Given I am at the All Projects page + Then I should not see New Project + + @kalibro_restart + Scenario: project creation + Given I am a regular user + And I am signed in + And I am at the New Project page + And I fill the Name field with Kalibro + And I fill the Description field with Web Service to collect metrics + When I press the Create Project button + Then I should see Kalibro + And I should see Web Service to collect metrics \ No newline at end of file diff --git a/features/project/deletion.feature b/features/project/deletion.feature new file mode 100644 index 0000000..5f018d2 --- /dev/null +++ b/features/project/deletion.feature @@ -0,0 +1,14 @@ +Feature: Project Deletion + In order to be able to remove projects + As a regular user + The system should have an interface to it + + @kalibro_restart + Scenario: Should delete a project + Given I am a regular user + And I am signed in + And I have a sample project + And I am at the Sample Project page + When I click the Destroy link + Then I should be in the All Projects page + And the sample project should not be there \ No newline at end of file diff --git a/features/project/edition.feature b/features/project/edition.feature new file mode 100644 index 0000000..9648f18 --- /dev/null +++ b/features/project/edition.feature @@ -0,0 +1,35 @@ +Feature: Project + In Order to be able to update my projects info + As a regular user + I should be able to edit my projects + + @kalibro_restart + Scenario: Should go to edit form from All Projects page + Given I am a regular user + And I am signed in + And I have a sample project + And I am at the All Projects page + When I click the Edit link + Then I should be in the Edit Project page + + @kalibro_restart + Scenario: Should have the content filled in form + Given I am a regular user + And I am signed in + And I have a sample project + And I am at the All Projects page + When I click the Edit link + Then The field "project[name]" should be filled with the sample project "name" + And The field "project[description]" should be filled with the sample project "description" + + @kalibro_restart + Scenario: After project edition should update the information + Given I am a regular user + And I am signed in + And I have a sample project + And I am at the sample project edit page + And I fill the Name field with Kalibro + And I fill the Description field with Web Service to collect metrics + When I press the Update button + Then I should see Kalibro + And I should see Web Service to collect metrics \ No newline at end of file diff --git a/features/project/listing.feature b/features/project/listing.feature new file mode 100644 index 0000000..de6fcee --- /dev/null +++ b/features/project/listing.feature @@ -0,0 +1,40 @@ +Feature: Project listing + In order to interact with other projects + As a regular user + I should have various listings + + Scenario: Listing projects + Given I am at the homepage + When I click the All Projects link + Then I should see Listing Projects + And I should see Name + And I should see Description + + @kalibro_restart + Scenario: Should list the existing projects + Given I am a regular user + And I am signed in + And I have a sample project + And I am at the All Projects page + Then the sample project should be there + + @kalibro_restart + Scenario: Should show the existing project + Given I am a regular user + And I am signed in + And I have a sample project + And I am at the All Projects page + When I click the Show link + Then I should see Name + And I should see Description + And I should see Back + And the sample project should be there + + @wip @kalibro_restart + Scenario: Should go back to the All Projects page from show project view + Given I am a regular user + And I am signed in + And I have a sample project + And I am at the Sample Project page + When I click the Back link + Then I should be in the All Projects page \ No newline at end of file -- libgit2 0.21.2