Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Desportes <williamdes@wdes.fr>2021-02-09 00:16:51 +0300
committerWilliam Desportes <williamdes@wdes.fr>2021-02-09 00:26:21 +0300
commit2ff9de1215623d7b35807e5ef48e4bd544814217 (patch)
tree68971a0ca94de1e50d21c8093c856e9a919e6df7
parent299ff94a6a6b36a2dfb8ff876862fb149500e9b4 (diff)
Fix server login and documentation
Signed-off-by: William Desportes <williamdes@wdes.fr>
-rw-r--r--.github/workflows/test-selenium.yml10
-rw-r--r--test/README.rst3
-rw-r--r--test/config.e2e.inc.php1
-rw-r--r--test/selenium/TestBase.php2
4 files changed, 8 insertions, 8 deletions
diff --git a/.github/workflows/test-selenium.yml b/.github/workflows/test-selenium.yml
index 144a47cfd1..78468a9a52 100644
--- a/.github/workflows/test-selenium.yml
+++ b/.github/workflows/test-selenium.yml
@@ -21,9 +21,6 @@ jobs:
ports:
- "3306:3306"
options: >-
- --name database-server
- --hostname database-server
- --add-host database-server:127.0.0.1
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
@@ -104,15 +101,15 @@ jobs:
CI_MODE: selenium
TESTSUITE_SELENIUM_BROWSER: chrome
TESTSUITE_USER: root
+ TESTSUITE_PASSWORD: testbench
# Port defined in test/nginx.conf
TESTSUITE_URL: http://docker-host-bridge:8000
- TESTSUITE_SERVER: "database-server"
- TESTSUITE_DATABASE: "selenium"
+ TESTSUITE_DATABASE_PREFIX: "selenium"
TESTSUITE_SELENIUM_HOST: "127.0.0.1"
TESTSUITE_SELENIUM_PORT: "4444"
# Allowed errors: https://github.com/phpmyadmin/phpmyadmin/issues/16479
continue-on-error: true
- run: ./vendor/bin/phpunit --group selenium --verbose --debug
+ run: ./vendor/bin/phpunit --group selenium --verbose --debug --no-coverage
- name: Output logs
if: ${{ success() || failure() }}
run: |
@@ -120,6 +117,7 @@ jobs:
if [ -f nginx-error.log ] ; then cat nginx-error.log ; fi
- name: 'Upload screenshots'
uses: actions/upload-artifact@v2
+ if: ${{ success() || failure() }}
with:
name: selenium-screenshots
path: ${{ github.workspace }}/build/selenium/**/*
diff --git a/test/README.rst b/test/README.rst
index 1ab6a70712..e466649096 100644
--- a/test/README.rst
+++ b/test/README.rst
@@ -47,10 +47,9 @@ TESTSUITE_BROWSERSTACK_KEY
For example you can use following setup in ``phpunit.xml``::
<php>
- <env name="TESTSUITE_SERVER" value="localhost"/>
<env name="TESTSUITE_USER" value="root"/>
<env name="TESTSUITE_PASSWORD" value="root"/>
- <env name="TESTSUITE_DATABASE" value="test"/>
+ <env name="TESTSUITE_DATABASE_PREFIX" value="test"/>
<env name="TESTSUITE_URL" value="http://localhost/phpmyadmin/" />
<env name="TESTSUITE_SELENIUM_HOST" value="127.0.0.1" />
<env name="TESTSUITE_SELENIUM_PORT" value="4444" />
diff --git a/test/config.e2e.inc.php b/test/config.e2e.inc.php
index b311fce528..335aaa3468 100644
--- a/test/config.e2e.inc.php
+++ b/test/config.e2e.inc.php
@@ -6,5 +6,6 @@ $i = 0;
$cfg['Servers'] = [];
$i++;
$cfg['Servers'][$i]['verbose'] = 'Local';
+$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['UploadDir'] = './test/test_data/';
diff --git a/test/selenium/TestBase.php b/test/selenium/TestBase.php
index eb5c32564b..3f6192ddd9 100644
--- a/test/selenium/TestBase.php
+++ b/test/selenium/TestBase.php
@@ -626,6 +626,8 @@ abstract class TestBase extends TestCase
$this->webDriver->switchTo()->window($this->sqlWindowHandle);
if (! $this->isSuccessLogin()) {
$this->takeScrenshot('SQL_window_not_logged_in');
+
+ return false;
}
$this->byXPath('//*[contains(@class,"nav-item") and contains(., "SQL")]')->click();
$this->waitAjax();