watir 6.16.2 → 6.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +5 -5
  2. data/.github/actions/enable-safari/action.yml +11 -0
  3. data/.github/actions/install-chrome/action.yml +11 -0
  4. data/.github/workflows/linux.yml +61 -0
  5. data/.github/workflows/mac.yml +55 -0
  6. data/.github/workflows/unit.yml +31 -0
  7. data/.github/workflows/windows.yml +39 -0
  8. data/.rubocop.yml +32 -107
  9. data/.rubocop_todo.yml +36 -0
  10. data/CHANGES.md +42 -0
  11. data/Gemfile +3 -1
  12. data/LICENSE +2 -2
  13. data/README.md +9 -10
  14. data/Rakefile +4 -4
  15. data/lib/watir-webdriver.rb +1 -1
  16. data/lib/watir.rb +1 -1
  17. data/lib/watir/adjacent.rb +8 -10
  18. data/lib/watir/after_hooks.rb +4 -4
  19. data/lib/watir/alert.rb +1 -0
  20. data/lib/watir/attribute_helper.rb +2 -0
  21. data/lib/watir/browser.rb +7 -3
  22. data/lib/watir/capabilities.rb +9 -6
  23. data/lib/watir/cookies.rb +3 -1
  24. data/lib/watir/element_collection.rb +21 -6
  25. data/lib/watir/elements/element.rb +66 -53
  26. data/lib/watir/elements/file_field.rb +1 -0
  27. data/lib/watir/elements/html_elements.rb +0 -1
  28. data/lib/watir/elements/iframe.rb +4 -3
  29. data/lib/watir/elements/link.rb +0 -9
  30. data/lib/watir/elements/radio.rb +1 -1
  31. data/lib/watir/elements/select.rb +22 -7
  32. data/lib/watir/generator/base/spec_extractor.rb +4 -4
  33. data/lib/watir/generator/html/generator.rb +1 -1
  34. data/lib/watir/has_window.rb +17 -15
  35. data/lib/watir/js_execution.rb +3 -3
  36. data/lib/watir/js_snippets.rb +2 -2
  37. data/lib/watir/legacy_wait.rb +1 -1
  38. data/lib/watir/locators.rb +1 -3
  39. data/lib/watir/locators/element/locator.rb +22 -12
  40. data/lib/watir/locators/element/selector_builder.rb +12 -13
  41. data/lib/watir/locators/element/selector_builder/xpath.rb +40 -13
  42. data/lib/watir/locators/text_field/matcher.rb +1 -1
  43. data/lib/watir/locators/text_field/selector_builder/xpath.rb +3 -1
  44. data/lib/watir/logger.rb +7 -20
  45. data/lib/watir/radio_set.rb +2 -2
  46. data/lib/watir/user_editable.rb +6 -2
  47. data/lib/watir/version.rb +1 -1
  48. data/lib/watir/wait.rb +2 -0
  49. data/lib/watir/wait/timer.rb +1 -1
  50. data/lib/watir/window.rb +8 -4
  51. data/lib/watir/window_collection.rb +105 -0
  52. data/lib/watirspec.rb +2 -1
  53. data/lib/watirspec/guards.rb +1 -1
  54. data/lib/watirspec/implementation.rb +3 -5
  55. data/lib/watirspec/rake_tasks.rb +2 -0
  56. data/lib/watirspec/runner.rb +5 -1
  57. data/lib/watirspec/server.rb +1 -1
  58. data/spec/spec_helper.rb +2 -7
  59. data/spec/unit/container_spec.rb +1 -1
  60. data/spec/unit/logger_spec.rb +5 -7
  61. data/spec/unit/match_elements/element_spec.rb +17 -15
  62. data/spec/unit/selector_builder/button_spec.rb +16 -15
  63. data/spec/unit/selector_builder/element_spec.rb +58 -9
  64. data/spec/unit/selector_builder/text_field_spec.rb +14 -14
  65. data/spec/unit/unit_helper.rb +2 -4
  66. data/spec/watirspec/after_hooks_spec.rb +58 -68
  67. data/spec/watirspec/alert_spec.rb +69 -79
  68. data/spec/watirspec/browser_spec.rb +51 -48
  69. data/spec/watirspec/cookies_spec.rb +52 -37
  70. data/spec/watirspec/drag_and_drop_spec.rb +14 -38
  71. data/spec/watirspec/elements/button_spec.rb +2 -0
  72. data/spec/watirspec/elements/buttons_spec.rb +1 -1
  73. data/spec/watirspec/elements/checkbox_spec.rb +8 -4
  74. data/spec/watirspec/elements/date_field_spec.rb +18 -9
  75. data/spec/watirspec/elements/date_time_field_spec.rb +3 -4
  76. data/spec/watirspec/elements/div_spec.rb +62 -54
  77. data/spec/watirspec/elements/element_spec.rb +73 -88
  78. data/spec/watirspec/elements/elements_spec.rb +12 -3
  79. data/spec/watirspec/elements/filefield_spec.rb +25 -50
  80. data/spec/watirspec/elements/form_spec.rb +6 -8
  81. data/spec/watirspec/elements/frame_spec.rb +10 -13
  82. data/spec/watirspec/elements/iframe_spec.rb +12 -9
  83. data/spec/watirspec/elements/iframes_spec.rb +2 -2
  84. data/spec/watirspec/elements/link_spec.rb +23 -12
  85. data/spec/watirspec/elements/links_spec.rb +11 -3
  86. data/spec/watirspec/elements/option_spec.rb +15 -17
  87. data/spec/watirspec/elements/select_list_spec.rb +222 -117
  88. data/spec/watirspec/elements/text_field_spec.rb +8 -4
  89. data/spec/watirspec/elements/tr_spec.rb +0 -9
  90. data/spec/watirspec/html/forms_with_input_elements.html +1 -0
  91. data/spec/watirspec/html/iframes.html +3 -0
  92. data/spec/watirspec/html/non_control_elements.html +4 -4
  93. data/spec/watirspec/html/right_click.html +12 -0
  94. data/spec/watirspec/html/wait.html +6 -6
  95. data/spec/watirspec/html/window_switching.html +10 -0
  96. data/spec/watirspec/legacy_wait_spec.rb +216 -0
  97. data/spec/watirspec/support/rspec_matchers.rb +17 -13
  98. data/spec/watirspec/user_editable_spec.rb +1 -1
  99. data/spec/watirspec/wait_spec.rb +257 -305
  100. data/spec/watirspec/window_switching_spec.rb +332 -211
  101. data/spec/watirspec_helper.rb +16 -19
  102. data/support/doctest_helper.rb +0 -2
  103. data/watir.gemspec +6 -7
  104. metadata +36 -26
  105. data/.travis.yml +0 -84
  106. data/appveyor.yml +0 -12
  107. data/lib/watir/elements/area.rb +0 -10
  108. data/spec/watirspec/relaxed_locate_spec.rb +0 -113
