Skip to content

Commit

Permalink
Build 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Inzirillo committed Jan 29, 2021
1 parent 7b24acd commit 80cb6db
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@
"sizingX": "grow",
"sizingY": "grow",
"contextMenu": "none",
"webEngine": "system"
"webEngine": "embedded",
"methodsAccessibility": "all"
},
"_setSize": {
"type": "rectangle",
Expand Down Expand Up @@ -333,17 +334,16 @@
"kind": "form"
},
"editor": {
"activeView": "View 1",
"activeView": "WA",
"defaultView": "View 1",
"views": {
"View 1": {},
"WA": {
"visible": false,
"objects": [
"results_wa"
]
}
}
},
"geometryStamp": 22
"geometryStamp": 29
}
25 changes: 13 additions & 12 deletions AJ_Tools_UnitTest/Project/Sources/Forms/AJ_Tools_UT_main/method.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@ $evt:=Form event code:C388

Case of
: ($evt=On Load:K2:1)
WA OPEN URL:C1020(*; "results_wa"; "about:blank")
C_OBJECT:C1216(AJ_Tools_UT_results)
AJ_Tools_UT_results:=New object:C1471
Form:C1466.listRef:=0
Form:C1466.view:="lb"

OBJECT SET VISIBLE:C603(*;"results_wa";False:C215)
OBJECT SET VISIBLE:C603(*;"results_lb";True:C214)
WA SET PREFERENCE:C1041(*;"results_wa";WA enable Web inspector:K62:7;True:C214)
OBJECT SET VISIBLE:C603(*; "results_wa"; False:C215)
OBJECT SET VISIBLE:C603(*; "results_lb"; True:C214)
WA SET PREFERENCE:C1041(*; "results_wa"; WA enable Web inspector:K62:7; True:C214)

// Try to get existing results to display the list of category / description
$path_logs:=Get 4D folder:C485(Logs folder:K5:19;*)+"UnitTestsResults.json"
// Try to get existing results to display the list of category / description
$path_logs:=Get 4D folder:C485(Logs folder:K5:19; *)+"UnitTestsResults.json"
If (Test path name:C476($path_logs)=Is a document:K24:1)
Form:C1466.parsedResult:=JSON Parse:C1218(Document to text:C1236($path_logs;"UTF-8"))
AJ_Tools_UT_buildList_UI
Form:C1466.parsedResult:=JSON Parse:C1218(Document to text:C1236($path_logs; "UTF-8"))
AJ_Tools_UT_buildList_UI
Else
Form:C1466.listRef:=New list:C375
APPEND TO LIST:C376(Form:C1466.listRef;"No Data - You must run the full tests once";0)
OBJECT SET LIST BY REFERENCE:C1266(*;"list";Form:C1466.listRef)
APPEND TO LIST:C376(Form:C1466.listRef; "No Data - You must run the full tests once"; 0)
OBJECT SET LIST BY REFERENCE:C1266(*; "list"; Form:C1466.listRef)
End if


Expand All @@ -31,12 +32,12 @@ Case of
AJ_Tools_UT_results.tests:=New collection:C1472
Case of
: (Form:C1466.timerCase="all")
AJ_Tools_UT_launch_runAll
AJ_Tools_UT_launch_runAll
: (Form:C1466.timerCase="selected")
AJ_Tools_UT_launch_runAll (Form:C1466.methods)
AJ_Tools_UT_launch_runAll(Form:C1466.methods)
End case


: ($evt=On Unload:K2:2)
CLEAR LIST:C377(Form:C1466.listRef;*)
CLEAR LIST:C377(Form:C1466.listRef; *)
End case
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ End if

C_TEXT:C284($0)

$version_t:="2.1.0+Build35" // Tue, 15 Dec 2020 12:18:33 GMT
$version_t:="2.2.0+Build37" // Fri, 29 Jan 2021 23:33:40 GMT

$0:="AJ_Tools_UnitTest: "+$version_t
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@

<head>
<title>Unit Tests Results</title>
<link rel="stylesheet" href="$4DEVAL($2)/bootstrap.min.css">
<script src="$4DEVAL($2)/jquery-3.3.1.slim.min.js"></script>
<script src="$4DEVAL($2)/popper.min.js"></script>
<script src="$4DEVAL($2)/bootstrap.min.js"></script>
<!-- <link rel="stylesheet" type="text/css" href="$4DEVAL($2)/bootstrap.min.css">
<script type="text/javascript" src="$4DEVAL($2)/jquery-3.3.1.slim.min.js"></script>
<script type="text/javascript" src="$4DEVAL($2)/popper.min.js"></script>
<script type="text/javascript" src="$4DEVAL($2)/bootstrap.min.js"></script> -->
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<script type="text/javascript" src="jquery-3.3.1.slim.min.js"></script>
<script type="text/javascript" src="popper.min.js"></script>
<script type="text/javascript" src="bootstrap.min.js"></script>



<script type="text/javascript">
/* See LICENSE file for terms of use */
Expand Down Expand Up @@ -408,9 +414,11 @@
})();





function methodButton_cb(event) {
event.stopPropagation();
let methodName = event.target.getAttribute('data-methodname');
$4d.openMethod(methodName);
}

$(document).ready(function () {

Expand Down Expand Up @@ -460,7 +468,12 @@
.actual del {
display: none;
}

.methodButton {
float: right;
}
</style>

</head>

<body>
Expand Down Expand Up @@ -534,6 +547,9 @@
data-toggle="collapse" data-target="#description$4DEVAL($id)_body" aria-expanded="true"
aria-controls="description$4DEVAL($id)_body">
<span style="font-size:17pt">$4DEVAL($results.categories[$i].descriptions[$j].description)</span>
<button onClick="methodButton_cb(event)"
data-methodname="$4DEVAL($results.categories[$i].descriptions[$j].method)"
class="methodButton btn btn-primary">Open Method</button>
</div>
<div id="description$4DEVAL($id)_body" class="collapse show"
aria-labelledby="description$4DEVAL($id)_header">
Expand Down
8 changes: 7 additions & 1 deletion change_logs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,10 @@ v2.1.0
You can pass any number or text
it will be displayed in the result after "#"
- Add a feature in the display result to see a diff of the expected and actual.
This will help to identify where is the difference when the output is big (object, collection or long text)
This will help to identify where is the difference when the output is big (object, collection or long text)

v2.1.0
- Feature: Add a button in the web view to open the test method
- Add the calling method in the assertion when something is wrong in the assert method (missing parameter(s)).
- Implement a visual feedback for the results listbox.
The text is red and bold for failing tests and green for passing tests.

0 comments on commit 80cb6db

Please sign in to comment.