summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/quickstart/JuiControls/JuiAutoCompleteTestCase.php
diff options
context:
space:
mode:
authorDavid <ottodavid@gmx.net>2014-11-21 22:14:00 +0100
committerDavid <ottodavid@gmx.net>2014-11-21 22:14:00 +0100
commit6d52f5c4461bd26c4e1dea68686d88c71a9d3e22 (patch)
treed629ca00a7d2a902d5d7e6724abda9f7bbcbcc8a /tests/FunctionalTests/quickstart/JuiControls/JuiAutoCompleteTestCase.php
parentac6eeca7dedbd74a60f507a8e7ec345394fb90aa (diff)
TJuiAutoComplete multiselection + quickstart doc
implemented Separator, minChars and Frequency properties, added the related quickstart parts
Diffstat (limited to 'tests/FunctionalTests/quickstart/JuiControls/JuiAutoCompleteTestCase.php')
-rwxr-xr-xtests/FunctionalTests/quickstart/JuiControls/JuiAutoCompleteTestCase.php50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/FunctionalTests/quickstart/JuiControls/JuiAutoCompleteTestCase.php b/tests/FunctionalTests/quickstart/JuiControls/JuiAutoCompleteTestCase.php
new file mode 100755
index 00000000..a3c1ff78
--- /dev/null
+++ b/tests/FunctionalTests/quickstart/JuiControls/JuiAutoCompleteTestCase.php
@@ -0,0 +1,50 @@
+<?php
+
+
+/**
+ * Testcase for TJuiAutoComplete
+ */
+class JuiAutoCompleteTestCase extends PradoGenericSelenium2Test
+{
+ function test ()
+ {
+ $this->url("../../demos/quickstart/index.php?page=JuiControls.Samples.TJuiAutoComplete.Home&amp;notheme=true&amp;lang=en");
+
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
+
+ $this->assertContains('TJuiAutoComplete Samples', $this->source());
+
+ $base = 'ctl0_body_';
+
+
+ $this->assertText("{$base}Selection1", "");
+
+ $this->byId("{$base}AutoComplete")->click();
+ $this->keys('J');
+ $this->pause(800);
+ $this->assertContains('John', $this->source());
+
+ $this->byCssSelector("#{$base}AutoComplete_result ul li")->click();
+ $this->pause(800);
+ $this->assertValue("{$base}AutoComplete", "John");
+ $this->assertText("{$base}Selection1", "Selected ID: 1");
+
+
+ $this->byId("{$base}AutoComplete2")->click();
+ $this->keys('Joh');
+ $this->pause(800);
+ $this->byCssSelector("#{$base}AutoComplete2_result ul li")->click();
+ $this->pause(800);
+ $this->assertValue("{$base}AutoComplete2", "John");
+ $this->assertText("{$base}Selection2", "Selected ID: 1");
+
+ //$this->keys(PHPUnit_Extensions_Selenium2TestCase_Keys::END);
+ $this->keys(',Ge');
+ $this->pause(800);
+ $this->byCssSelector("#{$base}AutoComplete2_result ul li")->click();
+ $this->pause(500);
+ $this->assertValue("{$base}AutoComplete2", "John,George");
+ $this->assertText("{$base}Selection2", "Selected ID: 3");
+
+ }
+}