-
Notifications
You must be signed in to change notification settings - Fork 2
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
How to phettest locally (for testing) #56
Comments
|
Committed above. @samreid can you review in whatever way you would like. From going through the instructions and trying to run it locally (more work), to just glancing through the doc (less work). Whatever you'd like is good with me. Feel free to close. |
The documentation looks reasonable, but leaves me wondering if we can eliminate several steps if we just update phettest so that it runs from phetmarks/index.html instead of having to pop it up to index.html. Wouldn't this simplify steps on the server as well? Let me know if this should be a different issue. |
This step is not needed on the server, because of htaccess directives. It is mostly just a hack for testing locally. I remember trying to accomplish what you are recommending when working on phettest last time (I believe when moving it to bayes), but giving up. I'm not currently in a position to devote more resources to phettest, and feel like it is nice for the index page to be at the root of the directory structure, i.e. I feel ready to close. |
Sounds good, let's close. @jonathanolson and I may take it for a test drive as part of phetsims/chipper#1073 |
I tested this in phetsims/chipper#1073 and it worked great. I got tricked for a while because I forgot a slash after the port. I'll add a note about that to protect me next time. Here is my patch that worked will (along with moving index.html). Index: phettest/phettest.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/phettest/phettest.js b/phettest/phettest.js
--- a/phettest/phettest.js (revision 5a2f4f399e6f62c5814a625bbc33c600178f6855)
+++ b/phettest/phettest.js (date 1630766681654)
@@ -1,8 +1,8 @@
// Copyright 2020, University of Colorado Boulder
// will be replaced by domain name in the future
-const domain = 'https://bayes.colorado.edu/dev/';
-const serverURL = `${domain}phettest-server/`;
+const domain = 'http://localhost/main/';
+const serverURL = 'http://localhost:45362/'; // must end with /
const phettestURL = `${domain}phettest/`;
// common repo fields
|
I discovered while working on #55 that it is quite challenging to debug phettest and its server from bayes. It is much nicer to have a local way of testing this. I'll explain how I was able to set it up locally, and then this issue will be for optimizing this further, and making sure to document it.
Here is a patch that outlines a fair number of these steps. I don't think committing this makes sense because it feels like a workaround.
cd ./phetmarks/phettest/phettest-server.js
node phettest-server.js
In addition to this, I found that some commands had to change to support windows platforms.
The text was updated successfully, but these errors were encountered: