Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency @playwright/test to v1.39.0 #1819

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 12, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@playwright/test (source) 1.38.1 -> 1.39.0 age adoption passing confidence

Release Notes

microsoft/playwright (@​playwright/test)

v1.39.0

Compare Source

Add custom matchers to your expect

You can extend Playwright assertions by providing custom matchers. These matchers will be available on the expect object.

import { expect as baseExpect } from '@​playwright/test';
export const expect = baseExpect.extend({
  async toHaveAmount(locator: Locator, expected: number, options?: { timeout?: number }) {
    // ... see documentation for how to write matchers.
  },
});

test('pass', async ({ page }) => {
  await expect(page.getByTestId('cart')).toHaveAmount(5);
});

See the documentation for a full example.

Merge test fixtures

You can now merge test fixtures from multiple files or modules:

import { mergeTests } from '@​playwright/test';
import { test as dbTest } from 'database-test-utils';
import { test as a11yTest } from 'a11y-test-utils';

export const test = mergeTests(dbTest, a11yTest);
import { test } from './fixtures';

test('passes', async ({ database, page, a11y }) => {
  // use database and a11y fixtures.
});

Merge custom expect matchers

You can now merge custom expect matchers from multiple files or modules:

import { mergeTests, mergeExpects } from '@​playwright/test';
import { test as dbTest, expect as dbExpect } from 'database-test-utils';
import { test as a11yTest, expect as a11yExpect } from 'a11y-test-utils';

export const test = mergeTests(dbTest, a11yTest);
export const expect = mergeExpects(dbExpect, a11yExpect);
import { test, expect } from './fixtures';

test('passes', async ({ page, database }) => {
  await expect(database).toHaveDatabaseUser('admin');
  await expect(page).toPassA11yAudit();
});

Hide implementation details: box test steps

You can mark a test.step() as "boxed" so that errors inside it point to the step call site.

async function login(page) {
  await test.step('login', async () => {
    // ...
  }, { box: true });  // Note the "box" option here.
}
Error: Timed out 5000ms waiting for expect(locator).toBeVisible()
  ... error details omitted ...

  14 |   await page.goto('https://github.com/login');
> 15 |   await login(page);
     |         ^
  16 | });

See test.step() documentation for a full example.

New APIs

Browser Versions

  • Chromium 119.0.6045.9
  • Mozilla Firefox 118.0.1
  • WebKit 17.4

This version was also tested against the following stable channels:

  • Google Chrome 118
  • Microsoft Edge 118

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot enabled auto-merge (rebase) October 12, 2023 04:28
@vercel
Copy link

vercel bot commented Oct 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
59-node-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 12, 2023 4:28am

@github-actions
Copy link
Contributor

Size Change: 0 B

Total Size: 1.95 kB

ℹ️ View Unchanged
Filename Size
./packages/ui/lib/Button/Button.stories.js 198 B
./packages/ui/lib/Button/index.js 260 B
./packages/ui/lib/Footer/Footer.stories.js 138 B
./packages/ui/lib/Footer/index.js 730 B
./packages/ui/lib/Header/Header.stories.js 139 B
./packages/ui/lib/Header/index.js 487 B

compressed-size-action

@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (e5404e3) 100.00% compared to head (cd65596) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1819   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           13        13           
  Branches         2         2           
=========================================
  Hits            13        13           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@renovate renovate bot merged commit 7188844 into main Oct 12, 2023
8 of 9 checks passed
@renovate renovate bot deleted the renovate/playwright-monorepo branch October 12, 2023 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants