wagn 1.20.0 → 1.20.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd1e828fb6c8ee33f6cc48e17c3b5a102eb90483
4
- data.tar.gz: 376b28cbee4e38ca2abe10591c0150e44145f156
3
+ metadata.gz: 6dffc37a2889618b5d050be8245b96f04c2e3158
4
+ data.tar.gz: 07cfa60ae76b35fd2f2198643bab61a10f6e5289
5
5
  SHA512:
6
- metadata.gz: df71a97b7d1ba6320557ca14a5e7d0d94bec48c62e8e064fb9c62b4507c10eea52308bbc5965fac9b11d7ca9f8d3afcb736ae642b41d15cf7c20378907ae8e31
7
- data.tar.gz: 61c053e4f2f1854ad40d9303bce379910e0afef3744aabeffa1551314ab2aad23a601b995fc583f99f4c613b812cacdfcb9c54d53f38a41d6ce014d3219739eb
6
+ metadata.gz: 7256a1ebc8ae176adf2cde46a6c05b5997f919730f295e9cf628a1541d8355a44e762441bb31ac444428226eb66ed5de957596a6c6b99223658ca6e08c4080cd
7
+ data.tar.gz: 8d522e43cf859b267263c9d7c2c88b24f7012760786ed6b41e55d972ee00e8e6679a34b7a0ebed495a615680cd9b68d3fdb7a5f8a71e2c9b40187a29a2b5d072
@@ -4,7 +4,7 @@ Feature: File Upload
4
4
 
5
5
  Background:
6
6
  Given I am signed in as Joe Admin
7
- And I wait until ajax response done
7
+ And I wait for ajax response
8
8
 
9
9
  Scenario: Block creating a new empty file
10
10
  When I go to new File
@@ -16,12 +16,12 @@ Feature: File Upload
16
16
  Scenario: Uploading a file
17
17
  When I go to new File
18
18
  And I upload the file "file.txt"
19
- And I wait until ajax response done
19
+ And I wait for ajax response
20
20
  Then I should see "file.txt 9 Bytes"
21
21
  When I press "Delete"
22
22
  Then I should see "Add file..."
23
23
  When I upload the file "file.txt"
24
- And I wait until ajax response done
24
+ And I wait for ajax response
25
25
  And I fill in "card_name" with "a test file"
26
26
  And I press "Submit"
27
27
  Then I should see "Download a test file"
@@ -29,26 +29,26 @@ Feature: File Upload
29
29
  Scenario: Uploading and changing an image
30
30
  When I go to new Image
31
31
  And I upload the image "image.png"
32
- And I wait until ajax response done
32
+ And I wait for ajax response
33
33
  Then I should see "image.png 34.3 KB"
34
34
  And I fill in "card_name" with "a test image"
35
35
  And I press "Submit"
36
36
  Then I should see an image of size "large" and type "png"
37
37
  And I edit "a test image"
38
38
  And I upload the image "image2.jpg"
39
- And I wait until ajax response done
39
+ And I wait for ajax response
40
40
  Then I should see "image2.jpg 69.8 KB"
41
41
  And I press "Submit"
42
42
  Then I should see an image of size "large" and type "jpg"
43
- And I wait until ajax response done
43
+ And I wait for ajax response
44
44
 
45
45
  Scenario: Changing a coded image
46
46
  When I edit "*logo"
47
47
  And I upload the image "image2.jpg"
48
- And I wait until ajax response done
48
+ And I wait for ajax response
49
49
  Then I should see "image2.jpg 69.8 KB"
50
50
  And I press "Submit"
51
- And I wait until ajax response done
51
+ And I wait for ajax response
52
52
  Then I should see a non-coded image of size "large" and type "jpg"
53
53
 
54
54
  Scenario: uploading a file as a field in a form
@@ -58,13 +58,13 @@ Feature: File Upload
58
58
  And I create HTML card "complicated card+*type+*structure" with content "{{+image}}{{+description}}"
59
59
  And I go to "/new complicated_card"
60
60
  And I fill in "card_name" with "Vignesh has a complicated relationship"
61
- And I wait until ajax response done
61
+ And I wait for ajax response
62
62
  And I upload the image "image.png"
63
- And I wait until ajax response done
63
+ And I wait for ajax response
64
64
  Then I should see "image.png 34.3 KB"
65
65
  And I press "Submit"
66
66
  Then I should see an image of size "medium" and type "png"
67
- And I wait until ajax response done
67
+ And I wait for ajax response
68
68
 
69
69
  Scenario: updating a file as a field in a form
70
70
  When I go to "/new Cardtype"
@@ -73,17 +73,17 @@ Feature: File Upload
73
73
  And I create HTML card "complicated card+*type+*structure" with content "{{+image}}{{+description}}"
74
74
  And I go to "/new complicated_card"
75
75
  And I fill in "card_name" with "Vignesh has a complicated relationship"
76
- And I wait until ajax response done
76
+ And I wait for ajax response
77
77
  And I upload the image "image.png"
78
- And I wait until ajax response done
78
+ And I wait for ajax response
79
79
  And I press "Submit"
