From d0850399648982a49e2adb6666a3310db005c691 Mon Sep 17 00:00:00 2001 From: Matan Borenkraout Date: Mon, 11 Oct 2021 15:45:43 +0300 Subject: [PATCH 01/10] chore: set protocol for npm to `https` (#409) --- .npmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.npmrc b/.npmrc index d2722898..1df2a6d8 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,2 @@ -registry=http://registry.npmjs.org/ +registry=https://registry.npmjs.org/ package-lock=false From 88760389b8630edc29593a380336fb9850b5de92 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Mon, 11 Oct 2021 12:08:42 -0300 Subject: [PATCH 02/10] docs: add MatanBobi as a contributor for platform (#410) * docs: update README.md * docs: update .all-contributorsrc Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 9 +++++++++ README.md | 1 + 2 files changed, 10 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index 7e5a88a7..cf9e1fa6 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -641,6 +641,15 @@ "contributions": [ "doc" ] + }, + { + "login": "MatanBobi", + "name": "Matan Borenkraout", + "avatar_url": "https://avatars.githubusercontent.com/u/12711091?v=4", + "profile": "https://matan.io", + "contributions": [ + "platform" + ] } ], "repoHost": "https://github.com", diff --git a/README.md b/README.md index e5a41091..5d1791ad 100644 --- a/README.md +++ b/README.md @@ -1354,6 +1354,7 @@ Thanks goes to these people ([emoji key][emojis]):
tu4mo

πŸ“– +
Matan Borenkraout

πŸ“¦ From 35ab97d28fb7c6e62f0feed6d8f397260eb10868 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Tue, 2 Nov 2021 01:47:30 -0400 Subject: [PATCH 03/10] docs: add yannbf as a contributor for code (#416) * docs: update README.md * docs: update .all-contributorsrc Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 9 +++++++++ README.md | 1 + 2 files changed, 10 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index cf9e1fa6..e3fe1602 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -650,6 +650,15 @@ "contributions": [ "platform" ] + }, + { + "login": "yannbf", + "name": "Yann Braga", + "avatar_url": "https://avatars.githubusercontent.com/u/1671563?v=4", + "profile": "https://github.com/yannbf", + "contributions": [ + "code" + ] } ], "repoHost": "https://github.com", diff --git a/README.md b/README.md index 5d1791ad..074152f0 100644 --- a/README.md +++ b/README.md @@ -1355,6 +1355,7 @@ Thanks goes to these people ([emoji key][emojis]):
tu4mo

πŸ“–
Matan Borenkraout

πŸ“¦ +
Yann Braga

πŸ’» From 4cb606cc591345a2f44240d7e74740b26fa9fa85 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Tue, 2 Nov 2021 06:50:34 +0100 Subject: [PATCH 04/10] feat: import parse directly from css (#415) - This will avoid having to access `fs` which will break in browser environments Co-authored-by: Nick McCurdy --- src/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.js b/src/utils.js index a7c61dda..2f07fb8e 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1,5 +1,5 @@ import redent from 'redent' -import {parse} from 'css' +import cssParse from 'css/lib/parse' import isEqual from 'lodash/isEqual' class GenericTypeError extends Error { @@ -100,7 +100,7 @@ class InvalidCSSError extends Error { } function parseCSS(css, ...args) { - const ast = parse(`selector { ${css} }`, {silent: true}).stylesheet + const ast = cssParse(`selector { ${css} }`, {silent: true}).stylesheet if (ast.parsingErrors && ast.parsingErrors.length > 0) { const {reason, line} = ast.parsingErrors[0] From dfcefa2e0262002b4eb0c2e382ea750e7f582347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Labrut?= Date: Tue, 23 Nov 2021 14:55:58 +0100 Subject: [PATCH 05/10] fix: wrong deprecate error message (#422) --- src/to-have-description.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/to-have-description.js b/src/to-have-description.js index bc9138ab..28a21347 100644 --- a/src/to-have-description.js +++ b/src/to-have-description.js @@ -3,8 +3,8 @@ import {checkHtmlElement, getMessage, normalize, deprecate} from './utils' // See algoritm: https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_description export function toHaveDescription(htmlElement, checkWith) { deprecate( - 'toBeInTheDOM', - 'Please use toBeInTheDocument for searching the entire document and toContainElement for searching a specific container.', + 'toHaveDescription', + 'Please use toHaveAccessibleDescription.', ) checkHtmlElement(htmlElement, toHaveDescription, this) From de26c7ae2f502f284d5d4320634571877dbcf7fc Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Fri, 3 Dec 2021 13:06:41 -0800 Subject: [PATCH 06/10] feat: Update aria-query to 5.0.0 (#414) * Update aria-query to 5.0.0 * Roles.keys() returns an array now --- package.json | 2 +- src/to-be-checked.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5045a5d0..fe373baa 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "dependencies": { "@babel/runtime": "^7.9.2", "@types/testing-library__jest-dom": "^5.9.1", - "aria-query": "^4.2.2", + "aria-query": "^5.0.0", "chalk": "^3.0.0", "css": "^3.0.0", "css.escape": "^1.5.1", diff --git a/src/to-be-checked.js b/src/to-be-checked.js index bd19fcb4..02093162 100644 --- a/src/to-be-checked.js +++ b/src/to-be-checked.js @@ -57,7 +57,7 @@ function supportedRolesSentence() { } function supportedRoles() { - return Array.from(roles.keys()).filter(roleSupportsChecked) + return roles.keys().filter(roleSupportsChecked) } function roleSupportsChecked(role) { From 6f69437085fe59610ff37b99408177ec8a684075 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Fri, 3 Dec 2021 22:28:39 -0300 Subject: [PATCH 07/10] docs: add IanVS as a contributor for code (#423) * docs: update README.md * docs: update .all-contributorsrc Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 9 +++++++++ README.md | 1 + 2 files changed, 10 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index e3fe1602..49f8de83 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -659,6 +659,15 @@ "contributions": [ "code" ] + }, + { + "login": "IanVS", + "name": "Ian VanSchooten", + "avatar_url": "https://avatars.githubusercontent.com/u/4616705?v=4", + "profile": "https://github.com/IanVS", + "contributions": [ + "code" + ] } ], "repoHost": "https://github.com", diff --git a/README.md b/README.md index 074152f0..3665b348 100644 --- a/README.md +++ b/README.md @@ -1356,6 +1356,7 @@ Thanks goes to these people ([emoji key][emojis]):
tu4mo

πŸ“–
Matan Borenkraout

πŸ“¦
Yann Braga

πŸ’» +
Ian VanSchooten

πŸ’» From a9beb47455dae0f455ddacc473d0ddabe09f0b43 Mon Sep 17 00:00:00 2001 From: Krisan Alifari Date: Mon, 6 Dec 2021 19:03:18 +0700 Subject: [PATCH 08/10] fix: Improve `toHaveClass` error message format (#405) --- src/to-have-class.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/to-have-class.js b/src/to-have-class.js index b9ff0fee..be59be3a 100644 --- a/src/to-have-class.js +++ b/src/to-have-class.js @@ -42,6 +42,11 @@ export function toHaveClass(htmlElement, ...params) { const to = this.isNot ? 'not to' : 'to' return getMessage( this, + this.utils.matcherHint( + `${this.isNot ? '.not' : ''}.toHaveClass`, + 'element', + this.utils.printExpected(expected.join(' ')), + ), `Expected the element ${to} have EXACTLY defined classes`, expected.join(' '), 'Received', From 43a420a64748af50f350fbf72bc5df24df27cd4d Mon Sep 17 00:00:00 2001 From: Chantal Broeren Date: Wed, 2 Feb 2022 16:18:10 +0100 Subject: [PATCH 09/10] docs: Fix wrong toHaveValue example (#431) Small fix on README.md The `.toHaveValue` example for the select verifies for `.not.toHaveValue`, but the code example has these two options selected. That means it _should_ have this value, so I removed the `.not` part to have the test example match the code example. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3665b348..8bd3ce42 100644 --- a/README.md +++ b/README.md @@ -890,7 +890,7 @@ const selectInput = getByTestId('select-number') expect(textInput).toHaveValue('text') expect(numberInput).toHaveValue(5) expect(emptyInput).not.toHaveValue() -expect(selectInput).not.toHaveValue(['second', 'third']) +expect(selectInput).toHaveValue(['second', 'third']) ```
From 3094eb1afeab7b54f789f47a714b36da2b6269fd Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 2 Feb 2022 12:18:35 -0300 Subject: [PATCH 10/10] docs: add cbroeren as a contributor for doc (#432) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: update README.md * docs: update .all-contributorsrc Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Ernesto GarcΓ­a --- .all-contributorsrc | 9 +++++++++ README.md | 1 + 2 files changed, 10 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index 49f8de83..b88d1110 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -668,6 +668,15 @@ "contributions": [ "code" ] + }, + { + "login": "cbroeren", + "name": "Chantal Broeren", + "avatar_url": "https://avatars.githubusercontent.com/u/7499806?v=4", + "profile": "http://chantalbroeren.nl", + "contributions": [ + "doc" + ] } ], "repoHost": "https://github.com", diff --git a/README.md b/README.md index 8bd3ce42..5e54ad3c 100644 --- a/README.md +++ b/README.md @@ -1357,6 +1357,7 @@ Thanks goes to these people ([emoji key][emojis]):
Matan Borenkraout

πŸ“¦
Yann Braga

πŸ’»
Ian VanSchooten

πŸ’» +
Chantal Broeren

πŸ“–