[Ubuntu] Migrate Browsers and Rust tests to Pester (#2323)

* add tests for browsers and rust

* small fix

* fix tests invoking

* small fixes

* resolve conflicts

* fix firefox test
This commit is contained in:
Dibir Magomedsaygitov
2020-12-28 11:34:32 +03:00
committed by GitHub
parent ba0809214b
commit 7c15befd02
5 changed files with 71 additions and 34 deletions

View File

@@ -4,15 +4,11 @@
## Desc: Installs Firefox
################################################################################
source $HELPER_SCRIPTS/invoke-tests.sh
# Install Firefox
apt-get install -y firefox
# Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work"
if ! command -v firefox; then
exit 1
fi
# add to gloabl system preferences for firefox locale en_US, because other browsers have en_US local.
# Default firefox local is en_GB
echo 'pref("intl.locale.requested","en_US");' >> "/usr/lib/firefox/browser/defaults/preferences/syspref.js"
@@ -34,9 +30,4 @@ chmod +x $GECKODRIVER_BIN
ln -s "$GECKODRIVER_BIN" /usr/bin/
echo "GECKOWEBDRIVER=$GECKODRIVER_DIR" | tee -a /etc/environment
# Run tests to determine that the geckodriver installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work"
if ! command -v geckodriver; then
echo "geckodriver was not installed"
exit 1
fi
invoke_tests "Browsers" "Firefox"