Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ETS form validation in teamengine. #355

Merged
merged 5 commits into from
Feb 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion teamengine-web/src/main/webapp/test.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<html>
<head>
<title>Executing Tests</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
var LONG_TIMEOUT = 4000;
var SHORT_TIMEOUT = 1000;
Expand Down Expand Up @@ -167,8 +168,24 @@ if (mode.equals("retest") || mode.equals("resume") || mode.equals("cache")) {
%>
window.location = url + "&stop=" + stop + "&t=" + d.getTime();
}

// Validate the inputs.
function validateIutInputs(iut_uri, iut_doc) {
var iuturi = window.frames[1].window.document.getElementById(iut_uri).value;
var iutdoc = window.frames[1].window.document.getElementById(iut_doc).value;
if ((iutdoc == undefined || iutdoc == null || iutdoc == "")
&& (iuturi == undefined || iuturi == null || iuturi == "")) {
alert("Capability URL or document should not be empty.");
window.frames[1].window.document.getElementById(iut_uri).focus();
return false;
}
if (iutdoc != null && iutdoc != "" && iuturi != null && iuturi != "") {
alert("Provide only one input either capability URL or document!");
return false;
}
}
</script>
</head>
</head>
<frameset onload="start()" rows="102,*">
<frame name="te_test_controls" src="testControls.html">
<frame name="te_test_panel" src="executing.html">
Expand Down