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

Add base for GUI tests #2476

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

Conversation

GuillaumeGomez
Copy link
Member

As discussed with @ehuss, this PR adds the basics for adding more GUI tests. Just add more .goml files in the tests/gui folder.

This is the same GUI test framework used in rustdoc and docs.rs.

If you need any explanation on how it works, or if you have any question, please don't hesitate to ask.

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Nov 8, 2024
@GuillaumeGomez GuillaumeGomez force-pushed the gui-tests branch 2 times, most recently from a3f8cd0 to 1a2991f Compare November 8, 2024 14:39
@GuillaumeGomez GuillaumeGomez reopened this Nov 8, 2024
@GuillaumeGomez GuillaumeGomez force-pushed the gui-tests branch 5 times, most recently from ef31501 to 4b48db3 Compare November 8, 2024 16:46
@GuillaumeGomez
Copy link
Member Author

Finally fixed windows build. :')

@notriddle

This comment was marked as resolved.

@GuillaumeGomez
Copy link
Member Author

Great idea, thanks! Updated.

CONTRIBUTING.md Outdated Show resolved Hide resolved
tests/gui/runner.rs Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated
cargo test --test gui -- --disable-headless-test
```

You can find the `browser-ui-test` package documentation on [its repository](https://github.com/GuillaumeGomez/browser-UI-test/blob/master/goml-script.md).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing a lot of information on how those are written. Something like this?

The GUI tests are in the directory tests/gui in text files with the .goml extension. These tests are run using a node.js program called browser-ui-test. You can find documentation for this language on its repository.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, thanks! Hard to know what is missing when you're too involved in something. ^^'

Comment on lines +61 to 66
- name: Build and run tests (+ GUI)
if: matrix.os != 'windows-latest'
run: cargo test --locked --target ${{ matrix.target }} --test gui
- name: Build and run tests
if: matrix.os == 'windows-latest'
run: cargo test --locked --target ${{ matrix.target }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to disable the default tests on non-windows runners. cargo test --locked --target ${{ matrix.target }} --test gui only runs the GUI tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: waiting on a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants