@@ -167,6 +167,33 @@ module.exports = {
167
167
browser . expect . element ( "#output-text .cm-status-bar .eol-value" ) . text . to . equal ( "LF" ) ;
168
168
} ,
169
169
170
+ "Autobaking the latest input" : browser => {
171
+ // Use the sleep recipe to simulate a long running task
172
+ utils . loadRecipe ( browser , "Sleep" , "input" , [ 2000 ] ) ;
173
+
174
+ browser . waitForElementVisible ( "#stale-indicator" ) ;
175
+
176
+ // Enable previously disabled autobake
177
+ browser . click ( "#auto-bake-label" ) ;
178
+
179
+ browser . sendKeys ( "#input-text .cm-content" , "1" ) ;
180
+
181
+ browser . pause ( 500 ) ;
182
+
183
+ // Make another change while the previous input is being baked
184
+ browser . sendKeys ( "#input-text .cm-content" , "2" ) ;
185
+
186
+ browser
187
+ . waitForElementNotVisible ( "#stale-indicator" )
188
+ . waitForElementNotVisible ( "#output-loader" ) ;
189
+
190
+ // Ensure we got the latest input baked
191
+ utils . expectOutput ( browser , "input12" ) ;
192
+
193
+ // Turn autobake off again
194
+ browser . click ( "#auto-bake-label" ) ;
195
+ } ,
196
+
170
197
"Special content" : browser => {
171
198
/* Special characters are rendered correctly */
172
199
utils . setInput ( browser , SPECIAL_CHARS , false ) ;
@@ -645,6 +672,20 @@ module.exports = {
645
672
} ,
646
673
647
674
"Loading from URL" : browser => {
675
+ utils . clear ( browser ) ;
676
+
677
+ /* Side panel displays correct info */
678
+ utils . uploadFile ( browser , "files/TowelDay.jpeg" ) ;
679
+
680
+ browser
681
+ . waitForElementVisible ( "#input-text .cm-file-details" )
682
+ . waitForElementVisible ( "#input-text .cm-file-details .file-details-toggle-shown" )
683
+ . waitForElementVisible ( "#input-text .cm-file-details .file-details-thumbnail" )
684
+ . waitForElementVisible ( "#input-text .cm-file-details .file-details-name" )
685
+ . waitForElementVisible ( "#input-text .cm-file-details .file-details-size" )
686
+ . waitForElementVisible ( "#input-text .cm-file-details .file-details-type" )
687
+ . waitForElementVisible ( "#input-text .cm-file-details .file-details-loaded" ) ;
688
+
648
689
/* Complex deep link populates the input correctly (encoding, eol, input) */
649
690
browser
650
691
. urlHash ( "recipe=To_Base64('A-Za-z0-9%2B/%3D')&input=VGhlIHNoaXBzIGh1bmcgaW4gdGhlIHNreSBpbiBtdWNoIHRoZSBzYW1lIHdheSB0aGF0IGJyaWNrcyBkb24ndC4M&ienc=21866&oenc=1201&ieol=FF&oeol=PS" )
0 commit comments