Skip to content

Commit

Permalink
Enable test on Safari (#737)
Browse files Browse the repository at this point in the history
* Enable test on Safari

* fix platform name

* update base Safari snapshot
  • Loading branch information
tinovyatkin authored and jshjohnson committed Nov 4, 2019
1 parent f30b976 commit 81c44ba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Binary file modified .github/actions-scripts/__snapshots__/safari-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 13 additions & 13 deletions .github/workflows/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,23 @@ on:
- 'webpack.config.*'
- 'public/index.html'
- '.github/actions-scripts/__snapshots__/**'
- '.github/workflows/browsers.yml'

jobs:
selenium:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macOS-10.14]
browser: [ie, firefox]
os: [windows-latest, macOS-latest]
browser: [ie, firefox, safari]
exclude:
# On Windows, run tests with only IE and Edge
- os: windows-latest
browser: safari
# On macOS, run tests with only on safari
- os: macOS-10.14
- os: macOS-latest
browser: ie
- os: macOS-10.14
- os: macOS-latest
browser: chrome

runs-on: ${{ matrix.os }}
Expand All @@ -51,20 +52,19 @@ jobs:
# install drivers
- name: Enable Safari Driver
run: |
# brew tap homebrew/cask-versions
# brew cask install safari-technology-preview
sudo safaridriver --enable
defaults write -app Safari IncludeDevelopMenu 1
defaults write -app Safari AllowJavaScriptFromAppleEvents 1
defaults write -app Safari IncludeInternalDebugMenu 1
defaults write -app Safari AllowRemoteAutomation 1
safaridriver -p 0 &
# Workaround for `sudo safardriver --enable` not working:
# https://github.com/web-platform-tests/wpt/issues/19845
# https://github.com/web-platform-tests/wpt/blob/master/tools/ci/azure/install_safari.yml
mkdir -p ~/Library/WebDriver/
curl https://raw.githubusercontent.com/web-platform-tests/wpt/master/tools/ci/azure/com.apple.Safari.plist -o ~/Library/WebDriver/com.apple.Safari.plist
defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically 1
# sudo safaridriver --enable
if: matrix.browser == 'safari'

- run: |
brew cask install firefox
brew install geckodriver
if: matrix.browser == 'firefox' && matrix.os == 'macOS-10.14'
if: matrix.browser == 'firefox' && matrix.os == 'macOS-latest'
- run: echo "::add-path::$env:GeckoWebDriver"
if: matrix.browser == 'firefox' && matrix.os == 'windows-latest'
Expand Down

0 comments on commit 81c44ba

Please sign in to comment.