-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Papyros integration #3453
Papyros integration #3453
Conversation
test/application_system_test_case.rb
Outdated
@@ -20,7 +20,7 @@ | |||
end | |||
|
|||
Capybara.configure do |config| | |||
config.default_max_wait_time = 10 | |||
config.default_max_wait_time = 20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary? The value of 10 was there with a reason to keep the total runtime of these tests acceptable. These tests have increased it from 2.5 to 3.5 minutes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pyodide intialization takes a while, so running a piece of code and expecting output to show up takes a while. The find methods take their waiting time from the capybara config and it doesn't seem to be possible to update the config for this test file only. This system test probably also takes longer because separate pages are loaded per test. I can try to do it all on the same page instead and make the waits longer only when required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can set it for checks where it fails: https://blog.tomoyukikashiro.me/post/things-to-be-aware-of-when-change-capybara_default_wait_time/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the minitest-suite we use support test nesting? Something similar to Jest using 'describe' and 'it'-blocks, as now I combined all tests into a big one separated by comment lines to prevent having to load Pyodide from scratch multiple times.
This pull request integrates Papyros into Dodona to allow users to write and run code within their browser.
Papyros makes use of WebWorkers, requiring SharedArrayBuffers to communicate. Enabling this feature in the browser requires specific HTTP headers to be set on resources used in the pages where this feature is enabled. Examples of such resources are /packs and /assets. For production/staging, these headers must be enabled on the server. In development, this can be taken care of with configuration in config/development.rb .
Some HTTP headers must also be added to responses concerning exercises and their description to allow the iframes to load everything correctly and securely.
Closes #3232 .