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