summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php
blob: a3e25e8548dfb2a852bd8c291ab5be6fdb7d6f20 (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
46
47
48
49
<?php

class Ticket470TestCase extends PradoGenericSelenium2Test
{
	function test()
	{
		$base = 'ctl0_Content_';
		$this->url('tickets/index.php?page=Ticket470');
		$this->assertEquals("Verifying Ticket 470", $this->title());
		$this->assertText("{$base}counter", "0");
		$this->assertText("{$base}Results", "");
		$this->assertNotVisible("{$base}validator1");

		$this->byId("{$base}button1")->click();
		$this->pause(800);
		$this->assertText("{$base}counter", "0");
		$this->assertText("{$base}Results", "");
		$this->assertVisible("{$base}validator1");

		$this->type("{$base}TextBox", "hello");
		$this->byId("{$base}button1")->click();
		$this->pause(800);
		$this->assertText("{$base}counter", "0");
		$this->assertText("{$base}Results", "OK!!!");
		$this->assertNotVisible("{$base}validator1");

		//reload
		$this->byId("{$base}reloadButton")->click();
		$this->pause(800);
		$this->assertValue("{$base}TextBox", "hello");
		$this->assertText("{$base}counter", "1");
		$this->assertText("{$base}Results", "");
		$this->assertNotVisible("{$base}validator1");

		$this->type("{$base}TextBox", "");
		$this->byId("{$base}button1")->click();
		$this->pause(800);
		$this->assertText("{$base}counter", "1");
		$this->assertText("{$base}Results", "");
		$this->assertVisible("{$base}validator1");

		$this->type("{$base}TextBox", "test");
		$this->byId("{$base}button1")->click();
		$this->pause(800);
		$this->assertText("{$base}counter", "1");
		$this->assertText("{$base}Results", "OK!!!");
		$this->assertNotVisible("{$base}validator1");
	}
}