From e2cc157fc51faef4b27c3eed1e55a395ca91399a Mon Sep 17 00:00:00 2001 From: Justin Hall Date: Sun, 30 Dec 2018 19:22:22 -0700 Subject: [PATCH 1/3] chore: update commands snapshot for latest dom-testing-library --- src/__tests__/__snapshots__/commands.js.snap | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/__tests__/__snapshots__/commands.js.snap b/src/__tests__/__snapshots__/commands.js.snap index 5738084..eeed656 100644 --- a/src/__tests__/__snapshots__/commands.js.snap +++ b/src/__tests__/__snapshots__/commands.js.snap @@ -28,6 +28,10 @@ Array [ "getAllByTitle", "getByValue", "getAllByValue", + "queryByDisplayValue", + "queryAllByDisplayValue", + "getByDisplayValue", + "getAllByDisplayValue", "getAllByRole", "getByRole", "queryByPlaceholderText", From cec215b87e2fb74d5de663ccb0bf4280f0d26063 Mon Sep 17 00:00:00 2001 From: Justin Hall Date: Sun, 30 Dec 2018 19:24:54 -0700 Subject: [PATCH 2/3] chore: update contributors --- .all-contributorsrc | 10 ++++++++++ README.md | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 7b38144..aeaf46d 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -81,6 +81,16 @@ "code", "test" ] + }, + { + "login": "wKovacs64", + "name": "Justin Hall", + "avatar_url": "https://avatars1.githubusercontent.com/u/1288694?v=4", + "profile": "https://github.com/wKovacs64", + "contributions": [ + "code", + "test" + ] } ], "repoType": "github" diff --git a/README.md b/README.md index 5a827ad..29fdcf1 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ [![downloads][downloads-badge]][npmtrends] [![MIT License][license-badge]][license] -[![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors) [![PRs Welcome][prs-badge]][prs] [![Code of Conduct][coc-badge]][coc] @@ -102,6 +102,7 @@ Thanks goes to these people ([emoji key][emojis]): | [
Kent C. Dodds](https://kentcdodds.com)
[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=kentcdodds "Code") [📖](https://github.com/kentcdodds/cypress-testing-library/commits?author=kentcdodds "Documentation") [🚇](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [⚠️](https://github.com/kentcdodds/cypress-testing-library/commits?author=kentcdodds "Tests") | [
Ivan Babak](https://sompylasar.github.io)
[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=sompylasar "Code") [🤔](#ideas-sompylasar "Ideas, Planning, & Feedback") | [
Łukasz Gandecki](http://team.thebrain.pro)
[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=lgandecki "Code") [⚠️](https://github.com/kentcdodds/cypress-testing-library/commits?author=lgandecki "Tests") | [
Peter Kamps](https://github.com/npeterkamps)
[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=npeterkamps "Code") [📖](https://github.com/kentcdodds/cypress-testing-library/commits?author=npeterkamps "Documentation") [🤔](#ideas-npeterkamps "Ideas, Planning, & Feedback") [⚠️](https://github.com/kentcdodds/cypress-testing-library/commits?author=npeterkamps "Tests") | [
Airat Aminev](https://github.com/airato)
[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=airato "Code") [⚠️](https://github.com/kentcdodds/cypress-testing-library/commits?author=airato "Tests") [🔧](#tool-airato "Tools") | [
Adrian Smijulj](https://www.webiny.com)
[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=adrian1358 "Code") | [
Soo Jae Hwang](https://www.ossfinder.com)
[🐛](https://github.com/kentcdodds/cypress-testing-library/issues?q=author%3Amisoguy "Bug reports") [💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=misoguy "Code") [⚠️](https://github.com/kentcdodds/cypress-testing-library/commits?author=misoguy "Tests") | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| [
Justin Hall](https://github.com/wKovacs64)
[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=wKovacs64 "Code") [⚠️](https://github.com/kentcdodds/cypress-testing-library/commits?author=wKovacs64 "Tests") | From 9ebb1697f763d85409d6f1bc1135af8d0bdbf277 Mon Sep 17 00:00:00 2001 From: Justin Hall Date: Sun, 30 Dec 2018 19:45:27 -0700 Subject: [PATCH 3/3] fix(TS): add timeout to MatcherOptions type --- tests/typescript-types/test.spec.ts | 1 + typings/index.d.ts | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/typescript-types/test.spec.ts b/tests/typescript-types/test.spec.ts index 8ce8c10..16454aa 100644 --- a/tests/typescript-types/test.spec.ts +++ b/tests/typescript-types/test.spec.ts @@ -32,6 +32,7 @@ describe('Foo', () => { cy.queryAllByPlaceholderText('foo', { collapseWhitespace: true, exact: true, + timeout: 500, trim: true, }).should(elements => { const el = elements[0] diff --git a/typings/index.d.ts b/typings/index.d.ts index 8de2711..4485e9b 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -3,10 +3,16 @@ import { SelectorMatcherOptions, Matcher, - MatcherOptions, + MatcherOptions as DTLMatcherOptions, getByTestId, } from 'dom-testing-library' +export interface CTLMatcherOptions { + timeout?: number +} + +export type MatcherOptions = DTLMatcherOptions | CTLMatcherOptions + declare global { namespace Cypress { interface Chainable {