watir 7.0.0.beta5 → 7.0.0

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
  SHA256:
3
- metadata.gz: af4906be1ae9d2713b91037006f964eddcac08ccb7a3cc341752132dea109b0f
4
- data.tar.gz: 52ece209164c1ff75eeaec71efe8c70f03dd27f4fb1c791761e77c9ac600b333
3
+ metadata.gz: aaa0e3a2614b0cdae93ebbae36c1f1c4ae58f55fd7d79a1b333144969354346f
4
+ data.tar.gz: 349abd59394dcd77d9f4aaf2050ab75dd613872c7aff3de96f8acc13cd797213
5
5
  SHA512:
6
- metadata.gz: 5623e2ac22fd67b0c7f147333ed0c0e8ce3b87cf66ecb8d40a3f85672ce647d480bfe0114986a83d1a0bdc59510ad2d164c046769eea5c44a12252b3578a4d23
7
- data.tar.gz: 9e95f5db40c379040dabb329c64dc4032c9c290193c3804e401cbfaabecec9550fa524c50e6483a9b597240a99f542549c1b823d91c99128dbab16b44f1c4d39
6
+ metadata.gz: 2abac0e5c8e81acf27b5edefd507c9056bca728f2ccab2aa858176287cf7e544a6961ab7bcc0edf7a01d78735038fedf77cbb70798aacdd490be4fc987f88602
7
+ data.tar.gz: a32076a9af54abfbcc470bb96095aa1441f812640029fa492233f7d7cbc5f9fb327de0397417103519cf674e7c03a91de85b749bf87e6cc8483cbf16bcefa3e7
@@ -0,0 +1,34 @@
1
+ name: Chrome Tests
2
+
3
+ on:
4
+ - push
5
+ - pull_request
6
+
7
+ jobs:
8
+ local-tests:
9
+ name: Local Tests
10
+ runs-on: ${{ matrix.os }}
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ os: [ubuntu-latest, macos-latest, windows-latest]
15
+ ruby: [ 2.6, 3.0 ]
16
+ steps:
17
+ - uses: actions/checkout@v2
18
+ - uses: ./.github/actions/setup-linux
19
+ if: matrix.os == 'ubuntu-latest'
20
+ - uses: ./.github/actions/install-chrome
21
+ if: matrix.os == 'ubuntu-latest'
22
+ - run: |
23
+ echo "COVERAGE=true" >> $GITHUB_ENV
24
+ if: |
25
+ matrix.os == 'ubuntu-latest' ||
26
+ matrix.os == 'macos-latest'
27
+ - uses: ruby/setup-ruby@v1
28
+ with:
29
+ ruby-version: ${{ matrix.ruby }}
30
+ - run: bundle install
31
+ - run: |
32
+ bundle exec rake spec:chrome
33
+ env:
34
+ DISPLAY: :99
@@ -0,0 +1,28 @@
1
+ name: Edge Tests
2
+
3
+ on:
4
+ - push
5
+ - pull_request
6
+
7
+ jobs:
8
+ local-tests:
9
+ name: Local Tests
10
+ runs-on: ${{ matrix.os }}
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ os: [macos-latest, windows-latest]
15
+ ruby: [ 2.6, 3.0 ]
16
+ steps:
17
+ - uses: actions/checkout@v2
18
+ - run: |
19
+ echo "COVERAGE=true" >> $GITHUB_ENV
20
+ if: matrix.os == 'macos-latest'
21
+ - uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby }}
24
+ - run: bundle install
25
+ - run: |
26
+ bundle exec rake spec:edge
27
+ env:
28
+ DISPLAY: :99
@@ -0,0 +1,35 @@
1
+ name: Firefox Tests
2
+
3
+ on:
4
+ - push
5
+ - pull_request
6
+
7
+ jobs:
8
+ local-tests:
9
+ name: Local Tests
10
+ runs-on: ${{ matrix.os }}
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ os: [ubuntu-latest, macos-latest, windows-latest]
15
+ ruby: [ 2.6, 3.0 ]
16
+ steps:
17
+ - uses: actions/checkout@v2
18
+ - uses: ./.github/actions/setup-linux
19
+ if: matrix.os == 'ubuntu-latest'
20
+ - uses: browser-actions/setup-firefox@latest
21
+ with:
22
+ firefox-version: '93.0'
23
+ - run: |
24
+ echo "COVERAGE=true" >> $GITHUB_ENV
25
+ if: |
26
+ matrix.os == 'ubuntu-latest' ||
27
+ matrix.os == 'macos-latest'
28
+ - uses: ruby/setup-ruby@v1
29
+ with:
30
+ ruby-version: ${{ matrix.ruby }}
31
+ - run: bundle install
32
+ - run: |
33
+ bundle exec rake spec:firefox
34
+ env:
35
+ DISPLAY: :99
@@ -0,0 +1,24 @@
1
+ name: IE Tests
2
+
3
+ on:
4
+ - push
5
+ - pull_request
6
+
7
+ jobs:
8
+ local-tests:
9
+ name: Local Tests
10
+ runs-on: windows-latest
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ ruby: [ 2.6, 3.0 ]
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ - run: bundle install
21
+ - run: |
22
+ bundle exec rake spec:ie
23
+ env:
24
+ DISPLAY: :99
@@ -0,0 +1,27 @@
1
+ name: Safari Tests
2
+
3
+ on:
4
+ - push
5
+ - pull_request
6
+
7
+ jobs:
8
+ local-tests:
9
+ name: Local Tests
10
+ runs-on: macos-latest
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ ruby: [ 2.6, 3.0 ]
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - uses: ./.github/actions/enable-safari
18
+ - run: |
19
+ echo "COVERAGE=true" >> $GITHUB_ENV
20
+ - uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: ${{ matrix.ruby }}
23
+ - run: bundle install
24
+ - run: |
25
+ bundle exec rake spec:safari
26
+ env:
27
+ DISPLAY: :99
@@ -0,0 +1,52 @@
1
+ name: Unit Tests
2
+
3
+ on:
4
+ - push
5
+ - pull_request
6
+
7
+ jobs:
8
+ documentation-test:
9
+ name: Yard Doctest
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ - uses: ruby/setup-ruby@v1
14
+ with:
15
+ ruby-version: 2.6
16
+ - run: bundle install
17
+ - uses: ./.github/actions/install-chrome
18
+ - uses: ./.github/actions/setup-linux
19
+ - run: |
20
+ bundle exec rake yard:doctest
21
+
22
+
23
+ unit-test:
24
+ name: Unit Tests
25
+ runs-on: ubuntu-latest
26
+ strategy:
27
+ fail-fast: false
28
+ matrix:
29
+ ruby: ['2.6', '2.7', '3.0']
30
+ steps:
31
+ - uses: actions/checkout@v2
32
+ - uses: ruby/setup-ruby@v1
33
+ with:
34
+ ruby-version: ${{ matrix.ruby }}
35
+ - run: bundle install
36
+ - uses: ./.github/actions/install-chrome
37
+ - uses: ./.github/actions/setup-linux
38
+ - run: |
39
+ bundle exec rake spec:unit
40
+ env:
41
+ DISPLAY: :99
42
+
43
+ linter-test:
44
+ name: Rubocop Tests
45
+ runs-on: ubuntu-latest
46
+ steps:
47
+ - uses: actions/checkout@v2
48
+ - uses: ruby/setup-ruby@v1
49
+ with:
50
+ ruby-version: 2.6
51
+ - run: bundle install
52
+ - run: bundle exec rubocop
data/.rubocop.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
3
  AllCops:
