-
Notifications
You must be signed in to change notification settings - Fork 3
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
test: e2e tests added for repo #88
Conversation
ea9c77a
to
5b4e40d
Compare
tests/e2e/specs/proposal.spec.js
Outdated
}); | ||
|
||
it('should have value of 1000 on psm inter', () => { | ||
cy.origin('https://psm.inter.trade', () => { |
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.
Not sure if it's good to depend on the live UI here since a service disruption could impede workflows. Although, even when using a local build of PSM and connecting to a local chain, the app will make a request to https://wallet.agoric.app/network-config. Maybe it's enough to just check that the history item shows up with the new value, below the check for 'Change Accepted', instead of looking at the PSM app.
cc @turadg
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.
Good point, @samsiegart . Could the e2e tests intercept https://wallet.agoric.app/network-config to provide a local result?
I don't see this as a blocking concern for having these tests in CI, but it should be addressed before required green to merge. (I.e. adding it to branch protection)
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.
sounds good. I'll remove the check from the external PSM URL
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.
The workflow is failing because it uses an old version of node incompatible with synpress. We should try updating https://github.com/Agoric/dapp-econ-gov/blob/main/.github/workflows/test.yml#L18 to version 18.
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.
LGTM!
This PR aims to add e2e tests to the repo using the @agoric/synpress library. CI/CD setup to run these tests will be handled in a future PR
How to run and verify tests:
first start the agoric chain using
then start the dapp using
then start the tests using
Note: one of the assertions in the tests depends on a default value in the agoric chain. once the tests have been run once, the value is changed and running the tests a second time fails that assertion. to run the tests more than once, the old chain will have to deleted and then recreated