Skip to content

Commit 6604688

Browse files
committed
Modernize Run Modal
1 parent b0c09b2 commit 6604688

File tree

8 files changed

+617
-443
lines changed

8 files changed

+617
-443
lines changed

source/src/main/webapp/TestCaseExecution.jsp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
<script type="text/javascript" src="js/transversalobject/TestCaseExecutionQueue.js"></script>
3838
<script type="text/javascript" src="js/transversalobject/TestCase.js"></script>
3939
<script type="text/javascript" src="js/transversalobject/File.js"></script>
40-
<script type="text/javascript" src="js/transversalobject/TestCaseSimpleExecution.js"></script>
4140
<script type="text/javascript" src="js/transversalobject/Robot.js"></script>
4241
<script type="text/javascript" src="js/transversalobject/Application.js"></script>
4342
<link rel="stylesheet" type="text/css" href="css/pages/TestCaseExecution.css">
@@ -52,7 +51,7 @@
5251
<%@ include file="include/transversalobject/TestCaseExecutionQueue.html" %>
5352
<%@ include file="include/transversalobject/TestCase.html" %>
5453
<%@ include file="include/transversalobject/File.html" %>
55-
<%@ include file="include/transversalobject/TestCaseSimpleExecution.html" %>
54+
<jsp:include page="include/transversalobject/TestCaseSimpleExecution.html"/>
5655
<%@ include file="include/transversalobject/Robot.html" %>
5756
<%@ include file="include/transversalobject/Application.html" %>
5857
<%@ include file="include/transversalobject/Invariant.html" %>

source/src/main/webapp/TestCaseList.jsp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
<script type="text/javascript" src="dependencies/Bootstrap-treeview-1.2.0/js/bootstrap-treeview.js"></script>
3838
<script type="text/javascript" src="js/pages/TestCaseList.js"></script>
3939
<script type="text/javascript" src="js/transversalobject/TestCase.js"></script>
40-
<script type="text/javascript" src="js/transversalobject/TestCaseSimpleExecution.js"></script>
4140
<script type="text/javascript" src="js/transversalobject/Application.js"></script>
4241
<title id="pageTitle">Test Case</title>
4342
</head>
@@ -50,7 +49,7 @@
5049
<%@ include file="include/utils/modal-confirmation.html"%>
5150
<%@ include file="include/transversalobject/TestCase.html"%>
5251
<jsp:include page="include/transversalobject/TestCaseSimpleCreation.html"/>
53-
<%@ include file="include/transversalobject/TestCaseSimpleExecution.html"%>
52+
<jsp:include page="include/transversalobject/TestCaseSimpleExecution.html"/>
5453
<%@ include file="include/transversalobject/Application.html"%>
5554
<%@ include file="include/pages/testcaselist/importTestCaseFromTestLink.html"%>
5655
<jsp:include page="include/transversalobject/TestCaseListMassActionUpdate.html"/>

source/src/main/webapp/TestCaseScript.jsp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
<script type="text/javascript" src="js/transversalobject/AppService.js"></script>
4141
<script type="text/javascript" src="js/transversalobject/Application.js"></script>
4242
<script type="text/javascript" src="js/transversalobject/TestCaseExecutionQueue.js"></script>
43-
<script type="text/javascript" src="js/transversalobject/TestCaseSimpleExecution.js"></script>
4443
<link rel="stylesheet" type="text/css" href="css/pages/TestCaseScript.css">
4544
</head>
4645
<body x-data x-cloak class="crb_body">
@@ -60,7 +59,7 @@
6059
<%@ include file="include/transversalobject/Application.html"%>
6160
<%@ include file="include/transversalobject/Property.html"%>
6261
<%@ include file="include/transversalobject/TestCaseExecutionQueue.html"%>
63-
<%@ include file="include/transversalobject/TestCaseSimpleExecution.html"%>
62+
<jsp:include page="include/transversalobject/TestCaseSimpleExecution.html"/>
6463
<%@ include file="include/utils/modal-generic.html"%>
6564

6665
<div class="flex gap-3">

source/src/main/webapp/include/transversalobject/TestCaseSimpleExecution.html

Lines changed: 588 additions & 129 deletions
Large diffs are not rendered by default.

source/src/main/webapp/js/pages/TestCaseExecution.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,14 @@ function updatePage(data, steps) {
565565

566566
$("#runTestCase").attr("disabled", false);
567567
$("#runTestCase").on('click', function () {
568-
openModalExecutionSimple(data.application, data.test, data.testcase, data.description, data.country, data.environment, data.robot);
568+
window.dispatchEvent(new CustomEvent('open-execution', {
569+
detail: {
570+
application: data.application,
571+
test: data.test,
572+
testcase: data.testcase,
573+
description: data.description
574+
}
575+
}))
569576
});
570577
//$("#runTestCase").parent().attr("href", "RunTests.jsp?test=" + data.test + "&testcase=" + data.testcase);
571578
$("#rerunTestCase").attr("disabled", false);

source/src/main/webapp/js/pages/TestCaseList.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,16 @@ function aoColumnsFunc(countries, tableId) {
10241024
id: `testcase_action_runtest_${row}`,
10251025
name: "runTestcase",
10261026
title: doc.getDocLabel("page_testcaselist", "btn_runTest"),
1027-
onClick: `openModalExecutionSimple('${data.application}','${obj.test}','${obj.testcase}','${data.description}')`,
1027+
onClick: `
1028+
window.dispatchEvent(new CustomEvent('open-execution', {
1029+
detail: {
1030+
application: '${data.application}',
1031+
test: '${obj.test}',
1032+
testcase: '${obj.testcase}',
1033+
description: '${data.description}'
1034+
}
1035+
}))
1036+
`,
10281037
extraClass: "group-hover:!text-green-500",
10291038
icon: icons.run
10301039
}));

source/src/main/webapp/js/pages/TestCaseScript.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,14 @@ $.when($.getScript("js/global/global.js")
328328
$("#seeTest").parent().attr("href", "./TestCaseList.jsp?test=" + encodeURI(test));
329329
//$("#runTestCase").parent().attr("href", "./RunTests.jsp?test=" + encodeURI(test) + "&testcase=" + encodeURI(testcase));
330330
$("#runTestCase").on('click', function () {
331-
openModalExecutionSimple(application, test, testcase, description);
331+
window.dispatchEvent(new CustomEvent('open-execution', {
332+
detail: {
333+
application: application,
334+
test: test,
335+
testcase: testcase,
336+
description: description
337+
}
338+
}))
332339
});
333340

334341
$.ajax({

0 commit comments

Comments
 (0)