Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
4866a64
transaction kit base integration to PillarX
RanaBug Jul 24, 2025
e503a12
Merge branch 'staging' into feat/PRO-3525/integration-transaction-kit-2
RanaBug Aug 11, 2025
c205c9f
fixes after staging merge
RanaBug Aug 15, 2025
94594c3
update unit tests
RanaBug Aug 15, 2025
1d33f0f
Merge branch 'staging' into feat/PRO-3525/integration-transaction-kit-2
RanaBug Aug 15, 2025
fa727df
minor fix after pulse merge
RanaBug Aug 15, 2025
f0fe0ce
fixes after review
RanaBug Aug 19, 2025
d6a73ed
Merge branch 'staging' into feat/PRO-3525/integration-transaction-kit-2
RanaBug Aug 19, 2025
b79fe07
fixes with walletConnect and payload transactions
RanaBug Aug 20, 2025
9b351a3
minor fix after review
RanaBug Aug 20, 2025
a28ae1b
fixes for batched transaction and changes of chainId
RanaBug Aug 21, 2025
6e4ae61
minor UI fix for batch button
RanaBug Aug 21, 2025
77089ef
Merge branch 'staging' into feat/PRO-3525/integration-transaction-kit-2
RanaBug Aug 21, 2025
bb27765
fix gasless selection
RanaBug Aug 21, 2025
2bb7eed
update transaction kit and resolution of single transaction chainId
RanaBug Aug 22, 2025
064ff31
gasless loading fix
RanaBug Aug 26, 2025
65db2fa
Merge pull request #374 from pillarwallet/feat/PRO-3525/integration-t…
RanaBug Aug 27, 2025
7afd9e2
my holdings section added and search targetted to my holdings, minor …
RanaBug Aug 28, 2025
264e180
sell feature implementation with selecting tokens and values on the U…
RanaBug Aug 29, 2025
54d449c
added preview sell component, and the full Relay and fee flow
RanaBug Sep 5, 2025
c126eaf
refreshing quotes in Sell feature and PreviewSell
RanaBug Sep 5, 2025
1754f42
snapshot update
RanaBug Sep 5, 2025
45d1db9
implementation of the gnosis feature flag
RanaBug Sep 8, 2025
4b9b773
update unit tests
RanaBug Sep 8, 2025
9e9e66f
update unit tests
RanaBug Sep 8, 2025
56be0de
Merge pull request #392 from pillarwallet/PRO-3645/feature-flag-gnosis
RanaBug Sep 8, 2025
70f3541
fixes after review
RanaBug Sep 9, 2025
e0eb063
minor fixes after review
RanaBug Sep 9, 2025
7027922
Merge pull request #391 from pillarwallet/feat/PRO-3638/sell-feature-…
RanaBug Sep 9, 2025
a5f4a3f
Update package.json dependencies and devDependencies lock
IAmKio Sep 9, 2025
72644df
Updated package and package lock
IAmKio Sep 9, 2025
bb39005
Updated dependencies and conflicts
IAmKio Sep 10, 2025
1f0cf97
Merge pull request #393 from pillarwallet/fix/dependency-locking
IAmKio Sep 10, 2025
8f64079
add unit tests
RanaBug Sep 10, 2025
9ddf921
Merge pull request #394 from pillarwallet/feat/PRO-3638/sell-feature-…
RanaBug Sep 11, 2025
24f93a6
fixes after QA review
RanaBug Sep 11, 2025
faa8dd2
Merge pull request #395 from pillarwallet/feat/PRO-3638/sell-feature-…
RanaBug Sep 11, 2025
41b45d9
minor UI fixes after QA review
RanaBug Sep 11, 2025
43eb1bc
Merge pull request #396 from pillarwallet/feat/PRO-3638/sell-feature-…
RanaBug Sep 11, 2025
cf8983d
preview UI cleanup, refreshes, calculations
RanaBug Sep 15, 2025
808baa8
added gast estimation for Sell, refresh updates
RanaBug Sep 16, 2025
2bc45df
Merge branch 'staging' into PRO-3679/pulse-preview-screen
RanaBug Sep 16, 2025
6105c86
Update config.yml
chetanbothra Sep 17, 2025
c0f3a76
Merge pull request #397 from pillarwallet/PRO-3679/pulse-preview-screen
RanaBug Sep 17, 2025
81f60b6
version update intentSDK 1.0.0-alpha.10
RanaBug Sep 17, 2025
965575e
remove auto version update
RanaBug Sep 17, 2025
3b2b2f4
Merge pull request #399 from pillarwallet/fix/update-intent-sdk-version
RanaBug Sep 17, 2025
b758ec7
fixes after QA review
RanaBug Sep 18, 2025
5218b94
Merge pull request #400 from pillarwallet/PRO-3679/pulse-preview-screen
RanaBug Sep 18, 2025
b3abc28
Update config.yml
chetanbothra Sep 18, 2025
ba91d31
ui fixes after QA review
RanaBug Sep 19, 2025
bdacf08
unit tests fixes
RanaBug Sep 19, 2025
344aa3d
Merge pull request #402 from pillarwallet/playwrite-e2e
chetanbothra Sep 19, 2025
821b0fe
Merge pull request #403 from pillarwallet/PRO-3679/pulse-preview-screen
RanaBug Sep 19, 2025
db863c2
minor fix
RanaBug Sep 22, 2025
71d9a5f
Merge pull request #404 from pillarwallet/PRO-3679/pulse-preview-screen
RanaBug Sep 22, 2025
af7779e
FE implementation of Transaction Status for Sell without animations
RanaBug Sep 22, 2025
282110b
Merge pull request #405 from pillarwallet/feat/PRO-3681/transaction-s…
IAmKio Sep 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,124 @@ jobs:

