From db1b43455ebaf24c6b2e92186279868446bbe8b0 Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Sat, 16 Sep 2017 21:26:53 +0700 Subject: [PATCH] Improved Codeception plugin GUI. --- public/assets/js/build-plugins/codeception.js | 36 +++++++------------ 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/public/assets/js/build-plugins/codeception.js b/public/assets/js/build-plugins/codeception.js index 8c517cca..079e8e4b 100644 --- a/public/assets/js/build-plugins/codeception.js +++ b/public/assets/js/build-plugins/codeception.js @@ -32,9 +32,12 @@ var codeceptionPlugin = ActiveBuild.UiPlugin.extend({ render: function() { return $('' + '' + - '' + - '' + - '' + + '' + + '' + + '' + + '' + + '' + + '' + '
'+Lang.get('codeception_suite')+''+Lang.get('codeception_feature')+''+Lang.get('codeception_time')+'
' + Lang.get('status') + '' + Lang.get('codeception_suite') + '' + Lang.get('codeception_feature') + '' + Lang.get('file') + '' + Lang.get('message') + '' + Lang.get('codeception_time') + '
'); }, @@ -57,28 +60,15 @@ var codeceptionPlugin = ActiveBuild.UiPlugin.extend({ } for (var i in tests) { - - var rows = $('' + - ''+tests[i].suite+'' + - ''+tests[i].feature+'' + - ''+tests[i].time+''+ - '' + - '' + - '' + - ''+Lang.get('name')+': '+tests[i].name+'
' + - ''+Lang.get('file')+': '+tests[i].file+'
' + - (tests[i].message - ? ''+Lang.get('message')+': '+tests[i].message+'' - : '') + - '' + + var rows = $('' + + '' + (tests[i].pass ? '' + Lang.get('success') + '' : '' + Lang.get('failed') + '') + '' + + '' + tests[i].suite + '' + + '' + tests[i].feature + '' + + '' + tests[i].file + ''+ + '' + ((tests[i].message) ? tests[i].message : '') + ''+ + '' + tests[i].time + ''+ ''); - if (!tests[i].pass) { - rows.first().addClass('danger'); - } else { - rows.first().addClass('success'); - } - tbody.append(rows); }