4
- TargetRubyVersion: 2.5.8
4
+ TargetRubyVersion: 2.6.8
5
5
  NewCops: enable
6
6
  Exclude:
7
7
  - 'lib/watir/elements/html_elements.rb'
data/CHANGES.md CHANGED
@@ -1,3 +1,10 @@
1
+ ### 7.0.0 (2021-10-18)
2
+
3
+ * Requires Selenium 4.0.0+
4
+ * Requires Ruby 2.6+
5
+ * Implement `Window#minimize`
6
+ * Implement `Window#full_screen`
7
+
1
8
  ### 7.0.0.beta5 (2021-08-02)
2
9
 
3
10
  * Add support for passing in Proxy and proxy Hash to Capabilities (#933)
@@ -29,7 +29,7 @@ module Watir
29
29
 
30
30
  def attribute_list
31
31
  @attribute_list ||= (typed_attributes.values.flatten +
32
- ancestors[1..-1].map { |e|
32
+ ancestors[1..].map { |e|
33
33
  e.attribute_list if e.respond_to?(:attribute_list)
34
34
  }.compact.flatten
35
35
  ).uniq
@@ -29,7 +29,7 @@ module Watir
29
29
  all_rows = rows.locate
30
30
  header_row = all_rows.first || raise(Error, 'no rows in table')
31
31
 
32
- all_rows.entries[1..-1].map do |row|
32
+ all_rows.entries[1..].map do |row|
33
33
  cell_size_check(header_row, row)
34
34
  Hash[headers(header_row).map(&:text).zip(row.cells.map(&:text))]
35
35
  end
@@ -172,7 +172,7 @@ module Watir
172
172
  end
173
173
 
174
174
  def starts_with?(results, regexp)
175
- regexp.source[0] == '^' && results.first == regexp.source[1..-1]
175
+ regexp.source[0] == '^' && results.first == regexp.source[1..]
176
176
  end
177
177
 
178
178
  def add_to_matching(key, regexp, results = nil)
@@ -219,7 +219,7 @@ module Watir
219
219
  def equal_pair(key, value)
220
220
  if key == :class
221
221
  negate_xpath = value =~ /^!/
222
- value = value[1..-1] if negate_xpath
222
+ value = value[1..] if negate_xpath
223
223
  expression = "contains(concat(' ', @class, ' '), #{XpathSupport.escape " #{value} "})"
224
224
 
225
225
  negate_xpath ? "not(#{expression})" : expression
data/lib/watir/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Watir
2
- VERSION = '7.0.0.beta5'.freeze
2
+ VERSION = '7.0.0'.freeze
3
3
  end
data/lib/watir/window.rb CHANGED
@@ -92,6 +92,28 @@ module Watir
92
92
  use { @driver.manage.window.maximize }
93
93
  end
94
94
 
95
+ #
96
+ # Minimize window.
97
+ #
98
+ # @example
99
+ # browser.window.minimize
100
+ #
101
+
102
+ def minimize
103
+ use { @driver.manage.window.minimize }
104
+ end
105
+
106
+ #
107
+ # Make window full screen.
108
+ #
109
+ # @example
110
+ # browser.window.full_screen
111
+ #
112
+
113
+ def full_screen
114
+ use { @driver.manage.window.full_screen }
115
+ end
116
+
95
117
  #
96
118
  # Returns true if window exists.
97
119
  #
@@ -20,8 +20,7 @@ describe 'DateTimeField' do
20
20
  end
21
21
 
22
22
  it 'returns true if the datetime-local element exists',
23
- except: [{browser: :firefox, reason: 'https://github.com/mozilla/geckodriver/issues/1469'},
24
- {browser: :ie, reason: 'Date type not recognized'}] do
23
+ except: {browser: :ie, reason: 'Date type not recognized'} do
25
24
  expect(browser.date_time_field(xpath: "//input[@id='html5_datetime-local']")).to exist
26
25
  end
27
26
 
@@ -30,8 +29,7 @@ describe 'DateTimeField' do
30
29
  end
31
30
 
32
31
  it 'respects date-time fields types',
33
- except: [{browser: :firefox, reason: 'https://github.com/mozilla/geckodriver/issues/1469'},
34
- {browser: :ie, reason: 'Date type not recognized'}] do
32
+ except: {browser: :ie, reason: 'Date type not recognized'} do
35
33
  expect(browser.date_time_field.type).to eq('datetime-local')
36
34
  end
37
35
 
@@ -80,8 +78,7 @@ describe 'DateTimeField' do
80
78
 
81
79
  describe '#type' do
82
80
  it 'returns the type attribute if the date-time field exists',
83
- except: [{browser: :firefox, reason: 'https://github.com/mozilla/geckodriver/issues/1469'},
84
- {browser: :ie, reason: 'Date type not recognized'}] do
81
+ except: {browser: :ie, reason: 'Date type not recognized'} do
85
82
  expect(browser.date_time_field(id: 'html5_datetime-local').type).to eq 'datetime-local'
86
83
  end
87
84
 
@@ -402,13 +402,16 @@ describe Watir::Window do
402
402
  context 'manipulating size and position', except: {headless: true} do
403
403
  before do
404
404
  browser.goto WatirSpec.url_for('window_switching.html')
405
+ @initial_size = browser.window.size
405
406
  end
406
407
 
407
- it 'should get the size of the current window' do
408
- size = browser.window.size
408
+ after do
409
+ browser.window.resize_to @initial_size.width, @initial_size.height
410
+ end
409
411
 
410
- expect(size.width).to eq browser.execute_script('return window.outerWidth;')
411
- expect(size.height).to eq browser.execute_script('return window.outerHeight;')
412
+ it 'should get the size of the current window' do
413
+ expect(@initial_size.width).to eq browser.execute_script('return window.outerWidth;')
414
+ expect(@initial_size.height).to eq browser.execute_script('return window.outerHeight;')
412
415
  end
413
416
 
414
417
  it 'should get the position of the current window' do
@@ -419,16 +422,15 @@ describe Watir::Window do
419
422
  end
420
423
 
421
424
  it 'should resize the window' do
422
- initial_size = browser.window.size
423
425
  browser.window.resize_to(
424
- initial_size.width - 20,
425
- initial_size.height - 20
426
+ @initial_size.width - 20,
427
+ @initial_size.height - 20
426
428
  )
427
429
 
428
430
  new_size = browser.window.size
429
431
 
430
- expect(new_size.width).to eq initial_size.width - 20
431
- expect(new_size.height).to eq initial_size.height - 20
432
+ expect(new_size.width).to eq @initial_size.width - 20
433
+ expect(new_size.height).to eq @initial_size.height - 20
432
434
  end
433
435
 
434
436
  it 'should move the window' do
@@ -445,12 +447,11 @@ describe Watir::Window do
445
447
  end
446
448
 
447
449
  it 'should maximize the window', except: {browser: :firefox, window_manager: false} do
448
- initial_size = browser.window.size
449
450
  browser.window.resize_to(
450
- initial_size.width - 40,
451
- initial_size.height - 40
451
+ @initial_size.width - 40,
452
+ @initial_size.height - 40
452
453
  )
453
- browser.wait_until { |b| b.window.size != initial_size }
454
+ browser.wait_until { |b| b.window.size != @initial_size }
454
455
  new_size = browser.window.size
455
456
 
456
457
  browser.window.maximize
@@ -458,7 +459,32 @@ describe Watir::Window do
458
459
 
459
460
  final_size = browser.window.size
460
461
  expect(final_size.width).to be >= new_size.width
461
- expect(final_size.height).to be > (new_size.height)
462
+ expect(final_size.height).to be > new_size.height
463
+ end
464
+
465
+ it 'should make the window full screen', except: {browser: :firefox, window_manager: false} do
466
+ browser.window.resize_to(
467
+ @initial_size.width - 40,
468
+ @initial_size.height - 40
469
+ )
470
+ new_size = browser.window.size
471
+
472
+ browser.window.full_screen
473
+ browser.wait_until { |b| b.window.size != new_size }
474
+
475
+ final_size = browser.window.size
476
+ expect(final_size.width).to be >= new_size.width
477
+ expect(final_size.height).to be > new_size.height
478
+ end
479
+
480
+ it 'should minimize the window', except: {window_manager: false} do
481
+ expect(browser.execute_script('return document.visibilityState;')).to eq 'visible'
482
+
483
+ browser.window.minimize
484
+
485
+ browser.wait_until { |b| b.execute_script('return document.visibilityState;') != 'visible' }
486
+
487
+ expect(browser.execute_script('return document.visibilityState;')).to eq 'hidden'
462
488
  end
463
489
  end
464
490
  end
@@ -39,6 +39,7 @@ class LocalConfig
39
39
  Webdrivers::Geckodriver.update
40
40
  "geckodriver version: #{Webdrivers::Geckodriver.current_version.version}"
41
41
  when :ie
42
+ Webdrivers::IEdriver.required_version = '3.150.1'
42
43
  Webdrivers::IEdriver.update
43
44
  "iedriver version: #{Webdrivers::IEdriver.current_version.version}"
44
45
  end
@@ -155,6 +156,8 @@ RSpec.configure do |config|
155
156
  headless = WatirSpec.implementation.browser_args.last[:headless]
156
157
  guards.add_condition(:headless, headless)
157
158
 
159
+ guards.add_condition(:ci, ENV['DESKTOP_SESSION'].nil?)
160
+
158
161
  window_manager = !Selenium::WebDriver::Platform.linux? || !ENV['DESKTOP_SESSION'].nil?
159
162
  guards.add_condition(:window_manager, window_manager)
160
163
 
data/watir.gemspec CHANGED
@@ -6,7 +6,7 @@ require 'watir/version'
6
6
  Gem::Specification.new do |s|
7
7
  s.name = 'watir'
8
8
  s.version = Watir::VERSION
9
- s.required_ruby_version = '>= 2.5.0'
9
+ s.required_ruby_version = '>= 2.6.0'
10
10
 
11
11
  s.platform = Gem::Platform::RUBY
12
12
  s.authors = ['Alex Rodionov', 'Titus Fortner', 'Justin Ko']
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
25
25
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
26
26
  s.require_paths = ['lib']
27
27
 
28
- s.add_dependency 'selenium-webdriver', '>= 4.0.0.beta4'
28
+ s.add_dependency 'selenium-webdriver', '~> 4.0'
29
29
  s.add_runtime_dependency 'regexp_parser', '>= 1.2', '< 3'
30
30
 
31
31
  s.add_development_dependency 'activesupport', '~> 4.0', '>= 4.1.11' # for pluralization during code generation
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
39
39
  s.add_development_dependency 'rubocop', '~> 0.59'
40
40
  s.add_development_dependency 'selenium_statistics'
41
41
  s.add_development_dependency 'simplecov-console'
42
- s.add_development_dependency 'webdrivers', '~> 4.6'
42
+ s.add_development_dependency 'webdrivers', '~> 4.7'
43
43
  s.add_development_dependency 'webidl', '>= 0.2.2'
44
44
  s.add_development_dependency 'yard', '> 0.8.2.1'
45
45
  s.add_development_dependency 'yard-doctest', '~> 0.1.14'
metadata CHANGED
@@ -1,31 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0.beta5
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Rodionov
8
8
  - Titus Fortner
9
9
  - Justin Ko
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-08-02 00:00:00.000000000 Z
13
+ date: 2021-10-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: selenium-webdriver
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - ">="
19
+ - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 4.0.0.beta4
21
+ version: '4.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - ">="
26
+ - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: 4.0.0.beta4
28
+ version: '4.0'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: regexp_parser
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -212,14 +212,14 @@ dependencies:
212
212
  requirements:
213
213
  - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: '4.6'
215
+ version: '4.7'
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: '4.6'
222
+ version: '4.7'
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: webidl
225
225
  requirement: !ruby/object:Gem::Requirement
@@ -278,7 +278,12 @@ files:
278
278
  - ".github/actions/enable-safari/action.yml"
279
279
  - ".github/actions/install-chrome/action.yml"
280
280
  - ".github/actions/setup-linux/action.yml"
281
- - ".github/workflows/tests.yml"
281
+ - ".github/workflows/chrome.yml"
282
+ - ".github/workflows/edge.yml"
283
+ - ".github/workflows/firefox.yml"
284
+ - ".github/workflows/ie.yml"
285
+ - ".github/workflows/safari.yml"
286
+ - ".github/workflows/unit.yml"
282
287
  - ".gitignore"
283
288
  - ".rubocop.yml"
284
289
  - ".rubocop_todo.yml"
@@ -599,7 +604,7 @@ homepage: http://github.com/watir/watir
599
604
  licenses:
600
605
  - MIT
601
606
  metadata: {}
602
- post_install_message:
607
+ post_install_message:
603
608
  rdoc_options: []
604
609
  require_paths:
605
610
  - lib
@@ -607,15 +612,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
607
612
  requirements:
608
613
  - - ">="
609
614
  - !ruby/object:Gem::Version
610
- version: 2.5.0
615
+ version: 2.6.0
611
616
  required_rubygems_version: !ruby/object:Gem::Requirement
612
617
  requirements:
613
- - - ">"
618
+ - - ">="
614
619
  - !ruby/object:Gem::Version
615
- version: 1.3.1
620
+ version: '0'
616
621
  requirements: []
617
- rubygems_version: 3.1.4
618
- signing_key:
622
+ rubygems_version: 3.2.22
623
+ signing_key:
619
624
  specification_version: 4
620
625
  summary: Watir powered by Selenium
621
626
  test_files:
@@ -1,104 +0,0 @@
1
- name: All Tests
2
-
3
- on:
4
- - push
5
- - pull_request
6
-
7
- jobs:
8
- documentation-test:
9
- name: Yard Doctest
10
- runs-on: ubuntu-latest
11
- steps:
12
- - uses: actions/checkout@v2
13
- - uses: ruby/setup-ruby@v1
14
- with:
15
- ruby-version: 2.6
16
- - run: bundle install
17
- - uses: ./.github/actions/install-chrome
18
- - uses: ./.github/actions/setup-linux
19
- - run: |
20
- bundle exec rake yard:doctest
21
-
22
- unit-test:
23
- name: Unit Tests
24
- runs-on: ubuntu-latest
25
- strategy:
26
- fail-fast: false
27
- matrix:
28
- ruby: ['2.5', '2.6', '2.7', '3.0']
29
- steps:
30
- - uses: actions/checkout@v2
31
- - uses: ruby/setup-ruby@v1
32
- with:
33
- ruby-version: ${{ matrix.ruby }}
34
- - run: bundle install
35
- - uses: ./.github/actions/install-chrome
36
- - uses: ./.github/actions/setup-linux
37
- - run: |
38
- bundle exec rake spec:unit
39
- env:
40
- DISPLAY: :99
41
-
42
- linter-test:
43
- name: Rubocop Tests
44
- runs-on: ubuntu-latest
45
- steps:
46
- - uses: actions/checkout@v2
47
- - uses: ruby/setup-ruby@v1
48
- with:
49
- ruby-version: 2.6
50
- - run: bundle install
51
- - run: bundle exec rubocop
52
-
53
- local-tests:
54
- name: Local Tests
55
- runs-on: ${{ matrix.os }}
56
- strategy:
57
- fail-fast: false
58
- matrix:
59
- os: [ubuntu-latest, macos-latest, windows-latest]
60
- ruby: [ 2.6, 3.0 ]
61
- task: [ chrome, firefox, edge ]
62
- include:
63
- - os: 'macos-latest'
64
- ruby: 2.6
65
- task: 'safari'
66
- - os: 'macos-latest'
67
- ruby: 3.0
68
- task: 'safari'
69
- - os: 'windows-latest'
70
- ruby: 2.6
71
- task: 'ie'
72
- - os: 'windows-latest'
73
- ruby: 3.0
74
- task: 'ie'
75
- exclude:
76
- - os: 'ubuntu-latest'
77
- task: 'edge'
78
- steps:
79
- - uses: actions/checkout@v2
80
- - uses: ./.github/actions/install-chrome
81
- if: |
82
- matrix.task == 'chrome' &&
83
- matrix.os == 'ubuntu-latest'
84
- - uses: ./.github/actions/setup-linux
85
- if: matrix.os == 'ubuntu-latest'
86
- - uses: browser-actions/setup-firefox@latest
87
- with:
88
- firefox-version: '86.0'
89
- if: matrix.task == 'firefox'
90
- - uses: ./.github/actions/enable-safari
91
- if: matrix.task == 'safari'
92
- - run: |
93
- echo "COVERAGE=true" >> $GITHUB_ENV
94
- if: |
95
- matrix.os == 'ubuntu-latest' ||
96
- matrix.os == 'macos-latest'
97
- - uses: ruby/setup-ruby@v1
98
- with:
99
- ruby-version: ${{ matrix.ruby }}
100
- - run: bundle install
101
- - run: |
102
- bundle exec rake spec:${{ matrix.task }}
103
- env:
104
- DISPLAY: :99