sauce_bindings 1.2.0 → 1.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 548124ac8f2aff4804f2c60c0176a409a1426b460e119d7fab72324c90c6332f
4
- data.tar.gz: b7c9612c34280b5b01118905133b485321f5f6ede306ae66368dbcd8df55192a
3
+ metadata.gz: 7512f163c74551644149ae5452bf7e8f72977cef83e90134c26bd3c1a07f352c
4
+ data.tar.gz: 87248ccb9a002564dc97f05380db06e55ee4cb0fb6599d5fb9fcc0dca7ee27e4
5
5
  SHA512:
6
- metadata.gz: ee0ddbee4427ad06c072510328406b8df7322ea218750e339b4dac5a3810bded7fa0ad394d81c8c2b2cfee593791368a164f529e0d0819b1dfd46fbc16955a61
7
- data.tar.gz: 330979521166f468908cfd7d6ff61b266a448e11c9a5c3e49d5dc063fec7087e63b1df83d97e82dc6a03afcf68bfe888184d427e81da9ca9a2c23c95ab2aab5a
6
+ metadata.gz: 796b7da1beb7307122675d78f8b2fd698ab71c5b5ce20f887cb288a14d880e3abc1a0a2f9219962d6b3040b33c7ab26c97dc8977e04b6681da1159ca3f0ab85f
7
+ data.tar.gz: cafb5b1b25caf038eb537b15a552ba6242ab2493c2005c71ca8a2e15424c364ab81ca3a9a183e4606d94be7de55b06cec356e7249c78653c4f29d0a42d0f8595
data/CHANGES.md ADDED
@@ -0,0 +1,34 @@
1
+ ### 1.2.1 - March 1, 2022
2
+
3
+ * Added latest Windows and Mac platforms
4
+
5
+ ### 1.2.0 - July 12, 2021
6
+
7
+ * Accessibility functionality via Sa11y
8
+
9
+ ### 1.1.1 - July 10, 2021
10
+
11
+ * `Options` class methods only allow setting valid options for the provided browser
12
+ * `Options` class supports Edge browser
13
+ * Support Selenium 4
14
+
15
+ ### 1.1.0 - May 30, 2021
16
+
17
+ * Build Name support for Github Actions
18
+ * APAC data center tentatively supported
19
+ * Update `Options` to be constructed with class methods for browsers
20
+
21
+ ### 1.0.0 - April 24, 2020
22
+
23
+ * Link to job on Sauce UI in STDOUT
24
+
25
+ ### 1.0.0.beta1 - March 10, 2020
26
+
27
+ * `Options` class to construct capabilities
28
+ * `Session` class to wrap driver instance
29
+ * `Session#data_center=` to choose data center
30
+ * `Options` automatically uses default value for `build` name
31
+ * `Options` class accepts Selenium `Options` classes as argument
32
+ * `Options` accepts serialized information via a `Hash`
33
+ * `CapybaraSession` class for special Capybara support
34
+ * Sauce options for `user` and `access_key` must be obtained by ENV variables
data/README.md CHANGED
@@ -62,7 +62,7 @@ browser_options = Selenium::WebDriver::Firefox::Options.new('args' => ['-foo'])
62
62
  ```
63
63
 
64
64
  ### Session class
65
- #### Intializing a Session
65
+ #### Initializing a Session
66
66
  `Session` class gets initialized with an `Options` instance. If you want the
67
67
  default settings (latest Chrome version on Windows 10), you don't even need to use an `Options` instance:
68
68
  ```ruby
data/Rakefile CHANGED
@@ -5,4 +5,16 @@ require 'rspec/core/rake_task'
5
5
 
6
6
  RSpec::Core::RakeTask.new(:spec)
7
7
 
8
- task default: :spec
8
+ RSpec::Core::RakeTask.new(:examples) do |spec|
9
+ spec.pattern = 'spec/examples/*_spec.rb'
10
+ end
11
+
12
+ RSpec::Core::RakeTask.new(:unit) do |spec|
13
+ spec.pattern = 'spec/unit/*_spec.rb'
14
+ end
15
+
16
+ RSpec::Core::RakeTask.new(:integration) do |spec|
17
+ spec.pattern = 'spec/integration/*_spec.rb'
18
+ end
19
+
20
+ task default: %i[examples unit integration]
@@ -39,7 +39,7 @@ module SauceBindings
39
39
 
40
40
  def safari(**opts)
41
41
  opts[:browser_name] = 'safari'
42
- opts[:platform_name] ||= 'macOS 11.00'
42
+ opts[:platform_name] ||= 'macOS 11'
43
43
  opts[:valid_options] = SafariConfigurations.valid_options
44
44
  Options.new(**opts)
45
45
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SauceBindings
4
- VERSION = '1.2.0'
4
+ VERSION = '1.2.1'
5
5
  end
@@ -6,10 +6,10 @@ require 'rspec'
6
6
  describe 'Browser Options' do
7
7
  it 'creates session' do
8
8
  # 1. Create Selenium Browser Options instance
