|
1
|
|
|
|
|
|
|
|
|
|
2
|
|
|
<?php |
|
3
|
|
|
|
|
4
|
|
|
class AnnotationCest extends CestCase |
|
5
|
|
|
{ |
|
6
|
|
|
|
|
7
|
|
|
private $annotationBlock = [ |
|
8
|
|
|
'fields' => [ |
|
9
|
|
|
'name' => '20:00 - Zahájení srazu', |
|
10
|
|
|
'description' => '', |
|
11
|
|
|
'tutor' => 'Tomáš Litera', |
|
12
|
|
|
'email' => '[email protected]', |
|
13
|
|
|
'capacity' => '0', |
|
14
|
|
|
], |
|
15
|
|
|
]; |
|
16
|
|
|
|
|
17
|
|
|
private $annotationProgram = [ |
|
18
|
|
|
'fields' => [ |
|
19
|
|
|
'name' => 'Hry a hříčky', |
|
20
|
|
|
'description' => 'sflvbhflevblf', |
|
21
|
|
|
'material' => '', |
|
22
|
|
|
'tutor' => '', |
|
23
|
|
|
'email' => '[email protected],[email protected]', |
|
24
|
|
|
'capacity' => '200', |
|
25
|
|
|
], |
|
26
|
|
|
]; |
|
27
|
|
|
|
|
28
|
|
|
public function _before(AcceptanceTester $I) |
|
|
|
|
|
|
29
|
|
|
{ |
|
30
|
|
|
} |
|
31
|
|
|
|
|
32
|
|
|
public function _after(AcceptanceTester $I) |
|
|
|
|
|
|
33
|
|
|
{ |
|
34
|
|
|
} |
|
35
|
|
|
|
|
36
|
|
|
// tests |
|
37
|
|
View Code Duplication |
public function ensure_that_block_annotation_works(\AcceptanceTester $I) |
|
|
|
|
|
|
38
|
|
|
{ |
|
39
|
|
|
$I->wantTo('Ensure that blocks annotation works'); |
|
40
|
|
|
$I = $this->logIn($I); |
|
41
|
|
|
$I->amOnPage('/srazvs/block/edit/2?page=block'); |
|
42
|
|
|
$I->see('úprava bloku'); |
|
43
|
|
|
$I->click('Náhled anotace', '#content'); |
|
44
|
|
|
$I->seeInCurrentUrl('/srazvs/block/annotation/382ff1c792c7980aa0b1950259a518e8'); |
|
45
|
|
|
foreach ($this->annotationBlock['fields'] as $field => $value) { |
|
46
|
|
|
$I->seeInField($field, $value); |
|
47
|
|
|
} |
|
48
|
|
|
} |
|
49
|
|
|
|
|
50
|
|
View Code Duplication |
public function ensure_that_program_annotation_works(\AcceptanceTester $I) |
|
|
|
|
|
|
51
|
|
|
{ |
|
52
|
|
|
$I->wantTo('Ensure that programs annotation works'); |
|
53
|
|
|
$I = $this->logIn($I); |
|
54
|
|
|
$I->amOnPage('/srazvs/program/edit/1?page=program'); |
|
55
|
|
|
$I->see('úprava programu'); |
|
56
|
|
|
$I->click('Náhled anotace', '#content'); |
|
57
|
|
|
$I->seeInCurrentUrl('/srazvs/program/annotation/524888c93f896f388d563f68682cf41c'); |
|
58
|
|
|
foreach ($this->annotationProgram['fields'] as $field => $value) { |
|
59
|
|
|
$I->seeInField($field, $value); |
|
60
|
|
|
} |
|
61
|
|
|
} |
|
62
|
|
|
|
|
63
|
|
View Code Duplication |
public function block_annotation_should_be_accessible_by_public(\AcceptanceTester $I) |
|
|
|
|
|
|
64
|
|
|
{ |
|
65
|
|
|
$I->wantTo('Ensure that blocks annotation is accesible by public'); |
|
66
|
|
|
$I->amOnPage('/srazvs/block/annotation/382ff1c792c7980aa0b1950259a518e8'); |
|
67
|
|
|
foreach ($this->annotationBlock['fields'] as $field => $value) { |
|
68
|
|
|
$I->seeInField($field, $value); |
|
69
|
|
|
} |
|
70
|
|
|
} |
|
71
|
|
|
|
|
72
|
|
View Code Duplication |
public function program_annotation_should_be_accessible_by_public(\AcceptanceTester $I) |
|
|
|
|
|
|
73
|
|
|
{ |
|
74
|
|
|
$I->wantTo('Ensure that programs annotation is accesible by public'); |
|
75
|
|
|
$I->amOnPage('/srazvs/program/annotation/524888c93f896f388d563f68682cf41c'); |
|
76
|
|
|
foreach ($this->annotationProgram['fields'] as $field => $value) { |
|
77
|
|
|
$I->seeInField($field, $value); |
|
78
|
|
|
} |
|
79
|
|
|
} |
|
80
|
|
|
|
|
81
|
|
|
} |
|
82
|
|
|
|