@@ -1,110 +1,100 @@
1
1
  require 'watirspec_helper'
2
2
 
3
- not_compliant_on :headless do
4
- describe 'Alert API' do
5
- before do
6
- browser.goto WatirSpec.url_for('alerts.html')
7
- end
3
+ describe 'Alert API' do
4
+ before do
5
+ browser.goto WatirSpec.url_for('alerts.html')
6
+ end
8
7
 
9
- after do
10
- browser.alert.ok if browser.alert.exists?
11
- end
8
+ after do
9
+ browser.alert.ok if browser.alert.exists?
10
+ end
12
11
 
13
- compliant_on :relaxed_locate do
14
- context 'Relaxed Waits' do
15
- context 'when acting on an alert' do
16
- it 'raises exception after timing out' do
17
- expect { browser.alert.text }.to wait_and_raise_unknown_object_exception
18
- end
12
+ compliant_on :relaxed_locate do
13
+ context 'Relaxed Waits' do
14
+ context 'when acting on an alert' do
15
+ it 'raises exception after timing out' do
16
+ expect { browser.alert.text }.to wait_and_raise_unknown_object_exception
19
17
  end
20
18
  end
21
19
  end
20
+ end
22
21
 
23
- context 'alert' do
24
- describe '#text' do
25
- it 'returns text of alert' do
26
- browser.button(id: 'alert').click
27
- expect(browser.alert.text).to include('ok')
28
- end
22
+ context 'alert' do
23
+ describe '#text' do
24
+ it 'returns text of alert' do
25
+ browser.button(id: 'alert').click
26
+ expect(browser.alert.text).to include('ok')
29
27
  end
