Sha256: 51af968afed051d947d7e35167ae3fdfd0ba53fcabf5a30003de27866a1df7d6
Contents?: true
Size: 1.55 KB
Versions: 2
Compression:
Stored size: 1.55 KB
Contents
Feature: Basic Authentication Selenium 2 does not allow header injection. So in order to support basic auth, we will pre-load HTTP and HTTPS URLs with get actions before each test execution in order for the browser to cache this information. This way tests will be able to execute without being prompted by a modal dialog box. Background: Given I run `bundle exec ckit new basic_auth_harness` And I cd to "basic_auth_harness" And a file named "beakers/basic_auth_1_beaker.rb" with: """ describe "Basic Auth", :depth => 'shallow' do it "works without providing credentials in the URL" do @driver.get ENV['BASE_URL'] end end """ Scenario: Pre-load HTTP before each test And a file named "config.yaml" with: """ base_url: 'http://the-internet.herokuapp.com/basic_auth' basic_auth: username: 'admin' password: 'admin' http_path: '/' """ When I run `bundle exec ckit brew` Then the stdout should contain "1 example, 0 failures" Scenario: Pre-load HTTP before each test without the http_path set And a file named "config.yaml" with: """ base_url: 'http://the-internet.herokuapp.com/basic_auth' basic_auth: username: 'admin' password: 'admin' """ When I run `bundle exec ckit brew` Then the stdout should contain "1 example, 0 failures" Scenario: Works without Basic Auth And a file named "config.yaml" with: """ base_url: 'http://google.com' """ When I run `bundle exec ckit brew` Then the stdout should contain "1 example, 0 failures"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
chemistrykit-3.10.1 | features/basic_auth.feature |
chemistrykit-3.10.0 | features/basic_auth.feature |