Fix failing Selenium tests
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
d1c6861b2c
commit
1a611a9641
@ -9635,11 +9635,6 @@ parameters:
|
||||
count: 1
|
||||
path: test/selenium/Database/OperationsTest.php
|
||||
|
||||
-
|
||||
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotNull\\(\\) with Facebook\\\\WebDriver\\\\Remote\\\\RemoteWebElement will always evaluate to true\\.$#"
|
||||
count: 1
|
||||
path: test/selenium/Database/StructureTest.php
|
||||
|
||||
-
|
||||
message: "#^Call to function is_string\\(\\) with non\\-falsy\\-string will always evaluate to true\\.$#"
|
||||
count: 2
|
||||
|
||||
@ -107,11 +107,10 @@ class OperationsTest extends TestBase
|
||||
$this->scrollIntoView('copy_db_form', -150);
|
||||
$this->byCssSelector('form#copy_db_form input[name="submit_copy"]')->click();
|
||||
|
||||
$this->waitForElement(
|
||||
'xpath',
|
||||
"//div[@class='alert alert-success' and contains(., 'Database "
|
||||
. $this->databaseName
|
||||
. ' has been copied to ' . $newDbName . "')]",
|
||||
$success = $this->waitForElement('cssSelector', '.alert-success');
|
||||
$this->assertStringContainsString(
|
||||
'Database ' . $this->databaseName . ' has been copied to ' . $newDbName,
|
||||
$success->getText(),
|
||||
);
|
||||
|
||||
$this->dbQuery(
|
||||
|
||||
@ -108,10 +108,7 @@ class ImportTest extends TestBase
|
||||
$this->waitUntilElementIsVisible('id', 'buttonGo', 30);
|
||||
$this->byId('buttonGo')->click();
|
||||
|
||||
$this->waitUntilElementIsVisible(
|
||||
'xpath',
|
||||
"//div[@class='alert alert-success' and contains(., 'Import has been successfully')]",
|
||||
30,
|
||||
);
|
||||
$success = $this->waitUntilElementIsVisible('cssSelector', '.alert-success', 30);
|
||||
$this->assertStringContainsString('Import has been successfully', $success->getText());
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,11 +42,8 @@ class ServerSettingsTest extends TestBase
|
||||
$this->moveto($ele);
|
||||
$ele->click();
|
||||
|
||||
$this->waitUntilElementIsPresent(
|
||||
'xpath',
|
||||
"//div[@class='alert alert-success' and contains(., 'Configuration has been saved')]",
|
||||
5000,
|
||||
);
|
||||
$success = $this->waitUntilElementIsPresent('cssSelector', '.alert-success', 5000);
|
||||
$this->assertStringContainsString('Configuration has been saved', $success->getText());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -61,11 +61,8 @@ class OperationsTest extends TestBase
|
||||
|
||||
$this->waitAjax();
|
||||
|
||||
$this->waitForElement(
|
||||
'xpath',
|
||||
"//div[@class='alert alert-success' and "
|
||||
. "contains(., 'Your SQL query has been executed successfully')]",
|
||||
);
|
||||
$success = $this->waitForElement('cssSelector', '.alert-success');
|
||||
$this->assertStringContainsString('Your SQL query has been executed successfully', $success->getText());
|
||||
|
||||
$this->byPartialLinkText('Browse')->click();
|
||||
|
||||
@ -91,12 +88,11 @@ class OperationsTest extends TestBase
|
||||
$this->byCssSelector("form#moveTableForm input[type='submit']")->click();
|
||||
$this->waitAjax();
|
||||
|
||||
$this->waitForElement(
|
||||
'xpath',
|
||||
"//div[@class='alert alert-success' and "
|
||||
. "contains(., 'Table `" . $this->databaseName
|
||||
. '`.`test_table` has been '
|
||||
. 'moved to `' . $this->databaseName . "`.`test_table2`.')]",
|
||||
$success = $this->waitForElement('cssSelector', '.alert-success');
|
||||
$this->assertStringContainsString(
|
||||
'Table `' . $this->databaseName . '`.`test_table` has been moved to `'
|
||||
. $this->databaseName . '`.`test_table2`',
|
||||
$success->getText(),
|
||||
);
|
||||
|
||||
$this->dbQuery(
|
||||
@ -126,11 +122,8 @@ class OperationsTest extends TestBase
|
||||
$this->byCssSelector("form#tableOptionsForm input[type='submit']")->click();
|
||||
$this->waitAjax();
|
||||
|
||||
$this->waitForElement(
|
||||
'xpath',
|
||||
"//div[@class='alert alert-success' and "
|
||||
. "contains(., 'Table test_table has been renamed to test_table2')]",
|
||||
);
|
||||
$success = $this->waitForElement('cssSelector', '.alert-success');
|
||||
$this->assertStringContainsString('Table test_table has been renamed to test_table2', $success->getText());
|
||||
|
||||
$this->dbQuery(
|
||||
'USE `' . $this->databaseName . '`;'
|
||||
@ -156,12 +149,11 @@ class OperationsTest extends TestBase
|
||||
$this->waitForElement('cssSelector', 'form#copyTable input[type=\'submit\']')->click();
|
||||
$this->waitAjax();
|
||||
|
||||
$this->waitForElement(
|
||||
'xpath',
|
||||
"//div[@class='alert alert-success' and "
|
||||
. "contains(., 'Table `" . $this->databaseName
|
||||
. '`.`test_table` has been '
|
||||
. 'copied to `' . $this->databaseName . "`.`test_table2`.')]",
|
||||
$success = $this->waitForElement('cssSelector', '.alert-success');
|
||||
$this->assertStringContainsString(
|
||||
'Table `' . $this->databaseName . '`.`test_table` has been copied to `'
|
||||
. $this->databaseName . '`.`test_table2`',
|
||||
$success->getText(),
|
||||
);
|
||||
|
||||
$this->dbQuery(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user