mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-21 03:39:43 +00:00
action-deletefield: Test when modified does and doesn't exist
This commit is contained in:
parent
9bb5fd0190
commit
8e7eb0e8d0
@ -30,8 +30,10 @@ function setupWiki(condition, targetField, wikiOptions) {
|
|||||||
if(condition.targetTiddlerExists) {
|
if(condition.targetTiddlerExists) {
|
||||||
var fields = {
|
var fields = {
|
||||||
title: TEST_TIDDLER_TITLE,
|
title: TEST_TIDDLER_TITLE,
|
||||||
modified: TEST_TIDDLER_MODIFIED,
|
|
||||||
};
|
};
|
||||||
|
if(condition.modifiedFieldExists) {
|
||||||
|
fields.modified = TEST_TIDDLER_MODIFIED;
|
||||||
|
}
|
||||||
if(condition.targetFieldExists) {
|
if(condition.targetFieldExists) {
|
||||||
fields[targetField] = "some text";
|
fields[targetField] = "some text";
|
||||||
}
|
}
|
||||||
@ -58,11 +60,14 @@ function generateTestConditions() {
|
|||||||
$tw.utils.each([true, false], function(targetTiddlerExists) {
|
$tw.utils.each([true, false], function(targetTiddlerExists) {
|
||||||
$tw.utils.each([true, false], function(targetFieldExists) {
|
$tw.utils.each([true, false], function(targetFieldExists) {
|
||||||
$tw.utils.each([true, false], function(fieldArgumentIsUsed) {
|
$tw.utils.each([true, false], function(fieldArgumentIsUsed) {
|
||||||
conditions.push({
|
$tw.utils.each([true, false], function(modifiedFieldExists) {
|
||||||
tiddlerArgumentIsPresent: tiddlerArgumentIsPresent,
|
conditions.push({
|
||||||
targetTiddlerExists: targetTiddlerExists,
|
tiddlerArgumentIsPresent: tiddlerArgumentIsPresent,
|
||||||
targetFieldExists: targetFieldExists,
|
targetTiddlerExists: targetTiddlerExists,
|
||||||
fieldArgumentIsUsed: fieldArgumentIsUsed,
|
targetFieldExists: targetFieldExists,
|
||||||
|
fieldArgumentIsUsed: fieldArgumentIsUsed,
|
||||||
|
modifiedFieldExists: modifiedFieldExists,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user