28
+ end
30
29
 
31
- describe '#exists?' do
32
- it 'returns false if alert is not present' do
33
- expect(browser.alert).to_not exist
34
- end
30
+ describe '#exists?' do
31
+ it 'returns false if alert is not present' do
32
+ expect(browser.alert).to_not exist
33
+ end
35
34
 
36
- bug 'Alert exception not thrown, so Browser#inspect hangs', :safari do
37
- it 'returns true if alert is present' do
38
- browser.button(id: 'alert').click
39
- browser.wait_until(timeout: 10) { browser.alert.exists? }
40
- end
41
- end
35
+ it 'returns true if alert is present' do
36
+ browser.button(id: 'alert').click
37
+ browser.wait_until(timeout: 10) { browser.alert.exists? }
42
38
  end
39
+ end
43
40
 
44
- describe '#ok' do
45
- not_compliant_on :safari do
46
- it 'closes alert' do
47
- browser.button(id: 'alert').click
48
- browser.alert.ok
49
- expect(browser.alert).to_not exist
50
- end
51
- end
41
+ describe '#ok' do
42
+ it 'closes alert' do
43
+ browser.button(id: 'alert').click
44
+ browser.alert.ok
45
+ expect(browser.alert).to_not exist
52
46
  end
47
+ end
53
48
 
54
- bug 'https://code.google.com/p/chromedriver/issues/detail?id=26', [:chrome, :macosx] do
55
- not_compliant_on :safari do
56
- describe '#close' do
57
- it 'closes alert' do
58
- browser.button(id: 'alert').click
59
- browser.alert.close
60
- expect(browser.alert).to_not exist
61
- end
62
- end
63
- end
49
+ describe '#close' do
50
+ it 'closes alert' do
51
+ browser.button(id: 'alert').click
52
+ browser.alert.close
53
+ expect(browser.alert).to_not exist
64
54
  end
55
+ end
65
56
 
66
- not_compliant_on :relaxed_locate do
67
- describe 'wait_until_present' do
68
- it 'waits until alert is present and goes on' do
69
- browser.button(id: 'timeout-alert').click
70
- browser.alert.wait_until_present.ok
57
+ not_compliant_on :relaxed_locate do
58
+ describe 'wait_until_present' do
59
+ it 'waits until alert is present and goes on' do
60
+ browser.button(id: 'timeout-alert').click
61
+ browser.alert.wait_until_present.ok
71
62
 
72
- expect(browser.alert).to_not exist
73
- end
63
+ expect(browser.alert).to_not exist
64
+ end
74
65
 
75
- it 'raises error if alert is not present after timeout' do
76
- expect { browser.alert.wait_until_present.ok }.to raise_timeout_exception
77
- end
66
+ it 'raises error if alert is not present after timeout' do
67
+ expect { browser.alert.wait_until_present.ok }.to raise_timeout_exception
78
68
  end
79
69
  end
80
70
  end
71
+ end
81
72
 
82
- context 'confirm' do
83
- describe '#ok' do
84
- it 'accepts confirm' do
85
- browser.button(id: 'confirm').click
86
- browser.alert.ok
87
- expect(browser.button(id: 'confirm').value).to eq 'true'
88
- end
73
+ context 'confirm' do
74
+ describe '#ok' do
75
+ it 'accepts confirm' do
76
+ browser.button(id: 'confirm').click
77
+ browser.alert.ok
78
+ expect(browser.button(id: 'confirm').value).to eq 'true'
89
79
  end
80
+ end
90
81
 
91
- describe '#close' do
92
- it 'cancels confirm' do
93
- browser.button(id: 'confirm').click
94
- browser.alert.close
95
- expect(browser.button(id: 'confirm').value).to eq 'false'
96
- end
82
+ describe '#close' do
83
+ it 'cancels confirm' do
84
+ browser.button(id: 'confirm').click
85
+ browser.alert.close
86
+ expect(browser.button(id: 'confirm').value).to eq 'false'
97
87
  end
98
88
  end
89
+ end
99
90
 
