evil_systems 0.1.0 → 0.2.0

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: aa4fcc03e62bde5ed6544ebe475649eaf5111a5e5ce8a76c9f315865b6e49b41
4
- data.tar.gz: ec4f28dcd255085354cd046b88d0bbe56a08ba5442d07ada59046040195a9f76
3
+ metadata.gz: 7ac55c0ee239d85c3181765a4421073e7905f65df50cbb20d64899e37ceac37c
4
+ data.tar.gz: f7e111b1a140dc381ff78df22612c06b18c917c06e37272739e91f4d5e7664d0
5
5
  SHA512:
6
- metadata.gz: 3b56787ea17108908bf3fdbdc1a5cf9fd928402629b636e303c075e0662ac5d3ec66ff95ee16e7b551485107bc981b371c7bc81a18bec2704bad71ea7476f199
7
- data.tar.gz: ebe190e15d7b09e29a602940ca22ba4ba94dba7969c42f254f4cd4d02fac4554ed5fe3cbc8a72d15c77dc176af538f2989607394e976785e8227c1f7a503a999
6
+ metadata.gz: 3bbc2b9279723ae17377f5b3dd51ddbefd98411b2f9ce600fe3aacd8cc2ee6c0f0f68fe5c755e180e82e981f2bd9d9bc55b1e7ae20c28c29adcb30cd3332c9c2
7
+ data.tar.gz: 296f841ef1e8fbe93c126e4f5cd4dc4af2890724fb0068ff9baf7984c57185a90048476090784263291dfdfe16a0658fd54a84ae435ea3b27987098f49aa2d5c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 0.2.0
2
+
3
+ - Disable animations by default @julianrubisch <https://github.com/ParamagicDev/evil_systems/commit/cf72d1189c8bd8b72f130909f209f543a52aaf50>
4
+
5
+ ## 0.1.3
6
+
7
+ - Add Slowmo option
8
+
9
+ ## 0.1.1
10
+
11
+ - Fix readme issue
12
+ - Remove mark_all_banners_as_read
13
+ - Remove selenium-webdriver
14
+
1
15
  ## 0.1.0
2
16
 
3
17
  - Allow the Cuprite driver to be configured with ENV variables for headless mode and process_timeouts.
data/README.md CHANGED
@@ -28,7 +28,7 @@ https://rdoc.info/github/paramagicdev/evil_systems/main
28
28
  ```ruby
29
29
  # Gemfile
30
30
  group :test do
31
- gem 'evil_system_tests', '~> 0.1.0'
31
+ gem 'evil_systems', '~> 0.1.0'
32
32
  end
33
33
  ```
34
34
 
@@ -37,8 +37,8 @@ Make sure the following 3 gems are in your `Gemfile` as well:
37
37
  ```ruby
38
38
  # Gemfile
39
39
  gem 'capybara'
40
- gem 'selenium-webdriver' # Still required when using Cuprite as of Rails 6.1
41
40
  gem 'cuprite' # Optional
41
+ gem 'selenium-webdriver' # Not required if using Cuprite and using Rails >= 6.1
42
42
  ```
43
43
 
44
44
  And then execute:
@@ -166,9 +166,6 @@ dom_id(*args)
166
166
  ```rb
167
167
  # Small wrapper around Capybara.using_session thats easy to call from an instance
168
168
  within_session(name_or_session, &block)
169
-
170
- # Remove all cookie banners
171
- mark_all_banners_as_read!
172
169
  ```
173
170
 
174
171
  #### Cuprite Helpers
@@ -179,7 +176,7 @@ pause
179
176
 
180
177
  # Opens a Pry or IRB repl. Will use Pry if Pry is defined, fallsback
181
178
  # to debugging with IRB
182
- debug
179
+ debug binding
183
180
  ```
184
181
 
185
182
  ### Env Variables
@@ -192,6 +189,8 @@ ENV["CAPYBARA_ARTIFACTS"] # used for Capybara.save_path
192
189
  ENV["CHROME_URL"] # used for setting a remote chrome instance for Cuprite
193
190
  ENV["PROCESS_TIMEOUT"] # How long to wait before killing the process, default is 5 seconds
194
191
  ENV["CI"] # Whether or not to run Cuprite in headless mode, defaults to true.
192
+ ENV["SLOWMO"] # Delay in seconds before sending a command (default 0). Also see https://github.com/rubycdp/ferrum#customization
193
+ ENV["DISABLE_ANIMATION"] # Configure whether Capybara should render animations, default is true
195
194
  ```
196
195
 
197
196
  ## I don't want to use Cuprite.
@@ -28,6 +28,7 @@ module EvilSystems
28
28
  browser_options: RemoteChrome.connected? ? {"no-sandbox" => nil} : {},
29
29
  headless: ENV.fetch("CI", "true") == "true",
30
30
  process_timeout: process_timeout,
31
+ slowmo: ENV.fetch("SLOWMO", 0).to_f,
31
32
  inspector: true
32
33
  }.merge(remote_options)
33
34
  )
@@ -5,10 +5,5 @@ module EvilSystems
5
5
  def within_session(name_or_session, &block)
6
6
  ::Capybara.using_session(name_or_session, &block)
7
7
  end
8
-
9
- # Remove all banners
10
- def mark_all_banners_as_read!
11
- page.driver.set_cookie "show_banners", "N"
12
- end
13
8
  end
14
9
  end
@@ -29,6 +29,9 @@ module EvilSystems
29
29
  # Make server listening on all hosts
30
30
  ::Capybara.server_host = "0.0.0.0"
31
31
 
32
+ # Silence puma
33
+ ::Capybara.server = :puma, {Silent: true}
34
+
32
35
  # Don't wait too long in `have_xyz` matchers
33
36
  ::Capybara.default_max_wait_time = 2
34
37
 
@@ -37,6 +40,9 @@ module EvilSystems
37
40
 
38
41
  # Where to store artifacts (e.g. screenshots, downloaded files, etc.)
39
42
  ::Capybara.save_path = ENV.fetch("CAPYBARA_ARTIFACTS", "./tmp/capybara")
43
+
44
+ # Disable animations in Capybara by default
45
+ ::Capybara.disable_animation = ENV.fetch("DISABLE_ANIMATION", "true") == "true"
40
46
  end
41
47
 
42
48
  private_class_method def self.prepend_session_to_capybara
@@ -1,3 +1,3 @@
1
1
  module EvilSystems
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
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: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ParamagicDev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-07 00:00:00.000000000 Z
11
+ date: 2021-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk