admin_data 1.1.11 → 1.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +5 -0
  3. data/Gemfile.lock +19 -0
  4. data/README.md +1 -1
  5. data/Rakefile +2 -50
  6. data/admin_data.gemspec +23 -0
  7. data/app/helpers/admin_data/application_helper.rb +7 -0
  8. data/app/views/admin_data/search/search/_listing.html.erb +1 -1
  9. data/config/routes.rb +24 -22
  10. data/lib/admin_data/version.rb +1 -1
  11. data/test/rails_root/Gemfile +23 -0
  12. data/test/rails_root/Gemfile.lock +157 -0
  13. data/test/rails_root/README.md +11 -0
  14. data/test/rails_root/Rakefile +7 -0
  15. data/test/rails_root/app/views/layouts/application.html.erb +14 -0
  16. data/test/rails_root/config/cucumber.yml +11 -0
  17. data/test/rails_root/config/database.yml +25 -0
  18. data/test/rails_root/config/locales/en.yml +5 -0
  19. data/test/rails_root/config.ru +4 -0
  20. data/test/rails_root/db/development.sqlite3 +0 -0
  21. data/test/rails_root/db/production.sqlite3 +1 -0
  22. data/test/rails_root/features/advance_search/boolean.feature +74 -0
  23. data/test/rails_root/features/advance_search/datetime.feature +101 -0
  24. data/test/rails_root/features/advance_search/delete_all.feature +20 -0
  25. data/test/rails_root/features/advance_search/destroy_all.feature +20 -0
  26. data/test/rails_root/features/advance_search/integer.feature +69 -0
  27. data/test/rails_root/features/advance_search/multiple_rows.feature +87 -0
  28. data/test/rails_root/features/advance_search/sort.feature +16 -0
  29. data/test/rails_root/features/advance_search/string.feature +130 -0
  30. data/test/rails_root/features/crud.feature +50 -0
  31. data/test/rails_root/features/crud_show.feature +56 -0
  32. data/test/rails_root/features/feed.feature +13 -0
  33. data/test/rails_root/features/home.feature +41 -0
  34. data/test/rails_root/features/migration.feature +7 -0
  35. data/test/rails_root/features/quick_search.feature +124 -0
  36. data/test/rails_root/features/table_structure.feature +18 -0
  37. data/test/rails_root/lib/tasks/.gitkeep +0 -0
  38. data/test/rails_root/lib/tasks/cucumber.rake +53 -0
  39. data/test/rails_root/public/.gitkeep +0 -0
  40. data/test/rails_root/script/cucumber +10 -0
  41. data/test/rails_root/script/rails +6 -0
  42. metadata +81 -77
