summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php
blob: f7cbe814ff58e30bcd6b5a23adc67952dd4d0c61 (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
<?php

class Ticket207TestCase extends PradoGenericSelenium2Test
{
	function test()
	{
		$base = 'ctl0_Content_';
		$this->url('tickets/index.php?page=Ticket207');
		$this->assertEquals($this->title(), "Verifying Ticket 207");
		$this->assertNotVisible("{$base}validator1");
		$this->assertNotVisible("{$base}validator2");

		$this->click("{$base}button1");
		$this->assertAlert('error on text1 fired');
		$this->assertVisible("{$base}validator1");
		$this->assertVisible("{$base}validator2");

		$this->type("{$base}text1", 'test');
		$this->assertVisible("{$base}validator1");
		$this->assertVisible("{$base}validator2");

		$this->click("{$base}button1");
		$this->assertNotVisible("{$base}validator1");
		$this->assertVisible("{$base}validator2");

		$this->type("{$base}text1", '');
		$this->assertNotVisible("{$base}validator1");
		$this->assertVisible("{$base}validator2");

		$this->click("{$base}button1");
		$this->assertAlert('error on text1 fired');
		$this->assertVisible("{$base}validator1");
		$this->assertVisible("{$base}validator2");
	}
}