-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Replace tests/generator/*.xml with .js files #1142
Labels
Comments
AnmAtAnm
added
component: tests
help wanted
External contributions actively solicited
low priority
type: cleanup
labels
May 31, 2017
@AnmAtAnm is this one still open ? |
moogacs
added a commit
to moogacs/blockly
that referenced
this issue
Apr 10, 2019
moogacs
added a commit
to moogacs/blockly
that referenced
this issue
Apr 10, 2019
moogacs
added a commit
to moogacs/blockly
that referenced
this issue
Apr 10, 2019
I think so, but check with @rachel-fenichel. |
Yes. |
moogacs
added a commit
to moogacs/blockly
that referenced
this issue
Apr 12, 2019
We now run the generator tests in a browser and we plan to continue to do so, therefore we don't need to implement this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Our generator tests currently try to read XML directly, but this doesn't work in a local file environment (browser security limitation), such as exactly the environment developers are likely to want to use when they are editing and testing the code base.
Thankfully, there is an easy fix. Since the test code is not distributed with other apps, we can use JavaScript ES6 raw strings:
Raw strings can use any character except the backtick, and we don't have that in our test files.
As
.js
files, we can import all the testdata via script tags. The only down side is that it is the file is no longer XML, but given that the XML does not need to be escaped, this is pretty trivial to cut and paste if you really need to use a syntax highlighting editor or other XML tool.The page will need to update how it is reading the target test data in response to the selector.
The text was updated successfully, but these errors were encountered: