8000 feat: tests for "Latests rewards distribution" section on Dashboard by Vorobeyko · Pull Request #264 · lidofinance/csm-widget · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: tests for "Latests rewards distribution" section on Dashboard #264

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

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

Vorobeyko
Copy link
Contributor
@Vorobeyko Vorobeyko commented Jun 18, 2025

Description

✅ What’s new

  • 🧪 Added tests for Latest Rewards Distribution
  • 🔌 Added more contract clients to simplify contract interactions in tests
  • 🚀 Upgraded Playwright to 1.53.1 — now test steps look much cleaner in the report 🧼📊
  • 🧠 Moved waitForCallback to helper (was in BasePage) — no direct page dependency anymore
  • 🏷️ Updated and cleaned up several test IDs for better structure and readability

Related Issue

How Has This Been Tested?

Checklist

  • Requires other services change
  • Affects to other services
  • Requires dependency update
  • Automated tests
  • Looks good on large screens
  • Looks good on mobile

@Vorobeyko Vorobeyko requested a review from a team as a code owner June 18, 2025 16:34
@Vorobeyko Vorobeyko requested review from madlabman and dgusakov June 18, 2025 16:34
@preview-stands
Copy link
preview-stands bot commented Jun 18, 2025

Preview stand status

Preview stand available on testnet

import { test } from '@playwright/test';
import { contractClients } from 'tests/services/clients.contract';

export const getReportFrameForLastRewards = async () => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not store in CSFeeOracleContract?

.getByText('View on Etherscan')
.click(),
]);
expect(etherscanPage.url()).toContain(`.etherscan.io`);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it's possible to verify latest tx id to verify full url to compare freshnes of tx'l link

`Expected`,
);
await expect(latestRewardsDistribution.expectedDays).toContainText(
`in ${expectedDays} day`,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As i see value able to be "Today". Maybe "Tomorrow. Can be flaky

@@ -93,7 +93,6 @@
"@nestjs/common": "^10.4.16",
"@next/bundle-analyzer": "^13.2.4",
"@next/eslint-plugin-next": "^13.4.13",
"@playwright/test": "^1.51.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👎

@@ -44,7 +44,7 @@
}
],
"import/no-extraneous-dependencies": [
"error",
"off",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👎

.getByText('View on Etherscan')
.click(),
]);
expect(etherscanPage.url()).toContain(`.etherscan.io`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dot in the start can fail with the testrun on prod environment (.etherscan.io)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0