-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #140 from yunair/fix_ws_signature
fix ws signature failed
- Loading branch information
Showing
16 changed files
with
238 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
*** Settings *** | ||
Suite Setup Setup Suite For Screenshots completion | ||
Resource ../Keywords.robot | ||
|
||
*** Variables *** | ||
${SIGNATURE_BOX} css:.lsp-signature-help | ||
|
||
*** Test Cases *** | ||
Triggers Signature Help After A Keystroke | ||
Setup Notebook Python Signature.ipynb | ||
Wait Until Fully Initialized | ||
Enter Cell Editor 1 line=6 | ||
Capture Page Screenshot 01-entered-cell.png | ||
Press Keys None ( | ||
Capture Page Screenshot 02-signature-shown.png | ||
Wait Until Keyword Succeeds 20x 0.5s Page Should Contain Element ${SIGNATURE_BOX} | ||
Element Should Contain ${SIGNATURE_BOX} Important docstring of abc() | ||
[Teardown] Clean Up After Working With File Signature.ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false, | ||
"jupyter": { | ||
"outputs_hidden": false | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"def abc(x=1):\n", | ||
" \"\"\"Important docstring of abc()\"\"\"\n", | ||
" pass\n", | ||
"\n", | ||
"\n", | ||
"abc" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"list" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.8.0" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import '../../style/console.css'; | ||
|
||
export abstract class EditorLogConsole { | ||
abstract log(...args: any[]): void; | ||
abstract warn(...args: any[]): void; | ||
abstract error(...args: any[]): void; | ||
} | ||
|
||
export class FloatingConsole extends EditorLogConsole { | ||
// likely to be replaced by JupyterLab console: https://github.com/jupyterlab/jupyterlab/pull/6833#issuecomment-543016425 | ||
element: HTMLElement; | ||
|
||
constructor() { | ||
super(); | ||
this.element = document.createElement('ul'); | ||
this.element.className = 'lsp-floating-console'; | ||
document.body.appendChild(this.element); | ||
} | ||
|
||
append(text: string, kind = 'log') { | ||
let entry = document.createElement('li'); | ||
entry.innerHTML = '<span class="lsp-kind">' + kind + '</span>' + text; | ||
this.element.appendChild(entry); | ||
this.element.scrollTop = this.element.scrollHeight; | ||
} | ||
|
||
private to_string(args: any[]) { | ||
return args | ||
.map(arg => '<span class="lsp-code">' + JSON.stringify(arg) + '</span>') | ||
.join(', '); | ||
} | ||
|
||
log(...args: any[]) { | ||
this.append(this.to_string(args), 'log'); | ||
} | ||
warn(...args: any[]) { | ||
this.append(this.to_string(args), 'warn'); | ||
} | ||
error(...args: any[]) { | ||
this.append(this.to_string(args), 'error'); | ||
} | ||
} | ||
|
||
export class BrowserConsole extends EditorLogConsole { | ||
log(...args: any[]) { | ||
console.log('LSP: ', ...args); | ||
} | ||
warn(...args: any[]) { | ||
console.warn('LSP: ', ...args); | ||
} | ||
error(...args: any[]) { | ||
console.error('LSP: ', ...args); | ||
} | ||
} | ||
|
||
export function create_console(kind: 'browser' | 'floating'): EditorLogConsole { | ||
if (kind === 'browser') { | ||
return new BrowserConsole(); | ||
} else { | ||
return new FloatingConsole(); | ||
} | ||
} |
Oops, something went wrong.