MW-Selenium 1.0 introduced a custom PageFactory that qualifies relative page-object URLs. Unfortunately, it's current implementation results in the given block being yield twice, resulting in unexpected and sometimes errant behavior. Reproduce with:
Then(/something/) do @called = 0 on(SomePage) { @called += 1 } expect(@called) to eq(1) end
This bug was uncovered while diagnosing issues refactored UploadWizard tests (https://gerrit.wikimedia.org/r/#/c/197975/).