Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-12-30 16:54:23 +03:00
parent d42cd430f9
commit f099aa68e0
2 changed files with 5 additions and 9 deletions

View File

@ -3170,8 +3170,7 @@ module.Tasks = ImageGridFeatures.Feature({
var selfTest = var selfTest =
module.selfTest = function(func){ module.selfTest = function(func){
func.__self_test__ = true func.__self_test__ = true
return func return func }
}
var SelfTestActions = actions.Actions({ var SelfTestActions = actions.Actions({
config: { config: {
@ -3188,19 +3187,13 @@ var SelfTestActions = actions.Actions({
return action != 'selfTest' return action != 'selfTest'
&& (that[action].func.__self_test__ && (that[action].func.__self_test__
|| that.getActionAttr(action, 'self_test'))}) || that.getActionAttr(action, 'self_test'))})
logger logger
&& tests.forEach(function(action){ && tests.forEach(function(action){
logger.emit('found', action) }) logger.emit('found', action) })
tests.forEach(function(action){ tests.forEach(function(action){
that[action]() that[action]()
logger logger
&& logger.emit('done', action) && logger.emit('done', action) }) })],
})
})],
}) })
var SelfTest = var SelfTest =

View File

@ -187,6 +187,9 @@ var MetadataReaderActions = actions.Actions({
&& that.markChanged('images', [gid]) } && that.markChanged('images', [gid]) }
resolve(data) }) }) }) })], resolve(data) }) }) }) })],
// XXX Q: should this be a linked task???
// ...on one hand yes, on the other, saving after this may
// unintentionally save other state from the main object...
readAllMetadata: ['File/Read all metadata', readAllMetadata: ['File/Read all metadata',
'readMetadata: "all" ...'], 'readMetadata: "all" ...'],