Skip to content

Commit

Permalink
fix: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
sahar-fehri committed Nov 25, 2024
1 parent 058ff23 commit 3bd6c72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/e2e/tests/privacy/polling.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ async function mockInfura(mockServer: Mockttp): Promise<MockedEndpoint[]> {
})),
];
}

const DELAY_UNTIL_NEXT_POLL = 20000;
async function getAllInfuraJsonRpcRequests(
mockedEndpoint: MockedEndpoint[],
): Promise<JsonRpcRequest[]> {
Expand Down Expand Up @@ -275,7 +275,7 @@ describe('Account Tracker API polling', function () {
const homepage = new HomePage(driver);
await homepage.check_pageIsLoaded();
// Want to wait long enough to pull requests relevant to a single loop cycle
await driver.delay(20000);
await driver.delay(DELAY_UNTIL_NEXT_POLL);
const infuraJsonRpcRequests = await getAllInfuraJsonRpcRequests(
mockedEndpoint,
);
Expand Down Expand Up @@ -366,7 +366,7 @@ describe('Token Detection', function () {
await loginWithoutBalanceValidation(driver);
const homepage = new HomePage(driver);
await homepage.check_pageIsLoaded();
await driver.delay(20000);
await driver.delay(DELAY_UNTIL_NEXT_POLL);

for (const single of mockedEndpoints) {
const requests = await single.getSeenRequests();
Expand Down

0 comments on commit 3bd6c72

Please sign in to comment.