Fix Import-related selenium tests
* Use $cfg['uploadDir'] = "./test/test_data" while importing * Prevents use of FileDetectors in remote file detectors etc. Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
This commit is contained in:
parent
6246c84021
commit
c28e2d4235
@ -48,6 +48,7 @@ after_script:
|
||||
- if [ -f vendor/bin/codacycoverage ] ; then php vendor/bin/codacycoverage clover || true ; fi
|
||||
- if [ -f php.log ] ; then cat php.log ; fi
|
||||
- if [ -f build/logs/phpunit.json ] ; then ./scripts/phpunit-top-tests build/logs/phpunit.json ; fi
|
||||
- if [ -f config.inc.php ] ; then rm -rf config.inc.php; fi
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
@ -2,3 +2,5 @@
|
||||
|
||||
./test/install-browserstack
|
||||
composer install --no-interaction
|
||||
|
||||
echo -e "<?php\n\$cfg['UploadDir'] = './test/test_data/';" > config.inc.php
|
||||
@ -110,15 +110,17 @@ 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"
|
||||
);
|
||||
$this->waitForElement('byPartialLinkText', "Import")->click();
|
||||
$this->waitForElementNotPresent('byId', 'ajax_message_num_1');
|
||||
$this->waitForElement("byId", "input_import_file");
|
||||
|
||||
$this->waitForElement('byCssSelector', 'label[for=radio_local_import_file]')->click();
|
||||
$this->select($this->byName("local_import_file"))
|
||||
->selectOptionByLabel($type . "_import.sql");
|
||||
|
||||
usleep(1000000);
|
||||
|
||||
$this->scrollToBottom();
|
||||
$this->byId("buttonGo")->click();
|
||||
$this->waitForElement(
|
||||
"byXPath",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user