summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2013-09-28 17:05:05 +0200
committerFabio Bas <ctrlaltca@gmail.com>2013-09-28 17:05:05 +0200
commit6b73f119a4e12c8e4b09f95463eec9be7626dec5 (patch)
treed11ff8342d3fff4ccf77b854681ba49fbab33841 /tests/FunctionalTests/active-controls
parente3a4bc286206a7cb11e78e80fd42980e5a298cd1 (diff)
More functional test porting
Diffstat (limited to 'tests/FunctionalTests/active-controls')
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php40
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/CalculatorTestCase.php2
2 files changed, 19 insertions, 23 deletions
diff --git a/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php b/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php
index 063e3d08..2033d6ff 100755
--- a/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php
@@ -4,43 +4,39 @@ class AutoCompleteTestCase extends PradoGenericSeleniumTest
{
function test()
{
- $this->disabled();
-
$this->open("active-controls/index.php?page=AutoCompleteTest");
$this->verifyTextPresent("TAutoComplete Test");
$this->assertText("label1", "Label 1");
- $this->keyPress("textbox3", 'a');
- $this->pause(1000);
+ $this->type("textbox3", 'a');
+ $this->runScript('Prado.Registry.get(\'textbox3\').onKeyPress({})');
+ $this->pause(500);
$this->verifyTextPresent('Andorra');
- $this->keyPress("textbox3", 'u');
- $this->pause(1000);
+ $this->assertText("label1", "suggestion for a");
+
+ $this->type("textbox3", 'au');
+ $this->runScript('Prado.Registry.get(\'textbox3\').onKeyPress({})');
+ $this->pause(500);
$this->verifyTextPresent('Australia');
- $this->click("heading"); //click somewhere else.
- $this->pause(800);
$this->assertText("label1", "suggestion for au");
+
$this->click("css=#textbox3_result ul li");
- $this->pause(800);
+ $this->pause(500);
$this->assertText("label1", "Label 1: Austria");
- $this->keyPress("textbox2", "c");
- $this->pause(800);
- $this->keyPress("textbox2", "u");
- $this->pause(800);
+ $this->type("textbox2", "cu");
+ $this->runScript('Prado.Registry.get(\'textbox2\').onKeyPress({})');
+ $this->pause(500);
$this->click('css=#textbox2_result ul li');
- $this->pause(800);
+ $this->pause(500);
$this->assertText("label1", "Label 1: Cuba");
- $this->keyPress("textbox2", ",");
-
- $this->keyPress("textbox2", "m");
- $this->pause(800);
-
- $this->keyPress("textbox2", "e");
- $this->pause(800);
+ $this->type("textbox2", "Cuba,me");
+ $this->runScript('Prado.Registry.get(\'textbox2\').onKeyPress({})');
+ $this->pause(500);
$this->click('css=#textbox2_result ul li');
- $this->pause(800);
+ $this->pause(500);
$this->assertText("label1", "Label 1: Cuba,Mexico");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php b/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php
index 5e5e4daa..48960d39 100755
--- a/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php
@@ -15,7 +15,7 @@ class CalculatorTestCase extends PradoGenericSeleniumTest
$this->type("b", "5");
$this->click("sum");
- $this->pause(250);
+ $this->pause(500);
$this->assertNotVisible("summary");
$this->assertValue("c", "7");