RunestoneInteractive / RunestoneComponents

Packaging of the Runestone tools for publishing educational materials using github pages
http://runestoneinteractive.org
Other
101 stars 225 forks source link

Improved testing 2 #1150

Closed bjones1 closed 3 years ago

bjones1 commented 3 years ago

This PR presents the new test environment, enabling Runestone Components and the server to share Selenium test code. It also updates the poll component to use this new framework. It's a part of the ideas in #1146 and follows #1148.

bjones1 commented 3 years ago

When this is merged, I'll submit a PR for the server-side test of this question.

bjones1 commented 3 years ago

Note that the test failure is again due to timing problems with tests. The shortanswer question type doesn't (yet) have a way to wait until the component is ready to begin testing. I will increase the delay on the shortanswer test to see if that passes.

bjones1 commented 3 years ago

...and the test passes now. Manual timing tweaks are so painful.

bnmnetp commented 3 years ago

An idea for a minor tweak -- why not have component_ready_resolve return either the div_id of the component, or this the component itself?

bjones1 commented 3 years ago

Reasonable, but doesn't the caller by definition have this in order to invoke await this.component_ready_promise? Given this, it's easy to access this.componentDiv or this.componentDiv.id.

bnmnetp commented 3 years ago

Yes, I was just about to delete that comment when you replied.