sus-fixtures-async-webdriver 0.1.0 → 0.1.1

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: 6d117bc1968ff83bc9c09fc192f096939e6359d446bd4528c027f65f8f3cffa4
4
- data.tar.gz: 31bf4661190b95dc50faa87e7680adbd5ed6f9d8b9163a4bef72b516b2e598d4
3
+ metadata.gz: e0aa6e207f1db7e7df17563416fbbfeee3c4e28c33046fddaade0b0ee243c64b
4
+ data.tar.gz: a51d687121cf6c59f01dd3c0c3441a02234009102a8895ac1925d0c6fd6ba78d
5
5
  SHA512:
6
- metadata.gz: bc36d496b42921bf10368ea166cc69edfa42e1e607c7810bff0bb4e9521feaa87aa092baf7e7698d859028940b42962eca8fd85a4178d6949c2eb98764d41d39
7
- data.tar.gz: 50734787e437a593fda343969b47b10bf480a38de0ce3f9a72495131c65583f43a58a7ebd6ba3a9abff7c4094655309b46185028b131249b46d1c8ebf1c554ac
6
+ metadata.gz: 3f73cbbb3f69d3d6bad842be7fb6616db51f5b64d5348d3f5c8080224651ac6a95eb2ce5a7f99811d14d6bc03f510423babf87babcb8b083684318060aef2310
7
+ data.tar.gz: 2cc953f0db8ac69a4b78bf19d507cf6506ef9f702c530692e295f1379bedc7cb418d3d385481de96eca9fcdf797919b12efbd43f592f88d00781f3f64c17b697
checksums.yaml.gz.sig CHANGED
Binary file
@@ -10,6 +10,7 @@ module Sus
10
10
  module Fixtures
11
11
  module Async
12
12
  module WebDriver
13
+ # The session context provides a way to manage the lifecycle of a WebDriver session.
13
14
  module SessionContext
14
15
  GUARD = Thread::Mutex.new
15
16
 
@@ -25,6 +26,7 @@ module Sus
25
26
  end
26
27
  end
27
28
 
29
+ # The current session, that represents the browser window.
28
30
  def session
29
31
  @session ||= SessionContext.pool.session
30
32
  end
@@ -44,14 +46,20 @@ module Sus
44
46
  super
45
47
  end
46
48
 
49
+ # Navigate to a specific path within the website.
50
+ # @parameter path [String] The path to navigate to.
47
51
  def navigate_to(path)
48
52
  session.navigate_to(URI.join(bound_url, path))
49
53
  end
50
54
 
55
+ # Find an element within the current session.
56
+ # @parameter locator [Hash] The locator to use to find the element.
51
57
  def find_element(...)
52
58
  session.find_element(::Async::WebDriver::Locator.wrap(...))
53
59
  end
54
60
 
61
+ # Find all elements matching the given locator.
62
+ # @parameter locator [Hash] The locator to use to find the elements.
55
63
  def find_elements(...)
56
64
  session.find_elements(::Async::WebDriver::Locator.wrap(...))
57
65
  end
@@ -87,6 +95,7 @@ module Sus
87
95
  end
88
96
  end
89
97
 
98
+ # Check if the current session has an element matching the given locator.
90
99
  def have_element(...)
91
100
  HaveElement.new(::Async::WebDriver::Locator.wrap(...))
92
101
  end
@@ -106,6 +115,7 @@ module Sus
106
115
  end
107
116
  end
108
117
 
118
+ # Check if an element has properties matching the given key-value pairs.
109
119
  def have_properties(**properties)
110
120
  predicates = properties.map do |key, value|
111
121
  HaveProperty.new(key, value)
@@ -7,7 +7,7 @@ module Sus
7
7
  module Fixtures
8
8
  module Async
9
9
  module WebDriver
10
- VERSION = "0.1.0"
10
+ VERSION = "0.1.1"
11
11
  end
12
12
  end
13
13
  end
data/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2023, by Samuel Williams.
3
+ Copyright, 2023-2024, by Samuel Williams.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/readme.md CHANGED
@@ -6,7 +6,13 @@ Provides test fixtures for [async-webdriver](https://github.com/socketry/async-w
6
6
 
7
7
  ## Usage
8
8
 
9
- See `examples/rack` for a full example.
9
+ Please see the [project documentation](https://socketry.github.io/sus-fixtures-async-webdriver/) for more details.
10
+
11
+ - [Getting Started](https://socketry.github.io/sus-fixtures-async-webdriver/guides/getting-started/index) - This guide is designed to help you get started with the `sus-fixtures-async-webdriver` gem.
12
+
13
+ ## See Also
14
+
15
+ - [async-webdriver](https://github.com/socketry/async-webdriver) - Asynchronous WebDriver client used by this fixture.
10
16
 
11
17
  ## Contributing
12
18
 
@@ -24,4 +30,4 @@ This project uses the [Developer Certificate of Origin](https://developercertifi
24
30
 
25
31
  ### Contributor Covenant
26
32
 
27
- This project is governed by [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
33
+ This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sus-fixtures-async-webdriver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -37,7 +37,7 @@ cert_chain:
37
37
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
38
38
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
39
39
  -----END CERTIFICATE-----
40
- date: 2023-12-08 00:00:00.000000000 Z
40
+ date: 2024-05-04 00:00:00.000000000 Z
41
41
  dependencies:
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: async-webdriver
@@ -63,12 +63,13 @@ files:
63
63
  - lib/sus/fixtures/async/webdriver/version.rb
64
64
  - license.md
65
65
  - readme.md
66
- homepage: https://github.com/socketry/sus-fixtures-async-webdriver/
66
+ homepage: https://github.com/socketry/sus-fixtures-async-webdriver
67
67
  licenses:
68
68
  - MIT
69
69
  metadata:
70
70
  documentation_uri: https://socketry.github.io/sus-fixtures-async-webdriver/
71
71
  funding_uri: https://github.com/sponsors/ioquatix
72
+ source_code_uri: https://github.com/socketry/sus-fixtures-async-webdriver.git
72
73
  post_install_message:
73
74
  rdoc_options: []
74
75
  require_paths:
@@ -77,14 +78,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
77
78
  requirements:
78
79
  - - ">="
79
80
  - !ruby/object:Gem::Version
80
- version: '3.0'
81
+ version: '3.1'
81
82
  required_rubygems_version: !ruby/object:Gem::Requirement
82
83
  requirements:
83
84
  - - ">="
84
85
  - !ruby/object:Gem::Version
85
86
  version: '0'
86
87
  requirements: []
87
- rubygems_version: 3.4.10
88
+ rubygems_version: 3.5.3
88
89
  signing_key:
89
90
  specification_version: 4
90
91
  summary: A set of sus fixtures for writing integration tests.
metadata.gz.sig CHANGED
Binary file