diff options
author | William Desportes <williamdes@wdes.fr> | 2020-06-09 10:37:44 +0300 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2020-06-10 02:27:22 +0300 |
commit | fce312855702a377bece8c20c090174edb5013a1 (patch) | |
tree | d9bf82d45dcc006b0a2f838a3c2a22476ffadb89 /test/selenium | |
parent | 53f54014ddbded6e29d67b7daa83cf6dd6a6befb (diff) |
Fix selenium Table\OperationsTest
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'test/selenium')
-rw-r--r-- | test/selenium/Table/OperationsTest.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/test/selenium/Table/OperationsTest.php b/test/selenium/Table/OperationsTest.php index 3f50988cba..6e2eff8d9e 100644 --- a/test/selenium/Table/OperationsTest.php +++ b/test/selenium/Table/OperationsTest.php @@ -50,6 +50,11 @@ class OperationsTest extends TestBase 'xpath', "//div[contains(., 'Table maintenance')]" ); + $this->reloadPage(); + $this->waitForElement( + 'xpath', + "//div[contains(., 'Table maintenance')]" + ); } /** @@ -183,7 +188,7 @@ class OperationsTest extends TestBase ); $this->dbQuery( - 'SELECT COUNT(*) as c FROM test_table2', + 'SELECT COUNT(*) as c FROM `' . $this->database_name . '`.test_table2', function () { $this->assertTrue($this->isElementPresent('className', 'table_results')); $this->assertEquals('2', $this->getCellByTableClass('table_results', 1, 1)); @@ -213,10 +218,10 @@ class OperationsTest extends TestBase ); $this->dbQuery( - 'SELECT COUNT(*) as c FROM test_table', + 'SELECT CONCAT("Count: ", COUNT(*)) as c FROM `' . $this->database_name . '`.test_table', function () { $this->assertTrue($this->isElementPresent('className', 'table_results')); - $this->assertEquals('0', $this->getCellByTableClass('table_results', 1, 1)); + $this->assertEquals('Count: 0', $this->getCellByTableClass('table_results', 1, 1)); } ); } @@ -230,7 +235,6 @@ class OperationsTest extends TestBase */ public function testDropTable() { - $this->reloadPage(); $dropLink = $this->waitUntilElementIsVisible('partialLinkText', 'Delete the table (DROP)', 30); $this->scrollToElement($this->byId('selflink')); $dropLink->click(); @@ -249,7 +253,8 @@ class OperationsTest extends TestBase ); $this->dbQuery( - 'SHOW TABLES', + 'USE `' . $this->database_name . '`;' + . 'SHOW TABLES', function () { $this->assertFalse($this->isElementPresent('className', 'table_results')); } |