Skip to content

Commit d1a3a5d

Browse files
authored
chore: cleanup test logging on CI (#5848)
1 parent 8df4dcb commit d1a3a5d

File tree

1 file changed

+4
-28
lines changed

1 file changed

+4
-28
lines changed

test/downloads-path.spec.ts

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -110,49 +110,25 @@ it('should report downloads in downloadsPath folder', async ({downloadsBrowser,
110110
});
111111

112112
it('should accept downloads in persistent context', async ({persistentDownloadsContext, testInfo, server}) => {
113-
logOnCI('----- 1.1');
114113
const page = persistentDownloadsContext.pages()[0];
115-
logOnCI('----- 1.2');
116114
const [ download ] = await Promise.all([
117-
page.waitForEvent('download').then(d => {
118-
logOnCI('----- 1.3');
119-
return d;
120-
}),
121-
page.click('a').then(d => {
122-
logOnCI('----- 1.4');
123-
}),
115+
page.waitForEvent('download'),
116+
page.click('a'),
124117
]);
125-
logOnCI('----- 1.5');
126118
expect(download.url()).toBe(`${server.PREFIX}/download`);
127-
logOnCI('----- 1.6');
128119
expect(download.suggestedFilename()).toBe(`file.txt`);
129-
logOnCI('----- 1.7');
130120
const path = await download.path();
131-
logOnCI('----- 1.8');
132121
expect(path.startsWith(testInfo.outputPath(''))).toBeTruthy();
133-
logOnCI('----- 1.9');
134122
});
135123

136124
it('should delete downloads when persistent context closes', async ({persistentDownloadsContext}) => {
137-
logOnCI('----- 2.1');
138125
const page = persistentDownloadsContext.pages()[0];
139-
logOnCI('----- 2.2');
140126
const [ download ] = await Promise.all([
141-
page.waitForEvent('download').then(d => {
142-
logOnCI('----- 2.3');
143-
return d;
144-
}),
145-
page.click('a').then(() => {
146-
logOnCI('----- 2.4');
147-
}),
127+
page.waitForEvent('download'),
128+
page.click('a'),
148129
]);
149-
logOnCI('----- 2.5');
150130
const path = await download.path();
151-
logOnCI('----- 2.6');
152131
expect(fs.existsSync(path)).toBeTruthy();
153-
logOnCI('----- 2.7');
154132
await persistentDownloadsContext.close();
155-
logOnCI('----- 2.8');
156133
expect(fs.existsSync(path)).toBeFalsy();
157-
logOnCI('----- 2.9');
158134
});

0 commit comments

Comments
 (0)