-
Notifications
You must be signed in to change notification settings - Fork 42
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
Update rpc-handler
and fix tests following beta merge
#345
Conversation
|
I also investigated why In my testing on Polygon it pulled two explorers, the first being polygonscan.com, the official one and I could view the tx instantly. I copied the same hash into For this reason I've added a toast in the case we can't find an explorer for a given network that gives feedback saying the default generic explorer may take longer to find the tx. |
The tests have been failing consistently for the past two weeks, this PR fixes them. It would also be good to ensure that tests are ran as part of CI as they haven't been for a little while and it's been allowing PRs through that are breaking tests although I'm not sure how to resolve that off the top of my head. https://github.com/ubiquity/pay.ubq.fi/blob/development/.github/workflows/cypress-testing.yml - Is it because |
QA of the tests now working: https://github.com/ubq-testing/pay.ubq.fi/actions/runs/11449624381/job/31855559926 Ready for review Not sure of more elegant ways to link this workflow to CI, any suggestions?
|
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.
I think this means that we'll need to re-use one of the permits from one of the prior two tests to use as the "claimed" one? Or something to that effect right?
This is problematic. This means one test has a dependency on other test. Tests should be independent. You can move both to same test if test isn't too big. Or do the claiming first in second test.
Or you can reuse one of the previously claimed permit on network 100 as this is what anvil uses by default. Probably will have to deal with signer problem though if you face one.
I create a permit with a function that uses I assumed you were using a real claimed permit url but I wasn't sure because obv as you say we'd hit a signer issue |
This makes a precondition that test-1 must pass before test-2. The best solution is to find an old claimed permit and or just make one even of 0.00001 wxdai and let the test use it. The test will be decoupled, isolated, and deterministic. |
I hear you. I'm sure you authored those tests but you were pulling a env variables from your |
If you are referring to test "should reveal a redeem code after claim", yes you can use the existing permit URL that was there. |
Sorry your message read like I'd need to create a new one against the anvil default account and because of the Will address these things today, ty |
Hardcoded the permit as requested but I'm still using the I stabilized the tests in this repo but I'm no cypress or testing/automation expert by any means, is this acceptable? Kept my anvil spawner logic as you agreed it's the better approach when considering CI. QA: https://github.com/ubq-testing/pay.ubq.fi/actions/runs/11487208662 |
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.
- Local claims seems to be working fine
- Hope this PR adds more stability
- I really need it for reloadly gift cards production setup
https://github.com/ubq-testing/pay.ubq.fi/actions/runs/11487208662
|
|
||
- name: Cypress run | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
build: yarn run build | ||
start: yarn test:fund | ||
start: npx wrangler pages dev static --port 8080 --binding USE_RELOADLY_SANDBOX=true RELOADLY_API_CLIENT_ID="$RELOADLY_SANDBOX_API_CLIENT_ID" RELOADLY_API_CLIENT_SECRET="$RELOADLY_SANDBOX_API_CLIENT_SECRET" & |
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.
@EresDev you had this as it's own step before but that's not right as the env hadn't fully setup yet that's why I've made this change here.
Is this the correct way to pass reloadly env vars?
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.
https://github.com/ubq-testing/pay.ubq.fi/actions/runs/11504344113/job/32023622908#step:7:1
I just added the id and secret for the sandbox taken directly from the google doc to my repo secrets and the errors are still present.
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.
I think there is logic missing inside the cards feature that is not throwing the error properly otherwise Cypress would fail, do you agree?
The log style looks unfamiliar to me also so I'm not 100% where it's coming from, so I think it needs it's own task and shouldn't block this pr.
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.
My wf run is fully passing.
Yes, tests are passing now. I ran multiple times, and one test was failing that time continuously. For me the quick guess was the claim URL. But I see that is what e2e tests do sometimes. They seem fine now.
Is this the correct way to pass reloadly env vars?
Seems correct, but I am also learning these workflow. So, no expert here either.
I just added the id and secret for the sandbox taken directly from the google doc to my repo secrets and the errors are still present.
Yes, I just tried myself too, and they are still showing up.
I think there is logic missing inside the cards feature that is not throwing the error properly otherwise Cypress would fail, do you agree?
I feel like it is a problem with workflow code (how they are passing those secrets) and probably not code side. Code works fine on my local setup. I will look more into this with my next PR.
Resolves #350
Related to ubiquity/rpc-handler#54
Related to #332
rpc-handler
so that we are now actually using the proxyrpc-handler
to fetch ENS nameTested locally with anvil
Tested on polygon mainnet
Tested with Cypress
Haven't been able to produce a single UI breaking error or problem in regards to RPC interactions both claiming and invalidating but I've watched the retry and proxy logic in action by setting
strictLogs: false
and watching every log taking place from within therpc-handler
.I thought it would be easier to just hardcode the
permitConfig
that you previously fetched withCypress.env
, I think this means that we'll need to re-use one of the permits from one of the prior two tests to use as the "claimed" one? Or something to that effect right?