mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 05:19:57 +00:00
add default and custom class to testcase-widget
This commit is contained in:
parent
3ea9d6c90c
commit
ae911d0c73
@ -33,7 +33,7 @@ TestCaseWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.execute();
|
||||
// Create container DOM node
|
||||
var domNode = this.document.createElement("div");
|
||||
domNode.setAttribute("class", "tc-test-case");
|
||||
domNode.setAttribute("class", "tc-test-case " + this.testcaseClass);
|
||||
this.domNodes.push(domNode);
|
||||
parent.insertBefore(domNode,nextSibling);
|
||||
// Render the children into a hidden DOM node
|
||||
@ -146,6 +146,7 @@ TestCaseWidget.prototype.execute = function() {
|
||||
this.testcaseTestActions = this.getAttribute("testActions");
|
||||
this.testcaseTestExpectedResult = this.getAttribute("testExpectedResult");
|
||||
this.testcaseHideIfPass = this.getAttribute("testHideIfPass");
|
||||
this.testcaseClass = this.getAttribute("class","");
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -1,6 +1,6 @@
|
||||
caption: testcase
|
||||
created: 20240507221902644
|
||||
modified: 20240507221902644
|
||||
modified: 20241113203728572
|
||||
tags: Widgets
|
||||
title: TestCaseWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@ -55,6 +55,7 @@ The content of the `<$testcase>` widget is not displayed but instead is scanned
|
||||
|<<.attr testExpectedResult>> |Optional title of the tiddler whose content is the expected result of rendering the output tiddler (note that both <<.attr testOutput>> and <<.attr testExpectedResult>> must be provided in order for testing to occur) |
|
||||
|<<.attr testActions>> |Optional title of the tiddler containing actions that should be executed before the test occurs |
|
||||
|<<.attr testHideIfPass>> |If set to "yes", hides the <<.wid testcase>> widget if the test passes |
|
||||
|<<.attr class>> |<<.from-version "5.3.7">> Optional CSS classes in addition to the default `tc-test-case` class |
|
||||
|
||||
! Payload Tiddlers
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user