Ran
|
Jobs
3
|
Files
24
|
Run time
1s
|
Badge
Embed ▾
README BADGES
|
push
github
Fix issue with non-has_one macros and duplicate element names What? ===== This introduces a test and change to address issues with non-has_one macros and elements that share the same name across different macro blocks. 5ef0fd2c0 introduced the notion of a class attribute `macro_registrar` on `PageEz::Page`. This attribute caches each element and corresponding construction strategy (e.g. dynamic vs static selectors) in order to determine how and when to run dynamic selectors. This solution did not account for initializing subclasses (run in `PageEz::Page.constructor_from_block`) with an empty registrar, which it should have; every layer of nesting should begin with an empty register since it operates as a new scope. By not starting with an empty register, naming collisions across nesting would result in erroneous behavior: ``` capybara-3.39.1/lib/capybara/selector/selector.rb:69: warning: Locator PageEz::HasOneResult:#<PageEz::HasOneResult:0x0000000109c5a940 @result=#<#<Class:0x00000001092cac90>:0x0000000109c50c10 @container=#<Capybara::Node::Element tag="div" path="/HTML/BODY[1]/MAIN[1]/SECTION[1]/UL[1]/LI[1]/DIV[1]">>> for selector :css must be an instance of String or Symbol. This will raise an error in a future version of Capybara. Called from: /Users/eebs/code/eebs/page_ez/lib/page_ez/has_one_result.rb:7 ``` Closes #35 Co-authored-by: Josh Clayton <joshua.clayton@gmail.com>
1 of 1 new or added line in 1 file covered. (100.0%)
555 of 557 relevant lines covered (99.64%)
408.29 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 5630970569.1 | 48 |
99.64 |
GitHub Action Run | |
2 | 5630970569.2 | 48 |
99.64 |
GitHub Action Run | |
3 | 5630970569.3 | 48 |
99.64 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|