diff --git a/test/selenium/Database/EventsTest.php b/test/selenium/Database/EventsTest.php index 126d3fa867..0335c74637 100644 --- a/test/selenium/Database/EventsTest.php +++ b/test/selenium/Database/EventsTest.php @@ -145,11 +145,11 @@ class EventsTest extends TestBase sleep(2); $this->dbQuery( - 'SELECT val FROM `' . $this->databaseName . '`.`test_table`', + 'SELECT * FROM `' . $this->databaseName . '`.`test_table`', function (): void { - $this->assertTrue($this->isElementPresent('className', 'table_results')); + $this->scrollToElement($this->waitForElement('className', 'table_results'), 0, 20); // [ ] | Edit | Copy | Delete | 1 | - $this->assertGreaterThan(2, (int) $this->getCellByTableClass('table_results', 1, 5)); + $this->assertGreaterThan(2, (int) $this->getCellByTableClass('table_results', 1, 6)); } ); } @@ -183,11 +183,11 @@ class EventsTest extends TestBase sleep(2); $this->dbQuery( - 'SELECT val FROM `' . $this->databaseName . '`.`test_table`', + 'SELECT * FROM `' . $this->databaseName . '`.`test_table`', function (): void { - $this->assertTrue($this->isElementPresent('className', 'table_results')); + $this->scrollToElement($this->waitForElement('className', 'table_results'), 0, 20); // [ ] | Edit | Copy | Delete | 4 - $this->assertGreaterThan(3, (int) $this->getCellByTableClass('table_results', 1, 5)); + $this->assertGreaterThan(3, (int) $this->getCellByTableClass('table_results', 1, 6)); } ); } diff --git a/test/selenium/Database/QueryByExampleTest.php b/test/selenium/Database/QueryByExampleTest.php index 6aabcce0ae..8c4fc1d9e1 100644 --- a/test/selenium/Database/QueryByExampleTest.php +++ b/test/selenium/Database/QueryByExampleTest.php @@ -119,56 +119,56 @@ class QueryByExampleTest extends TestBase $submitButton->click(); $this->waitAjax(); - $this->waitForElement('cssSelector', 'table.table_results'); + $this->scrollToElement($this->waitForElement('className', 'table_results'), 0, 20); /* Assert Row 1 */ $this->assertEquals( 4, - $this->getCellByTableClass('table_results', 1, 5) + $this->getCellByTableClass('table_results', 1, 1) ); $this->assertEquals( 3, - $this->getCellByTableClass('table_results', 1, 6) + $this->getCellByTableClass('table_results', 1, 2) ); /* Assert Row 2 */ $this->assertEquals( 6, - $this->getCellByTableClass('table_results', 2, 5) + $this->getCellByTableClass('table_results', 2, 1) ); $this->assertEquals( 4, - $this->getCellByTableClass('table_results', 2, 6) + $this->getCellByTableClass('table_results', 2, 2) ); /* Assert Row 3 */ $this->assertEquals( 5, - $this->getCellByTableClass('table_results', 3, 5) + $this->getCellByTableClass('table_results', 3, 1) ); $this->assertEquals( 4, - $this->getCellByTableClass('table_results', 3, 6) + $this->getCellByTableClass('table_results', 3, 2) ); /* Assert Row 4 */ $this->assertEquals( 7, - $this->getCellByTableClass('table_results', 4, 5) + $this->getCellByTableClass('table_results', 4, 1) ); $this->assertEquals( 5, - $this->getCellByTableClass('table_results', 4, 6) + $this->getCellByTableClass('table_results', 4, 2) ); /* Assert Row 5 */ $this->assertEquals( 3, - $this->getCellByTableClass('table_results', 5, 5) + $this->getCellByTableClass('table_results', 5, 1) ); $this->assertEquals( 5, - $this->getCellByTableClass('table_results', 5, 6) + $this->getCellByTableClass('table_results', 5, 2) ); } } diff --git a/test/selenium/Database/TriggersTest.php b/test/selenium/Database/TriggersTest.php index 5a773f2be5..479d26e352 100644 --- a/test/selenium/Database/TriggersTest.php +++ b/test/selenium/Database/TriggersTest.php @@ -117,11 +117,11 @@ class TriggersTest extends TestBase // test trigger $this->dbQuery('USE `' . $this->databaseName . '`;INSERT INTO `test_table` (val) VALUES (1);'); $this->dbQuery( - 'SELECT val FROM `' . $this->databaseName . '`.`test_table2`;', + 'SELECT * FROM `' . $this->databaseName . '`.`test_table2`;', function (): void { - $this->assertTrue($this->isElementPresent('className', 'table_results')); + $this->scrollToElement($this->waitForElement('className', 'table_results'), 0, 20); // [ ] | Edit | Copy | Delete | 1 | 3 - $this->assertEquals('3', $this->getCellByTableClass('table_results', 1, 5)); + $this->assertEquals('3', $this->getCellByTableClass('table_results', 1, 6)); } ); } @@ -157,11 +157,11 @@ class TriggersTest extends TestBase // test trigger $this->dbQuery('USE `' . $this->databaseName . '`;INSERT INTO `test_table` (val) VALUES (1);'); $this->dbQuery( - 'SELECT val FROM `' . $this->databaseName . '`.`test_table2`;', + 'SELECT * FROM `' . $this->databaseName . '`.`test_table2`;', function (): void { - $this->assertTrue($this->isElementPresent('className', 'table_results')); + $this->scrollToElement($this->waitForElement('className', 'table_results'), 0, 20); // [ ] | Edit | Copy | Delete | 1 | 12 - $this->assertEquals('12', $this->getCellByTableClass('table_results', 1, 5)); + $this->assertEquals('12', $this->getCellByTableClass('table_results', 1, 6)); } ); } @@ -189,11 +189,11 @@ class TriggersTest extends TestBase // test trigger $this->dbQuery('USE `' . $this->databaseName . '`;INSERT INTO `test_table` (val) VALUES (1);'); $this->dbQuery( - 'SELECT val FROM `' . $this->databaseName . '`.`test_table2`;', + 'SELECT * FROM `' . $this->databaseName . '`.`test_table2`;', function (): void { - $this->assertTrue($this->isElementPresent('className', 'table_results')); + $this->scrollToElement($this->waitForElement('className', 'table_results'), 0, 20); // [ ] | Edit | Copy | Delete | 1 | 2 - $this->assertEquals('2', $this->getCellByTableClass('table_results', 1, 5)); + $this->assertEquals('2', $this->getCellByTableClass('table_results', 1, 6)); } ); diff --git a/test/selenium/Table/CreateTest.php b/test/selenium/Table/CreateTest.php index 3a8259cb8f..1777f071b4 100644 --- a/test/selenium/Table/CreateTest.php +++ b/test/selenium/Table/CreateTest.php @@ -138,13 +138,10 @@ class CreateTest extends TestBase $this->getCellByTableId('tablestructure', 1, 10) ); - $this->assertFalse( - $this->isElementPresent( - 'cssSelector', - 'table#tablestructure tbody tr:nth-child(1) " - . "ul.table-structure-actions li.primary a' - ) - ); + self::assertFalse($this->isElementPresent( + 'cssSelector', + 'table#tablestructure tbody tr:nth-child(1) ul li.primary a' + )); // make assertions for second row $this->assertStringContainsString( @@ -172,11 +169,9 @@ class CreateTest extends TestBase $this->getCellByTableId('tablestructure', 2, 8) ); - $this->assertFalse( - $this->isElementPresent( - 'cssSelector', - 'css=ul.table-structure-actions:nth-child(2) li.primary a' - ) - ); + self::assertTrue($this->isElementPresent( + 'cssSelector', + 'table#tablestructure tbody tr:nth-child(2) ul li.primary a' + )); } }