curl -X POST -H 'Content-type: application/json' --data '{"text":"'"$SLACK_MESSAGE"'"}' $E2E_SLACK_WEBHOOK_URL

e2e-playwright:
working_directory: ~/x
docker:
- image: cypress/included:cypress-13.15.1-node-20.18.0-chrome-130.0.6723.69-1-ff-131.0.3-edge-130.0.2849.52-1
resource_class: xlarge
steps:
- checkout

- run:
name: Install jq
command: |
apt-get update && apt-get install -y curl jq

- run:
name: Checkout x-e2e repo and run tests
no_output_timeout: 90m
command: |
cd ~
git clone -b pillarx-playwright --single-branch https://$GITHUB_TOKEN@github.com/pillarwallet/x-e2e.git
cd x-e2e
git pull
sed -i "s|base_url_value|$BASE_URL|g" .env
sed -i "s|dry_run_value|$DRY_RUN|g" .env
sed -i "s|master_email_value|$MASTER_EMAIL|g" .env
sed -i "s|master_wallet_value|$MASTER_WALLET|g" .env
sed -i "s|testmail_api_key_value|$TESTMAIL_API_KEY|g" .env
sed -i "s|testmail_namespace_value|$TESTMAIL_NAMESPACE|g" .env
sed -i "s|recovery_recipient_address_value|$RECOVERY_RECIPIENT_ADDRESS|g" .env
sed -i "s|minimum_amount_value|$MINIMUM_AMOUNT|g" .env
sed -i "s|headless_value|$HEADLESS|g" .env
sed -i "s|timeout_value|$TIMEOUT|g" .env
sed -i "s|debug_value|$DEBUG|g" .env
sed -i "s|ci_value|$CI|g" .env
sed -i "s|headed_value|$HEADED|g" .env
sed -i "s|sushi_url_value|$SUSHI_URL|g" .env
sed -i "s|staging_url_value|$STAGING_URL|g" .env
sed -i "s|testmail_username_value|$TESTMAIL_USERNAME|g" .env
sed -i "s|testmail_email_value|$TESTMAIL_EMAIL|g" .env
npm install
npx playwright install
npm run test:all

- run:
name: Move test report
when: always
command: |
mv /root/x-e2e/mochawesome-report /tmp/
chmod 777 -R /tmp/mochawesome-report

- store_artifacts:
path: /tmp/mochawesome-report
when: always

- run:
name: Parse and send test results to Slack
when: always
command: |
wget https://output.circle-artifacts.com/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/${CIRCLE_NODE_INDEX}/tmp/mochawesome-report/mochawesome.json

MOCHAWESOME_JSON_FILE=./mochawesome.json
FAILED_TESTS_FILE=failed-tests.txt
TOTAL_SUITES=$(jq '.stats.suites' $MOCHAWESOME_JSON_FILE)
TOTAL_PASSES=$(jq '.stats.passes' $MOCHAWESOME_JSON_FILE)
TOTAL_PENDING=$(jq '.stats.pending' $MOCHAWESOME_JSON_FILE)
TOTAL_FAILURES=$(jq '.stats.failures' $MOCHAWESOME_JSON_FILE)
START_TIME=$(jq -r '.stats.start' $MOCHAWESOME_JSON_FILE)
END_TIME=$(jq -r '.stats.end' $MOCHAWESOME_JSON_FILE)
DURATION_MS=$(jq -r '.stats.duration' $MOCHAWESOME_JSON_FILE)

START_TIME_FORMATTED=$(date -d "$START_TIME" "+%Y-%m-%d %H:%M:%S")
END_TIME_FORMATTED=$(date -d "$END_TIME" "+%Y-%m-%d %H:%M:%S")
DURATION_MIN=$(awk "BEGIN {printf \"%.2f\",${DURATION_MS}/60000}")

jq -r '.results[] | .suites[] | select(.failures > 0) | {suite: .title, tests: [.tests[] | select(.fail) | .title]} | select(.tests | length > 0) |
"*Suite:* \(.suite)\n*Failing Tests:* \n\(.tests | map("- " + .) | join("\n"))\n"' $MOCHAWESOME_JSON_FILE > $FAILED_TESTS_FILE

