Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(axe-core-rspec): add e2e tests and set up rake tasks (#110)
- Loading branch information
Showing
4 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "rspec" | ||
gem "capybara" | ||
gem "selenium-webdriver" | ||
gem "axe-core-capybara", :path => "../../../axe-core-capybara" | ||
gem "axe-core-rspec", :path => "../../" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require "spec_helper" | ||
|
||
# Typical example using standard RSpec dsl | ||
describe "ABCD CompuTech (RSpec DSL)", | ||
:type => :feature, :driver => :selenium do | ||
before :each do | ||
visit "http://abcdcomputech.dequecloud.com/" | ||
end | ||
|
||
it "is known to be inaccessible, should fail" do | ||
expect(page).not_to be_accessible | ||
end | ||
|
||
it "is known to have an accessible sub-tree (should pass)" do | ||
expect(page).to be_accessible.within "#intro" | ||
end | ||
|
||
it "is known to have an inaccessible sub-tree (should fail)" do | ||
expect(page).not_to be_accessible.within "#topbar" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
require "rspec" | ||
require "capybara/rspec" | ||
require "axe-rspec" | ||
require "axe-capybara" | ||
|
||
@page = AxeCapybara.configure("firefox") do |c| | ||
end | ||
|
||
RSpec.configure do |config| | ||
config.color = true | ||
end |