diff options
Diffstat (limited to 'tests/FunctionalTests/quickstart')
-rwxr-xr-x | tests/FunctionalTests/quickstart/JuiControls/JuiDialogTestCase.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/FunctionalTests/quickstart/JuiControls/JuiDialogTestCase.php b/tests/FunctionalTests/quickstart/JuiControls/JuiDialogTestCase.php new file mode 100755 index 00000000..576582e6 --- /dev/null +++ b/tests/FunctionalTests/quickstart/JuiControls/JuiDialogTestCase.php @@ -0,0 +1,35 @@ +<?php + + +/** + * Testcase for TJuiDialog + */ +class JuiDialogTestCase extends PradoGenericSelenium2Test +{ + function test () + { + $this->url("../../demos/quickstart/index.php?page=JuiControls.Samples.TJuiDialog.Home&notheme=true&lang=en"); + + $this->assertEquals("PRADO QuickStart Sample", $this->title()); + + $this->assertContains('TJuiDialog Samples', $this->source()); + + $base = 'ctl0_body_'; + + + $this->byId("${base}ctl0")->click(); + $this->pause(500); + $this->assertVisible("${base}dlg1"); + + + $this->assertEmpty($this->byId("${base}lbl3")->text()); + $this->byId("${base}ctl2")->click(); + $this->pause(500); + $this->assertVisible("${base}dlg3"); + + // Click OK (by keys...) + $this->keys(PHPUnit_Extensions_Selenium2TestCase_Keys::ENTER); + $this->pause(500); + $this->assertEquals('Button Ok clicked', $this->byId("${base}lbl3")->text()); + } +} |