1 | <?php |
||
34 | class TextEditorContext extends RawMinkContext implements Context { |
||
35 | |||
36 | private $textEditorPage; |
||
37 | private $webUIGeneralContext; |
||
38 | private $webUIFilesContext; |
||
39 | |||
40 | /** |
||
41 | * TextEditorContext constructor. |
||
42 | * |
||
43 | * @param TextEditorPage $textEditorPage |
||
44 | */ |
||
45 | public function __construct(TextEditorPage $textEditorPage) { |
||
48 | |||
49 | /** |
||
50 | * @When /^the user creates a text file with the name ((?:'[^']*')|(?:"[^"]*")) using the webUI( without changing the default file extension|)$/ |
||
51 | * |
||
52 | * @param string $name |
||
53 | * @param string $useDefaultFileExtension |
||
54 | * |
||
55 | * @return void |
||
56 | */ |
||
57 | public function createATextFileWithTheNameUsingTheWebUI( |
||
71 | |||
72 | |||
73 | /** |
||
74 | * @Then near the new text file box a tooltip with the text :toolTipText should be displayed on the webUI |
||
75 | * |
||
76 | * @param string $toolTipText |
||
77 | * |
||
78 | * @return void |
||
79 | */ |
||
80 | public function nearTheNewTextFileBoxATooltipShouldBeDisplayedOnTheWebUI( |
||
88 | |||
89 | /** |
||
90 | * @When the user inputs :text in the text area |
||
91 | * |
||
92 | * @param string $text |
||
93 | * |
||
94 | * @return void |
||
95 | */ |
||
96 | public function theUserInputsTextInTheTextArea($text) { |
||
102 | |||
103 | /** |
||
104 | * @When the user inputs the following text in the text area: |
||
105 | * |
||
106 | * @param PyStringNode $multiLineText |
||
107 | * |
||
108 | * @return void |
||
109 | */ |
||
110 | public function theUserInputsTheFollowingInTheTextArea( |
||
118 | |||
119 | /** |
||
120 | * @Then there should be :number line(s) of text in the text area |
||
121 | * |
||
122 | * @param int $number |
||
123 | * |
||
124 | * @return void |
||
125 | */ |
||
126 | public function thereShouldBeLinesOfTextInTheTextArea($number) { |
||
132 | |||
133 | /** |
||
134 | * @Then line :number of the text should be :text |
||
135 | * |
||
136 | * @param int $number |
||
137 | * @param string $text |
||
138 | * |
||
139 | * @return void |
||
140 | */ |
||
141 | public function lineOfTheTextShouldBe($number, $text) { |
||
149 | /** |
||
150 | * @When the user closes the text editor |
||
151 | * |
||
152 | * @return void |
||
153 | */ |
||
154 | public function theUserClosesTheTextEditor() { |
||
157 | |||
158 | /** |
||
159 | * general before scenario for all text editor tests. |
||
160 | * This will run before EVERY scenario. |
||
161 | * It will set the properties for this object. |
||
162 | * |
||
163 | * @BeforeScenario |
||
164 | * |
||
165 | * @param BeforeScenarioScope $scope |
||
166 | * |
||
167 | * @return void |
||
168 | */ |
||
169 | public function before(BeforeScenarioScope $scope) { |
||
177 | } |
||
178 |