Skip to content

Update QA to Chemlab 0.8

Dan Davison requested to merge dj-update-chemlab-0.8 into master

What does this MR do and why?

Updates qa/Gemfile to include Chemlab version 0.8.

Chemlab version 0.8+ introduced the ability to configure base_url's. Since chemlab-library-gitlab is built from chemlab-library-gitlab.gemspec, this will allow dependent projects to configure a Base URL.

Before

Given:

# spec_helper.rb
Chemlab.configure do |chemlab|
  chemlab.base_url = 'https://example.com'
end

# page.rb
module App
  class Page < Chemlab::Page
    path '/test'
  end
end

# test_spec.rb
Page.perform do |page|
  page.visit #=> Navigates to https://example.com/test
end

After

Given:

# spec_helper.rb
Chemlab.configure do |chemlab|
  App.base_url = 'https://another.example.com'
  chemlab.base_url = 'https://example.com'
end

# page.rb
module App
  include Chemlab::Library
  class Page < Chemlab::Page
    path '/test'
  end
end

# test_spec.rb
Page.perform do |page|
  page.visit #=> Navigates to https://another.example.com/test
end

This allows Chemlab to have several different applications configured separately. This will be useful for when GitLab needs to have a base URL that is separate from Chemlab's base URL.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Dan Davison

Merge request reports