diff --git a/plugins/mezuro/features/configuration.feature b/plugins/mezuro/features/configuration.feature new file mode 100644 index 0000000..a5d4168 --- /dev/null +++ b/plugins/mezuro/features/configuration.feature @@ -0,0 +1,134 @@ +Feature: Configuration + As a mezuro user + I want to create, edit and remove a Mezuro configuration + + Background: + Given the following users + | login | name | + | joaosilva | Joao Silva | + Given I am logged in as "joaosilva" + And "Mezuro" plugin is enabled + + Scenario: I see Mezuro configurantion's input form + Given I am on joaosilva's control panel + When I follow "Mezuro configuration" + Then I should see "Title" + And I should see "Description" + And I should see "Clone Configuration" + + #TODO: Create step for Mezuro configuration with clone. + @selenium @kalibro_restart + Scenario: I create a Mezuro configuration with valid attributes without cloning + Given I am on joaosilva's control panel + When I create a Mezuro configuration with the following data + | Title | Sample Configuration | + | Description | Sample Description | + | Clone | None | + Then I should see "Sample Configuration" + And I should see "Sample Description" + And I should see "Add Metric" + + Scenario: I try to create a Mezuro configuration without title + Given I am on joaosilva's control panel + And I follow "Mezuro configuration" + And the field "article_name" is empty + When I press "Save" + Then I should see "Title can't be blank" + + @kalibro_restart + Scenario: I try to create a Mezuro configuration with title already in use + Given I have a Mezuro configuration with the following data + | name | Sample Configuration | + | description | Sample Description | + | user | joaosilva | + And I am on joaosilva's control panel + When I create a Mezuro configuration with the following data + | Title | Sample Configuration | + | Description | Sample Description | + | Clone | None | + Then I should see "Slug The title (article name) is already being used by another article, please use another title." + + @selenium @kalibro_restart + Scenario: I see a Mezuro configuration edit form + Given I have a Mezuro configuration with the following data + | name | Sample Configuration | + | description | Sample Description | + | user | joaosilva | + And I am on article "Sample Configuration" + When I follow "Edit" + Then I should see "Sample Configuration" in the "article_name" input + And I should see "Sample Description" in the "article_description" input + And I should see "Save" button + + @selenium @kalibro_restart + Scenario: I edit a Mezuro configuration with valid attributes + Given I have a Mezuro configuration with the following data + | name | Sample Configuration | + | description | Sample Description | + | user | joaosilva | + And I am on article "Sample Configuration" + And I follow "Edit" + When I fill the fields with the new following data + | article_name | Another Configuration | + | article_description | Another Description | + And I press "Save" + Then I should see "Another Configuration" + And I should see "Another Description" + And I should see "Add Metric" + + @selenium @kalibro_restart + Scenario: I try to edit a Mezuro configuration leaving empty its title + Given I have a Mezuro configuration with the following data + | name | Sample Configuration | + | description | Sample Description | + | user | joaosilva | + And I am on article "Sample Configuration" + And I follow "Edit" + When I erase the "article_name" field + And I press "Save" + Then I should see "Title can't be blank" + + @selenium @kalibro_restart + Scenario: I try to edit a Mezuro configuration with title of an existing Mezuro Configuration + Given I have a Mezuro configuration with the following data + | name | Sample Configuration | + | description | Sample Description | + | user | joaosilva | + And I have a Mezuro configuration with the following data + | name | Another Configuration | + | description | Another Description | + | user | joaosilva | + And I am on article "Sample Configuration" + And I follow "Edit" + When I fill the fields with the new following data + | article_name | Another Configuration | + | article_description | Another Description | + And I press "Save" + Then I should see "Slug The title (article name) is already being used by another article, please use another title." + + @selenium @kalibro_restart + Scenario: I delete a Mezuro configuration that belongs to me + Given I have a Mezuro configuration with the following data + | name | Sample Configuration | + | description | Sample Description | + | user | joaosilva | + And I am on article "Sample Configuration" + When I follow "Delete" + And I confirm the "Are you sure that you want to remove the item "Sample Configuration"?" dialog + Then I go to /joaosilva/sample-configuration + And I should see "There is no such page: /joaosilva/sample-configuration" + + @selenium @kalibro_restart + Scenario: I cannot edit or delete a Mezuro configuration that doesn't belong to me + Given I have a Mezuro configuration with the following data + | name | Sample Configuration | + | description | Sample Description | + | user | joaosilva | + And the following users + | login | name | + | adminuser | Admin | + And I am logged in as "adminuser" + When I am on article "Sample Configuration" + Then I should not see "Delete" + And I should not see "Edit" + diff --git a/plugins/mezuro/features/reading.feature b/plugins/mezuro/features/reading.feature index a385a62..cb5454c 100644 --- a/plugins/mezuro/features/reading.feature +++ b/plugins/mezuro/features/reading.feature @@ -23,7 +23,7 @@ Feature: Reading And I should see "Color" And I should see "Save" button - @kalibro_restart @current + @selenium @kalibro_restart Scenario: I want to add a reading with no name When I follow "Add Reading" When I fill the fields with the new following data -- libgit2 0.21.2