Merge pull request #1052 from mebjas/master

testing automated file uploading to remote server
This commit is contained in:
Michal Čihař 2014-03-12 19:49:25 +01:00
commit 7447bbab1a

View File

@ -25,6 +25,17 @@ class PMA_SeleniumImportTest extends PMA_SeleniumBase
public function setUpPage()
{
$this->login();
/**
* testing file upload to remote server
*/
$this->fileDetector(function($filename) {
if(file_exists($filename)) {
return $filename;
} else {
return NULL;
}
});
}
/**
@ -115,15 +126,12 @@ class PMA_SeleniumImportTest extends PMA_SeleniumBase
*/
private function _doImport($type)
{
/* FIXME: Need to implement file upload compatible with remote Selenium */
$this->markTestIncomplete(
'File uploading not yet implemented in Selenium test'
);
$this->waitForElement('byLinkText', "Import")->click();
$ele = $this->waitForElement("byId", "input_import_file");
$ele->value(
dirname(__FILE__) . "/../test_data/" . $type . "_import.sql"
);
//to implement file upload to remote server
$ele = $this->byName('import_file');
$this->sendKeys($ele, dirname(__FILE__) . "/../test_data/" . $type . "_import.sql");
$this->byId("buttonGo")->click();
$this->waitForElement(
"byXPath",