Skip to content
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

tests: hello world playground run with success and failure tests #2513

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

michael-kerscher
Copy link
Collaborator

Implement two tests for the rust playground:

  • successful run of the hello world example with the hello world message in stdout and a hidden stderr
  • on purpose compilation error is shown in stderr and "No output" in stdout

@michael-kerscher
Copy link
Collaborator Author

michael-kerscher commented Dec 13, 2024

Tests are failing because the Hello world message is localized.
It is at least great news that this is visible with the tests :)

Checking for only the world icon to be present

@michael-kerscher michael-kerscher force-pushed the js-test-framework branch 2 times, most recently from ce32ed4 to 6f5054f Compare December 13, 2024 15:18
@michael-kerscher
Copy link
Collaborator Author

Without localization issues another error class shows.
There are additional issues that don't show in my local runs and also not for all languages:

[0-2] 2024-12-13T15:25:07.756Z WARN webdriver: WebDriverError: javascript error: {"status":60,"value":"[object HTMLButtonElement] has no size and location"}
[0-2]   (Session info: chrome=131.0.6778.139) when running "actions" with method "POST" and args "{"actions":[{"id":"action1","type":"wheel","parameters":{},"actions":[{"type":"scroll","x":-751,"y":978,"deltaX":0,"deltaY":0,"duration":0,"origin":{"element-6066-11e4-a52e-4f735466cecf":"f.173C819DA147237EEEF427DC48FFF96F.d.A21CD0374576D9BD3747C260A5497CB1.e.45"}}]}]}"
[0-1] Error in "Playground.executes the hello world code and prints the hello message"
Error: Expect $(`.ace_content`) to exist

@michael-kerscher
Copy link
Collaborator Author

michael-kerscher commented Dec 16, 2024

I looked again into this and it seems I used a not ideal directory for the hello-world page as the "types-and-values" directory does not have this file in e.g. pl translation

$ find comprehensive-rust-* -name "hello-world.html"
comprehensive-rust-en/html/hello-world/hello-world.html
comprehensive-rust-en/html/hello-world.html
comprehensive-rust-en/html/types-and-values/hello-world.html
comprehensive-rust-en/pandoc/pdf/src/hello-world/hello-world.html
comprehensive-rust-pl/html/hello-world/hello-world.html
comprehensive-rust-pl/html/hello-world.html

using the hello-world directory redirection

"hello-world/hello-world.html" = "../types-and-values/hello-world.html"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant