owncast/test/automated/screenshots/run.sh
Gabe Kangas 69f217f758
Refactor mobile chat into modal (#3038)
* feat(mobile): refactor mobile chat into modal

- Make page always scrollable
- Move mobile chat into a standalone modal

* fix(test): split out mobile browser test specs

* fix(mobile): force chat button to render on top of footer

* fix: some small updates from review

* fix: hide/show hide chat menu option based on width

* fix: chat button icon getting cut off

* chore(tests): add browser tests for mobile chat modal

* chore(tests): add story for ChatModal component

* fix(test): quiet shellcheck

* fix: remove unused import

* fix(tests): silence storybook linting warning

* fix(ui): reposition chat modal button icon with transform
2023-05-22 18:56:44 -07:00

46 lines
930 B
Bash
Executable file

#!/bin/bash
set -e
set -o errexit
set -o pipefail
finish() {
# shellcheck disable=SC2317
kill_with_kids "$BROWSERSTACK_PID"
# shellcheck disable=SC2317
kill_with_kids "$STREAM_PID"
}
rm -rf ./screenshots
mkdir -p ./screenshots
curl -o ./BrowserStackLocal-linux-x64.zip https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip
unzip -o ./BrowserStackLocal-linux-x64.zip
./BrowserStackLocal --key "$BROWSERSTACK_KEY" &
BROWSERSTACK_PID=$!
trap finish EXIT TERM INT
npm install --silent >/dev/null
source ../tools.sh
install_ffmpeg
start_owncast
# Offline screenshots
FILE_SUFFIX="offline" node index.js
# Online screenshots
start_stream
sleep 20
FILE_SUFFIX="online" node index.js
SCREENSHOTS="$(pwd)/screenshots"
echo "$SCREENSHOTS"
# Change to the root directory of the repository
cd "$(git rev-parse --show-toplevel)"
cd web/.storybook/story-assets
rm -rf ./screenshots
mv "$SCREENSHOTS" .