all repos — caroster @ 0d53e660a5ab62e33086498aebaf26aa2b4ac6d6

[Octree] Group carpool to your event https://caroster.io

backend/e2e/docs/safari.md (view raw)

 1### Safari
 2
 3To run the tests with Safari on MacOS, follow these steps:
 4
 51. Configure Safari to Enable WebDriver Support (see
 6   [Testing with WebDriver in Safari](https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari)):
 7
 8   ```
 9   safaridriver --enable
10   ```
11
12   For
13   [Safari Technology Preview](https://developer.apple.com/safari/technology-preview/):
14
15   ```
16   /Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver --enable
17   ```
18
192. Download and install [MJPEG Server](https://github.com/blueimp/mjpeg-server)
20   as `mjpeg-server` in your `PATH` and install [FFmpeg](https://ffmpeg.org/)
21   via [Homebrew](https://brew.sh/):
22
23   ```sh
24   brew install ffmpeg
25   ```
26
273. Add the `example` host to your `/etc/hosts` file:
28
29   ```sh
30   printf '127.0.0.1\t%s\n' example | sudo tee -a /etc/hosts
31   ```
32
334. Start `safaridriver` and `mjpeg-server` with the provided helper script:
34
35   ```sh
36   bin/safaridriver.sh [-t] [screen index]
37   ```
38
39   Providing the `-t` argument starts the `safaridriver` for
40   [Safari Technology Preview](https://developer.apple.com/safari/technology-preview/).
41
42   Providing a number as screen index (e.g. `2`) allows to use a different
43   capture screen. Running the command without this argument will display a list
44   of available screens if there are more than one available.
45
46   **Please Note:**  
47   The Terminal application the `mjpeg-server` command is started from requires
48   Screen Recording permissions:  
49   System Preferences => Security & Privacy => Privacy => Screen Recording
50
515. Run the tests with Safari:
52   ```sh
53   docker-compose run --rm wdio conf/safari.js
54   ```