evil_systems 1.0.0 → 1.1.2

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: a1800bf37ee2b05f01d152d6b81a394d2b3b46632db9698d4482aad091143cd4
4
- data.tar.gz: 27f9e537d9812cf307ad5075555f98ec7a28a3eee53f662bbb508a2e3f67471a
3
+ metadata.gz: 11eac1204336ff38b3895892b4f238dad96b218b2836546e1ede3296a3469160
4
+ data.tar.gz: b404b988eeaf6aa51193a78bb08227f2d3aa4eb4f841eaf7a4fc7523ee30bbfb
5
5
  SHA512:
6
- metadata.gz: 0505da134fba919c92bc70892b41550ce81ca422ca14e0caf9efc60ed5ea449dddcff00854c039fd89a95ad4edb988bdff5b16cb4ef5799720d6296076365e14
7
- data.tar.gz: 4a45024f2ec7bcae400a2804b39f5a87e4d73994ea419f795aa1dffdc8062ef257b95f9e229b77b5c9ad7646ffd46026a767e719dddb270a32860f42447f3a39
6
+ metadata.gz: 0dbf271b20f2af1fc871f0accf32cde3c9ff007525bd4cc7c4233941590ea9a70d2c4fdf18217776914bfdbdcad959668dc8176ed7bc443cf561b3e4ad7fd3f9
7
+ data.tar.gz: 5ebb8aeee84e47703465180d3cb02407f0000445413c99516536ede3ef3013614bd60ddbc23c43cab2249ccab842ea39315f7e94e884f65e8281c4e8780758bf
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.1.0
2
+
3
+ - Feature: add `driver_options` to `initial_setup`
4
+
1
5
  ## 1.0.0
2
6
 
3
7
  - 🚨 BREAKING CHANGE - Renamed `:cuprite` driver to
data/README.md CHANGED
@@ -25,28 +25,24 @@ https://rdoc.info/github/paramagicdev/evil_systems/main
25
25
 
26
26
  ## Installation
27
27
 
28
- ```ruby
29
- # Gemfile
30
- group :test do
31
- gem 'evil_systems', '~> 0.1.0'
32
- end
28
+ ```bash
29
+ bundle add evil_systems --group=test
33
30
  ```
34
31
 
35
32
  Make sure the following 3 gems are in your `Gemfile` as well:
36
33
 
37
34
  ```ruby
38
35
  # Gemfile
39
- gem 'capybara'
40
- gem 'cuprite' # Optional
41
- gem 'selenium-webdriver' # Not required if using Cuprite and using Rails >= 6.1
42
- ```
43
36
 
44
- And then execute:
45
-
46
- ```bash
47
- bundle
37
+ group :test do
38
+ gem 'capybara'
39
+ gem 'cuprite' # Optional
40
+ gem 'selenium-webdriver' # Not required if using Cuprite and using Rails >= 6.1
41
+ end
48
42
  ```
49
43
 
44
+ > Note: `bundle add` by default appends the gem to the bottom of your `Gemfile`, which means not in the `test` group of gems. If the `capybara` gem is in the `test` group, but `evil_systems` is not, you will not be able to load your application in production. Be sure that `evil_systems` is placed in the same group as `capybara` (we recommend the `test` group).
45
+
50
46
  ## Setup
51
47
 
52
48
  ### Minitest
@@ -67,6 +63,8 @@ require 'capybara/cuprite'
67
63
  require 'evil_systems'
68
64
 
69
65
  EvilSystems.initial_setup
66
+ # To pass in driver_options to cuprite you can do the following:
67
+ # EvilSystems.initial_setup(driver_options: { process_timeout: 20 })
70
68
 
71
69
  class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
72
70
  driven_by :evil_cuprite
@@ -27,7 +27,7 @@ module EvilSystems
27
27
  # Make failure screenshots compatible with multi-session setup
28
28
  # @return void
29
29
  def take_screenshot
30
- return super unless ::Capybara.last_used_session
30
+ return super unless ::Capybara.respond_to?(:last_used_session) && ::Capybara.last_used_session
31
31
 
32
32
  ::Capybara.using_session(::Capybara.last_used_session) { super }
33
33
  end
@@ -9,7 +9,7 @@ module EvilSystems
9
9
  # driven_by :evil_cuprite, using: :chrome, screen_size: [1400, 1400]
10
10
  # The initial setup prior to the class ApplicationSystemTestCase, runs before the entire test suite.
11
11
  # @return [void]
12
- def self.initial_setup
12
+ def self.initial_setup(driver_options: {})
13
13
  return unless defined? Capybara::Cuprite
14
14
 
15
15
  begin
@@ -30,7 +30,7 @@ module EvilSystems
30
30
  process_timeout: process_timeout,
31
31
  slowmo: ENV.fetch("SLOWMO", 0).to_f,
32
32
  inspector: true
33
- }.merge(remote_options)
33
+ }.merge(remote_options).merge(driver_options)
34
34
  )
35
35
  end
36
36
  end
@@ -1,3 +1,3 @@
1
1
  module EvilSystems
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.2"
3
3
  end
data/lib/evil_systems.rb CHANGED
@@ -11,9 +11,9 @@ module EvilSystems
11
11
  # @see Settings#initial_setup
12
12
  # @see RegisterCuprite#initial_setup
13
13
  # @see PrecompileAssets#initial_setup
14
- def self.initial_setup(task: "assets:precompile", silent: true, skip_task: false)
14
+ def self.initial_setup(task: "assets:precompile", silent: true, skip_task: false, driver_options: {})
15
15
  Settings.initial_setup
16
- RegisterCuprite.initial_setup
16
+ RegisterCuprite.initial_setup(driver_options: driver_options)
17
17
 
18
18
  return if skip_task
19
19
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evil_systems
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ParamagicDev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-06 00:00:00.000000000 Z
11
+ date: 2022-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  requirements: []
98
- rubygems_version: 3.3.3
98
+ rubygems_version: 3.2.3
99
99
  signing_key:
100
100
  specification_version: 4
101
101
  summary: Fully integrated setup based on EvilMartians system of a test