Merge branch 'master' of github.com:phpmyadmin/phpmyadmin

This commit is contained in:
Michal Čihař 2017-08-21 11:48:07 +02:00
commit 02f8195581
5 changed files with 48 additions and 18 deletions

View File

@ -39,9 +39,7 @@ if ($type_upper == 'BIT') {
<textarea name="field_default_value[<?= $columnNumber; ?>]"
cols="15"
class="textfield
default_value">
<?= htmlspecialchars($defaultValue); ?>
</textarea>
default_value"><?= htmlspecialchars($defaultValue); ?></textarea>
<?php else: ?>
<input type="text"
name="field_default_value[<?= $columnNumber; ?>]"

View File

@ -122,8 +122,8 @@ class PMA_SeleniumCreateRemoveUserTest extends PMA_SeleniumBase
"(//input[@name='selected_usr[]'])[@value='" . $temp . "']"
)->click();
$this->byId("checkbox_drop_users_db")->click();
$this->scrollIntoView('fieldset_delete_user_footer');
$this->byId("checkbox_drop_users_db")->click();
$this->byId("buttonGo")->click();
$this->waitForElement("byCssSelector", "button.submitOK")->click();

View File

@ -124,6 +124,30 @@ class PMA_SeleniumDbEventsTest extends PMA_SeleniumBase
$this->byName("item_ends")->click();
$this->keys(date('Y-m-d', strtotime('+1 day')));
// Dynamic wait, retry if complete text not typed
$this->waitUntil(function () {
$startDate = date('Y-m-d', strtotime('-1 day'));
if ($this->byName('item_starts')->value() === $startDate) {
return true;
}
$this->byName("item_starts")->clear();
$this->byName("item_starts")->click();
$this->keys($startDate);
return null;
}, 5000);
$this->waitUntil(function () {
$endDate = date('Y-m-d', strtotime('+1 day'));
if ($this->byName('item_ends')->value() === $endDate) {
return true;
}
$this->byName("item_ends")->clear();
$this->byName("item_ends")->click();
$this->keys($endDate);
return null;
}, 5000);
$ele = $this->waitForElement('byName', "item_interval_value");
$ele->value('1');
@ -142,6 +166,9 @@ class PMA_SeleniumDbEventsTest extends PMA_SeleniumBase
'//div[@id=\'alertLabel\' and not(contains(@style,\'display: none;\'))]'
);
// Refresh the page
$this->url($this->url());
$this->assertTrue(
$this->isElementPresent(
'byXPath',

View File

@ -53,6 +53,17 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
$this->login();
$this->navigateTable('test_table');
$this->waitForElementNotPresent('byId', 'ajax_message_num_1');
usleep(1000000); // let the page load
// Dynamic wait
$this->waitUntil(function () {
if (trim($this->getCellByTableClass('table_results', 1, 5)) === '1') {
return true;
}
return null;
}, 5000);
}
/**
@ -64,9 +75,6 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
*/
public function testSortRecords()
{
$this->waitForElementNotPresent('byId', 'ajax_message_num_1');
usleep(1000000); // let the page load
// case 1
$this->byPartialLinkText("name")->click();
$this->waitForElementNotPresent('byId', 'ajax_message_num_1');
@ -158,9 +166,6 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
*/
public function testChangeRecords()
{
$this->waitForElementNotPresent('byId', 'ajax_message_num_1');
$this->sleep();
$ele = $this->byCssSelector(
"table.table_results tbody tr:nth-child(2) td:nth-child(2)"
);
@ -223,7 +228,6 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
*/
public function testChangeRecordsByDoubleClick()
{
$this->waitForElementNotPresent('byId', 'ajax_message_num_1');
$element = $this->byCssSelector(
"table.table_results tbody tr:nth-child(1) td:nth-child(6)"
);
@ -267,9 +271,6 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
*/
public function testCopyRecords()
{
$this->waitForElementNotPresent('byId', 'ajax_message_num_1');
$this->sleep();
$ele = $this->byCssSelector(
"table.table_results tbody tr:nth-child(3) td:nth-child(3)"
);
@ -323,7 +324,6 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
*/
public function testSearchRecords()
{
$this->waitForElementNotPresent('byId', 'ajax_message_num_1');
$this->expandMore();
$this->byPartialLinkText("Search")->click();
@ -362,9 +362,6 @@ class PMA_SeleniumTableBrowseTest extends PMA_SeleniumBase
*/
public function testDeleteRecords()
{
$this->waitForElementNotPresent('byId', 'ajax_message_num_1');
usleep(1000000);
$this->byId("id_rows_to_delete1_left")->click();
$this->byId("id_rows_to_delete2_left")->click();

View File

@ -56,6 +56,14 @@ class PMA_SeleniumTableStructureTest extends PMA_SeleniumBase
$this->waitForElementNotPresent('byId', 'ajax_message_num_1');
$this->waitForElement("byId", "tablestructure");
usleep(1000000);
// Dynamic wait
$this->waitUntil(function () {
if (trim($this->getCellByTableId('tablestructure', 2, 2)) === '2') {
return true;
}
return null;
}, 5000);
}
/**