Enable test on Safari (#737)

* Enable test on Safari

* fix platform name

* update base Safari snapshot
This commit is contained in:
Konstantin Vyatkin 2019-11-04 09:17:45 -04:00 committed by Josh Johnson
parent f30b976424
commit 81c44ba8f2
2 changed files with 13 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 KiB

After

Width:  |  Height:  |  Size: 284 KiB

View file

@ -10,22 +10,23 @@ on:
- 'webpack.config.*' - 'webpack.config.*'
- 'public/index.html' - 'public/index.html'
- '.github/actions-scripts/__snapshots__/**' - '.github/actions-scripts/__snapshots__/**'
- '.github/workflows/browsers.yml'
jobs: jobs:
selenium: selenium:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [windows-latest, macOS-10.14] os: [windows-latest, macOS-latest]
browser: [ie, firefox] browser: [ie, firefox, safari]
exclude: exclude:
# On Windows, run tests with only IE and Edge # On Windows, run tests with only IE and Edge
- os: windows-latest - os: windows-latest
browser: safari browser: safari
# On macOS, run tests with only on safari # On macOS, run tests with only on safari
- os: macOS-10.14 - os: macOS-latest
browser: ie browser: ie
- os: macOS-10.14 - os: macOS-latest
browser: chrome browser: chrome
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -51,20 +52,19 @@ jobs:
# install drivers # install drivers
- name: Enable Safari Driver - name: Enable Safari Driver
run: | run: |
# brew tap homebrew/cask-versions # Workaround for `sudo safardriver --enable` not working:
# brew cask install safari-technology-preview # https://github.com/web-platform-tests/wpt/issues/19845
sudo safaridriver --enable # https://github.com/web-platform-tests/wpt/blob/master/tools/ci/azure/install_safari.yml
defaults write -app Safari IncludeDevelopMenu 1 mkdir -p ~/Library/WebDriver/
defaults write -app Safari AllowJavaScriptFromAppleEvents 1 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 -app Safari IncludeInternalDebugMenu 1 defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically 1
defaults write -app Safari AllowRemoteAutomation 1 # sudo safaridriver --enable
safaridriver -p 0 &
if: matrix.browser == 'safari' if: matrix.browser == 'safari'
- run: | - run: |
brew cask install firefox brew cask install firefox
brew install geckodriver 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" - run: echo "::add-path::$env:GeckoWebDriver"
if: matrix.browser == 'firefox' && matrix.os == 'windows-latest' if: matrix.browser == 'firefox' && matrix.os == 'windows-latest'