5
5
*/
6
6
import { App } from "./app" ;
7
7
8
+ const showFullSignature =
9
+ "show(image, delay=400, wait=True, loop=False, clear=False)" ;
10
+
8
11
describe ( "Browser - autocomplete and signature help tests" , ( ) => {
9
12
// Enable flags to allow testing the toolkit interactions.
10
13
const app = new App ( ) ;
@@ -18,7 +21,7 @@ describe("Browser - autocomplete and signature help tests", () => {
18
21
19
22
// Initial completions
20
23
await app . findCompletionOptions ( [ "scroll" , "set_pixel" , "show" ] ) ;
21
- await app .findCompletionActiveOption ( "scroll(value )" ) ;
24
+ await app . findCompletionActiveOption ( "scroll(text )" ) ;
22
25
23
26
// Further refinement
24
27
await app . typeInEditor ( "h" ) ;
@@ -47,15 +50,15 @@ describe("Browser - autocomplete and signature help tests", () => {
47
50
48
51
await app . followCompletionOrSignatureDocumentionLink ( ) ;
49
52
50
- await app . findActiveDocumentationEntry ( "show(image)" ) ;
53
+ await app . findActiveDocumentationEntry ( showFullSignature ) ;
51
54
} ) ;
52
55
53
56
it ( "shows signature help after autocomplete" , async ( ) => {
54
57
await app . selectAllInEditor ( ) ;
55
58
await app . typeInEditor ( "from microbit import *\ndisplay.sho" ) ;
56
59
await app . acceptCompletion ( "show" ) ;
57
60
58
- await app . findSignatureHelp ( "show(image)" ) ;
61
+ await app . findSignatureHelp ( showFullSignature ) ;
59
62
} ) ;
60
63
61
64
it ( "does not insert brackets for import completion" , async ( ) => {
@@ -72,7 +75,7 @@ describe("Browser - autocomplete and signature help tests", () => {
72
75
// The closing bracket is autoinserted.
73
76
await app . typeInEditor ( "from microbit import *\ndisplay.show(" ) ;
74
77
75
- await app . findSignatureHelp ( "show(image)" ) ;
78
+ await app . findSignatureHelp ( showFullSignature ) ;
76
79
77
80
await app . followCompletionOrSignatureDocumentionLink ( ) ;
78
81
0 commit comments