Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): 4.7.0 #308

Merged
merged 8 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

All notable changes to this project will be documented in this file. See [standard-version](https:/conventional-changelog/standard-version) for commit guidelines.

## [4.7.0](https:/dequelabs/axe-core-gems/compare/v4.6.1...v4.7.0) (2023-04-27)


### Features

* Update axe-core to v4.7.0 ([#299](https:/dequelabs/axe-core-gems/issues/299)) ([81ca285](https:/dequelabs/axe-core-gems/commit/81ca285e2a8ebda7414b5d0543b732141ea6512d))


### Bug Fixes

* **capybara:** open browser based on passed symbol ([#303](https:/dequelabs/axe-core-gems/issues/303)) ([c43ee49](https:/dequelabs/axe-core-gems/commit/c43ee49744133ca22a32dde767d896b376c77b6c))
* **capybara:** open selected browser ([#305](https:/dequelabs/axe-core-gems/issues/305)) ([311e4da](https:/dequelabs/axe-core-gems/commit/311e4dabfe711c6d2bb0e37e113a86d4c4edcf6a))
* **capybara:** respect browser choice ([#307](https:/dequelabs/axe-core-gems/issues/307)) ([bb0471d](https:/dequelabs/axe-core-gems/commit/bb0471d6ce31c4accabe03de824053f644e6519a))
* Update axe-core to v4.6.3 ([#298](https:/dequelabs/axe-core-gems/issues/298)) ([4dbab74](https:/dequelabs/axe-core-gems/commit/4dbab7457b270180c1ae4d5917128dd330aaf0bb))
* **watir:** spawn firefox windows on windows ([#306](https:/dequelabs/axe-core-gems/issues/306)) ([74de72f](https:/dequelabs/axe-core-gems/commit/74de72f3074559b0d9ab3b3f62e10017010ac20a))

### [4.6.1](https:/dequelabs/axe-core-gems/compare/v4.6.0...v4.6.1) (2023-04-10)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "axe-core-gems",
"version": "4.6.1",
"version": "4.7.0",
"license": "MPL-2.0",
"private": true,
"repository": {
Expand Down
14 changes: 7 additions & 7 deletions packages/axe-core-api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/axe-core-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "axe-core-api",
"license": "MPL-2.0",
"dependencies": {
"axe-core": "^4.6.0"
"axe-core": "^4.7.0"
}
}
14 changes: 10 additions & 4 deletions packages/axe-core-capybara/lib/axe-capybara.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ def self.configure(browser = :firefox)

config = Axe::Configuration.instance

# provide a capybara webdriver page object
config.page = get_driver(browser)
config.page = set_driver(browser)

# await and return
yield config
Expand All @@ -24,7 +23,14 @@ def self.configure(browser = :firefox)

private

def self.get_driver(browserSymbol)
Capybara::Selenium::Driver.new(browserSymbol)
def self.set_driver(browserSymbol)
if browserSymbol == :chrome
Capybara.default_driver = :selenium_chrome
Capybara.javascript_driver = :selenium_chrome
else
Capybara.default_driver = :selenium
Capybara.javascript_driver = :selenium
end
Capybara::Selenium::Driver.new(nil, :browser => browserSymbol)
end
end
24 changes: 24 additions & 0 deletions packages/axe-core-capybara/spec/axe-capybara_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,30 @@
}.to yield_with_args(actual)
end

# Default is firefox, so we can just check that we can override the default
it "sets browser" do
driver = AxeCapybara.configure(:chrome) do
end
is_chrome = driver.page.execute_script "return !!window.chrome"
expect(is_chrome).to be true
expect(Capybara.default_driver).to be :selenium_chrome
end

it "defaults to firefox" do
driver = AxeCapybara.configure() do
end
browser = driver.page.options[:browser]
expect(browser).to be :firefox
expect(Capybara.default_driver).to be :selenium
end
it "sets browser correctly" do
driver = AxeCapybara.configure(:chrome) do
end
browser = driver.page.options[:browser]
expect(browser).to be :chrome
expect(Capybara.default_driver).to be :selenium_chrome
end

it "should yield configuration with specified jslib path" do
different_axe_path = "different-axe-path/axe.js"

Expand Down
4 changes: 2 additions & 2 deletions packages/axe-core-rspec/e2e/capybara/spec/a11y_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# Typical example using standard RSpec dsl
describe "ABCD CompuTech (RSpec DSL)",
:type => :feature, :driver => :selenium do
:type => :feature do
before :each do
visit "http://abcdcomputech.dequecloud.com/"
page.visit "http://abcdcomputech.dequecloud.com/"
end

it "is known to be inaccessible, should fail" do
Expand Down
2 changes: 1 addition & 1 deletion packages/axe-core-rspec/e2e/capybara/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require "axe-rspec"
require "axe-capybara"

@page = AxeCapybara.configure(:firefox) do |c|
AxeCapybara.configure(:chrome) do |c|
end

RSpec.configure do |config|
Expand Down
2 changes: 1 addition & 1 deletion packages/axe-core-watir/lib/axe-watir.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ def self.configure(browser = :firefox)
private

def self.get_driver(browserSymbol)
Watir::Browser.new browserSymbol
Watir::Browser.new(browserSymbol)
end
end
2 changes: 1 addition & 1 deletion version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# this version is used by all the packages

module AxeCoreGems
VERSION = "4.6.1"
VERSION = "4.7.0"
end