forked from bugy/script-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugy#117 added markdown support for scripts description section
- Loading branch information
Showing
6 changed files
with
71 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "Bash formatting", | ||
"script_path": "./samples/scripts/bash_formatting.py", | ||
"description": "Test script for validating output in case of bash escape sequences: https://en.wikipedia.org/wiki/ANSI_escape_code" | ||
"description": "Test script for validating output in case of bash escape sequences: [**ANSI wiki**](https://en.wikipedia.org/wiki/ANSI_escape_code). Supported features: \n - carriage return (\\r) \n - text colors/styles" | ||
} |
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,42 @@ | ||
"use strict"; | ||
|
||
var assert = chai.assert; | ||
chai.config.truncateThreshold = 0; | ||
|
||
describe('Test Configuration of ScriptView', function () { | ||
|
||
beforeEach(function () { | ||
this.viewContainer = document.createElement('div'); | ||
document.children[0].appendChild(this.viewContainer); | ||
|
||
this.scriptView = new ScriptView(this.viewContainer); | ||
this.vueModel = this.scriptView.vueModel; | ||
}); | ||
|
||
afterEach(function () { | ||
this.viewContainer.remove(); | ||
}); | ||
|
||
describe('Test descript section', function () { | ||
|
||
it('test simple text', function () { | ||
this.scriptView.setScriptDescription('some text'); | ||
assert.equal('some text', this.vueModel.formattedDescription) | ||
}); | ||
|
||
it('test bold', function () { | ||
this.scriptView.setScriptDescription('some **bold** text'); | ||
assert.equal('some <strong>bold</strong> text', this.vueModel.formattedDescription) | ||
}); | ||
|
||
it('test explicit link', function () { | ||
this.scriptView.setScriptDescription('some [link_text](https://google.com)'); | ||
assert.equal('some <a href="https://google.com">link_text</a>', this.vueModel.formattedDescription) | ||
}); | ||
|
||
it('test new line', function () { | ||
this.scriptView.setScriptDescription('line1\nline2'); | ||
assert.equal('line1<br>line2', this.vueModel.formattedDescription) | ||
}); | ||
}) | ||
}); |
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