80
80
  And I edit "Vignesh has a complicated relationship"
81
81
  And I upload the image "image2.jpg"
82
- And I wait until ajax response done
82
+ And I wait for ajax response
83
83
  Then I should see "image2.jpg 69.8 KB"
84
84
  And I press "Submit"
85
85
  Then I should see an image of size "medium" and type "jpg"
86
- And I wait until ajax response done
86
+ And I wait for ajax response
87
87
 
88
88
  Scenario: submit a form without updating a file
89
89
  When I go to "/new Cardtype"
@@ -92,14 +92,14 @@ Feature: File Upload
92
92
  And I create HTML card "complicated card+*type+*structure" with content "{{+image}}{{+description}}"
93
93
  And I go to "/new complicated_card"
94
94
  And I fill in "card_name" with "Vignesh has a complicated relationship"
95
- And I wait until ajax response done
95
+ And I wait for ajax response
96
96
  And I upload the image "image.png"
97
- And I wait until ajax response done
97
+ And I wait for ajax response
98
98
  And I press "Submit"
99
99
  And I edit "Vignesh has a complicated relationship"
100
100
  And I press "Submit"
101
- And I wait until ajax response done
101
+ And I wait for ajax response
102
102
  Then within ".card-body" I should see an image of size "medium" and type "png"
103
- And I wait until ajax response done
103
+ And I wait for ajax response
104
104
 
105
105
 
@@ -1,25 +1,27 @@
1
- @javascript
2
- Feature: History
3
- As an editor
4
- I want to be able to browse through the history and save an old version as
5
- current.
6
-
7
- Background:
8
- Given I am signed in as Joe Admin
9
- Then the card First should not contain "chicken"
10
-
11
- Scenario: view history and rollback
12
- When I go to url "/First?view=history"
13
- # Then In the main card content I should see a del with content "egg"
14
-
15
- When I expand act 2
16
- # And In the main card content I click "Hide changes"
17
- # Then In the main card content I should not see a del with content "egg"
18
- When In the main card body I click "Save as current"
19
- And I wait until ajax response
20
-
21
- Then In the main card content I should see "chicken"
22
-
23
- #Then the card First should contain "chicken"
1
+ # @javascript
2
+ # Feature: History
3
+ # As an editor
4
+ # I want to be able to browse through the history and save an old version as
5
+ # current.
6
+ #
7
+ # Background:
8
+ # Given I am signed in as Joe Admin
9
+ # Then the card First should not contain "chicken"
10
+ #
11
+ # Scenario: view history and rollback
12
+ # When I go to url "/First?view=history"
13
+ # # Then In the main card content I should see a del with content "egg"
14
+ #
15
+ # When I expand act 2
16
+ # # And In the main card content I click "Hide changes"
17
+ # # Then In the main card content I should not see a del with content "egg"
18
+ # And I wait for ajax response
19
+ #
20
+ # When In the main card body I click "Save as current"
21
+ # And I wait for ajax response
22
+ #
23
+ # Then In the main card content I should see "chicken"
24
+ #
25
+ # #Then the card First should contain "chicken"
24
26
 
25
27
 
@@ -13,20 +13,20 @@ Feature: paging
13
13
  And I create HTML card "list all basic cards" with content "{{basic card search||content;structure:basic item structure}}"
14
14
  And I go to card "list all basic cards"
15
15
  And I click "2" within ".paging"
16
- And I wait until ajax response done
16
+ And I wait for ajax response
17
17
  Then I should see css class ".STRUCTURE-basic_item_structure" within ".search-result-item"
18
18
  And I click "3" within ".paging"
19
- And I wait until ajax response done
19
+ And I wait for ajax response
20
20
  Then I should see css class ".STRUCTURE-basic_item_structure" within ".search-result-item"
21
21
 
22
22
  Scenario: jump to pages should keep the item view
23
23
  When I create HTML card "list basic types" with content "{{basic card search|open|closed}}"
24
24
  And I go to card "list basic types"
25
25
  And I click "2" within ".paging"
26
- And I wait until ajax response done
26
+ And I wait for ajax response
27
27
  Then I should see css class ".closed-view" within ".search-result-item"
28
28
  And I click "3" within ".paging"
29
- And I wait until ajax response done
29
+ And I wait for ajax response
30
30
  Then I should see css class ".TYPE-search.open-view"
31
31
  Then I should see css class ".closed-view" within ".search-result-item"
32
32
 
@@ -2,10 +2,10 @@
2
2
  Feature: Reference
3
3
  In order to connect related cards
4
4
  As a Wagneer
5
-
5
+
6
6
  Background:
7
7
  Given I am signed in as Joe Admin
8
- And I wait until ajax response done
8
+ And I wait for ajax response
9
9
 
10
10
  Scenario: Renaming a embed card
11
11
  When I create PlainText card "Vignesh" with content "Indian"
@@ -14,7 +14,7 @@ Feature: Reference
14
14
  And I fill in "card_name" with "Srivigneshwar"
15
15
  And I press "Rename"
16
16
  And I press "Rename and Update"
