test: improve test names (#5511)

We have a few tests with duplicated names and some describes with bad names
This commit is contained in:
Darío Kondratiuk 2021-02-24 18:28:22 -03:00 committed by GitHub
parent 3dd06815b9
commit b07dba8075
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 8 deletions

View File

@ -16,7 +16,7 @@
import { it, expect, describe } from './fixtures';
describe('oopif', (suite, { browserName }) => {
describe('CSS Coverage', (suite, { browserName }) => {
suite.skip(browserName !== 'chromium');
}, () => {
it('should work', async function({browserType, page, server}) {

View File

@ -23,7 +23,7 @@ async function({page}) {
expect(page.coverage).toBe(null);
});
describe('oopif', (suite, { browserName }) => {
describe('JS Coverage', (suite, { browserName }) => {
suite.skip(browserName !== 'chromium');
}, () => {
it('should work', async function({page, server}) {

View File

@ -110,7 +110,7 @@ describe('session', (suite, { browserName }) => {
await context.close();
});
it('should work', async function({browser}) {
it('should work with newBrowserCDPSession', async function({browser}) {
const session = await (browser as ChromiumBrowser).newBrowserCDPSession();
const version = await session.send('Browser.getVersion');

View File

@ -28,7 +28,7 @@ fixtures.outputTraceFile.init(async ({ testInfo }, run) => {
});
const { it, expect, describe } = fixtures.build();
describe('oopif', (suite, { browserName }) => {
describe('tracing', (suite, { browserName }) => {
suite.skip(browserName !== 'chromium');
}, () => {
it('should output a trace', async ({browser, page, server, outputTraceFile}) => {

View File

@ -32,7 +32,7 @@ it('should emulate type', async ({page, server}) => {
expect(await page.evaluate(() => matchMedia('print').matches)).toBe(false);
});
it('should throw in case of bad type argument', async ({page, server}) => {
it('should throw in case of bad media argument', async ({page, server}) => {
let error = null;
// @ts-expect-error 'bad' is not a valid media type
await page.emulateMedia({ media: 'bad'}).catch(e => error = e);
@ -61,7 +61,7 @@ it('should default to light', async ({page, server}) => {
expect(await page.evaluate(() => matchMedia('(prefers-color-scheme: light)').matches)).toBe(true);
});
it('should throw in case of bad argument', async ({page, server}) => {
it('should throw in case of bad colorScheme argument', async ({page, server}) => {
let error = null;
// @ts-expect-error 'bad' is not a valid media type
await page.emulateMedia({ colorScheme: 'bad' }).catch(e => error = e);

View File

@ -146,7 +146,7 @@ it('should use viewport size from window features', async function({browser, ser
expect(resized).toEqual({width: 500, height: 400});
});
it('should respect routes from browser context', async function({browser, server}) {
it('should respect routes from browser context when using window.open', async function({browser, server}) {
const context = await browser.newContext();
const page = await context.newPage();
await page.goto(server.EMPTY_PAGE);