-
Notifications
You must be signed in to change notification settings - Fork 196
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(e2e): test sync percentage #2264
test(e2e): test sync percentage #2264
Conversation
|
It would be nice to test the percentage increase from 0, 50, 100, etc..., but because of how chunk sizes work we'd need to generate over 5000 logs, which is too slow on the test set up. Tested manually and it does though! |
@@ -3,4 +3,6 @@ import { Page, expect } from "@playwright/test"; | |||
export async function waitForInitialSync(page: Page) { | |||
const syncStep = page.locator("#sync-step"); | |||
await expect(syncStep).toHaveText("live"); | |||
const syncProgress = page.locator("#sync-percentage"); | |||
await expect(syncProgress).toHaveText("100"); |
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.
do we need to test for this?
I kinda wonder about keeping the "live" indicator (caught up) separate from the percentage synced, so you can e.g. hide your load screen (because "live") but potentially show how "up to date" you are (percentage)
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.
That makes sense - in that case I think we can remove this test. createStoreSync.test.ts
does it more directly
|
||
const address = "0xad97505a508daf984fe60302109e0115e544b267"; | ||
|
||
describe("createStoreSync", () => { |
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 assume this is here because we haven't created all the scaffolding (anvil, database, etc.) in store-sync tests yet?
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.
Yes - store-sync
doesn't have a contracts folder, execa
, etc. I kind of like that it is more pure but we do risk e2e
getting bloated with tests that are not fully "end to end"
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.
It would be nice to test the percentage increase from 0, 50, 100, etc..., but because of how chunk sizes work we'd need to generate over 5000 logs, which is too slow on the test set up.
We could make this configurable so it's easier to test. But no need to do that here!
Tests that the sync progress is 100 when live