Page MenuHomePhabricator

Create Page#important_part_of_url
Closed, DeclinedPublic

Description

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


Version: unspecified
Severity: enhancement

Details

Reference
bz55873

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:15 AM
bzimport set Reference to bz55873.
bzimport added a subscriber: Unknown Object (MLST).

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

I do not plan to work on this any time soon. Please reopen if you would like to see this task done.