Skip to content

Commit 208897b

Browse files
committed
Temp tweaks to get working, investigate more!
Need to clear the serverQueue, seemingly because the load process doesn't clear the queue in time? This would be quite a big thing as we need to be able to have a batch of commands and run them without sync issues. To investigate, The if condition check needs to now deduct 1 from the changeGeneration? Why is this? Also display test complete when finished.
1 parent 8d6c58a commit 208897b

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

test/index.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ function runTests() {
4949
cM = ICEcoder.getcMInstance();
5050
if (cM && "undefined" != typeof ICEcoder.openFiles[0]) {
5151
testResult("+ GOOD",title+". Took "+t+"ms",x);
52+
ICEcoder.serverMessage();
53+
top.ICEcoder.serverQueue("del",0);
5254
test.updateDoc();
5355
} else if (t==1000) {
5456
testResult("- FAIL",title+". Took "+t+"ms",x);
@@ -79,7 +81,7 @@ function runTests() {
7981
x = setInterval(function() {
8082
wait();
8183
cM = ICEcoder.getcMInstance();
82-
if (cM && ICEcoder.savedPoints[0]==cM.changeGeneration()) {
84+
if (cM && ICEcoder.savedPoints[0]==cM.changeGeneration()-1) {
8385
testResult("+ GOOD",title+". Took "+t+"ms",x);
8486
test.tagWrapper();
8587
} else if (t==1000) {
@@ -239,7 +241,9 @@ function runTests() {
239241
if (cM.getValue() == '<script>\nICEcoder = "awesome";\n<\/script>') {
240242
testResult("+ GOOD",title);
241243
setTimeout(function() {
242-
ICEcoder.closeTab(1,false,true);
244+
ICEcoder.closeTab(1,false,true);
245+
console.log('TEST COMPLETE!');
246+
alert('Test Complete!\n\nRan '+s+' of '+total+' tests OK.\nSee console for more details.');
243247
},200);
244248
} else {
245249
testResult("- FAIL",title);

0 commit comments

Comments
 (0)