Skip to content

Commit

Permalink
Use default block to check rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarvu committed Dec 19, 2024
1 parent 8cc7637 commit e7b9bc5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/app/src/features/topbar/Topbar.test-e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ test.describe('Topbar', () => {
})

test.describe('Rewards badge', () => {
const REWARDS_PROGRAM_FINISHED_BLOCK = 20189272n
test('Displays total rewards in badge', async ({ page }) => {
const testContext = await setup(page, {
blockchain: {
blockNumber: REWARDS_PROGRAM_FINISHED_BLOCK,
blockNumber: DEFAULT_BLOCK_NUMBER,
chainId: mainnet.id,
},
initialPage: 'easyBorrow',
Expand All @@ -89,13 +88,13 @@ test.describe('Topbar', () => {
})

const topbar = new TopbarPageObject(testContext)
await topbar.expectClaimableRewardsValue('$25.58K')
await topbar.expectClaimableRewardsValue('$29.72K')
})

test('Displays details in dropdown', async ({ page }) => {
const testContext = await setup(page, {
blockchain: {
blockNumber: REWARDS_PROGRAM_FINISHED_BLOCK,
blockNumber: DEFAULT_BLOCK_NUMBER,
chainId: mainnet.id,
},
initialPage: 'easyBorrow',
Expand All @@ -112,15 +111,15 @@ test.describe('Topbar', () => {
{
tokenSymbol: 'wstETH',
amount: '6.3697',
amountUSD: '$25,583.20',
amountUSD: '$29,717.60',
},
])
})

test('Does not display badge when no rewards', async ({ page }) => {
const testContext = await setup(page, {
blockchain: {
blockNumber: REWARDS_PROGRAM_FINISHED_BLOCK,
blockNumber: DEFAULT_BLOCK_NUMBER,
chainId: mainnet.id,
},
initialPage: 'myPortfolio',
Expand Down

0 comments on commit e7b9bc5

Please sign in to comment.