summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php
blob: d5064c1eba7e35482380d6ba92cbf3e08219f5f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php

class Ticket587TestCase extends PradoGenericSeleniumTest
{
	function testKeyPress()
	{
		$base = 'ctl0_Content_';
		$this->open('tickets/index.php?page=Ticket587_reopened');
		$this->assertTitle("Verifying Ticket 587_reopened");

		$this->assertText($base."label1", "Label 1");
		$this->select($base."list1", "item 3");
		$this->pause(800);
		$this->select($base."list2", "value 3 - item 4");
		$this->pause(800);
		$this->assertText($base."label1", "Selection 2: value 3 - item 4");

		$this->type($base.'text1', 't');
		$this->runScript("Prado.Registry.get('{$base}text1').onKeyPress({})");
		$this->pause(800);
		$this->select($base."list2", "asd 3 - item 2");
		$this->pause(800);
		$this->assertText($base."label1", "Selection 2: asd 3 - item 2");
	}

	function testButtonClick()
	{
		$base = 'ctl0_Content_';
		$this->open('tickets/index.php?page=Ticket587_reopened');
		$this->assertTitle("Verifying Ticket 587_reopened");

		$this->assertText($base."label1", "Label 1");
		$this->select($base."list1", "item 3");
		$this->pause(800);
		$this->select($base."list2", "value 3 - item 4");
		$this->pause(800);
		$this->assertText($base."label1", "Selection 2: value 3 - item 4");

		$this->click($base.'button6');
		$this->pause(800);
		$this->select($base."list2", "asd 3 - item 2");
		$this->pause(800);
		$this->assertText($base."label1", "Selection 2: asd 3 - item 2");
	}
}