From 56e81f627a96d4eaea8a3b01418a086ccf1f99cf Mon Sep 17 00:00:00 2001 From: kovacsv Date: Fri, 11 Jan 2019 20:20:59 +0100 Subject: [PATCH] Add test mode for selenium tests. In this mode the file input is visible, so the driver can click on it. --- website/include/importerapp.js | 11 +++++++++++ website/testfiles/prism.off | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 website/testfiles/prism.off diff --git a/website/include/importerapp.js b/website/include/importerapp.js index 74af5af..4e9b875 100644 --- a/website/include/importerapp.js +++ b/website/include/importerapp.js @@ -267,6 +267,7 @@ ImporterApp.prototype.GenerateMenu = function () } var meshMenuItem = meshesGroup.AddSubItem (mesh.name, { + id : 'meshmenuitem-' + meshIndex.toString (), openCloseButton : { title : 'Show/Hide Details', onOpen : function (contentDiv, mesh) { @@ -626,7 +627,17 @@ ImporterApp.prototype.LoadFilesFromHash = function () return false; } + var fileInput = $('#file'); var hash = window.location.hash; + if (hash == '#testmode') { + fileInput.css ('display', ''); + fileInput.css ('position', 'absolute'); + fileInput.css ('right', '10px'); + fileInput.css ('bottom', '10px'); + return false; + } + + fileInput.css ('display', 'none'); var hash = hash.substr (1, hash.length - 1); var fileList = hash.split (','); this.ProcessFiles (fileList, true); diff --git a/website/testfiles/prism.off b/website/testfiles/prism.off new file mode 100644 index 0000000..0324ea5 --- /dev/null +++ b/website/testfiles/prism.off @@ -0,0 +1,16 @@ +OFF +6 8 0 +0.5 0 -0.5 +-0.25 0.433013 -0.5 +-0.25 -0.433013 -0.5 +0.5 0 0.5 +-0.25 0.433013 0.5 +-0.25 -0.433013 0.5 +3 2 1 0 +3 3 4 5 +3 0 1 4 +3 0 4 3 +3 1 2 5 +3 1 5 4 +3 2 0 3 +3 2 3 5