summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php
blob: e5595a13f3026ecf79bd86ba1c86c0e65ead9a5c (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
50
51
52
53
<?php

class Ticket239TestCase extends PradoGenericSelenium2Test
{
	function test()
	{
		$this->url('tickets/index.php?page=Ticket239');

		// view1
		$this->assertContains('view1 is activated', $this->source());
		$this->assertNotContains('view1 is deactivated', $this->source());
		$this->assertNotContains('view2 is activated', $this->source());
		$this->assertNotContains('view2 is deactivated', $this->source());
		$this->assertNotContains('view3 is activated', $this->source());
		$this->assertNotContains('view3 is deactivated', $this->source());

		// goto view2
		$this->byName('ctl0$Content$ctl1')->click();
		$this->assertNotContains('view1 is activated', $this->source());
		$this->assertContains('view1 is deactivated', $this->source());
		$this->assertContains('view2 is activated', $this->source());
		$this->assertNotContains('view2 is deactivated', $this->source());
		$this->assertNotContains('view3 is activated', $this->source());
		$this->assertNotContains('view3 is deactivated', $this->source());

		// goto view3
		$this->byName('ctl0$Content$ctl3')->click();
		$this->assertNotContains('view1 is activated', $this->source());
		$this->assertNotContains('view1 is deactivated', $this->source());
		$this->assertNotContains('view2 is activated', $this->source());
		$this->assertContains('view2 is deactivated', $this->source());
		$this->assertContains('view3 is activated', $this->source());
		$this->assertNotContains('view3 is deactivated', $this->source());

		// goto view2
		$this->byName('ctl0$Content$ctl4')->click();
		$this->assertNotContains('view1 is activated', $this->source());
		$this->assertNotContains('view1 is deactivated', $this->source());
		$this->assertContains('view2 is activated', $this->source());
		$this->assertNotContains('view2 is deactivated', $this->source());
		$this->assertNotContains('view3 is activated', $this->source());
		$this->assertContains('view3 is deactivated', $this->source());

		// goto view1
		$this->byName('ctl0$Content$ctl2')->click();
		$this->assertContains('view1 is activated', $this->source());
		$this->assertNotContains('view1 is deactivated', $this->source());
		$this->assertNotContains('view2 is activated', $this->source());
		$this->assertContains('view2 is deactivated', $this->source());
		$this->assertNotContains('view3 is activated', $this->source());
		$this->assertNotContains('view3 is deactivated', $this->source());
	}
}