Commit e860eba75de6c69cfd0798753c7f20682eb7f374
Committed by
Paulo Meireles
1 parent
1e31a204
Exists in
master
and in
29 other branches
[Mezuro] Configuration feature concluded and database script now runs the queries alphabetically.
Showing
2 changed files
with
30 additions
and
6 deletions
Show diff stats
plugins/mezuro/features/configuration.feature
... | ... | @@ -16,18 +16,42 @@ Feature: Configuration |
16 | 16 | And I should see "Description" |
17 | 17 | And I should see "Clone Configuration" |
18 | 18 | |
19 | - #TODO: Create step for Mezuro configuration with clone. | |
20 | 19 | @selenium @kalibro_restart |
21 | 20 | Scenario: I create a Mezuro configuration with valid attributes without cloning |
22 | 21 | Given I am on joaosilva's control panel |
23 | - When I create a Mezuro configuration with the following data | |
24 | - | Title | Sample Configuration | | |
25 | - | Description | Sample Description | | |
26 | - | Clone | None | | |
22 | + And I follow "Mezuro configuration" | |
23 | + When I fill the fields with the new following data | |
24 | + | article_name | Sample Configuration | | |
25 | + | article_description | Sample Description | | |
26 | + | article_configuration_to_clone_id | None | | |
27 | + And I press "Save" | |
27 | 28 | Then I should see "Sample Configuration" |
28 | 29 | And I should see "Sample Description" |
29 | 30 | And I should see "Add Metric" |
30 | 31 | |
32 | + @selenium @kalibro_restart | |
33 | + Scenario: I create a Mezuro configuration with valid attributes with cloning | |
34 | + Given I have a Mezuro configuration with the following data | |
35 | + | name | Sample Configuration| | |
36 | + | description | Sample Description | | |
37 | + | user | joaosilva | | |
38 | + And I have a Mezuro reading group with the following data | |
39 | + | name | Sample Reading group | | |
40 | + | description | Sample Description | | |
41 | + | user | joaosilva | | |
42 | + And I have a Mezuro metric configuration with previous created configuration and reading group | |
43 | + And I am on joaosilva's control panel | |
44 | + And I follow "Mezuro configuration" | |
45 | + When I fill the fields with the new following data | |
46 | + | article_name | Another Configuration | | |
47 | + | article_description | Another Description | | |
48 | + | article_configuration_to_clone_id | Sample Configuration | | |
49 | + And I press "Save" | |
50 | + Then I should see "Another Configuration" | |
51 | + And I should see "Another Description" | |
52 | + And I should see "Total Coupling Factor" | |
53 | + And I should see "Add Metric" | |
54 | + | |
31 | 55 | Scenario: I try to create a Mezuro configuration without title |
32 | 56 | Given I am on joaosilva's control panel |
33 | 57 | And I follow "Mezuro configuration" | ... | ... |
plugins/mezuro/script/prepare_kalibro_query_file.sh
... | ... | @@ -6,4 +6,4 @@ sudo su postgres -c "export PGPASSWORD=$PASSWORD && |
6 | 6 | if [ -f $QUERYFILE ] |
7 | 7 | then rm $QUERYFILE |
8 | 8 | fi && |
9 | - 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" | |
9 | + 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" | ... | ... |