Last modified: 2014-10-19 17:44:01 UTC
On several places in step code we have something like this[1]: @browser.url.should match /Special:UploadWizard/ We should create a method like Page#important_part_of_url (but we probably need a better name) that would return "Special:UploadWizard"[2]. 1: https://github.com/wikimedia/qa-browsertests/blob/master/features/step_definitions/upload_wizard_steps.rb#L82 2: https://github.com/wikimedia/qa-browsertests/blob/master/features/support/pages/upload_wizard_page.rb#L6
Then we could change the step code to something like: @browser.url.should match on(UploadWizardPage).important_part_of_url The implementation could be as simple as this: class UploadWizardPage ... def self.important_part_of_url 'Special:UploadWizard' end def self.url URL.url important_part_of_url end ... end