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

SAK-51196 webcomponents Run tests on maven build #13489

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

adrianfish
Copy link
Contributor

@adrianfish adrianfish marked this pull request as draft March 25, 2025 22:41
@adrianfish adrianfish force-pushed the SAK-51196 branch 4 times, most recently from a01a2c6 to ee92c95 Compare March 26, 2025 13:15
@ottenhoff
Copy link
Contributor

cool!!!

@adrianfish adrianfish force-pushed the SAK-51196 branch 3 times, most recently from 194acb5 to 6881dff Compare March 28, 2025 18:34
@adrianfish adrianfish marked this pull request as ready for review March 28, 2025 18:35
@adrianfish
Copy link
Contributor Author

@ern @ottenhoff I think we should merge this into 25.x. I've fixed all the unit tests and made some a11y fixes that the tests caught.

@ottenhoff
Copy link
Contributor

agree i like it

@adrianfish
Copy link
Contributor Author

This needs to go in before anybody else adds significant webcomponents PRs.

@ern
Copy link
Contributor

ern commented Mar 31, 2025

strange that the cypress build fails but the other 2 maven builds pass!

@ottenhoff
Copy link
Contributor

remove the since origin/master part of lerna test

@adrianfish
Copy link
Contributor Author

@ottenhoff Are you sure about that? that switch is pretty nice. It tests the modified files and all the packages that depend on it. Do we want to test everything everytime?

@ottenhoff
Copy link
Contributor

@ottenhoff Are you sure about that? that switch is pretty nice. It tests the modified files and all the packages that depend on it. Do we want to test everything everytime?

Yes, I think it's the job of CI to just test everything. Locally it makes sense if you want a quick test

@adrianfish adrianfish force-pushed the SAK-51196 branch 5 times, most recently from 4a40da6 to fcafd03 Compare April 4, 2025 11:34
https://sakaiproject.atlassian.net/browse/SAK-51196

This change adds test scripts to the top level package.json that enable
us to test all the components at once using Playwright, and test just
the component which we are working on and its dependants. The full test
runs the tests in parallel and takes around 30s to run. The test:dev
script uses Lerna and will only test the staged files. The tool pom runs
the full component Playwright tests.
@adrianfish
Copy link
Contributor Author

Okay, this stuff's working now. It uses Playwright to download Chromium and runs the tests in parallel. Takes about 30 seconds. If you're working on a particular component, you can still run tests just for that that component and its dependant packages. Best of both world's hopefully.

@ottenhoff
Copy link
Contributor

This PR is consistently failing an Assignments cypress test in Grader.

http://localhost:8080/direct/assignment/setGrade.json POST returns a 400 when setting a letter grade on a student assignment

@adrianfish
Copy link
Contributor Author

adrianfish commented Apr 7, 2025

I am totally amiss as to why this would fail the cypress tests. The grader source is touched, but very superficially, just removing some "same-origin" options from the fetch requests (default anyway) and uncoupling the grader from the portal object a bit by using getSiteId instead of portal.siteId. This PR also does not touch AssignmentEntityProvider at all.

I just did a full master rebuild and ran the latest cypress tests, and it fails, so whatever I've done in this PR, the Cypress tests were already failing

@ottenhoff
Copy link
Contributor

you dont see a stacktrace locally when setting a letter grade on a student in Assignments?

@adrianfish
Copy link
Contributor Author

@ottenhoff Do you mean in the cypress output, or when actually directly using Sakai?

@ottenhoff
Copy link
Contributor

just replicate the cypress test: create an assignment using letter grades and try to grade a student in the Grader

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

Successfully merging this pull request may close these issues.

3 participants