100
- context 'prompt' do
101
- describe '#set' do
102
- it 'enters text to prompt' do
103
- browser.button(id: 'prompt').click
104
- browser.alert.set 'My Name'
105
- browser.alert.ok
106
- expect(browser.button(id: 'prompt').value).to eq 'My Name'
107
- end
91
+ context 'prompt' do
92
+ describe '#set' do
93
+ it 'enters text to prompt' do
94
+ browser.button(id: 'prompt').click
95
+ browser.alert.set 'My Name'
96
+ browser.alert.ok
97
+ expect(browser.button(id: 'prompt').value).to eq 'My Name'
108
98
  end
109
99
  end
110
100
  end
@@ -12,17 +12,15 @@ describe 'Browser' do
12
12
  expect(browser).to exist
13
13
  end
14
14
 
15
- bug 'https://bugzilla.mozilla.org/show_bug.cgi?id=1223277', :firefox do
16
- not_compliant_on :headless do
17
- it 'returns false if window is closed' do
18
- browser.goto WatirSpec.url_for('window_switching.html')
19
- browser.a(id: 'open').click
20
- Watir::Wait.until { browser.windows.size == 2 }
21
- browser.window(title: 'closeable window').use
22
- browser.a(id: 'close').click
23
- Watir::Wait.until { browser.windows.size == 1 }
24
- expect(browser.exists?).to be false
25
- end
15
+ bug 'Clicking an Element that Closes a Window is returning NoMatchingWindowFoundException', :safari do
16
+ it 'returns false if window is closed' do
17
+ browser.goto WatirSpec.url_for('window_switching.html')
18
+ browser.a(id: 'open').click
19
+ Watir::Wait.until { browser.windows.size == 2 }
20
+ browser.window(title: 'closeable window').use
21
+ browser.a(id: 'close').click
22
+ Watir::Wait.until { browser.windows.size == 1 }
23
+ expect(browser.exists?).to be false
26
24
  end
27
25
  end
28
26
 
@@ -74,7 +72,7 @@ describe 'Browser' do
74
72
  end
75
73
  end
76
74
 
77
- bug 'Capitalization bug fixed in upcoming release', %i[remote firefox] do
75
+ bug 'Capitalization issue', :safari do
78
76
  describe '#name' do
79
77
  it 'returns browser name' do
80
78
  expect(browser.name).to eq(WatirSpec.implementation.browser_args.first)
@@ -150,8 +148,9 @@ describe 'Browser' do
150
148
  end
151
149
  end
152
150
 
153
- describe '#new' do
154
- not_compliant_on :remote, :appveyor do
151
+ # TODO: Temporarily disabling this before moving it to unit tests
152
+ xdescribe '#new' do
153
+ not_compliant_on :remote do
155
154
  context 'with parameters' do
156
155
  let(:url) { 'http://localhost:4544/wd/hub/' }
157
156
 
@@ -159,8 +158,8 @@ describe 'Browser' do
159
158
  @original = WatirSpec.implementation.clone
160
159
 
161
160
  require 'watirspec/remote_server'
162
- args = ["-Dwebdriver.chrome.driver=#{Webdrivers::Chromedriver.binary}",
163
- "-Dwebdriver.gecko.driver=#{Webdrivers::Geckodriver.binary}"]
161
+ args = ["-Dwebdriver.chrome.driver=#{Webdrivers::Chromedriver.driver_path}",
162
+ "-Dwebdriver.gecko.driver=#{Webdrivers::Geckodriver.driver_path}"]
164
163
  WatirSpec::RemoteServer.new.start(4544, args: args)
165
164
  browser.close
166
165
  end
@@ -287,13 +286,15 @@ describe 'Browser' do
287
286
 
288
287
  compliant_on :chrome do
289
288
  not_compliant_on :watigiri do
290
- it 'takes port and driver_opt as arguments' do
289
+ it 'takes service as argument' do
291
290
  @original = WatirSpec.implementation.clone
292
291
  browser.close
293
292
  @opts = WatirSpec.implementation.browser_args.last
293
+ browser_name = WatirSpec.implementation.browser_args.first
294
+
295
+ service = Selenium::WebDriver::Service.send(browser_name, port: '2314', args: ['foo'])
294
296
 
295
- @opts.merge!(port: '2314',
296
- driver_opts: {args: ['foo']},
297
+ @opts.merge!(service: service,
297
298
  listener: LocalConfig::SelectorListener.new)
298
299
 
299
300
  @new_browser = WatirSpec.new_browser
@@ -373,16 +374,19 @@ describe 'Browser' do
373
374
  end
374
375
  end
375
376
 
376
- not_compliant_on :headless do
377
- describe '#refresh' do
378
- it 'refreshes the page' do
379
- browser.goto(WatirSpec.url_for('non_control_elements.html'))
380
- browser.span(class: 'footer').click
381
- expect(browser.span(class: 'footer').text).to include('Javascript')
382
- browser.refresh
383
- browser.span(class: 'footer').wait_until(&:present?)
384
- expect(browser.span(class: 'footer').text).to_not include('Javascript')
377
+ describe '#refresh' do
378
+ it 'refreshes the page' do
379
+ browser.goto(WatirSpec.url_for('non_control_elements.html'))
380
+
381
+ compliant_on :headless do
382
+ browser.div(id: 'best_language').scroll.to
385
383
  end
384
+
385
+ browser.div(id: 'best_language').click
386
+ expect(browser.div(id: 'best_language').text).to include('Ruby!')
387
+ browser.refresh
388
+ browser.div(id: 'best_language').wait_until(&:present?)
389
+ expect(browser.div(id: 'best_language').text).to_not include('Ruby!')
386
390
  end
387
391
  end
388
392
 
@@ -509,27 +513,26 @@ describe 'Browser' do
509
513
 
510
514
  describe '#wait' do
511
515
  # The only way to get engage this method is with page load strategy set to "none"
512
- # Chrome will be blocking on document ready state because it does not yet support page load strategy
513
516
  # This spec is both mocking out the response and demonstrating the necessary settings for it to be meaningful
514
- not_compliant_on :chrome do
515
- it 'waits for document ready state to be complete' do
516
- @original = WatirSpec.implementation.clone
517
- browser.close
518
- @opts = WatirSpec.implementation.browser_args.last
519
-
520
- @opts[:page_load_strategy] = 'none'
521
- browser = WatirSpec.new_browser
522
-
523
- start_time = Time.now
524
- allow(browser).to receive(:ready_state) { Time.now < start_time + 3 ? 'loading' : 'complete' }
525
- expect(browser.ready_state).to eq 'loading'
526
- browser.wait(20)
527
- expect(browser.ready_state).to eq 'complete'
528
-
529
- browser.close
530
- WatirSpec.implementation = @original.clone
531
- $browser = WatirSpec.new_browser
532
- end
517
+ it 'waits for document ready state to be complete' do
518
+ @original = WatirSpec.implementation.clone
519
+ browser.close
520
+ @opts = WatirSpec.implementation.browser_args.last
521
+
522
+ @opts[:page_load_strategy] = 'none'
523
+ browser = WatirSpec.new_browser
524
+
525
+ start_time = Time.now
526
+ allow(browser).to receive(:ready_state) { Time.now < start_time + 3 ? 'loading' : 'complete' }
527
+ expect(browser.ready_state).to eq 'loading'
528
+
529
+ browser.wait(20)
530
+ expect(Time.now - start_time).to be > 3
531
+ expect(browser.ready_state).to eq 'complete'
532
+
533
+ browser.close
534
+ WatirSpec.implementation = @original.clone
535
+ $browser = WatirSpec.new_browser
533
536
  end
534
537
  end
535
538
 
@@ -42,7 +42,7 @@ describe 'Browser#cookies' do
42
42
  end
43
43
 
44
44
  not_compliant_on :internet_explorer do
45
- it 'adds a cookie' do
45
+ it 'adds a cookie without options' do
46
46
  browser.goto set_cookie_url
47
47
  verify_cookies_count 1
48
48
 
@@ -63,29 +63,49 @@ describe 'Browser#cookies' do
63
63
  end
64
64
  end
65
65
 
66
- # TODO: - Split this up into multiple tests or figure out which parts are not compliant
67
- not_compliant_on :chrome, :internet_explorer, :safari, :firefox do
68
- it 'adds a cookie with options' do
66
+ it 'adds a cookie with path' do
67
+ browser.goto set_cookie_url
68
+
69
+ options = {path: '/set_cookie'}
70
+
71
+ browser.cookies.add 'path', 'b', options
72
+ cookie = browser.cookies.to_a.find { |e| e[:name] == 'path' }
73
+
74
+ expect(cookie).to_not be_nil
75
+ expect(cookie[:name]).to eq 'path'
76
+ expect(cookie[:value]).to eq 'b'
77
+ expect(cookie[:path]).to eq '/set_cookie'
78
+ end
79
+
80
+ it 'adds a cookie with expiration' do
81
+ browser.goto set_cookie_url
82
+
83
+ expires = Time.now + 10_000
84
+ options = {expires: expires}
85
+
86
+ browser.cookies.add 'expiration', 'b', options
87
+ cookie = browser.cookies.to_a.find { |e| e[:name] == 'expiration' }
88
+
89
+ expect(cookie).to_not be_nil
90
+ expect(cookie[:name]).to eq 'expiration'
91
+ expect(cookie[:value]).to eq 'b'
92
+ # a few ms slack
93
+ expect((cookie[:expires]).to_i).to be_within(2).of(expires.to_i)
94
+ end
95
+
96
+ bug 'https://bugs.chromium.org/p/chromedriver/issues/detail?id=2727', :chrome, :safari do
97
+ it 'adds a cookie with security' do
69
98
  browser.goto set_cookie_url
70
99
 
71
- expires = Time.now + 10_000
72
- options = {path: '/set_cookie',
73
- secure: true,
74
- expires: expires}
100
+ options = {secure: true}
75
101
 
76
- browser.cookies.add 'a', 'b', options
77
- cookie = browser.cookies.to_a.find { |e| e[:name] == 'a' }
102
+ browser.cookies.add 'secure', 'b', options
103
+ cookie = browser.cookies.to_a.find { |e| e[:name] == 'secure' }
78
104
  expect(cookie).to_not be_nil
79
105
 
80
- expect(cookie[:name]).to eq 'a'
106
+ expect(cookie[:name]).to eq 'secure'
81
107
  expect(cookie[:value]).to eq 'b'
82
-
83
- expect(cookie[:path]).to eq '/set_cookie'
84
108
  expect(cookie[:secure]).to be true
85
-
86
- expect(cookie[:expires]).to be_kind_of(Time)
87
- # a few ms slack
88
- expect((cookie[:expires]).to_i).to be_within(2).of(expires.to_i)
89
109
  end
90
110
  end
91
111
 
@@ -98,15 +118,13 @@ describe 'Browser#cookies' do
98
118
  verify_cookies_count 0
99
119
  end
100
120
 
101
- bug 'https://code.google.com/p/selenium/issues/detail?id=5487', :safari do
102
- it 'clears all cookies' do
103
- browser.goto set_cookie_url
104
- browser.cookies.add 'foo', 'bar'
105
- verify_cookies_count 2
121
+ it 'clears all cookies' do
122
+ browser.goto set_cookie_url
123
+ browser.cookies.add 'foo', 'bar'
124
+ verify_cookies_count 2
106
125
 
107
- browser.cookies.clear
108
- verify_cookies_count 0
109
- end
126
+ browser.cookies.clear
127
+ verify_cookies_count 0
110
128
  end
111
129
  end
112
130
 
@@ -124,20 +142,17 @@ describe 'Browser#cookies' do
124
142
  end
125
143
  end
126
144
 
127
- bug 'https://github.com/mozilla/geckodriver/issues/1000', :firefox do
128
- describe '#load' do
129
- it 'loads cookies from file' do
130
- browser.cookies.clear
131
- browser.cookies.load file
132
- expected = browser.cookies.to_a
133
- actual = YAML.safe_load(IO.read(file), [::Symbol])
145
+ describe '#load' do
146
+ it 'loads cookies from file' do
147
+ browser.cookies.clear
148
+ browser.cookies.load file
149
+ expected = browser.cookies.to_a
150
+ actual = YAML.safe_load(IO.read(file), [::Symbol])
134
151
 
135
- # https://code.google.com/p/selenium/issues/detail?id=6834
136
- expected.each { |cookie| cookie.delete(:expires) }
137
- actual.each { |cookie| cookie.delete(:expires) }
152
+ expected.each { |cookie| cookie.delete(:expires) }
153
+ actual.each { |cookie| cookie.delete(:expires) }
138
154
 
139
- expect(actual).to eq(expected)
140
- end
155
+ expect(actual).to eq(expected)
141
156
  end
142
157
  end
143
158
  end