|
6 | 6 | set -e
|
7 | 7 | set -x
|
8 | 8 |
|
9 |
| -# Access passed params |
10 |
| -DB=$1 |
11 |
| -PHP_VERSION=$2 |
12 |
| - |
13 |
| -# Some vars to make this easy to change |
14 |
| -SELENIUM_HUB_URL='http://127.0.0.1:4444' |
15 |
| -SELENIUM_JAR=/usr/share/selenium/selenium-server-standalone.jar |
16 |
| -SELENIUM_DOWNLOAD_URL=https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar |
17 |
| - |
18 |
| -# Location of geckodriver for use as webdriver in xvfb |
19 |
| -GECKODRIVER_DOWNLOAD_URL=https://github.com/mozilla/geckodriver/releases/download/v0.29.1/geckodriver-v0.29.1-linux64.tar.gz |
20 |
| -GECKODRIVER_TAR=/tmp/geckodriver.tar.gz |
21 |
| - |
22 |
| -# Location of chromedriver for use as webdriver in xvfb |
23 |
| -CHROMEDRIVER_ZIP=/tmp/chromedriver_linux64.zip |
24 |
| - |
25 |
| -# Download Selenium |
26 |
| -echo "Downloading Selenium" |
27 |
| -sudo mkdir -p $(dirname "$SELENIUM_JAR") |
28 |
| -sudo wget -nv -O "$SELENIUM_JAR" "$SELENIUM_DOWNLOAD_URL" |
29 |
| - |
30 |
| -# Install Fx or Chrome |
31 |
| -echo "Installing Browser" |
32 |
| -# sudo apt install firefox -y -qq > /dev/null |
33 |
| -# Available Chrome Versions |
34 |
| -# https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable?id=202706 |
| 9 | +# Per actions in the tests.yaml file |
35 | 10 | #
|
36 |
| -CHROME_VERSION='110.0.5481.100-1' # '91.0.4472.114-1' |
37 |
| - |
38 |
| -wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb -q |
39 |
| -sudo dpkg -i google-chrome-stable_${CHROME_VERSION}_amd64.deb |
40 |
| - |
41 |
| -# Download Chrome Driver |
42 |
| -echo "Downloading chromedriver" |
43 |
| -CHROME_VERSION=$(google-chrome --version | cut -f 3 -d ' ' | cut -d '.' -f 1) \ |
44 |
| - && CHROMEDRIVER_RELEASE=$(curl --location --fail --retry 3 https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_VERSION}) \ |
45 |
| - && wget -nv -O "$CHROMEDRIVER_ZIP" "https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_RELEASE/chromedriver_linux64.zip" \ |
46 |
| - && unzip "$CHROMEDRIVER_ZIP" \ |
47 |
| - && rm -rf "$CHROMEDRIVER_ZIP" \ |
48 |
| - && sudo mv chromedriver /usr/local/bin/chromedriver \ |
49 |
| - && sudo chmod +x /usr/local/bin/chromedriver \ |
50 |
| - && chromedriver --version |
| 11 | +# Current Versions for Ref |
| 12 | +# Selenium 3.141.59 jar |
| 13 | +# Chrome 123.0.6312.58 |
| 14 | +# ChromeDriver 123.0.6312.58 |
51 | 15 |
|
52 |
| -# Download Gecko driver |
53 |
| -#echo "Downloading geckodriver" |
54 |
| -#wget -nv -O "$GECKODRIVER_TAR" "$GECKODRIVER_DOWNLOAD_URL" \ |
55 |
| -# && sudo tar -xvf "$GECKODRIVER_TAR" -C "/usr/local/bin/" \ |
56 |
| -# && sudo chmod +x /usr/local/bin/geckodriver \ |
57 |
| -# && geckodriver --version |
58 |
| - |
59 |
| -# Start Selenium using default chosen webdriver |
60 |
| -export DISPLAY=:99.0 |
61 |
| -xvfb-run --server-args="-screen 0, 2560x1440x24" java -Dwebdriver.chrome.driver=/usr/local/bin/chromedriver -jar "$SELENIUM_JAR" > /tmp/selenium.log & |
| 16 | +echo "Ensuring Selenium Started" |
| 17 | +SELENIUM_HUB_URL='http://127.0.0.1:4444' |
62 | 18 | wget --retry-connrefused --tries=120 --waitretry=3 --output-file=/dev/null "$SELENIUM_HUB_URL/wd/hub/status" -O /dev/null
|
63 | 19 |
|
64 | 20 | # Test to see if the selenium server really did start
|
|
77 | 33 | # Copy RemoteCoverage.php back to vendor, this version supports phpunit RawCodeCoverageData
|
78 | 34 | sudo cp ./tests/RemoteCoverage.php ./vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon
|
79 | 35 |
|
80 |
| - # This keeps triggering in tests for the 2 second rule |
| 36 | + # This keeps triggering in tests for the 2 second rule, lets try to fix that |
81 | 37 | sudo sed -i -e "s|spamProtection('login');|//spamProtection('login');|g" ./sources/ElkArte/Controller/Auth.php
|
82 | 38 |
|
83 | 39 | # Run the phpunit selenium tests
|
|
0 commit comments