diff --git a/plugins/mezuro/features/configuration.feature b/plugins/mezuro/features/configuration.feature index a5d4168..561fdb9 100644 --- a/plugins/mezuro/features/configuration.feature +++ b/plugins/mezuro/features/configuration.feature @@ -16,18 +16,42 @@ Feature: Configuration 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 | + And I follow "Mezuro configuration" + When I fill the fields with the new following data + | article_name | Sample Configuration | + | article_description | Sample Description | + | article_configuration_to_clone_id | None | + And I press "Save" Then I should see "Sample Configuration" And I should see "Sample Description" And I should see "Add Metric" + @selenium @kalibro_restart + Scenario: I create a Mezuro configuration with valid attributes with cloning + Given I have a Mezuro configuration with the following data + | name | Sample Configuration| + | description | Sample Description | + | user | joaosilva | + And I have a Mezuro reading group with the following data + | name | Sample Reading group | + | description | Sample Description | + | user | joaosilva | + And I have a Mezuro metric configuration with previous created configuration and reading group + And I am on joaosilva's control panel + And I follow "Mezuro configuration" + When I fill the fields with the new following data + | article_name | Another Configuration | + | article_description | Another Description | + | article_configuration_to_clone_id | Sample Configuration | + And I press "Save" + Then I should see "Another Configuration" + And I should see "Another Description" + And I should see "Total Coupling Factor" + 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" diff --git a/plugins/mezuro/script/prepare_kalibro_query_file.sh b/plugins/mezuro/script/prepare_kalibro_query_file.sh index 9feb817..0740286 100755 --- a/plugins/mezuro/script/prepare_kalibro_query_file.sh +++ b/plugins/mezuro/script/prepare_kalibro_query_file.sh @@ -6,4 +6,4 @@ sudo su postgres -c "export PGPASSWORD=$PASSWORD && if [ -f $QUERYFILE ] then rm $QUERYFILE fi && - psql -q -t -d $DATABASE -c \"SELECT 'DELETE FROM ' || n.nspname || '.' || c.relname || ' CASCADE;' FROM pg_catalog.pg_class AS c LEFT JOIN pg_catalog.pg_namespace AS n ON n.oid = c.relnamespace WHERE relkind = 'r' AND n.nspname NOT IN ('pg_catalog', 'pg_toast') AND pg_catalog.pg_table_is_visible(c.oid)\" | sed '/$EXCEPTION/d' > $QUERYFILE" + psql -q -t -d $DATABASE -c \"SELECT 'DELETE FROM ' || n.nspname || '.' || c.relname || ' CASCADE;' FROM pg_catalog.pg_class AS c LEFT JOIN pg_catalog.pg_namespace AS n ON n.oid = c.relnamespace WHERE relkind = 'r' AND n.nspname NOT IN ('pg_catalog', 'pg_toast') AND pg_catalog.pg_table_is_visible(c.oid)\" | sed '/$EXCEPTION/d' | sort > $QUERYFILE" -- libgit2 0.21.2