releaf 1.0.8 → 1.0.9

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: d7dd9841082ae78e9d8c7affd58e6ec5306a311d
4
- data.tar.gz: d0aad6e85a80938dbd00d2eabd59275dadce63f3
3
+ metadata.gz: 239d56dc37e0194ec6fd39a265fe0fde663ab5ff
4
+ data.tar.gz: c074e42c49ab29fca959bc4bcb83a42abfb66785
5
5
  SHA512:
6
- metadata.gz: 3916f8837e57a6a717a7d1ee3b97c8a1020abdeb026af8b552bfe6908869e951688d1b29d277d321aeb69be1f81f819024e889e59bf95eda0e7b8bf63d520694
7
- data.tar.gz: ef8976bf107af13657bc9007358f8743d73960b2a5270fe3ff24d7898f3328f211af0c0cd3654427acee432b137f010a9b4edb0d28027ba7f7b842f2915267cc
6
+ metadata.gz: 2a6b96436ace6ca6c66d215bd1a26df5125acf398a401105c234827280d0611b892e5c6f1ed37bfdbb399e8f990a5382fe5dd2fb6ce271def799100e13e11508
7
+ data.tar.gz: 81bf27e0255ef71105514a06e9ea95a9178c5df059bd1e522a2be24841e3182c4a3dad641511891ce681906a4bb78202e0ee59ba7b4ca642b99387f028c4c246
@@ -158,7 +158,7 @@ module Releaf::Test
158
158
  end
159
159
  end
160
160
 
161
- def fill_in_date field_locator, options
161
+ def fill_in_date(field_locator, options)
162
162
  date = options[:with]
163
163
 
164
164
  if date.is_a? Time
@@ -223,5 +223,35 @@ module Releaf::Test
223
223
  page.execute_script("CKEDITOR.instances['#{textarea_id}'].setData(#{html.to_json});")
224
224
  end
225
225
 
226
+
227
+ def scroll_to_bottom_of_page
228
+ execute_script('window.scrollTo(0, document.body.scrollHeight);')
229
+ end
230
+
231
+ def add_nested_item(block_name, expected_item_index)
232
+ scroll_to_bottom_of_page
233
+ all('button', text: 'Add item').last.click # use last button in case of multiple nested items
234
+ wait_for_nested_item block_name, expected_item_index
235
+
236
+ if block_given?
237
+ within(".item[data-name=\"#{block_name}\"][data-index=\"#{expected_item_index}\"]") do
238
+ yield
239
+ end
240
+ end
241
+ end
242
+
243
+ def remove_nested_item(block_name, item_index)
244
+ base_selector = ".item[data-name=\"#{block_name}\"][data-index=\"#{item_index}\"]"
245
+ page.find("#{base_selector} > .remove-item-box button.remove-nested-item").click
246
+ # wait for js to finish hiding the block
247
+ # the opacity and display styles may get set in different order, so select both orders
248
+ expect(page).to have_css("#{base_selector}[style=\"display: none; opacity: 0;\"], #{base_selector}[style=\"opacity: 0; display: none;\"]", visible: false)
249
+ end
250
+
251
+ def wait_for_nested_item(block_name, item_index)
252
+ # wait for js to finish initializing the block
253
+ expect(page).to have_css(".item[data-name=\"#{block_name}\"][data-index=\"#{item_index}\"][style=\"opacity: 1; display: block;\"]")
254
+ end
255
+
226
256
  end
227
257
  end
@@ -1,3 +1,3 @@
1
1
  module Releaf
2
- VERSION = "1.0.8"
2
+ VERSION = "1.0.9"
3
3
  end
@@ -0,0 +1,5 @@
1
+ FactoryGirl.define do
2
+ factory :banner_page do
3
+
4
+ end
5
+ end
@@ -25,7 +25,6 @@ FactoryGirl.define do
25
25
  content_attributes ({ intro_text_html: "some <strong>STRRRONG</strong> text" })
26
26
  end
27
27
 
28
-
29
28
  factory :text_page_node, class: ::Node do
30
29
  sequence(:name) {|n| "node #{n}"}
31
30
  sequence(:slug) {|n| "node-#{n}"}
@@ -40,4 +39,12 @@ FactoryGirl.define do
40
39
  content_attributes ({ text_html: "some <strong>STRIONG</strong> text" })
41
40
  end
42
41
 
42
+ factory :banner_page_node, class: ::Node do
43
+ sequence(:name) {|n| "node #{n}"}
44
+ sequence(:slug) {|n| "node-#{n}"}
45
+ content_type "BannerPage"
46
+ content_attributes ({})
47
+ end
48
+
49
+
43
50
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: releaf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - CubeSystems
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-31 00:00:00.000000000 Z
11
+ date: 2017-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: releaf-core
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.8
19
+ version: 1.0.9
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.8
26
+ version: 1.0.9
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: releaf-i18n_database
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.8
33
+ version: 1.0.9
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 1.0.8
40
+ version: 1.0.9
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: releaf-permissions
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 1.0.8
47
+ version: 1.0.9
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 1.0.8
54
+ version: 1.0.9
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: releaf-content
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 1.0.8
61
+ version: 1.0.9
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 1.0.8
68
+ version: 1.0.9
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec-rails
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -307,6 +307,7 @@ files:
307
307
  - lib/releaf/test.rb
308
308
  - lib/releaf/version.rb
309
309
  - spec/factories/author.rb
310
+ - spec/factories/banner_page.rb
310
311
  - spec/factories/book.rb
311
312
  - spec/factories/chapter.rb
312
313
  - spec/factories/common.rb
@@ -343,12 +344,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
343
344
  version: '0'
344
345
  requirements: []
345
346
  rubyforge_project:
346
- rubygems_version: 2.5.1
347
+ rubygems_version: 2.6.10
347
348
  signing_key:
348
349
  specification_version: 4
349
350
  summary: Administration interface for Ruby on Rails
350
351
  test_files:
351
352
  - spec/factories/author.rb
353
+ - spec/factories/banner_page.rb
352
354
  - spec/factories/book.rb
353
355
  - spec/factories/chapter.rb
354
356
  - spec/factories/common.rb