summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/tickets/tests/Ticket719TestCase.php')
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket719TestCase.php35
1 files changed, 19 insertions, 16 deletions
diff --git a/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
index c71cb0a8..46346ca1 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
@@ -1,42 +1,45 @@
<?php
-class Ticket719TestCase extends PradoGenericSeleniumTest
+class Ticket719TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("tickets/index.php?page=Ticket719");
- $this->verifyTextPresent("Verifying Ticket 719");
+ $this->url("tickets/index.php?page=Ticket719");
+ $this->assertContains("Verifying Ticket 719", $this->source());
$base="ctl0_Content_";
- $this->click("${base}ctl2");
+ $this->byId("${base}ctl2")->click();
$this->pause(800);
$this->assertVisible("${base}ctl0", 'Required');
$this->assertVisible("${base}ctl1", 'Required');
- $this->type("${base}autocomplete", 'f');
- $this->runScript("Prado.Registry.get('${base}autocomplete').onKeyPress({})");
+ $this->byId("${base}autocomplete")->click();
+
+ $this->keys('f');
$this->pause(500);
- $this->verifyTextPresent('Finland');
+ $this->assertContains('Finland', $this->source());
- $this->type("${base}autocomplete", 'fr');
- $this->runScript("Prado.Registry.get('${base}autocomplete').onKeyPress({})");
+ $this->keys('r');
$this->pause(500);
- $this->verifyTextPresent('French');
+ $this->assertContains('French', $this->source());
- $this->type("${base}autocomplete", 'fra');
- $this->runScript("Prado.Registry.get('${base}autocomplete').onKeyPress({})");
+ $this->keys('a');
$this->pause(500);
- $this->verifyTextPresent('France');
+ $this->assertContains('France', $this->source());
- $this->click("css=#${base}autocomplete_result ul li");
+ $this->byCssSelector("#${base}autocomplete_result ul li")->click();
$this->pause(800);
$this->assertNotVisible("${base}ctl1");
- $this->type("${base}textbox", "Prado");
+ $this->byId("${base}textbox")->clear();
+ $this->byId("${base}textbox")->value('Prado');
+ // trigger onblur() event
+ $this->byCssSelector('body')->click();
+
$this->assertNotVisible("${base}ctl0");
- $this->click("${base}ctl2");
+ $this->byId("${base}ctl2")->click();
$this->pause(800);
$this->assertText("${base}Result", "TextBox Content : Prado -- Autocomplete Content :France");
}