9
- browser_options = Selenium::WebDriver::Firefox::Options.new(args: ['--foo'])
9
+ browser_options = Selenium::WebDriver::Chrome::Options.new(args: ['--start-fullscreen'])
10
10
 
11
11
  # 2. Create Sauce Options object with the Browser Options object instance
12
- sauce_options = SauceBindings::Options.firefox(selenium_options: browser_options)
12
+ sauce_options = SauceBindings::Options.chrome(selenium_options: browser_options)
13
13
 
14
14
  # 3. Create Session object with SauceOptions object instance
15
15
  session = SauceBindings::Session.new(sauce_options)
@@ -3,11 +3,12 @@
3
3
  require 'sauce_bindings'
4
4
  require 'rspec'
5
5
 
6
- describe 'Basic Options' do
6
+ describe 'Common Options' do
7
7
  it 'creates session' do
8
- # 1. Create a SauceOptions instance with the 3 primary parameters
8
+ # 1. Create Options instance with common w3c options
9
9
  sauce_options = SauceBindings::Options.firefox(browser_version: '88.0',
10
- platform_name: 'Windows 8')
10
+ platform_name: 'Windows 8',
11
+ unhandled_prompt_behavior: 'ignore')
11
12
 
12
13
  # 2. Create Session object with SauceOptions object instance
13
14
  session = SauceBindings::Session.new(sauce_options)
@@ -7,7 +7,7 @@ describe 'Sauce Options' do
7
7
  it 'creates session' do
8
8
  # 1. Create a SauceOptions instance with Sauce Labs Specific Options
9
9
  sauce_options = SauceBindings::Options.firefox(extended_debugging: true,
10
- idle_timeout: 100,
10
+ idle_timeout: 45,
11
11
  time_zone: 'Alaska')
12
12
 
13
13
  # 2. Create Session object with SauceOptions object instance
@@ -31,6 +31,15 @@ module SauceBindings
31
31
  expect(driver).not_to be_nil
32
32
  expect(@session.url).to include('eu-central-1')
33
33
  end
34
+
35
+ it 'executes on APAC' do
36
+ pending 'Adding Data Center to Sauce Whisk'
37
+ @session = Session.new(data_center: :APAC_SOUTHEAST)
38
+ driver = @session.start
39
+
40
+ expect(driver).not_to be_nil
41
+ expect(@session.url).to include('apac-southeast-1')
42
+ end
34
43
  end
35
44
  end
36
45
  end
@@ -289,7 +289,7 @@ module SauceBindings
289
289
 
290
290
  expect(options.browser_name).to eq 'safari'
291
291
  expect(options.browser_version).to eq 'latest'
292
- expect(options.platform_name).to eq 'macOS 11.00'
292
+ expect(options.platform_name).to eq 'macOS 11'
293
293
  end
294
294
 
295
295
  it 'accepts correct Selenium Options class' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sauce_bindings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Titus Fortner
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-12 00:00:00.000000000 Z
11
+ date: 2022-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -175,6 +175,7 @@ files:
175
175
  - ".rspec"
176
176
  - ".rubocop.yml"
177
177
  - ".travis.yml"
178
+ - CHANGES.md
178
179
  - Gemfile
179
180
  - LICENSE.txt
180
181
  - README.md
@@ -195,8 +196,8 @@ files:
195
196
  - spec/deprecated_options.yml
196
197
  - spec/examples/accessibility_spec.rb
197
198
  - spec/examples/axe.min.js
198
- - spec/examples/basic_options_spec.rb
199
199
  - spec/examples/browser_options_spec.rb
200
+ - spec/examples/common_options_spec.rb
200
201
  - spec/examples/create_session_spec.rb
201
202
  - spec/examples/data_center_spec.rb
202
203
  - spec/examples/sauce_options_spec.rb
@@ -212,7 +213,7 @@ homepage: https://github.com/saucelabs/sauce_bindings
212
213
  licenses:
213
214
  - MIT
214
215
  metadata: {}
215
- post_install_message:
216
+ post_install_message:
216
217
  rdoc_options: []
217
218
  require_paths:
218
219
  - lib
@@ -227,16 +228,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
228
  - !ruby/object:Gem::Version
228
229
  version: '0'
229
230
  requirements: []
230
- rubygems_version: 3.2.11
231
- signing_key:
231
+ rubygems_version: 3.1.2
232
+ signing_key:
232
233
  specification_version: 4
233
234
  summary: Simple interface for interacting with Sauce Labs.
234
235
  test_files:
235
236
  - spec/deprecated_options.yml
236
237
  - spec/examples/accessibility_spec.rb
237
238
  - spec/examples/axe.min.js
238
- - spec/examples/basic_options_spec.rb
239
239
  - spec/examples/browser_options_spec.rb
240
+ - spec/examples/common_options_spec.rb
240
241
  - spec/examples/create_session_spec.rb
241
242
  - spec/examples/data_center_spec.rb
242
243
  - spec/examples/sauce_options_spec.rb