@@ -0,0 +1,101 @@
1
+ Feature: Advance Search datetime
2
+
3
+ @javascript
4
+ Scenario: test dropdown for datetime
5
+ Given a user exists
6
+ Given I visit advance_search page
7
+ When I select "created_at" from "adv_search[1_row][col1]"
8
+ Then page should have css "#advance_search_table tr td select.col2"
9
+ When I select "is null" from "adv_search[1_row][col2]"
10
+ #Then page should have disabled css "#advance_search_table tr td input.col3"
11
+ When I select "is not null" from "adv_search[1_row][col2]"
12
+ #Then page should have disabled css "#advance_search_table tr td input.col3"
13
+ When I select "on" from "adv_search[1_row][col2]"
14
+ Then async page should have text as current date for "#advance_search_table tr td input.col3"
15
+ When I select "on or before" from "adv_search[1_row][col2]"
16
+ Then async page should have text as current date for "#advance_search_table tr td input.col3"
17
+ When I select "on or after" from "adv_search[1_row][col2]"
18
+ Then async page should have text as current date for "#advance_search_table tr td input.col3"
19
+
20
+ @javascript
21
+ Scenario: option "is null"
22
+ Given the following user exists:
23
+ | first name | last name | born_at |
24
+ | John | Smith | |
25
+ | Mary | Jane | 03-November-2010 |
26
+ Given I visit advance_search page
27
+ When I select "born_at" from "adv_search[1_row][col1]"
28
+ When I select "is null" from "adv_search[1_row][col2]"
29
+ When I press "Search"
30
+ Then I should see "Search result: 1 record found"
31
+ Then async verify that user "first_name" is "John"
32
+ Then async verify that user "last_name" is "Smith"
33
+
34
+ @javascript
35
+ Scenario: option "is not null"
36
+ Given the following user exists:
37
+ | first name | last name | born_at |
38
+ | Mary | Jane | 03-November-2010 |
39
+ | John | Smith | |
40
+ Given I visit advance_search page
41
+ When I select "born_at" from "adv_search[1_row][col1]"
42
+ When I select "is not null" from "adv_search[1_row][col2]"
43
+ When I press "Search"
44
+ Then I should see "Search result: 1 record found"
45
+ Then async verify that user "first_name" is "Mary"
46
+ Then async verify that user "last_name" is "Jane"
47
+
48
+ @javascript
49
+ Scenario: option "on"
50
+ Given the following user exists:
51
+ | first name | last name | born_at |
52
+ | Mary | Jane | 03-November-2010 |
53
+ | John | Smith | 14-November-2010 |
54
+ Given I visit advance_search page
55
+ When I select "born_at" from "adv_search[1_row][col1]"
56
+ When I select "on" from "adv_search[1_row][col2]"
57
+ When I fill in "adv_search[1_row][col3]" with "03-November-2010"
58
+ When I press "Search"
59
+ Then I should see "Search result: 1 record found"
60
+ Then async verify that user "first_name" is "Mary"
61
+ Then async verify that user "last_name" is "Jane"
62
+
63
+ @javascript
64
+ Scenario: option "on or after"
65
+ Given the following user exists:
66
+ | first name | last name | born_at |
67
+ | John | Smith | 14-November-2010 |
68
+ | Mary | Jane | 03-November-2010 |
69
+ Given I visit advance_search page
70
+ When I select "born_at" from "adv_search[1_row][col1]"
71
+ When I select "on or after" from "adv_search[1_row][col2]"
72
+ When I fill in "adv_search[1_row][col3]" with "05-November-2010"
73
+ When I press "Search"
74
+ Then I should see "Search result: 1 record found"
75
+ Then async verify that user "first_name" is "John"
76
+ Then async verify that user "last_name" is "Smith"
77
+
78
+ @javascript
79
+ Scenario: option "on or before"
80
+ Given the following user exists:
81
+ | first name | last name | born_at |
82
+ | Mary | Jane | 03-November-2010 |
83
+ | John | Smith | 14-November-2010 |
84
+ Given I visit advance_search page
85
+ When I select "born_at" from "adv_search[1_row][col1]"
86
+ When I select "on or before" from "adv_search[1_row][col2]"
87
+ When I fill in "adv_search[1_row][col3]" with "05-November-2010"
88
+ When I press "Search"
89
+ Then I should see "Search result: 1 record found"
90
+ Then async verify that user "first_name" is "Mary"
91
+ Then async verify that user "last_name" is "Jane"
92
+
93
+ @javascript
94
+ Scenario: invalid integer value
95
+ Given I visit advance_search page
96
+ When I select "born_at" from "adv_search[1_row][col1]"
97
+ When I select "on" from "adv_search[1_row][col2]"
98
+ When I fill in "adv_search[1_row][col3]" with "xyz"
99
+ When I press "Search"
100
+ Then async I should see "xyz is not a valid date"
101
+
@@ -0,0 +1,20 @@
1
+ Feature: Advance search delete all
2
+
3
+ @javascript
4
+ Scenario: delete all
5
+ Given the following user exists:
6
+ | first name | last name |
7
+ | John | Smith |
8
+ | Mary | Jane |
9
+ | Jennifer | Jane |
10
+ Given I visit advance_search page
11
+ When I select "first_name" from "adv_search[1_row][col1]"
12
+ When I select "is exactly" from "adv_search[1_row][col2]"
13
+ When I fill in "adv_search[1_row][col3]" with "John"
14
+ When I press "Search"
15
+ Then I should see "Search result: 1 record found"
16
+ Then async verify that user "first_name" is "John"
17
+ Then async verify that user "last_name" is "Smith"
18
+ When async click "Delete All"
19
+ Then async verify that number of "User" records is "2"
20
+ Then asyc I should see "1 record deleted"
@@ -0,0 +1,20 @@
1
+ Feature: Advance search destroy all
2
+
3
+ @javascript
4
+ Scenario: destroy all
5
+ Given the following user exists:
6
+ | first name | last name |
7
+ | John | Smith |
8
+ | Mary | Jane |
9
+ | Jennifer | Jane |
10
+ Given I visit advance_search page
11
+ When I select "first_name" from "adv_search[1_row][col1]"
12
+ When I select "is exactly" from "adv_search[1_row][col2]"
13
+ When I fill in "adv_search[1_row][col3]" with "John"
14
+ When I press "Search"
15
+ Then I should see "Search result: 1 record found"
16
+ Then async verify that user "first_name" is "John"
17
+ Then async verify that user "last_name" is "Smith"
18
+ When async click "Destroy All"
19
+ Then async verify that number of "User" records is "2"
20
+ Then async I should see "1 record destroyed"
@@ -0,0 +1,69 @@
1
+ Feature: Advance Search for integer
2
+
3
+ @javascript
4
+ Scenario: Advance Search for an integer
5
+ Given a user exists
6
+ Given I visit advance_search page
7
+ When I select "age" from "adv_search[1_row][col1]"
8
+ Then page should have css "#advance_search_table tr td select.col2"
9
+ When I select "is equal to" from "adv_search[1_row][col2]"
10
+ Then page should have css "#advance_search_table tr td input.col3"
11
+ When I select "is less than" from "adv_search[1_row][col2]"
12
+ Then page should have css "#advance_search_table tr td input.col3"
13
+ When I select "is greater than" from "adv_search[1_row][col2]"
14
+ Then page should have css "#advance_search_table tr td input.col3"
15
+
16
+ @javascript
17
+ Scenario: option "is equal to"
18
+ Given the following user exists:
19
+ | first name | last name | age |
20
+ | John | Smith | 40 |
21
+ | Mary | Jane | 30 |
22
+ Given I visit advance_search page
23
+ When I select "age" from "adv_search[1_row][col1]"
24
+ When I select "is equal to" from "adv_search[1_row][col2]"
25
+ When I fill in "adv_search[1_row][col3]" with "40"
26
+ When I press "Search"
27
+ Then I should see "Search result: 1 record found"
28
+ Then async verify that user "first_name" is "John"
29
+ Then async verify that user "last_name" is "Smith"
30
+
31
+ @javascript
32
+ Scenario: option "is less than"
33
+ Given the following user exists:
34
+ | first name | last name | age |
35
+ | Mary | Jane | 30 |
36
+ | John | Smith | 40 |
37
+ Given I visit advance_search page
38
+ When I select "age" from "adv_search[1_row][col1]"
39
+ When I select "is less than" from "adv_search[1_row][col2]"
40
+ When I fill in "adv_search[1_row][col3]" with "35"
41
+ When I press "Search"
42
+ Then I should see "Search result: 1 record found"
43
+ Then async verify that user "first_name" is "Mary"
44
+ Then async verify that user "last_name" is "Jane"
45
+
46
+ @javascript
47
+ Scenario: option "is greater than"
48
+ Given the following user exists:
49
+ | first name | last name | age |
50
+ | John | Smith | 40 |
51
+ | Mary | Jane | 30 |
52
+ Given I visit advance_search page
53
+ When I select "age" from "adv_search[1_row][col1]"
54
+ When I select "is greater than" from "adv_search[1_row][col2]"
55
+ When I fill in "adv_search[1_row][col3]" with "35"
56
+ When I press "Search"
57
+ Then I should see "Search result: 1 record found"
58
+ Then async verify that user "first_name" is "John"
59
+ Then async verify that user "last_name" is "Smith"
60
+
61
+ @javascript
62
+ Scenario: invalid integer value
63
+ Given I visit advance_search page
64
+ When I select "age" from "adv_search[1_row][col1]"
65
+ When I select "is greater than" from "adv_search[1_row][col2]"
66
+ When I fill in "adv_search[1_row][col3]" with "xyz"
67
+ When I press "Search"
68
+ Then async I should see "xyz is not a valid integer"
69
+
@@ -0,0 +1,87 @@
1
+ Feature: Advance search multiple rows
2
+
3
+ @javascript
4
+ Scenario: two rows
5
+ Given the following user exists:
6
+ | first name | last name | age |
7
+ | Mary | Jane | 30 |
8
+ | Jennifer | Jane | 30 |
9
+ | John | Smith | 40 |
10
+ | John | Vander | 30 |
11
+ Given I visit advance_search page
12
+ When I select "first_name" from "adv_search[1_row][col1]"
13
+ When I select "is exactly" from "adv_search[1_row][col2]"
14
+ When I fill in "adv_search[1_row][col3]" with "John"
15
+
16
+ When I follow "add_row_link_1"
17
+
18
+ When I select "last_name" from "adv_search[2_row][col1]"
19
+ When I select "is exactly" from "adv_search[2_row][col2]"
20
+ When I fill in "adv_search[2_row][col3]" with "Smith"
21
+
22
+ When I press "Search"
23
+ Then I should see "Search result: 1 record found"
24
+ Then async verify that user "first_name" is "John"
25
+ Then async verify that user "last_name" is "Smith"
26
+
27
+
28
+ @javascript
29
+ Scenario: three rows
30
+ Given the following user exists:
31
+ | first name | last name | age |
32
+ | John | Smith | 40 |
33
+ | John | Smith | 30 |
34
+ | Mary | Jane | 30 |
35
+ | Mary | Jane | 40 |
36
+ | Jennifer | Jane | 30 |
37
+ Given I visit advance_search page
38
+ When I select "first_name" from "adv_search[1_row][col1]"
39
+ When I select "is exactly" from "adv_search[1_row][col2]"
40
+ When I fill in "adv_search[1_row][col3]" with "John"
41
+
42
+ When I follow "add_row_link_1"
43
+ When I select "last_name" from "adv_search[2_row][col1]"
44
+ When I select "is exactly" from "adv_search[2_row][col2]"
45
+ When I fill in "adv_search[2_row][col3]" with "Smith"
46
+
47
+ When I follow "add_row_link_1"
48
+ When I select "age" from "adv_search[3_row][col1]"
49
+ When I select "is equal to" from "adv_search[3_row][col2]"
50
+ When I fill in "adv_search[3_row][col3]" with "40"
51
+
52
+ When I press "Search"
53
+ Then I should see "Search result: 1 record found"
54
+ Then async verify that user "first_name" is "John"
55
+ Then async verify that user "last_name" is "Smith"
56
+
57
+ @javascript
58
+ Scenario: First built two extra rows and then kill the last row
59
+ Given the following user exists:
60
+ | first name | last name | age |
61
+ | Mary | Jane | 30 |
62
+ | Jennifer | Jane | 30 |
63
+ | John | Smith | 40 |
64
+ | John | Smith | 30 |
65
+ Given I visit advance_search page
66
+ When I select "first_name" from "adv_search[1_row][col1]"
67
+ When I select "is exactly" from "adv_search[1_row][col2]"
68
+ When I fill in "adv_search[1_row][col3]" with "John"
69
+
70
+ When I follow "add_row_link_1"
71
+ When I select "last_name" from "adv_search[2_row][col1]"
72
+ When I select "is exactly" from "adv_search[2_row][col2]"
73
+ When I fill in "adv_search[2_row][col3]" with "Smith"
74
+
75
+ When I follow "add_row_link_1"
76
+ When I select "age" from "adv_search[3_row][col1]"
77
+ When I select "is equal to" from "adv_search[3_row][col2]"
78
+ When I fill in "adv_search[3_row][col3]" with "40"
79
+
80
+ Then page should have id "remove_row_3"
81
+
82
+ When I follow "remove_row_3"
83
+ Then I should see "2" rows in table "advance_search_table"
84
+ When I press "Search"
85
+ Then I should see "Search result: 2 records found"
86
+ Then async verify that user "first_name" is "John"
87
+ Then async verify that user "last_name" is "Smith"
@@ -0,0 +1,16 @@
1
+ Feature: Advance Search
2
+
3
+ @javascript
4
+ Scenario: sorting
5
+ Given the following user exists:
6
+ | first name | last name |
7
+ | Mary | Jane |
8
+ | John | Smith |
9
+ Given I visit advance_search page
10
+ When I press "Search"
11
+ Then async verify that user "first_name" is "John"
12
+ Then async verify that user "last_name" is "Smith"
13
+ When I select "id asc" from "sortby"
14
+ When I press "Search"
15
+ Then async verify that user "first_name" is "Mary"
16
+ Then async verify that user "last_name" is "Jane"
@@ -0,0 +1,130 @@
1
+ Feature: Advance Search for string
2
+
3
+ @javascript
4
+ Scenario: Advance Search for a text field
5
+ Given a user exists
6
+ Given I visit advance_search page
7
+ When I select "description" from "adv_search[1_row][col1]"
8
+ Then page should have css "#advance_search_table tr td select.col2"
9
+ When I select "Contains" from "adv_search[1_row][col2]"
10
+ Then page should have css "#advance_search_table tr td input.col3"
11
+ When I select "Doesn't Contain" from "adv_search[1_row][col2]"
12
+ Then page should have css "#advance_search_table tr td input.col3"
13
+ When I select "is null" from "adv_search[1_row][col2]"
14
+ #Then page should have disabled css "#advance_search_table tr td input.col3"
15
+ When I select "is not null" from "adv_search[1_row][col2]"
16
+ #Then page should have disabled css "#advance_search_table tr td input.col3"
17
+
18
+
19
+ @javascript
20
+ Scenario: testing drop down behavior
21
+ Given a user exists
22
+ Given I visit advance_search page
23
+ Then page should have css "#advance_search_form"
24
+ Then page should have css "#advance_search_table"
25
+ Then page should have css "#advance_search_table tr td select.col1"
26
+ When I select "first_name" from "adv_search[1_row][col1]"
27
+ Then page should have css "#advance_search_table tr td select.col2"
28
+ When I select "contains" from "adv_search[1_row][col2]"
29
+ Then page should have css "#advance_search_table tr td input.col3"
30
+ When I select "is exactly" from "adv_search[1_row][col2]"
31
+ Then page should have css "#advance_search_table tr td input.col3"
32
+ When I select "doesn't contain" from "adv_search[1_row][col2]"
33
+ Then page should have css "#advance_search_table tr td input.col3"
34
+ When I select "is null" from "adv_search[1_row][col2]"
35
+ #Then page should have disabled css "#advance_search_table tr td input.col3"
36
+ When I select "is not null" from "adv_search[1_row][col2]"
37
+ #Then page should have disabled css "#advance_search_table tr td input.col3"
38
+
39
+ @javascript
40
+ Scenario: option "is not null"
41
+ Given the following user exists:
42
+ | first name | last name |
43
+ | Mary | Jane |
44
+ | John | |
45
+ Given I visit advance_search page
46
+ When I select "last_name" from "adv_search[1_row][col1]"
47
+ When I select "is not null" from "adv_search[1_row][col2]"
48
+ When I press "Search"
49
+ Then I should see "Search result: 1 record found"
50
+ Then async verify that user "first_name" is "Mary"
51
+ Then async verify that user "last_name" is "Jane"
52
+
53
+ @javascript
54
+ Scenario: option "is null"
55
+ Given the following user exists:
56
+ | first name | last name |
57
+ | John | |
58
+ | Mary | Jane |
59
+ | Jennifer | Jane |
60
+ Given I visit advance_search page
61
+ When I select "last_name" from "adv_search[1_row][col1]"
62
+ When I select "is null" from "adv_search[1_row][col2]"
63
+ When I press "Search"
64
+ Then I should see "Search result: 1 record found"
65
+ Then async verify that user "first_name" is "John"
66
+
67
+ @javascript
68
+ Scenario: option "is exactly"
69
+ Given the following user exists:
70
+ | first name | last name |
71
+ | John | Smith |
72
+ | Mary | Jane |
73
+ | Jennifer | Jane |
74
+ Given I visit advance_search page
75
+ When I select "first_name" from "adv_search[1_row][col1]"
76
+ When I select "is exactly" from "adv_search[1_row][col2]"
77
+ When I fill in "adv_search[1_row][col3]" with "John"
78
+ When I press "Search"
79
+ Then I should see "Search result: 1 record found"
80
+ Then async verify that user "first_name" is "John"
81
+ Then async verify that user "last_name" is "Smith"
82
+
83
+ @javascript
84
+ Scenario: option "contains"
85
+ Given the following user exists:
86
+ | first name | last name |
87
+ | Mary | Jane |
88
+ | Jennifer | Jane |
89
+ | Jenny | Aniston |
90
+ | John | Smith |
91
+ Given I visit advance_search page
92
+ When I select "first_name" from "adv_search[1_row][col1]"
93
+ When I select "contains" from "adv_search[1_row][col2]"
94
+ When I fill in "adv_search[1_row][col3]" with "Jenn"
95
+ When I press "Search"
96
+ Then I should see "Search result: 2 records found"
97
+ Then async verify that user "first_name" is "Jenny"
98
+ Then async verify that user "last_name" is "Aniston"
99
+
100
+ @javascript
101
+ Scenario: search for a text that does not exist
102
+ Given the following user exists:
103
+ | first name | last name |
104
+ | Mary | Jane |
105
+ | Jennifer | Jane |
106
+ | Jenny | Aniston |
107
+ | John | Smith |
108
+ Given I visit advance_search page
109
+ When I select "first_name" from "adv_search[1_row][col1]"
110
+ When I select "contains" from "adv_search[1_row][col2]"
111
+ When I fill in "adv_search[1_row][col3]" with "xxxxxxxxxxxxx"
112
+ When I press "Search"
113
+ Then I should see "Search result: 0 records found"
114
+
115
+ @javascript
116
+ Scenario: option "does not contain"
117
+ Given the following user exists:
118
+ | first name | last name |
119
+ | John | Smith |
120
+ | Mary | Jane |
121
+ | Jennifer | Jane |
122
+ | Jenny | Aniston |
123
+ Given I visit advance_search page
124
+ When I select "first_name" from "adv_search[1_row][col1]"
125
+ When I select "doesn't contain" from "adv_search[1_row][col2]"
126
+ When I fill in "adv_search[1_row][col3]" with "Jenn"
127
+ When I press "Search"
128
+ Then I should see "Search result: 2 records found"
129
+ Then async verify that user "first_name" is "John"
130
+ Then async verify that user "last_name" is "Smith"
@@ -0,0 +1,50 @@
1
+ Feature: CRUD
2
+
3
+ Scenario: edit
4
+ Given a user exists
5
+ Given I visit user show page
6
+ Given I follow "Edit"
7
+ When I fill in the following:
8
+ | user_first_name ||
9
+ | user_age ||
10
+ When I press "Update"
11
+ Then I should see "First name can't be blank"
12
+ Then I should see "Age can't be blank"
13
+ Then I should see "Age is not a number"
14
+ Then I should find value "(auto)" for "created_at"
15
+ Then I should find value "(auto)" for "updated_at"
16
+ When I fill in the following:
17
+ | user_first_name | Robert2 |
18
+ | user_age | 99 |
19
+ When I press "Update"
20
+ Then I should see "Robert2"
21
+ Then I should see "99"
22
+ Then I should see "Record was updated"
23
+
24
+ Scenario: edit PhoneNumber (no association drop-down)
25
+ Given configuration to hide the association drop down for PhoneNumber
26
+ Given a phone number exists
27
+ Given I visit phone_number show page
28
+ Given I follow "Edit"
29
+ Then page should have "input" field with selector "#phone_number_user_id"
30
+
31
+ Scenario: edit PhoneNumber (with association drop-down)
32
+ Given configuration to show the association drop down for PhoneNumber
33
+ Given a phone number exists
34
+ Given I visit phone_number show page
35
+ Given I follow "Edit"
36
+ Then page should have "select" field with selector "#phone_number_user_id"
37
+
38
+ Scenario: add a new record
39
+ Given a user exists
40
+ Given I visit quick_search page
41
+ Given I follow "+Add New Record"
42
+ Given I press "Create"
43
+ Then I should see "First name can't be blank"
44
+ Then I should see "Age can't be blank"
45
+ Then I should see "Age is not a number"
46
+ When I fill in the following:
47
+ | user_first_name | Johny |
48
+ | user_age | 21 |
49
+ When I press "Create"
50
+ Then I should see "Record was created"
@@ -0,0 +1,56 @@
1
+ Feature: CRUD show
2
+
3
+ Background:
4
+ When configured to display only 2 records per page
5
+ When configured to display City column :name as "City Name"
6
+
7
+ Scenario: show
8
+ Given a user exists
9
+ Given I visit user show page
10
+ Then I should notice id of the last person
11
+ Then I should see "Edit"
12
+ Then I should see "Delete"
13
+ Then I should see "Destroy"
14
+ Then I should see crud show tabular attributes
15
+
16
+ Scenario: show for Newspaper which has primary key as paper_id
17
+ Given a newspaper exists
18
+ Given I visit newspaper show page
19
+ Then I should see "Edit"
20
+
21
+ Scenario: show with has_one association info
22
+ Given the following user exists:
23
+ | first name | last name |
24
+ | Mary | Jane |
25
+ Given the following website exists:
26
+ | url | user |
27
+ | www.google.com | first name:Mary |
28
+ Given I visit user show page
29
+ Then I should see "website"
30
+ When I follow "website"
31
+ Then I should notice id of website of the last person
32
+ When I follow "user"
33
+ Then I should notice id of the last person
34
+
35
+ Scenario: show with has_many association info
36
+ Given the following user exists:
37
+ | first name | last name |
38
+ | Mary | Jane |
39
+ Given the following phone number exists:
40
+ | number | user |
41
+ | 123-456-7890 | first name:Mary |
42
+ | 123-456-7899 | first name:Mary |
43
+ Given I visit user show page
44
+ Then I should see "phone_numbers(2)"
45
+ When I follow "phone_numbers(2)"
46
+ Then I should see "has 2 phone_numbers"
47
+
48
+ Scenario: show with habtm association info
49
+ Given the following user exists:
50
+ | first name | last name |
51
+ | Mary | Jane |
52
+ Given user owns two clubs "sun-shine" and "rise-n-shine"
53
+ Given I visit user show page
54
+ Then I should see "clubs(2)"
55
+ When I follow "clubs(2)"
56
+ Then I should see "has 2 clubs"
@@ -0,0 +1,13 @@
1
+ Feature: RSS feed availabilty for all the models
2
+
3
+ Scenario: RSS feed availability with invalid authentication
4
+ Given a user exists
5
+ When mocked feed authentication returns false
6
+ Given I visit user feed page
7
+ Then I should see "not authorized"
8
+
9
+ Scenario: RSS feed availability with valid authentication
10
+ Given a user exists
11
+ When mocked feed authentication returns true
12
+ Given I visit user feed page
13
+ Then I should see "Feeds from admin_data User"
@@ -0,0 +1,41 @@
1
+ Feature: homepage
2
+
3
+ @javascript
4
+ Scenario: admin_data homepage
5
+ Given the following user exists:
6
+ | first_name | last_name |
7
+ | Mary | Jane |
8
+ | John | Smith |
9
+ | Neil | Singh |
10
+ | Trisha | Singh |
11
+ Given I visit admin_data page
12
+ Then I should see "Select from the drop down menu above"
13
+ When I follow "admin_data" within "#subnav"
14
+ Then I should see "Select from the drop down menu above"
15
+ Then I should see dropdown with css_selector ".drop_down_value_klass" with following options:
16
+ | text | value | position | value_match_type |
17
+ | city | /admin_data/quick_search/city | 2 | regex |
18
+ | club | /admin_data/quick_search/club | 3 | regex |
19
+ | newspaper | /admin_data/quick_search/newspaper | 4 | regex |
20
+ | phone_number | /admin_data/quick_search/phone_number | 5 | regex |
21
+ | user | /admin_data/quick_search/user | 6 | regex |
22
+ | website | /admin_data/quick_search/website | 7 | regex |
23
+
24
+ Then I should see dropdown with css_selector "#drop_down_klasses" with following options:
25
+ | text | value | position | value_match_type |
26
+ | city | /admin_data/quick_search/city | 2 | regex |
27
+ | club | /admin_data/quick_search/club | 3 | regex |
28
+ | newspaper | /admin_data/quick_search/newspaper | 4 | regex |
29
+ | phone_number | /admin_data/quick_search/phone_number | 5 | regex |
30
+ | user | /admin_data/quick_search/user | 6 | regex |
31
+ | website | /admin_data/quick_search/website | 7 | regex |
32
+ When I select "user" from "drop_down_klasses"
33
+ Then first id of table should be of "Trisha"
34
+
35
+ Scenario: footer links
36
+ Given I visit admin_data page
37
+ Then page should have following links:
38
+ | url | text | within |
39
+ | http://github.com/neerajdotname/admin_data | admin_data | #footer |
40
+ | http://github.com/neerajdotname/admin_data/issues | Report Bug | #footer |
41
+ | http://github.com/neerajdotname/admin_data/wiki | Documentation | #footer |
@@ -0,0 +1,7 @@
1
+ Feature: Migration
2
+
3
+ @javascript
4
+ Scenario: migration information
5
+ Given I visit admin_data page
6
+ When I select "Migration Information" from "drop_down_klasses"
7
+ Then I should see "20091030202259"