Skip to content

Commit 8148b4b

Browse files
Merge pull request #19992 from MauricioFauth/e2e-tests-fix
Fix failing end to end tests
2 parents e24aa37 + e48eea5 commit 8148b4b

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

tests/end-to-end/Database/StructureTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function testTruncateTable(): void
5252
$this->waitForElement('id', 'functionConfirmOkButton')->click();
5353

5454
$success = $this->waitForElement('cssSelector', '.alert-success');
55-
self::assertStringContainsString('MySQL returned an empty result', $success->getText());
55+
self::assertStringContainsString('Table test_table has been emptied.', $success->getText());
5656

5757
$this->dbQuery(
5858
'SELECT CONCAT("Count: ", COUNT(*)) as c FROM `' . $this->databaseName . '`.`test_table`',

tests/end-to-end/Table/CreateTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ public function testCreateTable(): void
6060
$columnDropdownDetails = [
6161
'field_0_6' => 'UNSIGNED',
6262
'field_1_2' => 'VARCHAR',
63-
'field_1_5' => 'utf8mb4_general_ci',
6463
'field_1_4' => 'As defined:',
6564
];
6665

@@ -71,6 +70,13 @@ public function testCreateTable(): void
7170
)->click();
7271
}
7372

73+
// click to load select options
74+
$this->byId('field_1_5')->click();
75+
$this->waitForElement(
76+
'xpath',
77+
'//select[@id=\'field_1_5\']//option[contains(text(), \'utf8mb4_general_ci\')]',
78+
)->click();
79+
7480
$this->byName('field_default_value[1]')->sendKeys('def');
7581

7682
$this->scrollToBottom();

tests/end-to-end/Table/OperationsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public function testTruncateTable(): void
172172
$this->waitAjax();
173173

174174
$success = $this->waitForElement('cssSelector', '.alert-success');
175-
self::assertStringContainsString('MySQL returned an empty result set', $success->getText());
175+
self::assertStringContainsString('Table test_table has been emptied.', $success->getText());
176176

177177
$this->dbQuery(
178178
'SELECT CONCAT("Count: ", COUNT(*)) as c FROM `' . $this->databaseName . '`.test_table',
@@ -195,7 +195,7 @@ public function testDropTable(): void
195195
$this->waitAjax();
196196

197197
$success = $this->waitForElement('cssSelector', '.alert-success');
198-
self::assertStringContainsString('MySQL returned an empty result set', $success->getText());
198+
self::assertStringContainsString('Table test_table has been dropped.', $success->getText());
199199

200200
$this->dbQuery(
201201
'USE `' . $this->databaseName . '`;'

0 commit comments

Comments
 (0)