syntax-prosody-ot / main

A webapp for the syntax-prosody analyst working in Optimality Theory, with automated Gen, Con and Eval. Download build files from syntax-prosody-ot/build
https://spot.sites.ucsc.edu/
GNU General Public License v2.0
12 stars 2 forks source link

Front end tests failing #595

Closed jbellik closed 3 years ago

jbellik commented 3 years ago
sz245 commented 3 years ago
Screen Shot 2021-06-16 at 2 47 42 PM
sz245 commented 3 years ago

stringTest() -in built_in_input() this code document.getElementById('autoGenDoneButton').click(); was causing the script error. I commented it out but I am not sure if you need that line of code somewhere else.

jbellik commented 3 years ago

Ok, I'm glad you located the problem. That line of code is important for being able to load an analysis that uses GEN from the Automatic tab. When it's commented out, those analyses don't load properly. So that is not a tenable solution.

I think what's going on is that the string input validation code that you wrote ages ago broke this test, and rightfully so, because the way Max set this test up was to put in a bunch of arbitrary strings that should be unique in the analysis, and check if they show up (approximately) where they should. I think the script error is because the test puts strings like "9001" in the max and min fields for the "Generate combinations and permutations" bit of the interface.

So I've come to the conclusion that the test itself is what's broken. Unfortunately the tests in that file are interlaced in a complicated way so I'm not sure how to quickly fix it.

jbellik commented 3 years ago

ok actually I fixed it in a way that makes the test a little less robust in that the strings it's searching for are no longer unique, but at least they don't break the input validation!