mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 21:53:35 +03:00
test: improve test names (#5511)
We have a few tests with duplicated names and some describes with bad names
This commit is contained in:
parent
3dd06815b9
commit
b07dba8075
@ -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}) {
|
||||
|
@ -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}) {
|
||||
|
@ -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');
|
||||
|
@ -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}) => {
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user