17
- And I wait until ajax response done
17
+ And I wait for ajax response
18
18
  Then I go to card "Kawaii Man"
19
19
  And I should see "Srivigneshwar"
20
20
 
@@ -177,7 +177,7 @@ When /I wait (\d+) seconds$/ do |period|
177
177
  sleep period.to_i
178
178
  end
179
179
 
180
- When /^I wait until ajax response done$/ do
180
+ When /^I wait for ajax response$/ do
181
181
  Timeout.timeout(Capybara.default_wait_time) do
182
182
  sleep(0.5) while page.evaluate_script("jQuery.active") != 0
183
183
  end
@@ -187,10 +187,11 @@ end
187
187
  # save_and_open_page
188
188
  # end
189
189
  #
190
- # Then /debug/ do
190
+ Then /debug/ do
191
+ require 'pry'
192
+ binding.pry
193
+ end
191
194
  # if RUBY_VERSION =~ /^2/
192
- # require 'pry'
193
- # binding.pry
194
195
  # else
195
196
  # debugger
196
197
  # end
@@ -51,9 +51,30 @@ When /^(?:|I )select "([^"]*)" from "([^"]*)"$/ do |value, field|
51
51
  select(value, from: field)
52
52
  end
53
53
 
54
+ When /^(?:|I )submit form$/ do
55
+ find(:css, "button[type='submit']").click
56
+ end
57
+
54
58
  When /^(?:|I )single-select "([^"]*)" from "([^"]*)"$/ do |value, field|
55
- find("label", text: field).parent.find("a.chosen-single").click
56
- find("li", text: value).click
59
+ select =
60
+ find("label", text: field).find(:xpath, "..//select", visible: false)
61
+ value = select.find("option", text: value, visible: false)["value"]
62
+ page.execute_script("$('##{select['id']}').val('#{value}')")
63
+ page.execute_script("$('##{select['id']}').trigger('chosen:updated')")
64
+ page.execute_script("$('##{select['id']}').change()")
65
+
66
+ # code below doesn't work on wikirate because if you select an item in
67
+ # a very long list the list gets pushed below the navigation bar
68
+ # find("label", text: field).find(:xpath, "..//a[@class='chosen-single']")
69
+ # .click
70
+ # li = find("li", text: value, visible: false)
71
+ # li.click
72
+ # # If the list element is too far down the list then the first click
73
+ # # scrolls it up but doesn't select it. It needs another click.
74
+ # # A selected item is no longer visible (because the list disappears)
75
+ # if li.visible?
76
+ # li.click
77
+ # end
57
78
  end
58
79
 
59
80
  # Use this step in conjunction with Rail's datetime_select helper. For example:
@@ -36,7 +36,8 @@ require "test_after_commit"
36
36
  # prefer to use XPath just remove this line and adjust any selectors in your
37
37
  # steps to use the XPath syntax.
38
38
  Capybara.default_selector = :css
39
- Capybara.default_wait_time = 30
39
+ Capybara.default_wait_time = 5
40
+ Cardio.config.paging_limit = 10
40
41
  # By default, any exception happening in your Rails application will bubble up
41
42
  # to Cucumber so that your scenario will fail. This is a different from how
42
43
  # your application behaves in the production environment, where an error page
@@ -17,11 +17,11 @@ Scenario: close toolbar
17
17
 
18
18
  Scenario: pin and unpin toolbar
19
19
  When In main card toolbar I find button with icon "pushpin" and click it
20
- And I wait until ajax response done
20
+ And I wait for ajax response
21
21
  And I go to card "Home"
22
22
  Then In main card frame I should see a nav with class "toolbar"
23
23
  And In main card toolbar I should see a button with class "toolbar-pin.active"
24
24
  When In main card toolbar I find button with icon "pushpin" and click it
25
- And I wait until ajax response done
25
+ And I wait for ajax response
26
26
  And I go to card "Home"
27
27
  Then In main card frame I should not see a nav with class "toolbar"
@@ -75,7 +75,7 @@ end
75
75
  group :test do
76
76
  gem 'fog'
77
77
  gem 'fog-aws'
78
- gem 'rspec-html-matchers'
78
+ gem 'rspec-html-matchers', '0.8.1' # 0.9 requires ruby >= 2.1
79
79
  gem 'rr' #, '=1.0.0'
80
80
  gem 'simplecov', '~> 0.7.1', :require => false #test coverage
81
81
  gem 'codeclimate-test-reporter', require: nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wagn
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.20.0
4
+ version: 1.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-01-02 00:00:00.000000000 Z
14
+ date: 2017-01-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -33,14 +33,14 @@ dependencies:
33
33
  requirements:
34
34
  - - '='
35
35
  - !ruby/object:Gem::Version
36
- version: 1.20.0
36
+ version: 1.20.1
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - '='
42
42
  - !ruby/object:Gem::Version
43
- version: 1.20.0
43
+ version: 1.20.1
44
44
  description: a wiki approach to stuctured data, dynamic interaction, and web design
45
45
  email:
46
46
  - info@wagn.org