-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-tests
executable file
·37 lines (30 loc) · 1.01 KB
/
run-tests
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /usr/bin/env bash
if [ "$CI" != "true" ]; then
read -r -p "ORCID username (leave blank to skip auth tests): " ORCID_USER
if [ -n "$ORCID_USER" ]; then
read -r -s -p "ORCID password: " ORCID_PASSWORD
export ORCID_USER ORCID_PASSWORD
fi
fi
# only test authentication on firefox.
# it doesn't work on chrome or safari
# due to limitations of the browser
# automation framework.
npx testcafe \
--selector-timeout "${TIMEOUT}" \
--stop-on-first-fail \
firefox authentication
# but, don't test anything else on firefox,
# because fetching gazetteers will mysteriously
# fail. this only seems to happen when running
# under automation.
npx testcafe \
--selector-timeout "${TIMEOUT}" \
--stop-on-first-fail \
chrome browse-periods local-database view-authority
# do not run tests in parallel on two different
# browsers, because things get flaky.
npx testcafe \
--selector-timeout "${TIMEOUT}" \
--stop-on-first-fail \
safari browse-periods local-database view-authority