Skip to content

Commit 4c70f65

Browse files
committed
better waiting
1 parent a3f9b7e commit 4c70f65

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

special-pages/pages/new-tab/app/privacy-stats/integration-tests/privacy-stats.page.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class PrivacyStatsPage {
7676
await this.ntp.openPage({ additional: { stats: 'manyOnlyTop' } });
7777

7878
// control, ensure we have 5 rows
79-
expect(await rows.count()).toBe(5);
79+
await expect(rows).toHaveCount(5);
8080

8181
// check the initial values
8282
expect(await rows.nth(0).textContent()).toBe('Facebook310');
@@ -103,8 +103,8 @@ export class PrivacyStatsPage {
103103
// open the NTP with the correct param
104104
await this.ntp.openPage({ additional: { stats: 'fewOnlyTop' } });
105105

106-
// control, ensure we have 5 rows
107-
expect(await rows.count()).toBe(3);
106+
// control, ensure we have 3 rows
107+
await expect(rows).toHaveCount(3);
108108

109109
// check the initial values
110110
expect(await rows.nth(0).textContent()).toBe('Facebook310');
@@ -126,7 +126,7 @@ export class PrivacyStatsPage {
126126
await this.ntp.openPage({ additional: { stats: 'topAndOneOther' } });
127127

128128
// should show all 5 items
129-
expect(await rows.count()).toBe(5);
129+
await expect(rows).toHaveCount(5);
130130

131131
// And should also show the text, but no expander
132132
// ensure the toggle is absent
@@ -145,7 +145,7 @@ export class PrivacyStatsPage {
145145
await this.ntp.openPage({ additional: { stats: 'manyTopAndOther' } });
146146

147147
// control, ensure we have 5 rows
148-
expect(await rows.count()).toBe(5);
148+
await expect(rows).toHaveCount(5);
149149

150150
// control: ensure 'other' text is absent here
151151
await expect(this.page.getByTestId('ListFooter')).not.toContainText('2 attempts from other networks');

0 commit comments

Comments
 (0)