if [ -s $FAILED_TESTS_FILE ]; then
MESSAGE=$(cat $FAILED_TESTS_FILE)
SLACK_MESSAGE=":x: *PillarX UI Tests Failed :x: *\n\
*Project:* ${CIRCLE_PROJECT_REPONAME}\n\
*Triggered by:* ${CIRCLE_USERNAME}\n\
*Branch:* ${CIRCLE_BRANCH}\n\
*Commit:* <https://github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/commit/${CIRCLE_SHA1}|${CIRCLE_SHA1}>\n\n\
*Test Summary:*\n\
*Total Suites:* ${TOTAL_SUITES}\n\
*Passes:* ${TOTAL_PASSES}\n\
*Pending:* ${TOTAL_PENDING}\n\
*Failures:* ${TOTAL_FAILURES}\n\
*Start Time:* ${START_TIME_FORMATTED}\n\
*End Time:* ${END_TIME_FORMATTED}\n\
*Duration:* ${DURATION_MIN} minutes\n\n\
*Failed Tests:*\n${MESSAGE}\n\
*Report:* <https://output.circle-artifacts.com/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/${CIRCLE_NODE_INDEX}/tmp/mochawesome-report/mochawesome.html|View HTML Report>\n\
*Job:* <https://circleci.com/gh/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BUILD_NUM}|View Job>\n\
cc: ${TAG_RESPONSIBLE_PEOPLE}"
else
SLACK_MESSAGE=":white_check_mark: All PillarX UI tests passed\n\
*Project:* ${CIRCLE_PROJECT_REPONAME}\n\
*Triggered by:* ${CIRCLE_USERNAME}\n\
*Branch:* ${CIRCLE_BRANCH}\n\
*Commit:* <https://github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/commit/${CIRCLE_SHA1}|${CIRCLE_SHA1}>\n\
*Job:* <https://circleci.com/gh/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BUILD_NUM}|View Job>\n\
\n*Test Summary:*\n\
*Total Suites:* ${TOTAL_SUITES}\n\
*Passes:* ${TOTAL_PASSES}\n\
*Pending:* ${TOTAL_PENDING}\n\
*Failures:* ${TOTAL_FAILURES}\n\
*Start Time:* ${START_TIME_FORMATTED}\n\
*End Time:* ${END_TIME_FORMATTED}\n\
*Duration:* ${DURATION_MIN} minutes\n\n\
*Report:* <https://output.circle-artifacts.com/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/${CIRCLE_NODE_INDEX}/tmp/mochawesome-report/mochawesome.html|View HTML Report>\n\
*Job:* <https://circleci.com/gh/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BUILD_NUM}|View Job>"

fi

curl -X POST -H 'Content-type: application/json' --data '{"text":"'"$SLACK_MESSAGE"'"}' $E2E_SLACK_WEBHOOK_URL


workflows:
version: 2

Expand All @@ -118,3 +236,8 @@ workflows:
branches:
only:
- staging
- e2e-playwright:
filters:
branches:
only:
- staging
46 changes: 46 additions & 0 deletions __mocks__/EtherspotTransactionKitProvider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/* eslint-disable react/jsx-no-constructed-context-values */
import React, { createContext } from 'react';

// Mock context type that matches the real implementation
export interface EtherspotTransactionKitContextType {
data: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
kit: any; // Mock kit object
walletAddress: string | undefined;
setWalletAddress: React.Dispatch<React.SetStateAction<string | undefined>>;
};
}

export const EtherspotTransactionKitContext =
createContext<EtherspotTransactionKitContextType | null>({
data: {
kit: {
// Mock kit methods, can add more as needed for the tests
getWalletAddress: () => Promise.resolve('0xMockWalletAddress'),
},
walletAddress: '0xMockWalletAddress',
setWalletAddress: () => {},
},
});

export const EtherspotTransactionKitProvider: React.FC<{
// eslint-disable-next-line @typescript-eslint/no-explicit-any, react/no-unused-prop-types
config: any;
children: React.ReactNode;
}> = ({ children }) => {
return (
<EtherspotTransactionKitContext.Provider
value={{
data: {
kit: {
getWalletAddress: () => Promise.resolve('0xMockWalletAddress'),
},
walletAddress: '0xMockWalletAddress',
setWalletAddress: () => {},
},
}}
>
{children}
</EtherspotTransactionKitContext.Provider>
);
};
29 changes: 29 additions & 0 deletions __mocks__/useTransactionKit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { vi } from 'vitest';

const useTransactionKit = vi.fn(() => ({
kit: {
getState: vi.fn(() => ({
namedTransactions: {},
batches: {},
isEstimating: false,
isSending: false,
containsSendingError: false,
containsEstimatingError: false,
})),
getEtherspotProvider: vi.fn(() => ({
getChainId: vi.fn(() => 1),
})),
transaction: vi.fn(() => ({
name: vi.fn(() => ({
estimate: vi.fn(() => Promise.resolve({})),
send: vi.fn(() => Promise.resolve({})),
})),
})),
estimateBatches: vi.fn(() => Promise.resolve({})),
sendBatches: vi.fn(() => Promise.resolve({})),
},
walletAddress: '0x1234567890123456789012345678901234567890',
setWalletAddress: vi.fn(),
}));

export default useTransactionKit;
Loading