-
Notifications
You must be signed in to change notification settings - Fork 209
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: Add CCTP E2E tests to CI #1843
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
cy.confirmSpending(USDCAmountToSend.toString()) | ||
|
||
/** | ||
* Currently synpress cy.confirmMetamaskTransaction doesn't work on Sepolia |
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.
Is there no way to fix this currently? We are also skipping 1 test coz of it which isn't ideal.
.github/workflows/build-test.yml
Outdated
e2e_content=$(cat packages/arb-token-bridge-ui/tests/e2e/specfiles.json | jq --compact-output .) | ||
cctp_content=$(cat packages/arb-token-bridge-ui/tests/e2e/cctp.json | jq --compact-output .) | ||
|
||
e2e_with_orbit=$(echo "$e2e_content" | jq '[.[] | {type: "regular", name: .name, file: .file, recordVideo: .recordVideo, orbitTest: "0"}, {type: "regular", name: .name, file: .file, recordVideo: .recordVideo, orbitTest: "1"}]' | jq . --compact-output) | ||
cctp_formatted=$(echo "$cctp_content" | jq '[.[] | {type: "cctp", name: .name, file: .file, recordVideo: .recordVideo, orbitTest: null}]' | jq . --compact-output) | ||
|
||
combined_content=$(echo "$e2e_with_orbit $cctp_formatted" | jq -s 'add' --compact-output) | ||
echo "e2eFiles=$combined_content" >> $GITHUB_OUTPUT |
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.
this is way too chunky to read now
can you clean this up please?
we can also handle this in a separate file rather than inlining the processing script
.github/workflows/build-test.yml
Outdated
test-e2e: | ||
name: "Test E2E${{ matrix.orbit-test == '1' && ' with L3' || '' }} - ${{ matrix.tests.name }}" | ||
name: "Test ${{ matrix.test.type == 'cctp' && 'E2E CCTP' || 'E2E' }}${{ matrix.test.type == 'regular' && matrix.test.orbitTest == '1' && ' with L3' || '' }} - ${{ matrix.test.name }}" |
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.
name: "Test ${{ matrix.test.type == 'cctp' && 'E2E CCTP' || 'E2E' }}${{ matrix.test.type == 'regular' && matrix.test.orbitTest == '1' && ' with L3' || '' }} - ${{ matrix.test.name }}" | |
name: "Test E2E ${{ matrix.test.type == 'cctp' && 'CCTP' || matrix.test.orbitTest == '1' && 'with L3' }} - ${{ matrix.test.name }}" |
does this work?
.github/workflows/build-test.yml
Outdated
|
||
- name: Run e2e tests via cypress-io/github-action | ||
uses: cypress-io/github-action@8d3918616d8ac34caa2b49afc8b408b6a872a6f5 # [email protected] | ||
with: | ||
start: yarn start | ||
command: ${{ matrix.orbit-test == '1' && 'yarn test:e2e:orbit --browser chromium' || 'yarn test:e2e --browser chromium' }} | ||
command: ${{ matrix.test.type == 'cctp' && 'yarn test:e2e:cctp --browser chromium' || (matrix.test.orbitTest == '1' && 'yarn test:e2e:orbit --browser chromium' || 'yarn test:e2e --browser chromium') }} |
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.
command: ${{ matrix.test.type == 'cctp' && 'yarn test:e2e:cctp --browser chromium' || (matrix.test.orbitTest == '1' && 'yarn test:e2e:orbit --browser chromium' || 'yarn test:e2e --browser chromium') }} | |
command: "yarn test:e2e${{ matrix.test.type == 'cctp' && ':cctp' || matrix.test.orbitTest == '1' && ':orbit' }} --browser chromium" |
does this work?
const SEPOLIA_INFURA_RPC_URL = `https://sepolia.infura.io/v3/${INFURA_KEY}` | ||
const sepoliaRpcUrl = | ||
process.env.NEXT_PUBLIC_SEPOLIA_RPC_URL ?? SEPOLIA_INFURA_RPC_URL | ||
const arbSepoliaRpcUrl = 'https://sepolia-rollup.arbitrum.io/rpc' | ||
|
||
const sepoliaProvider = new StaticJsonRpcProvider(sepoliaRpcUrl) | ||
const arbSepoliaProvider = new StaticJsonRpcProvider(arbSepoliaRpcUrl) | ||
|
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.
nbd but why move them?
}) | ||
}) | ||
|
||
console.log(JSON.stringify(tests)) |
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.
add end of file line?
Closes fs-729
Summary
Steps to test