Commit b2f7be44 authored by Roque's avatar Roque

erp5_officejs_drone_capture_flag_test: refactor functional test

parent 24eb80cd
Pipeline #33080 failed with stage
in 0 seconds
......@@ -4,7 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Drone Capture Flag OJS app (expected failure)</title>
<!-- This test is expected to fail as the drone simulator runs on a web worker canvas, which relies on a very new feature: offscreen canvas
---- This feature is not supported yet by the latest Firefox ESR used in the test nodes -->
---- This feature is not supported yet by the latest Firefox ESR used in the test nodes (error: webgl not supported) -->
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
......@@ -30,36 +30,16 @@
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_drone_capture_flag_script_page.html')]</td>
<td></td>
<tr>
<!-- Check game -->
<tr>
<td>waitForElementPresent</td>
<td>//label[text()='Simulation Speed']</td>
<td></td>
<tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'codemirror.gadget.html')]</td>
<td>//span[@id="loading"]</td>
<td></td>
<tr>
<!-- Check panel -->
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel_drone_capture_flag.html')]//a[contains(@class, 'ui-icon-puzzle-piece') and text()='Run Game']</td>
<td></td>
<tr>
<!-- Run game -->
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_drone_capture_flag_script_page.html')]//input[@type="submit" and @name="action_run"]</td>
<td></td>
<tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@id="loading"]</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel_drone_capture_flag.html')]//a[contains(@class, 'ui-icon-puzzle-piece') and text()='Run Game']</td>
<td></td>
<tr>
<!-- Check simulator gadget and babylon lib -->
......
......@@ -72,10 +72,6 @@
' me.getCurrentPosition().longitude\n' +
' ).toFixed(8),\n' +
' expectedDistance = (me.getAirSpeed() * timestamp / 1000).toFixed(8);\n' +
' console.log("timestamp", timestamp);\n' +
' console.log("1000 / 60", 1000/60);\n' +
' console.log("expectedDistance", expectedDistance);\n' +
' console.log("realDistance", realDistance);\n' +
' assert(timestamp, 1000 / 60, "Timestamp");\n' +
' assert(realDistance, expectedDistance, "Distance");\n' +
' current_position.latitude = current_position.latitude.toFixed(7);\n' +
......
......@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>1709050966.57</float>
<float>1709057695.61</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment