Set up comprehensive frontend testing infrastructure
- Install Jest for unit testing with React Testing Library - Install Playwright for end-to-end testing - Configure Jest with proper TypeScript support and module mapping - Create test setup files and utilities for both unit and e2e tests Components: * Jest configuration with coverage thresholds * Playwright configuration with browser automation * Unit tests for LoginForm, AuthContext, and useSocketIO hook * E2E tests for authentication, dashboard, and agents workflows * GitHub Actions workflow for automated testing * Mock data and API utilities for consistent testing * Test documentation with best practices Testing features: - Unit tests with 70% coverage threshold - E2E tests with API mocking and user journey testing - CI/CD integration for automated test runs - Cross-browser testing support with Playwright - Authentication system testing end-to-end 🚀 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
20
frontend/node_modules/@testing-library/dom/LICENSE
generated
vendored
Normal file
20
frontend/node_modules/@testing-library/dom/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
Copyright (c) 2017 Kent C. Dodds
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
402
frontend/node_modules/@testing-library/dom/README.md
generated
vendored
Normal file
402
frontend/node_modules/@testing-library/dom/README.md
generated
vendored
Normal file
@@ -0,0 +1,402 @@
|
||||
<div align="center">
|
||||
<h1>DOM Testing Library</h1>
|
||||
|
||||
<a href="https://www.emojione.com/emoji/1f419">
|
||||
<img
|
||||
height="80"
|
||||
width="80"
|
||||
alt="octopus"
|
||||
src="https://raw.githubusercontent.com/testing-library/dom-testing-library/main/other/octopus.png"
|
||||
/>
|
||||
</a>
|
||||
|
||||
<p>Simple and complete DOM testing utilities that encourage good testing
|
||||
practices.</p>
|
||||
|
||||
[**Read the docs**](https://testing-library.com/dom) |
|
||||
[Edit the docs](https://github.com/testing-library/testing-library-docs)
|
||||
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[![Build Status][build-badge]][build]
|
||||
[![Code Coverage][coverage-badge]][coverage]
|
||||
[![version][version-badge]][package]
|
||||
[![downloads][downloads-badge]][npmtrends]
|
||||
[![MIT License][license-badge]][license]
|
||||
[![All Contributors][all-contributors-badge]](#contributors)
|
||||
[![PRs Welcome][prs-badge]][prs]
|
||||
[![Code of Conduct][coc-badge]][coc]
|
||||
[![Discord][discord-badge]][discord]
|
||||
|
||||
[![Watch on GitHub][github-watch-badge]][github-watch]
|
||||
[![Star on GitHub][github-star-badge]][github-star]
|
||||
[![Tweet][twitter-badge]][twitter]
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
<div align="center">
|
||||
<a href="https://testingjavascript.com">
|
||||
<img
|
||||
width="500"
|
||||
alt="TestingJavaScript.com Learn the smart, efficient way to test any JavaScript application."
|
||||
src="https://raw.githubusercontent.com/testing-library/dom-testing-library/main/other/testingjavascript.jpg"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
## Table of Contents
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
|
||||
- [The Problem](#the-problem)
|
||||
- [This Solution](#this-solution)
|
||||
- [Installation](#installation)
|
||||
- [Documentation](#documentation)
|
||||
- [Guiding Principles](#guiding-principles)
|
||||
- [Contributors](#contributors)
|
||||
- [LICENSE](#license)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## The Problem
|
||||
|
||||
You want to write maintainable tests for your Web UI. As a part of this goal,
|
||||
you want your tests to avoid including implementation details of your components
|
||||
and rather focus on making your tests give you the confidence for which they are
|
||||
intended. As part of this, you want your testbase to be maintainable in the long
|
||||
run so refactors of your components (changes to implementation but not
|
||||
functionality) don't break your tests and slow you and your team down.
|
||||
|
||||
## This Solution
|
||||
|
||||
The `DOM Testing Library` is a very light-weight solution for testing DOM nodes
|
||||
(whether simulated with [`JSDOM`](https://github.com/jsdom/jsdom) as provided by
|
||||
default with [Jest][] or in the browser). The main utilities it provides involve
|
||||
querying the DOM for nodes in a way that's similar to how the user finds
|
||||
elements on the page. In this way, the library helps ensure your tests give you
|
||||
confidence in your UI code. The `DOM Testing Library`'s primary guiding
|
||||
principle is:
|
||||
|
||||
> [The more your tests resemble the way your software is used, the more
|
||||
> confidence they can give you.][guiding-principle]
|
||||
|
||||
## Installation
|
||||
|
||||
This module is distributed via [npm][npm] which is bundled with [node][node] and
|
||||
should be installed as one of your project's `devDependencies`:
|
||||
|
||||
```
|
||||
npm install --save-dev @testing-library/dom
|
||||
```
|
||||
|
||||
> [**Docs**](https://testing-library.com/docs/install)
|
||||
|
||||
## Documentation
|
||||
|
||||
Read the docs (and discover framework and tool-specific implementations) at
|
||||
[testing-library.com](https://testing-library.com/dom)
|
||||
|
||||
## Guiding Principles
|
||||
|
||||
> [The more your tests resemble the way your software is used, the more
|
||||
> confidence they can give you.][guiding-principle]
|
||||
|
||||
We try to only expose methods and utilities that encourage you to write tests
|
||||
that closely resemble how your web pages are used.
|
||||
|
||||
Utilities are included in this project based on the following guiding
|
||||
principles:
|
||||
|
||||
1. If it relates to rendering components, it deals with DOM nodes rather than
|
||||
component instances, nor should it encourage dealing with component
|
||||
instances.
|
||||
2. It should be generally useful for testing the application components in the
|
||||
way the user would use it. We _are_ making some trade-offs here because
|
||||
we're using a computer and often a simulated browser environment, but in
|
||||
general, utilities should encourage tests that use the components the way
|
||||
they're intended to be used.
|
||||
3. Utility implementations and APIs should be simple and flexible.
|
||||
|
||||
At the end of the day, what we want is for this library to be pretty
|
||||
light-weight, simple, and understandable.
|
||||
|
||||
## Contributors
|
||||
|
||||
Thanks goes to these people ([emoji key][emojis]):
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- markdownlint-disable -->
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://kentcdodds.com"><img src="https://avatars.githubusercontent.com/u/1500684?v=3?s=100" width="100px;" alt="Kent C. Dodds"/><br /><sub><b>Kent C. Dodds</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=kentcdodds" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=kentcdodds" title="Documentation">📖</a> <a href="#infra-kentcdodds" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=kentcdodds" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://argos-ci.com"><img src="https://avatars2.githubusercontent.com/u/266302?v=4?s=100" width="100px;" alt="Greg Bergé"/><br /><sub><b>Greg Bergé</b></sub></a><br /><a href="#ideas-neoziro" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://audiolion.github.io"><img src="https://avatars1.githubusercontent.com/u/2430381?v=4?s=100" width="100px;" alt="Ryan Castner"/><br /><sub><b>Ryan Castner</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=audiolion" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.dnlsandiego.com"><img src="https://avatars0.githubusercontent.com/u/8008023?v=4?s=100" width="100px;" alt="Daniel Sandiego"/><br /><sub><b>Daniel Sandiego</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=dnlsandiego" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Miklet"><img src="https://avatars2.githubusercontent.com/u/12592677?v=4?s=100" width="100px;" alt="Paweł Mikołajczyk"/><br /><sub><b>Paweł Mikołajczyk</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=Miklet" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://co.linkedin.com/in/alejandronanez/"><img src="https://avatars3.githubusercontent.com/u/464978?v=4?s=100" width="100px;" alt="Alejandro Ñáñez Ortiz"/><br /><sub><b>Alejandro Ñáñez Ortiz</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=alejandronanez" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/pbomb"><img src="https://avatars0.githubusercontent.com/u/1402095?v=4?s=100" width="100px;" alt="Matt Parrish"/><br /><sub><b>Matt Parrish</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3Apbomb" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=pbomb" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=pbomb" title="Documentation">📖</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=pbomb" title="Tests">⚠️</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/wKovacs64"><img src="https://avatars1.githubusercontent.com/u/1288694?v=4?s=100" width="100px;" alt="Justin Hall"/><br /><sub><b>Justin Hall</b></sub></a><br /><a href="#platform-wKovacs64" title="Packaging/porting to new platform">📦</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/antoaravinth"><img src="https://avatars1.githubusercontent.com/u/1241511?s=460&v=4?s=100" width="100px;" alt="Anto Aravinth"/><br /><sub><b>Anto Aravinth</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=antoaravinth" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=antoaravinth" title="Tests">⚠️</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=antoaravinth" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/JonahMoses"><img src="https://avatars2.githubusercontent.com/u/3462296?v=4?s=100" width="100px;" alt="Jonah Moses"/><br /><sub><b>Jonah Moses</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=JonahMoses" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://team.thebrain.pro"><img src="https://avatars1.githubusercontent.com/u/4002543?v=4?s=100" width="100px;" alt="Łukasz Gandecki"/><br /><sub><b>Łukasz Gandecki</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=lgandecki" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=lgandecki" title="Tests">⚠️</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=lgandecki" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://sompylasar.github.io"><img src="https://avatars2.githubusercontent.com/u/498274?v=4?s=100" width="100px;" alt="Ivan Babak"/><br /><sub><b>Ivan Babak</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3Asompylasar" title="Bug reports">🐛</a> <a href="#ideas-sompylasar" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=sompylasar" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=sompylasar" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jday3"><img src="https://avatars3.githubusercontent.com/u/4439618?v=4?s=100" width="100px;" alt="Jesse Day"/><br /><sub><b>Jesse Day</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=jday3" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://gnapse.github.io"><img src="https://avatars0.githubusercontent.com/u/15199?v=4?s=100" width="100px;" alt="Ernesto García"/><br /><sub><b>Ernesto García</b></sub></a><br /><a href="#question-gnapse" title="Answering Questions">💬</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=gnapse" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=gnapse" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://jomaxx.com"><img src="https://avatars2.githubusercontent.com/u/2747424?v=4?s=100" width="100px;" alt="Josef Maxx Blake"/><br /><sub><b>Josef Maxx Blake</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=jomaxx" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=jomaxx" title="Documentation">📖</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=jomaxx" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/alecook"><img src="https://avatars3.githubusercontent.com/u/725236?v=4?s=100" width="100px;" alt="Alex Cook"/><br /><sub><b>Alex Cook</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=alecook" title="Documentation">📖</a> <a href="#example-alecook" title="Examples">💡</a> <a href="https://github.com/testing-library/dom-testing-library/pulls?q=is%3Apr+reviewed-by%3Aalecook" title="Reviewed Pull Requests">👀</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dfcook"><img src="https://avatars3.githubusercontent.com/u/10348212?v=4?s=100" width="100px;" alt="Daniel Cook"/><br /><sub><b>Daniel Cook</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=dfcook" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=dfcook" title="Documentation">📖</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=dfcook" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/thchia"><img src="https://avatars2.githubusercontent.com/u/21194045?s=400&v=4?s=100" width="100px;" alt="Thomas Chia"/><br /><sub><b>Thomas Chia</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3Athchia" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=thchia" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://timdeschryver.dev"><img src="https://avatars.githubusercontent.com/u/28659384?v=4?s=100" width="100px;" alt="Tim Deschryver"/><br /><sub><b>Tim Deschryver</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=timdeschryver" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=timdeschryver" title="Tests">⚠️</a> <a href="https://github.com/testing-library/dom-testing-library/pulls?q=is%3Apr+reviewed-by%3Atimdeschryver" title="Reviewed Pull Requests">👀</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://alexkrolick.com"><img src="https://avatars3.githubusercontent.com/u/1571667?v=4?s=100" width="100px;" alt="Alex Krolick"/><br /><sub><b>Alex Krolick</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=alexkrolick" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://www.maddijoyce.com"><img src="https://avatars2.githubusercontent.com/u/2224291?v=4?s=100" width="100px;" alt="Maddi Joyce"/><br /><sub><b>Maddi Joyce</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=maddijoyce" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/npeterkamps"><img src="https://avatars1.githubusercontent.com/u/25429764?v=4?s=100" width="100px;" alt="Peter Kamps"/><br /><sub><b>Peter Kamps</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3Anpeterkamps" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=npeterkamps" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=npeterkamps" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://jonathanstoye.de"><img src="https://avatars2.githubusercontent.com/u/21689428?v=4?s=100" width="100px;" alt="Jonathan Stoye"/><br /><sub><b>Jonathan Stoye</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=JonathanStoye" title="Documentation">📖</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=JonathanStoye" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yongdamsh"><img src="https://avatars2.githubusercontent.com/u/4126644?v=4?s=100" width="100px;" alt="Sanghyeon Lee"/><br /><sub><b>Sanghyeon Lee</b></sub></a><br /><a href="#example-yongdamsh" title="Examples">💡</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Dajust"><img src="https://avatars3.githubusercontent.com/u/8015514?v=4?s=100" width="100px;" alt="Justice Mba "/><br /><sub><b>Justice Mba </b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=Dajust" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=Dajust" title="Documentation">📖</a> <a href="#ideas-Dajust" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/wgcrouch"><img src="https://avatars3.githubusercontent.com/u/340761?v=4?s=100" width="100px;" alt="Wayne Crouch"/><br /><sub><b>Wayne Crouch</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=wgcrouch" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://benjaminelliott.co.uk"><img src="https://avatars1.githubusercontent.com/u/4996462?v=4?s=100" width="100px;" alt="Ben Elliott"/><br /><sub><b>Ben Elliott</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=benelliott" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://nuances.co"><img src="https://avatars3.githubusercontent.com/u/577921?v=4?s=100" width="100px;" alt="Ruben Costa"/><br /><sub><b>Ruben Costa</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=rubencosta" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://rbrtsmith.com/"><img src="https://avatars2.githubusercontent.com/u/4982001?v=4?s=100" width="100px;" alt="Robert Smith"/><br /><sub><b>Robert Smith</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3Arbrtsmith" title="Bug reports">🐛</a> <a href="#ideas-rbrtsmith" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=rbrtsmith" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dadamssg"><img src="https://avatars3.githubusercontent.com/u/881986?v=4?s=100" width="100px;" alt="dadamssg"/><br /><sub><b>dadamssg</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=dadamssg" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://neilkistner.com/"><img src="https://avatars1.githubusercontent.com/u/186971?v=4?s=100" width="100px;" alt="Neil Kistner"/><br /><sub><b>Neil Kistner</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=wyze" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=wyze" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://bdchauvette.net/"><img src="https://avatars3.githubusercontent.com/u/1448597?v=4?s=100" width="100px;" alt="Ben Chauvette"/><br /><sub><b>Ben Chauvette</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=bdchauvette" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/JeffBaumgardt"><img src="https://avatars2.githubusercontent.com/u/777527?v=4?s=100" width="100px;" alt="Jeff Baumgardt"/><br /><sub><b>Jeff Baumgardt</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=JeffBaumgardt" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=JeffBaumgardt" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://matchai.me"><img src="https://avatars0.githubusercontent.com/u/4658208?v=4?s=100" width="100px;" alt="Matan Kushner"/><br /><sub><b>Matan Kushner</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=matchai" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=matchai" title="Documentation">📖</a> <a href="#ideas-matchai" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=matchai" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://www.wendtedesigns.com/"><img src="https://avatars2.githubusercontent.com/u/5779538?v=4?s=100" width="100px;" alt="Alex Wendte"/><br /><sub><b>Alex Wendte</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=themostcolm" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=themostcolm" title="Documentation">📖</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=themostcolm" title="Tests">⚠️</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ruffle1986"><img src="https://avatars0.githubusercontent.com/u/2196208?v=4?s=100" width="100px;" alt="Tamas Fodor"/><br /><sub><b>Tamas Fodor</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=ruffle1986" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/BenjaminEckardt"><img src="https://avatars3.githubusercontent.com/u/14793495?v=4?s=100" width="100px;" alt="Benjamin Eckardt"/><br /><sub><b>Benjamin Eckardt</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=BenjaminEckardt" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/campbellr"><img src="https://avatars3.githubusercontent.com/u/205752?v=4?s=100" width="100px;" alt="Ryan Campbell"/><br /><sub><b>Ryan Campbell</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=campbellr" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://taylor-briggs.com"><img src="https://avatars2.githubusercontent.com/u/1335519?v=4?s=100" width="100px;" alt="Taylor Briggs"/><br /><sub><b>Taylor Briggs</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=TaylorBriggs" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jgoz"><img src="https://avatars2.githubusercontent.com/u/132233?v=4?s=100" width="100px;" alt="John Gozde"/><br /><sub><b>John Gozde</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=jgoz" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/chentsulin"><img src="https://avatars2.githubusercontent.com/u/3382565?v=4?s=100" width="100px;" alt="C. T. Lin"/><br /><sub><b>C. T. Lin</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=chentsulin" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://terrencewwong.com"><img src="https://avatars3.githubusercontent.com/u/5312329?v=4?s=100" width="100px;" alt="Terrence Wong"/><br /><sub><b>Terrence Wong</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=terrencewwong" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.ossfinder.com"><img src="https://avatars0.githubusercontent.com/u/12230408?v=4?s=100" width="100px;" alt="Soo Jae Hwang"/><br /><sub><b>Soo Jae Hwang</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=misoguy" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/RoystonS"><img src="https://avatars0.githubusercontent.com/u/19773?v=4?s=100" width="100px;" alt="Royston Shufflebotham"/><br /><sub><b>Royston Shufflebotham</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3ARoystonS" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=RoystonS" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=RoystonS" title="Documentation">📖</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=RoystonS" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://www.vadimbrodsky.com"><img src="https://avatars0.githubusercontent.com/u/591673?v=4?s=100" width="100px;" alt="Vadim Brodsky"/><br /><sub><b>Vadim Brodsky</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=VadimBrodsky" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/eunjae_lee"><img src="https://avatars3.githubusercontent.com/u/499898?v=4?s=100" width="100px;" alt="Eunjae Lee"/><br /><sub><b>Eunjae Lee</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=eunjae-lee" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://davidpeter.me"><img src="https://avatars2.githubusercontent.com/u/167743?v=4?s=100" width="100px;" alt="David Peter"/><br /><sub><b>David Peter</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=sarenji" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/@puemos"><img src="https://avatars0.githubusercontent.com/u/13174025?v=4?s=100" width="100px;" alt="Shy Alter"/><br /><sub><b>Shy Alter</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=puemos" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=puemos" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://lukaszmakuch.pl"><img src="https://avatars1.githubusercontent.com/u/11966621?v=4?s=100" width="100px;" alt="Łukasz Makuch"/><br /><sub><b>Łukasz Makuch</b></sub></a><br /><a href="#platform-lukaszmakuch" title="Packaging/porting to new platform">📦</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tylerthehaas"><img src="https://avatars1.githubusercontent.com/u/11150235?v=4?s=100" width="100px;" alt="Tyler Haas"/><br /><sub><b>Tyler Haas</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=tylerthehaas" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=tylerthehaas" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://vesalaakso.com"><img src="https://avatars2.githubusercontent.com/u/482561?v=4?s=100" width="100px;" alt="Vesa Laakso"/><br /><sub><b>Vesa Laakso</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=valscion" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=valscion" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Tolsee"><img src="https://avatars0.githubusercontent.com/u/16590492?v=4?s=100" width="100px;" alt="Tulsi Sapkota"/><br /><sub><b>Tulsi Sapkota</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=Tolsee" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tnunes"><img src="https://avatars1.githubusercontent.com/u/163187?v=4?s=100" width="100px;" alt="Tiago Nunes"/><br /><sub><b>Tiago Nunes</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=tnunes" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=tnunes" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/JaxCavalera"><img src="https://avatars1.githubusercontent.com/u/15429762?v=4?s=100" width="100px;" alt="JaxCavalera"/><br /><sub><b>JaxCavalera</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=JaxCavalera" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/pulls?q=is%3Apr+reviewed-by%3AJaxCavalera" title="Reviewed Pull Requests">👀</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bopfer"><img src="https://avatars2.githubusercontent.com/u/824368?v=4?s=100" width="100px;" alt="bopfer"/><br /><sub><b>bopfer</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=bopfer" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://blog.alfrescian.com"><img src="https://avatars0.githubusercontent.com/u/1340740?v=4?s=100" width="100px;" alt="Jan Pfitzner"/><br /><sub><b>Jan Pfitzner</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=alfrescian" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dbismut"><img src="https://avatars2.githubusercontent.com/u/5003380?v=4?s=100" width="100px;" alt="David"/><br /><sub><b>David</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=dbismut" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/diego_codes"><img src="https://avatars0.githubusercontent.com/u/5973294?v=4?s=100" width="100px;" alt="Diego Hernandez"/><br /><sub><b>Diego Hernandez</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=diego-codes" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=diego-codes" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/foray1010"><img src="https://avatars3.githubusercontent.com/u/3212221?v=4?s=100" width="100px;" alt="Alex Young"/><br /><sub><b>Alex Young</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=foray1010" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/paularmstrong"><img src="https://avatars1.githubusercontent.com/u/33297?v=4?s=100" width="100px;" alt="Paul Armstrong"/><br /><sub><b>Paul Armstrong</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=paularmstrong" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=paularmstrong" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://hu.linkedin.com/pub/tamas-szabo/57/a4b/242"><img src="https://avatars0.githubusercontent.com/u/3720079?v=4?s=100" width="100px;" alt="Tamás Szabó"/><br /><sub><b>Tamás Szabó</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=szabototo89" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=szabototo89" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/dylan_piercey"><img src="https://avatars2.githubusercontent.com/u/4985201?v=4?s=100" width="100px;" alt="Dylan Piercey"/><br /><sub><b>Dylan Piercey</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=DylanPiercey" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=DylanPiercey" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/michaellasky"><img src="https://avatars2.githubusercontent.com/u/6646599?v=4?s=100" width="100px;" alt="Michael Lasky"/><br /><sub><b>Michael Lasky</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=michaellasky" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=michaellasky" title="Tests">⚠️</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=michaellasky" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/sebsilbermann"><img src="https://avatars3.githubusercontent.com/u/12292047?v=4?s=100" width="100px;" alt="Sebastian Silbermann"/><br /><sub><b>Sebastian Silbermann</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=eps1lon" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=eps1lon" title="Tests">⚠️</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=eps1lon" title="Documentation">📖</a> <a href="#infra-eps1lon" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/testing-library/dom-testing-library/pulls?q=is%3Apr+reviewed-by%3Aeps1lon" title="Reviewed Pull Requests">👀</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://dylanvann.com/"><img src="https://avatars0.githubusercontent.com/u/1537615?v=4?s=100" width="100px;" alt="Dylan Vann"/><br /><sub><b>Dylan Vann</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=DylanVann" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://afontcu.dev"><img src="https://avatars0.githubusercontent.com/u/9197791?v=4?s=100" width="100px;" alt="Adrià Fontcuberta"/><br /><sub><b>Adrià Fontcuberta</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=afontcu" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=afontcu" title="Tests">⚠️</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=afontcu" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://thomlom.dev"><img src="https://avatars3.githubusercontent.com/u/16003285?v=4?s=100" width="100px;" alt="Thomas Lombart"/><br /><sub><b>Thomas Lombart</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=thomlom" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/SavePointSam"><img src="https://avatars0.githubusercontent.com/u/8203211?v=4?s=100" width="100px;" alt="Sam Horton"/><br /><sub><b>Sam Horton</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=SavePointSam" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=SavePointSam" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://andrewhillcode.com"><img src="https://avatars1.githubusercontent.com/u/12396191?v=4?s=100" width="100px;" alt="Andrew Hill"/><br /><sub><b>Andrew Hill</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=andrewhillcode" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://amann.me"><img src="https://avatars1.githubusercontent.com/u/4038316?v=4?s=100" width="100px;" alt="Jan Amann"/><br /><sub><b>Jan Amann</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=amannn" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=amannn" title="Tests">⚠️</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/brapifra"><img src="https://avatars3.githubusercontent.com/u/17855450?v=4?s=100" width="100px;" alt="Brais Piñeiro"/><br /><sub><b>Brais Piñeiro</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=brapifra" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=brapifra" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.dominykas.com/"><img src="https://avatars1.githubusercontent.com/u/505619?v=4?s=100" width="100px;" alt="Dominykas Blyžė"/><br /><sub><b>Dominykas Blyžė</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=dominykas" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=dominykas" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://olzhas.de"><img src="https://avatars3.githubusercontent.com/u/15848876?v=4?s=100" width="100px;" alt="Olzhas Askar"/><br /><sub><b>Olzhas Askar</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=pheeria" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=pheeria" title="Tests">⚠️</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=pheeria" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/mbelsky_"><img src="https://avatars1.githubusercontent.com/u/3923527?v=4?s=100" width="100px;" alt="Max Belsky"/><br /><sub><b>Max Belsky</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=mbelsky" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=mbelsky" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mmantel"><img src="https://avatars2.githubusercontent.com/u/1326403?v=4?s=100" width="100px;" alt="Michael Mantel"/><br /><sub><b>Michael Mantel</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=mmantel" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://tomdoes.tech/"><img src="https://avatars1.githubusercontent.com/u/8683577?v=4?s=100" width="100px;" alt="Tom Nagle"/><br /><sub><b>Tom Nagle</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=tomanagle" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://westbrookjohnson.com"><img src="https://avatars0.githubusercontent.com/u/1156657?v=4?s=100" width="100px;" alt="Westbrook Johnson"/><br /><sub><b>Westbrook Johnson</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=Westbrook" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://aziz.js.org"><img src="https://avatars3.githubusercontent.com/u/17024120?v=4?s=100" width="100px;" alt="Mohammad Aziz"/><br /><sub><b>Mohammad Aziz</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=iAziz786" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=iAziz786" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/seetdev/"><img src="https://avatars2.githubusercontent.com/u/35116035?v=4?s=100" width="100px;" alt="seetdev"/><br /><sub><b>seetdev</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=seetdev" title="Tests">⚠️</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=seetdev" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/xgbuils"><img src="https://avatars2.githubusercontent.com/u/6483614?v=4?s=100" width="100px;" alt="Xavier Garcia Buils"/><br /><sub><b>Xavier Garcia Buils</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=xgbuils" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=xgbuils" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/aw-davidson"><img src="https://avatars2.githubusercontent.com/u/32170938?v=4?s=100" width="100px;" alt="aw-davidson"/><br /><sub><b>aw-davidson</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=aw-davidson" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=aw-davidson" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://michaeldeboey.be"><img src="https://avatars3.githubusercontent.com/u/6643991?v=4?s=100" width="100px;" alt="Michaël De Boey"/><br /><sub><b>Michaël De Boey</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=MichaelDeBoey" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/minh_ngvyen"><img src="https://avatars3.githubusercontent.com/u/2852660?v=4?s=100" width="100px;" alt="Minh Nguyen"/><br /><sub><b>Minh Nguyen</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=NMinhNguyen" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/egilsster"><img src="https://avatars0.githubusercontent.com/u/5672257?v=4?s=100" width="100px;" alt="Egill Sveinbjörnsson"/><br /><sub><b>Egill Sveinbjörnsson</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=egilsster" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://pustovalov.dev"><img src="https://avatars2.githubusercontent.com/u/1568885?v=4?s=100" width="100px;" alt="Pavel Pustovalov"/><br /><sub><b>Pavel Pustovalov</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=pustovalov" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/apalaniuk"><img src="https://avatars1.githubusercontent.com/u/17710124?v=4?s=100" width="100px;" alt="Adam Palaniuk"/><br /><sub><b>Adam Palaniuk</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=apalaniuk" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=apalaniuk" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Yama-Tomo"><img src="https://avatars0.githubusercontent.com/u/4970917?v=4?s=100" width="100px;" alt="Yama-Tomo"/><br /><sub><b>Yama-Tomo</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=Yama-Tomo" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=Yama-Tomo" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/airjp73"><img src="https://avatars2.githubusercontent.com/u/25882770?v=4?s=100" width="100px;" alt="Aaron Pettengill"/><br /><sub><b>Aaron Pettengill</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=airjp73" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=airjp73" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://kwboyd.com"><img src="https://avatars0.githubusercontent.com/u/13855750?v=4?s=100" width="100px;" alt="Kate W. Boyd"/><br /><sub><b>Kate W. Boyd</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=kwboyd" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rahulchavan30"><img src="https://avatars2.githubusercontent.com/u/5296464?v=4?s=100" width="100px;" alt="Rahul Suryakanth"/><br /><sub><b>Rahul Suryakanth</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=rahulchavan30" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=rahulchavan30" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://jamie.tokyo"><img src="https://avatars0.githubusercontent.com/u/5964236?v=4?s=100" width="100px;" alt="Jamie"/><br /><sub><b>Jamie</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=jamsinclair" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=jamsinclair" title="Tests">⚠️</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nstepien"><img src="https://avatars0.githubusercontent.com/u/567105?v=4?s=100" width="100px;" alt="Nicolas Stepien"/><br /><sub><b>Nicolas Stepien</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=nstepien" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://knpw.rs"><img src="https://avatars0.githubusercontent.com/u/174864?v=4?s=100" width="100px;" alt="Ken Powers"/><br /><sub><b>Ken Powers</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=knpwrs" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mzdunek93"><img src="https://avatars0.githubusercontent.com/u/10826511?v=4?s=100" width="100px;" alt="Michał Zdunek"/><br /><sub><b>Michał Zdunek</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=mzdunek93" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Lagily"><img src="https://avatars2.githubusercontent.com/u/42535205?v=4?s=100" width="100px;" alt="Ali Nasserzadeh"/><br /><sub><b>Ali Nasserzadeh</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=Lagily" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://darekkay.com"><img src="https://avatars0.githubusercontent.com/u/3101914?v=4?s=100" width="100px;" alt="Darek Kay"/><br /><sub><b>Darek Kay</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=darekkay" title="Documentation">📖</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=darekkay" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=darekkay" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Lukas-Kullmann"><img src="https://avatars0.githubusercontent.com/u/387547?v=4?s=100" width="100px;" alt="Lukas"/><br /><sub><b>Lukas</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=Lukas-Kullmann" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=Lukas-Kullmann" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/pelotom"><img src="https://avatars2.githubusercontent.com/u/128019?v=4?s=100" width="100px;" alt="Tom Crockett"/><br /><sub><b>Tom Crockett</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=pelotom" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=pelotom" title="Tests">⚠️</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/appleJax"><img src="https://avatars1.githubusercontent.com/u/13618860?v=4?s=100" width="100px;" alt="Kevin Brewer"/><br /><sub><b>Kevin Brewer</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=appleJax" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=appleJax" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/benmonro"><img src="https://avatars3.githubusercontent.com/u/399236?v=4?s=100" width="100px;" alt="Ben Monro"/><br /><sub><b>Ben Monro</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=benmonro" title="Code">💻</a> <a href="#ideas-benmonro" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=benmonro" title="Tests">⚠️</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=benmonro" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/smeijer"><img src="https://avatars1.githubusercontent.com/u/1196524?v=4?s=100" width="100px;" alt="Stephan Meijer"/><br /><sub><b>Stephan Meijer</b></sub></a><br /><a href="#ideas-smeijer" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=smeijer" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=smeijer" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://joaoforja.com/"><img src="https://avatars2.githubusercontent.com/u/7002157?v=4?s=100" width="100px;" alt="João Forja"/><br /><sub><b>João Forja</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=Jnforja" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=Jnforja" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://nickmccurdy.com/"><img src="https://avatars0.githubusercontent.com/u/927220?v=4?s=100" width="100px;" alt="Nick McCurdy"/><br /><sub><b>Nick McCurdy</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=nickmccurdy" title="Documentation">📖</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=nickmccurdy" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=nickmccurdy" title="Tests">⚠️</a> <a href="https://github.com/testing-library/dom-testing-library/pulls?q=is%3Apr+reviewed-by%3Anickmccurdy" title="Reviewed Pull Requests">👀</a> <a href="#infra-nickmccurdy" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://calebmer.com"><img src="https://avatars1.githubusercontent.com/u/8282507?v=4?s=100" width="100px;" alt="Caleb Meredith"/><br /><sub><b>Caleb Meredith</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=calebmer" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/marcosvega91"><img src="https://avatars2.githubusercontent.com/u/5365582?v=4?s=100" width="100px;" alt="Marco Moretti"/><br /><sub><b>Marco Moretti</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=marcosvega91" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=marcosvega91" title="Tests">⚠️</a> <a href="https://github.com/testing-library/dom-testing-library/pulls?q=is%3Apr+reviewed-by%3Amarcosvega91" title="Reviewed Pull Requests">👀</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tjefferson08"><img src="https://avatars2.githubusercontent.com/u/3535390?v=4?s=100" width="100px;" alt="Travis Jefferson"/><br /><sub><b>Travis Jefferson</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=tjefferson08" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=tjefferson08" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mdjastrzebski"><img src="https://avatars2.githubusercontent.com/u/6368606?v=4?s=100" width="100px;" alt="Maciej Jastrzebski"/><br /><sub><b>Maciej Jastrzebski</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3Amdjastrzebski" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://commonlit.org"><img src="https://avatars3.githubusercontent.com/u/319471?v=4?s=100" width="100px;" alt="Geoff Harcourt"/><br /><sub><b>Geoff Harcourt</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=geoffharcourt" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://www.joshuakgoldberg.com"><img src="https://avatars1.githubusercontent.com/u/3335181?v=4?s=100" width="100px;" alt="Josh Goldberg"/><br /><sub><b>Josh Goldberg</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=JoshuaKGoldberg" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=JoshuaKGoldberg" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://kengregory.com"><img src="https://avatars0.githubusercontent.com/u/3155127?v=4?s=100" width="100px;" alt="Ken Gregory"/><br /><sub><b>Ken Gregory</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=kgregory" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=kgregory" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.jacobparis.com/"><img src="https://avatars2.githubusercontent.com/u/5633704?v=4?s=100" width="100px;" alt="Jacob Paris"/><br /><sub><b>Jacob Paris</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=JacobParis" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=JacobParis" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://keiya01.github.io/portfolio"><img src="https://avatars1.githubusercontent.com/u/34934510?v=4?s=100" width="100px;" alt="keiya sasaki"/><br /><sub><b>keiya sasaki</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=keiya01" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/idanen"><img src="https://avatars2.githubusercontent.com/u/1687893?v=4?s=100" width="100px;" alt="Idan Entin"/><br /><sub><b>Idan Entin</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=idanen" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=idanen" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/deniz-susman-92b40a145/"><img src="https://avatars1.githubusercontent.com/u/39295979?v=4?s=100" width="100px;" alt="Deniz Susman"/><br /><sub><b>Deniz Susman</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=DenrizSusam" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/delca85"><img src="https://avatars1.githubusercontent.com/u/4076043?v=4?s=100" width="100px;" alt="Bianca Del Carretto"/><br /><sub><b>Bianca Del Carretto</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=delca85" title="Tests">⚠️</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=delca85" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/joshlalonde3/"><img src="https://avatars3.githubusercontent.com/u/9097492?v=4?s=100" width="100px;" alt="Josh Lalonde"/><br /><sub><b>Josh Lalonde</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=ryuuji3" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=ryuuji3" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ipap360"><img src="https://avatars2.githubusercontent.com/u/11017666?v=4?s=100" width="100px;" alt="Ioannis Papadopoulos"/><br /><sub><b>Ioannis Papadopoulos</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=ipap360" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=ipap360" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/maxnewlands"><img src="https://avatars3.githubusercontent.com/u/1304166?v=4?s=100" width="100px;" alt="Maxwell Newlands"/><br /><sub><b>Maxwell Newlands</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=maxnewlands" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=maxnewlands" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://www.jaredlux.com"><img src="https://avatars0.githubusercontent.com/u/450478?v=4?s=100" width="100px;" alt="Jared Luxenberg"/><br /><sub><b>Jared Luxenberg</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=jluxenberg" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=jluxenberg" title="Tests">⚠️</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Snizhana"><img src="https://avatars3.githubusercontent.com/u/18139946?v=4?s=100" width="100px;" alt="snizhana"/><br /><sub><b>snizhana</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=Snizhana" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=Snizhana" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/micha149"><img src="https://avatars2.githubusercontent.com/u/298880?v=4?s=100" width="100px;" alt="Michael van Engelshoven"/><br /><sub><b>Michael van Engelshoven</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/pulls?q=is%3Apr+reviewed-by%3Amicha149" title="Reviewed Pull Requests">👀</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://ashertuggle.wixsite.com/portfolio"><img src="https://avatars2.githubusercontent.com/u/10679635?v=4?s=100" width="100px;" alt="Asher Tuggle"/><br /><sub><b>Asher Tuggle</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3Aawesomeunleashed" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/winterlamon"><img src="https://avatars0.githubusercontent.com/u/16295605?v=4?s=100" width="100px;" alt="Winter LaMon"/><br /><sub><b>Winter LaMon</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=winterlamon" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=winterlamon" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://victorandcode.com"><img src="https://avatars0.githubusercontent.com/u/18427801?v=4?s=100" width="100px;" alt="Victor Cordova"/><br /><sub><b>Victor Cordova</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=victorandcode" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=victorandcode" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/slowselfip"><img src="https://avatars3.githubusercontent.com/u/9762906?v=4?s=100" width="100px;" alt="slowselfip"/><br /><sub><b>slowselfip</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3Aslowselfip" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Semigradsky"><img src="https://avatars3.githubusercontent.com/u/1198848?v=4?s=100" width="100px;" alt="Dmitry Semigradsky"/><br /><sub><b>Dmitry Semigradsky</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=Semigradsky" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Tismas"><img src="https://avatars2.githubusercontent.com/u/13601275?v=4?s=100" width="100px;" alt="Adam"/><br /><sub><b>Adam</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=Tismas" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=Tismas" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/balavishnuvj"><img src="https://avatars3.githubusercontent.com/u/13718688?v=4?s=100" width="100px;" alt="balavishnuvj"/><br /><sub><b>balavishnuvj</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=balavishnuvj" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://chriscolborne.com"><img src="https://avatars2.githubusercontent.com/u/101371?v=4?s=100" width="100px;" alt="Chris Colborne"/><br /><sub><b>Chris Colborne</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=zorfling" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/romain-trotard"><img src="https://avatars0.githubusercontent.com/u/17161484?v=4?s=100" width="100px;" alt="Romain Trotard"/><br /><sub><b>Romain Trotard</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=romain-trotard" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://www.thomasmarshall.com"><img src="https://avatars0.githubusercontent.com/u/770763?v=4?s=100" width="100px;" alt="Thomas Marshall"/><br /><sub><b>Thomas Marshall</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=thomasmarshall" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=thomasmarshall" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/johnjesse"><img src="https://avatars1.githubusercontent.com/u/6839660?v=4?s=100" width="100px;" alt="johnjessewood"/><br /><sub><b>johnjessewood</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3Ajohnjesse" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=johnjesse" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://codepen.io/ariperkkio/"><img src="https://avatars2.githubusercontent.com/u/14806298?v=4?s=100" width="100px;" alt="Ari Perkkiö"/><br /><sub><b>Ari Perkkiö</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3AAriPerkkio" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=AriPerkkio" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=AriPerkkio" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nathanforce"><img src="https://avatars2.githubusercontent.com/u/6694194?v=4?s=100" width="100px;" alt="Nathan Force"/><br /><sub><b>Nathan Force</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=nathanforce" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ph-fritsche"><img src="https://avatars.githubusercontent.com/u/39068198?v=4?s=100" width="100px;" alt="Philipp Fritsche"/><br /><sub><b>Philipp Fritsche</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=ph-fritsche" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://medium.com/@renatoalencar"><img src="https://avatars.githubusercontent.com/u/6964593?v=4?s=100" width="100px;" alt="Renato Alencar"/><br /><sub><b>Renato Alencar</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=renatoalencar" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=renatoalencar" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SimenB"><img src="https://avatars.githubusercontent.com/u/1404810?v=4?s=100" width="100px;" alt="Simen Bekkhus"/><br /><sub><b>Simen Bekkhus</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3ASimenB" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gaearon"><img src="https://avatars.githubusercontent.com/u/810438?v=4?s=100" width="100px;" alt="Dan Abramov"/><br /><sub><b>Dan Abramov</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3Agaearon" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/dom-testing-library/pulls?q=is%3Apr+reviewed-by%3Agaearon" title="Reviewed Pull Requests">👀</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://matan.io"><img src="https://avatars.githubusercontent.com/u/12711091?v=4?s=100" width="100px;" alt="Matan Borenkraout"/><br /><sub><b>Matan Borenkraout</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=MatanBobi" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/simcha90"><img src="https://avatars.githubusercontent.com/u/56388545?v=4?s=100" width="100px;" alt="simcha90"/><br /><sub><b>simcha90</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=simcha90" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/amitmiran137"><img src="https://avatars.githubusercontent.com/u/47772523?v=4?s=100" width="100px;" alt="Amit Miran"/><br /><sub><b>Amit Miran</b></sub></a><br /><a href="#infra-amitmiran137" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/leschdom"><img src="https://avatars.githubusercontent.com/u/62334278?v=4?s=100" width="100px;" alt="Dominik Lesch"/><br /><sub><b>Dominik Lesch</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=leschdom" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/G-Rath"><img src="https://avatars.githubusercontent.com/u/3151613?v=4?s=100" width="100px;" alt="Gareth Jones"/><br /><sub><b>Gareth Jones</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=G-Rath" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=G-Rath" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/riotrah"><img src="https://avatars.githubusercontent.com/u/22646419?v=4?s=100" width="100px;" alt="Rayat Rahman"/><br /><sub><b>Rayat Rahman</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=riotrah" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/savcni01"><img src="https://avatars.githubusercontent.com/u/18025894?v=4?s=100" width="100px;" alt="Nik Savchenko"/><br /><sub><b>Nik Savchenko</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=savcni01" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://www.hawkeye.dog"><img src="https://avatars.githubusercontent.com/u/7245931?v=4?s=100" width="100px;" alt="Kevin Fleischman"/><br /><sub><b>Kevin Fleischman</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=istateside" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=istateside" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://dfdx.us"><img src="https://avatars.githubusercontent.com/u/3087358?v=4?s=100" width="100px;" alt="Beth Hitch"/><br /><sub><b>Beth Hitch</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=dfoverdx" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://www.jacklaurence.net"><img src="https://avatars.githubusercontent.com/u/12763356?v=4?s=100" width="100px;" alt="Jack Laurence"/><br /><sub><b>Jack Laurence</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=jacklaurencegaray" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Lusito"><img src="https://avatars.githubusercontent.com/u/53570854?v=4?s=100" width="100px;" alt="SantoJambit"/><br /><sub><b>SantoJambit</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=SantoJambit" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mittalyashu"><img src="https://avatars.githubusercontent.com/u/29014463?v=4?s=100" width="100px;" alt="Yashu Mittal"/><br /><sub><b>Yashu Mittal</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=mittalyashu" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/IanVS"><img src="https://avatars.githubusercontent.com/u/4616705?v=4?s=100" width="100px;" alt="Ian VanSchooten"/><br /><sub><b>Ian VanSchooten</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=IanVS" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://supervanya.com"><img src="https://avatars.githubusercontent.com/u/12336038?v=4?s=100" width="100px;" alt="Vanya Prokopovich"/><br /><sub><b>Vanya Prokopovich</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3Asupervanya" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jrnail23"><img src="https://avatars.githubusercontent.com/u/392612?v=4?s=100" width="100px;" alt="James Nail"/><br /><sub><b>James Nail</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3Ajrnail23" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/robcaldecott"><img src="https://avatars.githubusercontent.com/u/796702?v=4?s=100" width="100px;" alt="Rob Caldecott"/><br /><sub><b>Rob Caldecott</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3Arobcaldecott" title="Bug reports">🐛</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Dennis273"><img src="https://avatars.githubusercontent.com/u/19815164?v=4?s=100" width="100px;" alt="Dennis273"/><br /><sub><b>Dennis273</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=Dennis273" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.jacksonhardaker.dev"><img src="https://avatars.githubusercontent.com/u/7596320?v=4?s=100" width="100px;" alt="Jackson Hardaker"/><br /><sub><b>Jackson Hardaker</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=jacksonhardaker" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.robin-drexler.com/"><img src="https://avatars.githubusercontent.com/u/474248?v=4?s=100" width="100px;" alt="Robin Drexler"/><br /><sub><b>Robin Drexler</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=robin-drexler" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dolevoper"><img src="https://avatars.githubusercontent.com/u/53278705?v=4?s=100" width="100px;" alt="Omer Dolev"/><br /><sub><b>Omer Dolev</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=dolevoper" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Lirlev48"><img src="https://avatars.githubusercontent.com/u/58209233?v=4?s=100" width="100px;" alt="Lirlev48"/><br /><sub><b>Lirlev48</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=Lirlev48" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kalmi"><img src="https://avatars.githubusercontent.com/u/54426?v=4?s=100" width="100px;" alt="Tarnay Kálmán"/><br /><sub><b>Tarnay Kálmán</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=kalmi" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MynockSpit"><img src="https://avatars.githubusercontent.com/u/5713867?v=4?s=100" width="100px;" alt="Than Hutchins"/><br /><sub><b>Than Hutchins</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=MynockSpit" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/raplemie"><img src="https://avatars.githubusercontent.com/u/1904889?v=4?s=100" width="100px;" alt="Raphaël LEMIEUX"/><br /><sub><b>Raphaël LEMIEUX</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=raplemie" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/arthurlvilasboas"><img src="https://avatars.githubusercontent.com/u/95368212?v=4?s=100" width="100px;" alt="Arthur Lauck Vilas Boas"/><br /><sub><b>Arthur Lauck Vilas Boas</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=arthurlvilasboas" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/DaniAcu"><img src="https://avatars.githubusercontent.com/u/26409015?v=4?s=100" width="100px;" alt="Daniel Acuña"/><br /><sub><b>Daniel Acuña</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=DaniAcu" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jlp-craigmorten"><img src="https://avatars.githubusercontent.com/u/124147726?v=4?s=100" width="100px;" alt="Craig Morten"/><br /><sub><b>Craig Morten</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=jlp-craigmorten" title="Code">💻</a> <a href="#question-jlp-craigmorten" title="Answering Questions">💬</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://naor.dev"><img src="https://avatars.githubusercontent.com/u/6171622?v=4?s=100" width="100px;" alt="Naor Peled"/><br /><sub><b>Naor Peled</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=naorpeled" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://everlong.org/"><img src="https://avatars.githubusercontent.com/u/454175?v=4?s=100" width="100px;" alt="Julien Wajsberg"/><br /><sub><b>Julien Wajsberg</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=julienw" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3Ajulienw" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/KevinBon"><img src="https://avatars.githubusercontent.com/u/1910927?v=4?s=100" width="100px;" alt="Kevin BON"/><br /><sub><b>Kevin BON</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=KevinBon" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/issues?q=author%3AKevinBon" title="Bug reports">🐛</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sieem"><img src="https://avatars.githubusercontent.com/u/36861085?v=4?s=100" width="100px;" alt="sieem"/><br /><sub><b>sieem</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=sieem" title="Code">💻</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
This project follows the [all-contributors][all-contributors] specification.
|
||||
Contributions of any kind welcome!
|
||||
|
||||
## LICENSE
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
[npm]: https://www.npmjs.com/
|
||||
[node]: https://nodejs.org
|
||||
[build-badge]: https://img.shields.io/github/workflow/status/testing-library/dom-testing-library/validate?logo=github&style=flat-square
|
||||
[build]: https://github.com/testing-library/dom-testing-library/actions?query=workflow%3Avalidate
|
||||
[coverage-badge]: https://img.shields.io/codecov/c/github/testing-library/dom-testing-library.svg?style=flat-square
|
||||
[coverage]: https://codecov.io/github/testing-library/dom-testing-library
|
||||
[version-badge]: https://img.shields.io/npm/v/@testing-library/dom.svg?style=flat-square
|
||||
[package]: https://www.npmjs.com/package/@testing-library/dom
|
||||
[downloads-badge]: https://img.shields.io/npm/dm/@testing-library/dom.svg?style=flat-square
|
||||
[npmtrends]: http://www.npmtrends.com/@testing-library/dom
|
||||
[license-badge]: https://img.shields.io/npm/l/@testing-library/dom.svg?style=flat-square
|
||||
[license]: https://github.com/testing-library/dom-testing-library/blob/main/LICENSE
|
||||
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
|
||||
[prs]: http://makeapullrequest.com
|
||||
[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
|
||||
[coc]: https://github.com/testing-library/dom-testing-library/blob/main/CODE_OF_CONDUCT.md
|
||||
[github-watch-badge]: https://img.shields.io/github/watchers/testing-library/dom-testing-library.svg?style=social
|
||||
[github-watch]: https://github.com/testing-library/dom-testing-library/watchers
|
||||
[github-star-badge]: https://img.shields.io/github/stars/testing-library/dom-testing-library.svg?style=social
|
||||
[github-star]: https://github.com/testing-library/dom-testing-library/stargazers
|
||||
[twitter]: https://twitter.com/intent/tweet?text=Check%20out%20dom-testing-library%20by%20%40testing-library%20https%3A%2F%2Fgithub.com%2Ftesting-library%2Fdom-testing-library%20%F0%9F%91%8D
|
||||
[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/testing-library/dom-testing-library.svg?style=social
|
||||
[emojis]: https://github.com/all-contributors/all-contributors#emoji-key
|
||||
[all-contributors]: https://github.com/all-contributors/all-contributors
|
||||
[all-contributors-badge]: https://img.shields.io/github/all-contributors/testing-library/dom-testing-library?color=orange&style=flat-square
|
||||
[set-immediate]: https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate
|
||||
[guiding-principle]: https://twitter.com/kentcdodds/status/977018512689455106
|
||||
[jest]: https://facebook.github.io/jest
|
||||
[discord-badge]: https://img.shields.io/discord/723559267868737556.svg?color=7389D8&labelColor=6A7EC2&logo=discord&logoColor=ffffff&style=flat-square
|
||||
[discord]: https://discord.gg/testing-library
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
2951
frontend/node_modules/@testing-library/dom/dist/@testing-library/dom.cjs.js
generated
vendored
Normal file
2951
frontend/node_modules/@testing-library/dom/dist/@testing-library/dom.cjs.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2848
frontend/node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js
generated
vendored
Normal file
2848
frontend/node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
12567
frontend/node_modules/@testing-library/dom/dist/@testing-library/dom.umd.js
generated
vendored
Normal file
12567
frontend/node_modules/@testing-library/dom/dist/@testing-library/dom.umd.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
frontend/node_modules/@testing-library/dom/dist/@testing-library/dom.umd.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/dom/dist/@testing-library/dom.umd.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
frontend/node_modules/@testing-library/dom/dist/@testing-library/dom.umd.min.js
generated
vendored
Normal file
2
frontend/node_modules/@testing-library/dom/dist/@testing-library/dom.umd.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
frontend/node_modules/@testing-library/dom/dist/@testing-library/dom.umd.min.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/dom/dist/@testing-library/dom.umd.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
116
frontend/node_modules/@testing-library/dom/dist/DOMElementFilter.js
generated
vendored
Normal file
116
frontend/node_modules/@testing-library/dom/dist/DOMElementFilter.js
generated
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = createDOMElementFilter;
|
||||
exports.test = void 0;
|
||||
/**
|
||||
* Source: https://github.com/facebook/jest/blob/e7bb6a1e26ffab90611b2593912df15b69315611/packages/pretty-format/src/plugins/DOMElement.ts
|
||||
*/
|
||||
/* eslint-disable -- trying to stay as close to the original as possible */
|
||||
/* istanbul ignore file */
|
||||
|
||||
function escapeHTML(str) {
|
||||
return str.replace(/</g, '<').replace(/>/g, '>');
|
||||
}
|
||||
// Return empty string if keys is empty.
|
||||
const printProps = (keys, props, config, indentation, depth, refs, printer) => {
|
||||
const indentationNext = indentation + config.indent;
|
||||
const colors = config.colors;
|
||||
return keys.map(key => {
|
||||
const value = props[key];
|
||||
let printed = printer(value, config, indentationNext, depth, refs);
|
||||
if (typeof value !== 'string') {
|
||||
if (printed.indexOf('\n') !== -1) {
|
||||
printed = config.spacingOuter + indentationNext + printed + config.spacingOuter + indentation;
|
||||
}
|
||||
printed = '{' + printed + '}';
|
||||
}
|
||||
return config.spacingInner + indentation + colors.prop.open + key + colors.prop.close + '=' + colors.value.open + printed + colors.value.close;
|
||||
}).join('');
|
||||
};
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#node_type_constants
|
||||
const NodeTypeTextNode = 3;
|
||||
|
||||
// Return empty string if children is empty.
|
||||
const printChildren = (children, config, indentation, depth, refs, printer) => children.map(child => {
|
||||
const printedChild = typeof child === 'string' ? printText(child, config) : printer(child, config, indentation, depth, refs);
|
||||
if (printedChild === '' && typeof child === 'object' && child !== null && child.nodeType !== NodeTypeTextNode) {
|
||||
// A plugin serialized this Node to '' meaning we should ignore it.
|
||||
return '';
|
||||
}
|
||||
return config.spacingOuter + indentation + printedChild;
|
||||
}).join('');
|
||||
const printText = (text, config) => {
|
||||
const contentColor = config.colors.content;
|
||||
return contentColor.open + escapeHTML(text) + contentColor.close;
|
||||
};
|
||||
const printComment = (comment, config) => {
|
||||
const commentColor = config.colors.comment;
|
||||
return commentColor.open + '<!--' + escapeHTML(comment) + '-->' + commentColor.close;
|
||||
};
|
||||
|
||||
// Separate the functions to format props, children, and element,
|
||||
// so a plugin could override a particular function, if needed.
|
||||
// Too bad, so sad: the traditional (but unnecessary) space
|
||||
// in a self-closing tagColor requires a second test of printedProps.
|
||||
const printElement = (type, printedProps, printedChildren, config, indentation) => {
|
||||
const tagColor = config.colors.tag;
|
||||
return tagColor.open + '<' + type + (printedProps && tagColor.close + printedProps + config.spacingOuter + indentation + tagColor.open) + (printedChildren ? '>' + tagColor.close + printedChildren + config.spacingOuter + indentation + tagColor.open + '</' + type : (printedProps && !config.min ? '' : ' ') + '/') + '>' + tagColor.close;
|
||||
};
|
||||
const printElementAsLeaf = (type, config) => {
|
||||
const tagColor = config.colors.tag;
|
||||
return tagColor.open + '<' + type + tagColor.close + ' …' + tagColor.open + ' />' + tagColor.close;
|
||||
};
|
||||
const ELEMENT_NODE = 1;
|
||||
const TEXT_NODE = 3;
|
||||
const COMMENT_NODE = 8;
|
||||
const FRAGMENT_NODE = 11;
|
||||
const ELEMENT_REGEXP = /^((HTML|SVG)\w*)?Element$/;
|
||||
const isCustomElement = val => {
|
||||
const {
|
||||
tagName
|
||||
} = val;
|
||||
return Boolean(typeof tagName === 'string' && tagName.includes('-') || typeof val.hasAttribute === 'function' && val.hasAttribute('is'));
|
||||
};
|
||||
const testNode = val => {
|
||||
const constructorName = val.constructor.name;
|
||||
const {
|
||||
nodeType
|
||||
} = val;
|
||||
return nodeType === ELEMENT_NODE && (ELEMENT_REGEXP.test(constructorName) || isCustomElement(val)) || nodeType === TEXT_NODE && constructorName === 'Text' || nodeType === COMMENT_NODE && constructorName === 'Comment' || nodeType === FRAGMENT_NODE && constructorName === 'DocumentFragment';
|
||||
};
|
||||
const test = val => (val?.constructor?.name || isCustomElement(val)) && testNode(val);
|
||||
exports.test = test;
|
||||
function nodeIsText(node) {
|
||||
return node.nodeType === TEXT_NODE;
|
||||
}
|
||||
function nodeIsComment(node) {
|
||||
return node.nodeType === COMMENT_NODE;
|
||||
}
|
||||
function nodeIsFragment(node) {
|
||||
return node.nodeType === FRAGMENT_NODE;
|
||||
}
|
||||
function createDOMElementFilter(filterNode) {
|
||||
return {
|
||||
test: val => (val?.constructor?.name || isCustomElement(val)) && testNode(val),
|
||||
serialize: (node, config, indentation, depth, refs, printer) => {
|
||||
if (nodeIsText(node)) {
|
||||
return printText(node.data, config);
|
||||
}
|
||||
if (nodeIsComment(node)) {
|
||||
return printComment(node.data, config);
|
||||
}
|
||||
const type = nodeIsFragment(node) ? `DocumentFragment` : node.tagName.toLowerCase();
|
||||
if (++depth > config.maxDepth) {
|
||||
return printElementAsLeaf(type, config);
|
||||
}
|
||||
return printElement(type, printProps(nodeIsFragment(node) ? [] : Array.from(node.attributes).map(attr => attr.name).sort(), nodeIsFragment(node) ? {} : Array.from(node.attributes).reduce((props, attribute) => {
|
||||
props[attribute.name] = attribute.value;
|
||||
return props;
|
||||
}, {}), config, indentation + config.indent, depth, refs, printer), printChildren(Array.prototype.slice.call(node.childNodes || node.children).filter(filterNode), config, indentation + config.indent, depth, refs, printer), config, indentation);
|
||||
}
|
||||
};
|
||||
}
|
||||
67
frontend/node_modules/@testing-library/dom/dist/config.js
generated
vendored
Normal file
67
frontend/node_modules/@testing-library/dom/dist/config.js
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.configure = configure;
|
||||
exports.getConfig = getConfig;
|
||||
exports.runWithExpensiveErrorDiagnosticsDisabled = runWithExpensiveErrorDiagnosticsDisabled;
|
||||
var _prettyDom = require("./pretty-dom");
|
||||
// It would be cleaner for this to live inside './queries', but
|
||||
// other parts of the code assume that all exports from
|
||||
// './queries' are query functions.
|
||||
let config = {
|
||||
testIdAttribute: 'data-testid',
|
||||
asyncUtilTimeout: 1000,
|
||||
// asyncWrapper and advanceTimersWrapper is to support React's async `act` function.
|
||||
// forcing react-testing-library to wrap all async functions would've been
|
||||
// a total nightmare (consider wrapping every findBy* query and then also
|
||||
// updating `within` so those would be wrapped too. Total nightmare).
|
||||
// so we have this config option that's really only intended for
|
||||
// react-testing-library to use. For that reason, this feature will remain
|
||||
// undocumented.
|
||||
asyncWrapper: cb => cb(),
|
||||
unstable_advanceTimersWrapper: cb => cb(),
|
||||
eventWrapper: cb => cb(),
|
||||
// default value for the `hidden` option in `ByRole` queries
|
||||
defaultHidden: false,
|
||||
// default value for the `ignore` option in `ByText` queries
|
||||
defaultIgnore: 'script, style',
|
||||
// showOriginalStackTrace flag to show the full error stack traces for async errors
|
||||
showOriginalStackTrace: false,
|
||||
// throw errors w/ suggestions for better queries. Opt in so off by default.
|
||||
throwSuggestions: false,
|
||||
// called when getBy* queries fail. (message, container) => Error
|
||||
getElementError(message, container) {
|
||||
const prettifiedDOM = (0, _prettyDom.prettyDOM)(container);
|
||||
const error = new Error([message, `Ignored nodes: comments, ${config.defaultIgnore}\n${prettifiedDOM}`].filter(Boolean).join('\n\n'));
|
||||
error.name = 'TestingLibraryElementError';
|
||||
return error;
|
||||
},
|
||||
_disableExpensiveErrorDiagnostics: false,
|
||||
computedStyleSupportsPseudoElements: false
|
||||
};
|
||||
function runWithExpensiveErrorDiagnosticsDisabled(callback) {
|
||||
try {
|
||||
config._disableExpensiveErrorDiagnostics = true;
|
||||
return callback();
|
||||
} finally {
|
||||
config._disableExpensiveErrorDiagnostics = false;
|
||||
}
|
||||
}
|
||||
function configure(newConfig) {
|
||||
if (typeof newConfig === 'function') {
|
||||
// Pass the existing config out to the provided function
|
||||
// and accept a delta in return
|
||||
newConfig = newConfig(config);
|
||||
}
|
||||
|
||||
// Merge the incoming config delta
|
||||
config = {
|
||||
...config,
|
||||
...newConfig
|
||||
};
|
||||
}
|
||||
function getConfig() {
|
||||
return config;
|
||||
}
|
||||
711
frontend/node_modules/@testing-library/dom/dist/event-map.js
generated
vendored
Normal file
711
frontend/node_modules/@testing-library/dom/dist/event-map.js
generated
vendored
Normal file
@@ -0,0 +1,711 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.eventMap = exports.eventAliasMap = void 0;
|
||||
const eventMap = exports.eventMap = {
|
||||
// Clipboard Events
|
||||
copy: {
|
||||
EventType: 'ClipboardEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
cut: {
|
||||
EventType: 'ClipboardEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
paste: {
|
||||
EventType: 'ClipboardEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
// Composition Events
|
||||
compositionEnd: {
|
||||
EventType: 'CompositionEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
compositionStart: {
|
||||
EventType: 'CompositionEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
compositionUpdate: {
|
||||
EventType: 'CompositionEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
// Keyboard Events
|
||||
keyDown: {
|
||||
EventType: 'KeyboardEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
charCode: 0,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
keyPress: {
|
||||
EventType: 'KeyboardEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
charCode: 0,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
keyUp: {
|
||||
EventType: 'KeyboardEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
charCode: 0,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
// Focus Events
|
||||
focus: {
|
||||
EventType: 'FocusEvent',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
blur: {
|
||||
EventType: 'FocusEvent',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
focusIn: {
|
||||
EventType: 'FocusEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
focusOut: {
|
||||
EventType: 'FocusEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
// Form Events
|
||||
change: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
input: {
|
||||
EventType: 'InputEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
invalid: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: true
|
||||
}
|
||||
},
|
||||
submit: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true
|
||||
}
|
||||
},
|
||||
reset: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true
|
||||
}
|
||||
},
|
||||
// Mouse Events
|
||||
click: {
|
||||
EventType: 'MouseEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
button: 0,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
contextMenu: {
|
||||
EventType: 'MouseEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
dblClick: {
|
||||
EventType: 'MouseEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
drag: {
|
||||
EventType: 'DragEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
dragEnd: {
|
||||
EventType: 'DragEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
dragEnter: {
|
||||
EventType: 'DragEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
dragExit: {
|
||||
EventType: 'DragEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
dragLeave: {
|
||||
EventType: 'DragEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
dragOver: {
|
||||
EventType: 'DragEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
dragStart: {
|
||||
EventType: 'DragEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
drop: {
|
||||
EventType: 'DragEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
mouseDown: {
|
||||
EventType: 'MouseEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
mouseEnter: {
|
||||
EventType: 'MouseEvent',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
mouseLeave: {
|
||||
EventType: 'MouseEvent',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
mouseMove: {
|
||||
EventType: 'MouseEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
mouseOut: {
|
||||
EventType: 'MouseEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
mouseOver: {
|
||||
EventType: 'MouseEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
mouseUp: {
|
||||
EventType: 'MouseEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
// Selection Events
|
||||
select: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
// Touch Events
|
||||
touchCancel: {
|
||||
EventType: 'TouchEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
touchEnd: {
|
||||
EventType: 'TouchEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
touchMove: {
|
||||
EventType: 'TouchEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
touchStart: {
|
||||
EventType: 'TouchEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
// UI Events
|
||||
resize: {
|
||||
EventType: 'UIEvent',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
scroll: {
|
||||
EventType: 'UIEvent',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
// Wheel Events
|
||||
wheel: {
|
||||
EventType: 'WheelEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
// Media Events
|
||||
abort: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
canPlay: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
canPlayThrough: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
durationChange: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
emptied: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
encrypted: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
ended: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
loadedData: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
loadedMetadata: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
loadStart: {
|
||||
EventType: 'ProgressEvent',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
pause: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
play: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
playing: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
progress: {
|
||||
EventType: 'ProgressEvent',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
rateChange: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
seeked: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
seeking: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
stalled: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
suspend: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
timeUpdate: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
volumeChange: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
waiting: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
// Events
|
||||
load: {
|
||||
// TODO: load events can be UIEvent or Event depending on what generated them
|
||||
// This is where this abstraction breaks down.
|
||||
// But the common targets are <img />, <script /> and window.
|
||||
// Neither of these targets receive a UIEvent
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
error: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
// Animation Events
|
||||
animationStart: {
|
||||
EventType: 'AnimationEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
animationEnd: {
|
||||
EventType: 'AnimationEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
animationIteration: {
|
||||
EventType: 'AnimationEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
// Transition Events
|
||||
transitionCancel: {
|
||||
EventType: 'TransitionEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
transitionEnd: {
|
||||
EventType: 'TransitionEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true
|
||||
}
|
||||
},
|
||||
transitionRun: {
|
||||
EventType: 'TransitionEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
transitionStart: {
|
||||
EventType: 'TransitionEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
// pointer events
|
||||
pointerOver: {
|
||||
EventType: 'PointerEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
pointerEnter: {
|
||||
EventType: 'PointerEvent',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
pointerDown: {
|
||||
EventType: 'PointerEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
pointerMove: {
|
||||
EventType: 'PointerEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
pointerUp: {
|
||||
EventType: 'PointerEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
pointerCancel: {
|
||||
EventType: 'PointerEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
pointerOut: {
|
||||
EventType: 'PointerEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
pointerLeave: {
|
||||
EventType: 'PointerEvent',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
gotPointerCapture: {
|
||||
EventType: 'PointerEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
lostPointerCapture: {
|
||||
EventType: 'PointerEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false,
|
||||
composed: true
|
||||
}
|
||||
},
|
||||
// history events
|
||||
popState: {
|
||||
EventType: 'PopStateEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
// window events
|
||||
offline: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
online: {
|
||||
EventType: 'Event',
|
||||
defaultInit: {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
}
|
||||
},
|
||||
pageHide: {
|
||||
EventType: 'PageTransitionEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true
|
||||
}
|
||||
},
|
||||
pageShow: {
|
||||
EventType: 'PageTransitionEvent',
|
||||
defaultInit: {
|
||||
bubbles: true,
|
||||
cancelable: true
|
||||
}
|
||||
}
|
||||
};
|
||||
const eventAliasMap = exports.eventAliasMap = {
|
||||
doubleClick: 'dblClick'
|
||||
};
|
||||
140
frontend/node_modules/@testing-library/dom/dist/events.js
generated
vendored
Normal file
140
frontend/node_modules/@testing-library/dom/dist/events.js
generated
vendored
Normal file
@@ -0,0 +1,140 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.createEvent = createEvent;
|
||||
exports.fireEvent = fireEvent;
|
||||
var _config = require("./config");
|
||||
var _helpers = require("./helpers");
|
||||
var _eventMap = require("./event-map");
|
||||
function fireEvent(element, event) {
|
||||
return (0, _config.getConfig)().eventWrapper(() => {
|
||||
if (!event) {
|
||||
throw new Error(`Unable to fire an event - please provide an event object.`);
|
||||
}
|
||||
if (!element) {
|
||||
throw new Error(`Unable to fire a "${event.type}" event - please provide a DOM element.`);
|
||||
}
|
||||
return element.dispatchEvent(event);
|
||||
});
|
||||
}
|
||||
function createEvent(eventName, node, init, {
|
||||
EventType = 'Event',
|
||||
defaultInit = {}
|
||||
} = {}) {
|
||||
if (!node) {
|
||||
throw new Error(`Unable to fire a "${eventName}" event - please provide a DOM element.`);
|
||||
}
|
||||
const eventInit = {
|
||||
...defaultInit,
|
||||
...init
|
||||
};
|
||||
const {
|
||||
target: {
|
||||
value,
|
||||
files,
|
||||
...targetProperties
|
||||
} = {}
|
||||
} = eventInit;
|
||||
if (value !== undefined) {
|
||||
setNativeValue(node, value);
|
||||
}
|
||||
if (files !== undefined) {
|
||||
// input.files is a read-only property so this is not allowed:
|
||||
// input.files = [file]
|
||||
// so we have to use this workaround to set the property
|
||||
Object.defineProperty(node, 'files', {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: files
|
||||
});
|
||||
}
|
||||
Object.assign(node, targetProperties);
|
||||
const window = (0, _helpers.getWindowFromNode)(node);
|
||||
const EventConstructor = window[EventType] || window.Event;
|
||||
let event;
|
||||
/* istanbul ignore else */
|
||||
if (typeof EventConstructor === 'function') {
|
||||
event = new EventConstructor(eventName, eventInit);
|
||||
} else {
|
||||
// IE11 polyfill from https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill
|
||||
event = window.document.createEvent(EventType);
|
||||
const {
|
||||
bubbles,
|
||||
cancelable,
|
||||
detail,
|
||||
...otherInit
|
||||
} = eventInit;
|
||||
event.initEvent(eventName, bubbles, cancelable, detail);
|
||||
Object.keys(otherInit).forEach(eventKey => {
|
||||
event[eventKey] = otherInit[eventKey];
|
||||
});
|
||||
}
|
||||
|
||||
// DataTransfer is not supported in jsdom: https://github.com/jsdom/jsdom/issues/1568
|
||||
const dataTransferProperties = ['dataTransfer', 'clipboardData'];
|
||||
dataTransferProperties.forEach(dataTransferKey => {
|
||||
const dataTransferValue = eventInit[dataTransferKey];
|
||||
if (typeof dataTransferValue === 'object') {
|
||||
/* istanbul ignore if */
|
||||
if (typeof window.DataTransfer === 'function') {
|
||||
Object.defineProperty(event, dataTransferKey, {
|
||||
value: Object.getOwnPropertyNames(dataTransferValue).reduce((acc, propName) => {
|
||||
Object.defineProperty(acc, propName, {
|
||||
value: dataTransferValue[propName]
|
||||
});
|
||||
return acc;
|
||||
}, new window.DataTransfer())
|
||||
});
|
||||
} else {
|
||||
Object.defineProperty(event, dataTransferKey, {
|
||||
value: dataTransferValue
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return event;
|
||||
}
|
||||
Object.keys(_eventMap.eventMap).forEach(key => {
|
||||
const {
|
||||
EventType,
|
||||
defaultInit
|
||||
} = _eventMap.eventMap[key];
|
||||
const eventName = key.toLowerCase();
|
||||
createEvent[key] = (node, init) => createEvent(eventName, node, init, {
|
||||
EventType,
|
||||
defaultInit
|
||||
});
|
||||
fireEvent[key] = (node, init) => fireEvent(node, createEvent[key](node, init));
|
||||
});
|
||||
|
||||
// function written after some investigation here:
|
||||
// https://github.com/facebook/react/issues/10135#issuecomment-401496776
|
||||
function setNativeValue(element, value) {
|
||||
const {
|
||||
set: valueSetter
|
||||
} = Object.getOwnPropertyDescriptor(element, 'value') || {};
|
||||
const prototype = Object.getPrototypeOf(element);
|
||||
const {
|
||||
set: prototypeValueSetter
|
||||
} = Object.getOwnPropertyDescriptor(prototype, 'value') || {};
|
||||
if (prototypeValueSetter && valueSetter !== prototypeValueSetter) {
|
||||
prototypeValueSetter.call(element, value);
|
||||
} else {
|
||||
/* istanbul ignore if */
|
||||
// eslint-disable-next-line no-lonely-if -- Can't be ignored by istanbul otherwise
|
||||
if (valueSetter) {
|
||||
valueSetter.call(element, value);
|
||||
} else {
|
||||
throw new Error('The given element does not have a value setter');
|
||||
}
|
||||
}
|
||||
}
|
||||
Object.keys(_eventMap.eventAliasMap).forEach(aliasKey => {
|
||||
const key = _eventMap.eventAliasMap[aliasKey];
|
||||
fireEvent[aliasKey] = (...args) => fireEvent[key](...args);
|
||||
});
|
||||
|
||||
/* eslint complexity:["error", 9] */
|
||||
13
frontend/node_modules/@testing-library/dom/dist/get-node-text.js
generated
vendored
Normal file
13
frontend/node_modules/@testing-library/dom/dist/get-node-text.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.getNodeText = getNodeText;
|
||||
var _helpers = require("./helpers");
|
||||
function getNodeText(node) {
|
||||
if (node.matches('input[type=submit], input[type=button], input[type=reset]')) {
|
||||
return node.value;
|
||||
}
|
||||
return Array.from(node.childNodes).filter(child => child.nodeType === _helpers.TEXT_NODE && Boolean(child.textContent)).map(c => c.textContent).join('');
|
||||
}
|
||||
26
frontend/node_modules/@testing-library/dom/dist/get-queries-for-element.js
generated
vendored
Normal file
26
frontend/node_modules/@testing-library/dom/dist/get-queries-for-element.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.getQueriesForElement = getQueriesForElement;
|
||||
var defaultQueries = _interopRequireWildcard(require("./queries"));
|
||||
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
||||
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
||||
/**
|
||||
* @typedef {{[key: string]: Function}} FuncMap
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {HTMLElement} element container
|
||||
* @param {FuncMap} queries object of functions
|
||||
* @param {Object} initialValue for reducer
|
||||
* @returns {FuncMap} returns object of functions bound to container
|
||||
*/
|
||||
function getQueriesForElement(element, queries = defaultQueries, initialValue = {}) {
|
||||
return Object.keys(queries).reduce((helpers, key) => {
|
||||
const fn = queries[key];
|
||||
helpers[key] = fn.bind(null, element);
|
||||
return helpers;
|
||||
}, initialValue);
|
||||
}
|
||||
55
frontend/node_modules/@testing-library/dom/dist/get-user-code-frame.js
generated
vendored
Normal file
55
frontend/node_modules/@testing-library/dom/dist/get-user-code-frame.js
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.getUserCodeFrame = getUserCodeFrame;
|
||||
// We try to load node dependencies
|
||||
let chalk = null;
|
||||
let readFileSync = null;
|
||||
let codeFrameColumns = null;
|
||||
try {
|
||||
const nodeRequire = module && module.require;
|
||||
readFileSync = nodeRequire.call(module, 'fs').readFileSync;
|
||||
codeFrameColumns = nodeRequire.call(module, '@babel/code-frame').codeFrameColumns;
|
||||
chalk = nodeRequire.call(module, 'chalk');
|
||||
} catch {
|
||||
// We're in a browser environment
|
||||
}
|
||||
|
||||
// frame has the form "at myMethod (location/to/my/file.js:10:2)"
|
||||
function getCodeFrame(frame) {
|
||||
const locationStart = frame.indexOf('(') + 1;
|
||||
const locationEnd = frame.indexOf(')');
|
||||
const frameLocation = frame.slice(locationStart, locationEnd);
|
||||
const frameLocationElements = frameLocation.split(':');
|
||||
const [filename, line, column] = [frameLocationElements[0], parseInt(frameLocationElements[1], 10), parseInt(frameLocationElements[2], 10)];
|
||||
let rawFileContents = '';
|
||||
try {
|
||||
rawFileContents = readFileSync(filename, 'utf-8');
|
||||
} catch {
|
||||
return '';
|
||||
}
|
||||
const codeFrame = codeFrameColumns(rawFileContents, {
|
||||
start: {
|
||||
line,
|
||||
column
|
||||
}
|
||||
}, {
|
||||
highlightCode: true,
|
||||
linesBelow: 0
|
||||
});
|
||||
return `${chalk.dim(frameLocation)}\n${codeFrame}\n`;
|
||||
}
|
||||
function getUserCodeFrame() {
|
||||
// If we couldn't load dependencies, we can't generate the user trace
|
||||
/* istanbul ignore next */
|
||||
if (!readFileSync || !codeFrameColumns) {
|
||||
return '';
|
||||
}
|
||||
const err = new Error();
|
||||
const firstClientCodeFrame = err.stack.split('\n').slice(1) // Remove first line which has the form "Error: TypeError"
|
||||
.find(frame => !frame.includes('node_modules/')); // Ignore frames from 3rd party libraries
|
||||
|
||||
return getCodeFrame(firstClientCodeFrame);
|
||||
}
|
||||
69
frontend/node_modules/@testing-library/dom/dist/helpers.js
generated
vendored
Normal file
69
frontend/node_modules/@testing-library/dom/dist/helpers.js
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.TEXT_NODE = void 0;
|
||||
exports.checkContainerType = checkContainerType;
|
||||
exports.getDocument = getDocument;
|
||||
exports.getWindowFromNode = getWindowFromNode;
|
||||
exports.jestFakeTimersAreEnabled = jestFakeTimersAreEnabled;
|
||||
// Constant node.nodeType for text nodes, see:
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#Node_type_constants
|
||||
const TEXT_NODE = exports.TEXT_NODE = 3;
|
||||
function jestFakeTimersAreEnabled() {
|
||||
/* istanbul ignore else */
|
||||
// eslint-disable-next-line
|
||||
if (typeof jest !== 'undefined' && jest !== null) {
|
||||
return (
|
||||
// legacy timers
|
||||
setTimeout._isMockFunction === true ||
|
||||
// modern timers
|
||||
// eslint-disable-next-line prefer-object-has-own -- not supported by our support matrix
|
||||
Object.prototype.hasOwnProperty.call(setTimeout, 'clock')
|
||||
);
|
||||
}
|
||||
// istanbul ignore next
|
||||
return false;
|
||||
}
|
||||
function getDocument() {
|
||||
/* istanbul ignore if */
|
||||
if (typeof window === 'undefined') {
|
||||
throw new Error('Could not find default container');
|
||||
}
|
||||
return window.document;
|
||||
}
|
||||
function getWindowFromNode(node) {
|
||||
if (node.defaultView) {
|
||||
// node is document
|
||||
return node.defaultView;
|
||||
} else if (node.ownerDocument && node.ownerDocument.defaultView) {
|
||||
// node is a DOM node
|
||||
return node.ownerDocument.defaultView;
|
||||
} else if (node.window) {
|
||||
// node is window
|
||||
return node.window;
|
||||
} else if (node.ownerDocument && node.ownerDocument.defaultView === null) {
|
||||
throw new Error(`It looks like the window object is not available for the provided node.`);
|
||||
} else if (node.then instanceof Function) {
|
||||
throw new Error(`It looks like you passed a Promise object instead of a DOM node. Did you do something like \`fireEvent.click(screen.findBy...\` when you meant to use a \`getBy\` query \`fireEvent.click(screen.getBy...\`, or await the findBy query \`fireEvent.click(await screen.findBy...\`?`);
|
||||
} else if (Array.isArray(node)) {
|
||||
throw new Error(`It looks like you passed an Array instead of a DOM node. Did you do something like \`fireEvent.click(screen.getAllBy...\` when you meant to use a \`getBy\` query \`fireEvent.click(screen.getBy...\`?`);
|
||||
} else if (typeof node.debug === 'function' && typeof node.logTestingPlaygroundURL === 'function') {
|
||||
throw new Error(`It looks like you passed a \`screen\` object. Did you do something like \`fireEvent.click(screen, ...\` when you meant to use a query, e.g. \`fireEvent.click(screen.getBy..., \`?`);
|
||||
} else {
|
||||
// The user passed something unusual to a calling function
|
||||
throw new Error(`The given node is not an Element, the node type is: ${typeof node}.`);
|
||||
}
|
||||
}
|
||||
function checkContainerType(container) {
|
||||
if (!container || !(typeof container.querySelector === 'function') || !(typeof container.querySelectorAll === 'function')) {
|
||||
throw new TypeError(`Expected container to be an Element, a Document or a DocumentFragment but got ${getTypeName(container)}.`);
|
||||
}
|
||||
function getTypeName(object) {
|
||||
if (typeof object === 'object') {
|
||||
return object === null ? 'null' : object.constructor.name;
|
||||
}
|
||||
return typeof object;
|
||||
}
|
||||
}
|
||||
186
frontend/node_modules/@testing-library/dom/dist/index.js
generated
vendored
Normal file
186
frontend/node_modules/@testing-library/dom/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,186 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {
|
||||
within: true,
|
||||
queries: true,
|
||||
queryHelpers: true,
|
||||
getDefaultNormalizer: true,
|
||||
getRoles: true,
|
||||
logRoles: true,
|
||||
isInaccessible: true,
|
||||
configure: true,
|
||||
getConfig: true
|
||||
};
|
||||
Object.defineProperty(exports, "configure", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _config.configure;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "getConfig", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _config.getConfig;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "getDefaultNormalizer", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _matches.getDefaultNormalizer;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "getRoles", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _roleHelpers.getRoles;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isInaccessible", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _roleHelpers.isInaccessible;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "logRoles", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _roleHelpers.logRoles;
|
||||
}
|
||||
});
|
||||
exports.queryHelpers = exports.queries = void 0;
|
||||
Object.defineProperty(exports, "within", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _getQueriesForElement.getQueriesForElement;
|
||||
}
|
||||
});
|
||||
var _getQueriesForElement = require("./get-queries-for-element");
|
||||
Object.keys(_getQueriesForElement).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _getQueriesForElement[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _getQueriesForElement[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var queries = _interopRequireWildcard(require("./queries"));
|
||||
exports.queries = queries;
|
||||
Object.keys(queries).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === queries[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return queries[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var queryHelpers = _interopRequireWildcard(require("./query-helpers"));
|
||||
exports.queryHelpers = queryHelpers;
|
||||
Object.keys(queryHelpers).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === queryHelpers[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return queryHelpers[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _waitFor = require("./wait-for");
|
||||
Object.keys(_waitFor).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _waitFor[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _waitFor[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _waitForElementToBeRemoved = require("./wait-for-element-to-be-removed");
|
||||
Object.keys(_waitForElementToBeRemoved).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _waitForElementToBeRemoved[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _waitForElementToBeRemoved[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _matches = require("./matches");
|
||||
var _getNodeText = require("./get-node-text");
|
||||
Object.keys(_getNodeText).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _getNodeText[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _getNodeText[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _events = require("./events");
|
||||
Object.keys(_events).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _events[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _events[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _screen = require("./screen");
|
||||
Object.keys(_screen).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _screen[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _screen[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _roleHelpers = require("./role-helpers");
|
||||
var _prettyDom = require("./pretty-dom");
|
||||
Object.keys(_prettyDom).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _prettyDom[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _prettyDom[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _config = require("./config");
|
||||
var _suggestions = require("./suggestions");
|
||||
Object.keys(_suggestions).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _suggestions[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _suggestions[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
||||
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
||||
64
frontend/node_modules/@testing-library/dom/dist/label-helpers.js
generated
vendored
Normal file
64
frontend/node_modules/@testing-library/dom/dist/label-helpers.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.getLabelContent = getLabelContent;
|
||||
exports.getLabels = getLabels;
|
||||
exports.getRealLabels = getRealLabels;
|
||||
var _helpers = require("./helpers");
|
||||
const labelledNodeNames = ['button', 'meter', 'output', 'progress', 'select', 'textarea', 'input'];
|
||||
function getTextContent(node) {
|
||||
if (labelledNodeNames.includes(node.nodeName.toLowerCase())) {
|
||||
return '';
|
||||
}
|
||||
if (node.nodeType === _helpers.TEXT_NODE) return node.textContent;
|
||||
return Array.from(node.childNodes).map(childNode => getTextContent(childNode)).join('');
|
||||
}
|
||||
function getLabelContent(element) {
|
||||
let textContent;
|
||||
if (element.tagName.toLowerCase() === 'label') {
|
||||
textContent = getTextContent(element);
|
||||
} else {
|
||||
textContent = element.value || element.textContent;
|
||||
}
|
||||
return textContent;
|
||||
}
|
||||
|
||||
// Based on https://github.com/eps1lon/dom-accessibility-api/pull/352
|
||||
function getRealLabels(element) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- types are not aware of older browsers that don't implement `labels`
|
||||
if (element.labels !== undefined) {
|
||||
return element.labels ?? [];
|
||||
}
|
||||
if (!isLabelable(element)) return [];
|
||||
const labels = element.ownerDocument.querySelectorAll('label');
|
||||
return Array.from(labels).filter(label => label.control === element);
|
||||
}
|
||||
function isLabelable(element) {
|
||||
return /BUTTON|METER|OUTPUT|PROGRESS|SELECT|TEXTAREA/.test(element.tagName) || element.tagName === 'INPUT' && element.getAttribute('type') !== 'hidden';
|
||||
}
|
||||
function getLabels(container, element, {
|
||||
selector = '*'
|
||||
} = {}) {
|
||||
const ariaLabelledBy = element.getAttribute('aria-labelledby');
|
||||
const labelsId = ariaLabelledBy ? ariaLabelledBy.split(' ') : [];
|
||||
return labelsId.length ? labelsId.map(labelId => {
|
||||
const labellingElement = container.querySelector(`[id="${labelId}"]`);
|
||||
return labellingElement ? {
|
||||
content: getLabelContent(labellingElement),
|
||||
formControl: null
|
||||
} : {
|
||||
content: '',
|
||||
formControl: null
|
||||
};
|
||||
}) : Array.from(getRealLabels(element)).map(label => {
|
||||
const textToMatch = getLabelContent(label);
|
||||
const formControlSelector = 'button, input, meter, output, progress, select, textarea';
|
||||
const labelledFormControl = Array.from(label.querySelectorAll(formControlSelector)).filter(formControlElement => formControlElement.matches(selector))[0];
|
||||
return {
|
||||
content: textToMatch,
|
||||
formControl: labelledFormControl
|
||||
};
|
||||
});
|
||||
}
|
||||
92
frontend/node_modules/@testing-library/dom/dist/matches.js
generated
vendored
Normal file
92
frontend/node_modules/@testing-library/dom/dist/matches.js
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.fuzzyMatches = fuzzyMatches;
|
||||
exports.getDefaultNormalizer = getDefaultNormalizer;
|
||||
exports.makeNormalizer = makeNormalizer;
|
||||
exports.matches = matches;
|
||||
function assertNotNullOrUndefined(matcher) {
|
||||
if (matcher === null || matcher === undefined) {
|
||||
throw new Error(
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions -- implicitly converting `T` to `string`
|
||||
`It looks like ${matcher} was passed instead of a matcher. Did you do something like getByText(${matcher})?`);
|
||||
}
|
||||
}
|
||||
function fuzzyMatches(textToMatch, node, matcher, normalizer) {
|
||||
if (typeof textToMatch !== 'string') {
|
||||
return false;
|
||||
}
|
||||
assertNotNullOrUndefined(matcher);
|
||||
const normalizedText = normalizer(textToMatch);
|
||||
if (typeof matcher === 'string' || typeof matcher === 'number') {
|
||||
return normalizedText.toLowerCase().includes(matcher.toString().toLowerCase());
|
||||
} else if (typeof matcher === 'function') {
|
||||
return matcher(normalizedText, node);
|
||||
} else {
|
||||
return matchRegExp(matcher, normalizedText);
|
||||
}
|
||||
}
|
||||
function matches(textToMatch, node, matcher, normalizer) {
|
||||
if (typeof textToMatch !== 'string') {
|
||||
return false;
|
||||
}
|
||||
assertNotNullOrUndefined(matcher);
|
||||
const normalizedText = normalizer(textToMatch);
|
||||
if (matcher instanceof Function) {
|
||||
return matcher(normalizedText, node);
|
||||
} else if (matcher instanceof RegExp) {
|
||||
return matchRegExp(matcher, normalizedText);
|
||||
} else {
|
||||
return normalizedText === String(matcher);
|
||||
}
|
||||
}
|
||||
function getDefaultNormalizer({
|
||||
trim = true,
|
||||
collapseWhitespace = true
|
||||
} = {}) {
|
||||
return text => {
|
||||
let normalizedText = text;
|
||||
normalizedText = trim ? normalizedText.trim() : normalizedText;
|
||||
normalizedText = collapseWhitespace ? normalizedText.replace(/\s+/g, ' ') : normalizedText;
|
||||
return normalizedText;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a normalizer to pass to functions in matches.js
|
||||
* @param {boolean|undefined} trim The user-specified value for `trim`, without
|
||||
* any defaulting having been applied
|
||||
* @param {boolean|undefined} collapseWhitespace The user-specified value for
|
||||
* `collapseWhitespace`, without any defaulting having been applied
|
||||
* @param {Function|undefined} normalizer The user-specified normalizer
|
||||
* @returns {Function} A normalizer
|
||||
*/
|
||||
|
||||
function makeNormalizer({
|
||||
trim,
|
||||
collapseWhitespace,
|
||||
normalizer
|
||||
}) {
|
||||
if (!normalizer) {
|
||||
// No custom normalizer specified. Just use default.
|
||||
return getDefaultNormalizer({
|
||||
trim,
|
||||
collapseWhitespace
|
||||
});
|
||||
}
|
||||
if (typeof trim !== 'undefined' || typeof collapseWhitespace !== 'undefined') {
|
||||
// They've also specified a value for trim or collapseWhitespace
|
||||
throw new Error('trim and collapseWhitespace are not supported with a normalizer. ' + 'If you want to use the default trim and collapseWhitespace logic in your normalizer, ' + 'use "getDefaultNormalizer({trim, collapseWhitespace})" and compose that into your normalizer');
|
||||
}
|
||||
return normalizer;
|
||||
}
|
||||
function matchRegExp(matcher, text) {
|
||||
const match = matcher.test(text);
|
||||
if (matcher.global && matcher.lastIndex !== 0) {
|
||||
console.warn(`To match all elements we had to reset the lastIndex of the RegExp because the global flag is enabled. We encourage to remove the global flag from the RegExp.`);
|
||||
matcher.lastIndex = 0;
|
||||
}
|
||||
return match;
|
||||
}
|
||||
97
frontend/node_modules/@testing-library/dom/dist/pretty-dom.js
generated
vendored
Normal file
97
frontend/node_modules/@testing-library/dom/dist/pretty-dom.js
generated
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.logDOM = void 0;
|
||||
exports.prettyDOM = prettyDOM;
|
||||
exports.prettyFormat = void 0;
|
||||
var prettyFormat = _interopRequireWildcard(require("pretty-format"));
|
||||
exports.prettyFormat = prettyFormat;
|
||||
var _DOMElementFilter = _interopRequireDefault(require("./DOMElementFilter"));
|
||||
var _getUserCodeFrame = require("./get-user-code-frame");
|
||||
var _helpers = require("./helpers");
|
||||
var _config = require("./config");
|
||||
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
||||
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
||||
const shouldHighlight = () => {
|
||||
if (typeof process === 'undefined') {
|
||||
// Don't colorize in non-node environments (e.g. Browsers)
|
||||
return false;
|
||||
}
|
||||
let colors;
|
||||
// Try to safely parse env COLORS: We will default behavior if any step fails.
|
||||
try {
|
||||
const colorsJSON = process.env?.COLORS;
|
||||
if (colorsJSON) {
|
||||
colors = JSON.parse(colorsJSON);
|
||||
}
|
||||
} catch {
|
||||
// If this throws, process.env?.COLORS wasn't parsable. Since we only
|
||||
// care about `true` or `false`, we can safely ignore the error.
|
||||
}
|
||||
if (typeof colors === 'boolean') {
|
||||
// If `colors` is set explicitly (both `true` and `false`), use that value.
|
||||
return colors;
|
||||
} else {
|
||||
// If `colors` is not set, colorize if we're in node.
|
||||
return process.versions !== undefined && process.versions.node !== undefined;
|
||||
}
|
||||
};
|
||||
const {
|
||||
DOMCollection
|
||||
} = prettyFormat.plugins;
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#node_type_constants
|
||||
const ELEMENT_NODE = 1;
|
||||
const COMMENT_NODE = 8;
|
||||
|
||||
// https://github.com/facebook/jest/blob/615084195ae1ae61ddd56162c62bbdda17587569/packages/pretty-format/src/plugins/DOMElement.ts#L50
|
||||
function filterCommentsAndDefaultIgnoreTagsTags(value) {
|
||||
return value.nodeType !== COMMENT_NODE && (value.nodeType !== ELEMENT_NODE || !value.matches((0, _config.getConfig)().defaultIgnore));
|
||||
}
|
||||
function prettyDOM(dom, maxLength, options = {}) {
|
||||
if (!dom) {
|
||||
dom = (0, _helpers.getDocument)().body;
|
||||
}
|
||||
if (typeof maxLength !== 'number') {
|
||||
maxLength = typeof process !== 'undefined' && typeof process.env !== 'undefined' && process.env.DEBUG_PRINT_LIMIT || 7000;
|
||||
}
|
||||
if (maxLength === 0) {
|
||||
return '';
|
||||
}
|
||||
if (dom.documentElement) {
|
||||
dom = dom.documentElement;
|
||||
}
|
||||
let domTypeName = typeof dom;
|
||||
if (domTypeName === 'object') {
|
||||
domTypeName = dom.constructor.name;
|
||||
} else {
|
||||
// To don't fall with `in` operator
|
||||
dom = {};
|
||||
}
|
||||
if (!('outerHTML' in dom)) {
|
||||
throw new TypeError(`Expected an element or document but got ${domTypeName}`);
|
||||
}
|
||||
const {
|
||||
filterNode = filterCommentsAndDefaultIgnoreTagsTags,
|
||||
...prettyFormatOptions
|
||||
} = options;
|
||||
const debugContent = prettyFormat.format(dom, {
|
||||
plugins: [(0, _DOMElementFilter.default)(filterNode), DOMCollection],
|
||||
printFunctionName: false,
|
||||
highlight: shouldHighlight(),
|
||||
...prettyFormatOptions
|
||||
});
|
||||
return maxLength !== undefined && dom.outerHTML.length > maxLength ? `${debugContent.slice(0, maxLength)}...` : debugContent;
|
||||
}
|
||||
const logDOM = (...args) => {
|
||||
const userCodeFrame = (0, _getUserCodeFrame.getUserCodeFrame)();
|
||||
if (userCodeFrame) {
|
||||
console.log(`${prettyDOM(...args)}\n\n${userCodeFrame}`);
|
||||
} else {
|
||||
console.log(prettyDOM(...args));
|
||||
}
|
||||
};
|
||||
exports.logDOM = logDOM;
|
||||
49
frontend/node_modules/@testing-library/dom/dist/queries/all-utils.js
generated
vendored
Normal file
49
frontend/node_modules/@testing-library/dom/dist/queries/all-utils.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _matches = require("../matches");
|
||||
Object.keys(_matches).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _matches[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _matches[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _getNodeText = require("../get-node-text");
|
||||
Object.keys(_getNodeText).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _getNodeText[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _getNodeText[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _queryHelpers = require("../query-helpers");
|
||||
Object.keys(_queryHelpers).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _queryHelpers[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _queryHelpers[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _config = require("../config");
|
||||
Object.keys(_config).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _config[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _config[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
24
frontend/node_modules/@testing-library/dom/dist/queries/alt-text.js
generated
vendored
Normal file
24
frontend/node_modules/@testing-library/dom/dist/queries/alt-text.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.queryByAltText = exports.queryAllByAltText = exports.getByAltText = exports.getAllByAltText = exports.findByAltText = exports.findAllByAltText = void 0;
|
||||
var _queryHelpers = require("../query-helpers");
|
||||
var _helpers = require("../helpers");
|
||||
var _allUtils = require("./all-utils");
|
||||
// Valid tags are img, input, area and custom elements
|
||||
const VALID_TAG_REGEXP = /^(img|input|area|.+-.+)$/i;
|
||||
const queryAllByAltText = (container, alt, options = {}) => {
|
||||
(0, _helpers.checkContainerType)(container);
|
||||
return (0, _queryHelpers.queryAllByAttribute)('alt', container, alt, options).filter(node => VALID_TAG_REGEXP.test(node.tagName));
|
||||
};
|
||||
const getMultipleError = (c, alt) => `Found multiple elements with the alt text: ${alt}`;
|
||||
const getMissingError = (c, alt) => `Unable to find an element with the alt text: ${alt}`;
|
||||
const queryAllByAltTextWithSuggestions = exports.queryAllByAltText = (0, _queryHelpers.wrapAllByQueryWithSuggestion)(queryAllByAltText, queryAllByAltText.name, 'queryAll');
|
||||
const [queryByAltText, getAllByAltText, getByAltText, findAllByAltText, findByAltText] = (0, _allUtils.buildQueries)(queryAllByAltText, getMultipleError, getMissingError);
|
||||
exports.findByAltText = findByAltText;
|
||||
exports.findAllByAltText = findAllByAltText;
|
||||
exports.getByAltText = getByAltText;
|
||||
exports.getAllByAltText = getAllByAltText;
|
||||
exports.queryByAltText = queryByAltText;
|
||||
40
frontend/node_modules/@testing-library/dom/dist/queries/display-value.js
generated
vendored
Normal file
40
frontend/node_modules/@testing-library/dom/dist/queries/display-value.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.queryByDisplayValue = exports.queryAllByDisplayValue = exports.getByDisplayValue = exports.getAllByDisplayValue = exports.findByDisplayValue = exports.findAllByDisplayValue = void 0;
|
||||
var _queryHelpers = require("../query-helpers");
|
||||
var _helpers = require("../helpers");
|
||||
var _allUtils = require("./all-utils");
|
||||
const queryAllByDisplayValue = (container, value, {
|
||||
exact = true,
|
||||
collapseWhitespace,
|
||||
trim,
|
||||
normalizer
|
||||
} = {}) => {
|
||||
(0, _helpers.checkContainerType)(container);
|
||||
const matcher = exact ? _allUtils.matches : _allUtils.fuzzyMatches;
|
||||
const matchNormalizer = (0, _allUtils.makeNormalizer)({
|
||||
collapseWhitespace,
|
||||
trim,
|
||||
normalizer
|
||||
});
|
||||
return Array.from(container.querySelectorAll(`input,textarea,select`)).filter(node => {
|
||||
if (node.tagName === 'SELECT') {
|
||||
const selectedOptions = Array.from(node.options).filter(option => option.selected);
|
||||
return selectedOptions.some(optionNode => matcher((0, _allUtils.getNodeText)(optionNode), optionNode, value, matchNormalizer));
|
||||
} else {
|
||||
return matcher(node.value, node, value, matchNormalizer);
|
||||
}
|
||||
});
|
||||
};
|
||||
const getMultipleError = (c, value) => `Found multiple elements with the display value: ${value}.`;
|
||||
const getMissingError = (c, value) => `Unable to find an element with the display value: ${value}.`;
|
||||
const queryAllByDisplayValueWithSuggestions = exports.queryAllByDisplayValue = (0, _queryHelpers.wrapAllByQueryWithSuggestion)(queryAllByDisplayValue, queryAllByDisplayValue.name, 'queryAll');
|
||||
const [queryByDisplayValue, getAllByDisplayValue, getByDisplayValue, findAllByDisplayValue, findByDisplayValue] = (0, _allUtils.buildQueries)(queryAllByDisplayValue, getMultipleError, getMissingError);
|
||||
exports.findByDisplayValue = findByDisplayValue;
|
||||
exports.findAllByDisplayValue = findAllByDisplayValue;
|
||||
exports.getByDisplayValue = getByDisplayValue;
|
||||
exports.getAllByDisplayValue = getAllByDisplayValue;
|
||||
exports.queryByDisplayValue = queryByDisplayValue;
|
||||
93
frontend/node_modules/@testing-library/dom/dist/queries/index.js
generated
vendored
Normal file
93
frontend/node_modules/@testing-library/dom/dist/queries/index.js
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _labelText = require("./label-text");
|
||||
Object.keys(_labelText).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _labelText[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _labelText[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _placeholderText = require("./placeholder-text");
|
||||
Object.keys(_placeholderText).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _placeholderText[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _placeholderText[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _text = require("./text");
|
||||
Object.keys(_text).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _text[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _text[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _displayValue = require("./display-value");
|
||||
Object.keys(_displayValue).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _displayValue[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _displayValue[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _altText = require("./alt-text");
|
||||
Object.keys(_altText).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _altText[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _altText[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _title = require("./title");
|
||||
Object.keys(_title).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _title[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _title[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _role = require("./role");
|
||||
Object.keys(_role).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _role[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _role[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _testId = require("./test-id");
|
||||
Object.keys(_testId).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _testId[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _testId[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
133
frontend/node_modules/@testing-library/dom/dist/queries/label-text.js
generated
vendored
Normal file
133
frontend/node_modules/@testing-library/dom/dist/queries/label-text.js
generated
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.queryByLabelText = exports.queryAllByLabelText = exports.getByLabelText = exports.getAllByLabelText = exports.findByLabelText = exports.findAllByLabelText = void 0;
|
||||
var _config = require("../config");
|
||||
var _helpers = require("../helpers");
|
||||
var _labelHelpers = require("../label-helpers");
|
||||
var _allUtils = require("./all-utils");
|
||||
function queryAllLabels(container) {
|
||||
return Array.from(container.querySelectorAll('label,input')).map(node => {
|
||||
return {
|
||||
node,
|
||||
textToMatch: (0, _labelHelpers.getLabelContent)(node)
|
||||
};
|
||||
}).filter(({
|
||||
textToMatch
|
||||
}) => textToMatch !== null);
|
||||
}
|
||||
const queryAllLabelsByText = (container, text, {
|
||||
exact = true,
|
||||
trim,
|
||||
collapseWhitespace,
|
||||
normalizer
|
||||
} = {}) => {
|
||||
const matcher = exact ? _allUtils.matches : _allUtils.fuzzyMatches;
|
||||
const matchNormalizer = (0, _allUtils.makeNormalizer)({
|
||||
collapseWhitespace,
|
||||
trim,
|
||||
normalizer
|
||||
});
|
||||
const textToMatchByLabels = queryAllLabels(container);
|
||||
return textToMatchByLabels.filter(({
|
||||
node,
|
||||
textToMatch
|
||||
}) => matcher(textToMatch, node, text, matchNormalizer)).map(({
|
||||
node
|
||||
}) => node);
|
||||
};
|
||||
const queryAllByLabelText = (container, text, {
|
||||
selector = '*',
|
||||
exact = true,
|
||||
collapseWhitespace,
|
||||
trim,
|
||||
normalizer
|
||||
} = {}) => {
|
||||
(0, _helpers.checkContainerType)(container);
|
||||
const matcher = exact ? _allUtils.matches : _allUtils.fuzzyMatches;
|
||||
const matchNormalizer = (0, _allUtils.makeNormalizer)({
|
||||
collapseWhitespace,
|
||||
trim,
|
||||
normalizer
|
||||
});
|
||||
const matchingLabelledElements = Array.from(container.querySelectorAll('*')).filter(element => {
|
||||
return (0, _labelHelpers.getRealLabels)(element).length || element.hasAttribute('aria-labelledby');
|
||||
}).reduce((labelledElements, labelledElement) => {
|
||||
const labelList = (0, _labelHelpers.getLabels)(container, labelledElement, {
|
||||
selector
|
||||
});
|
||||
labelList.filter(label => Boolean(label.formControl)).forEach(label => {
|
||||
if (matcher(label.content, label.formControl, text, matchNormalizer) && label.formControl) {
|
||||
labelledElements.push(label.formControl);
|
||||
}
|
||||
});
|
||||
const labelsValue = labelList.filter(label => Boolean(label.content)).map(label => label.content);
|
||||
if (matcher(labelsValue.join(' '), labelledElement, text, matchNormalizer)) {
|
||||
labelledElements.push(labelledElement);
|
||||
}
|
||||
if (labelsValue.length > 1) {
|
||||
labelsValue.forEach((labelValue, index) => {
|
||||
if (matcher(labelValue, labelledElement, text, matchNormalizer)) {
|
||||
labelledElements.push(labelledElement);
|
||||
}
|
||||
const labelsFiltered = [...labelsValue];
|
||||
labelsFiltered.splice(index, 1);
|
||||
if (labelsFiltered.length > 1) {
|
||||
if (matcher(labelsFiltered.join(' '), labelledElement, text, matchNormalizer)) {
|
||||
labelledElements.push(labelledElement);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return labelledElements;
|
||||
}, []).concat((0, _allUtils.queryAllByAttribute)('aria-label', container, text, {
|
||||
exact,
|
||||
normalizer: matchNormalizer
|
||||
}));
|
||||
return Array.from(new Set(matchingLabelledElements)).filter(element => element.matches(selector));
|
||||
};
|
||||
|
||||
// the getAll* query would normally look like this:
|
||||
// const getAllByLabelText = makeGetAllQuery(
|
||||
// queryAllByLabelText,
|
||||
// (c, text) => `Unable to find a label with the text of: ${text}`,
|
||||
// )
|
||||
// however, we can give a more helpful error message than the generic one,
|
||||
// so we're writing this one out by hand.
|
||||
const getAllByLabelText = (container, text, ...rest) => {
|
||||
const els = queryAllByLabelText(container, text, ...rest);
|
||||
if (!els.length) {
|
||||
const labels = queryAllLabelsByText(container, text, ...rest);
|
||||
if (labels.length) {
|
||||
const tagNames = labels.map(label => getTagNameOfElementAssociatedWithLabelViaFor(container, label)).filter(tagName => !!tagName);
|
||||
if (tagNames.length) {
|
||||
throw (0, _config.getConfig)().getElementError(tagNames.map(tagName => `Found a label with the text of: ${text}, however the element associated with this label (<${tagName} />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <${tagName} />, you can use aria-label or aria-labelledby instead.`).join('\n\n'), container);
|
||||
} else {
|
||||
throw (0, _config.getConfig)().getElementError(`Found a label with the text of: ${text}, however no form control was found associated to that label. Make sure you're using the "for" attribute or "aria-labelledby" attribute correctly.`, container);
|
||||
}
|
||||
} else {
|
||||
throw (0, _config.getConfig)().getElementError(`Unable to find a label with the text of: ${text}`, container);
|
||||
}
|
||||
}
|
||||
return els;
|
||||
};
|
||||
function getTagNameOfElementAssociatedWithLabelViaFor(container, label) {
|
||||
const htmlFor = label.getAttribute('for');
|
||||
if (!htmlFor) {
|
||||
return null;
|
||||
}
|
||||
const element = container.querySelector(`[id="${htmlFor}"]`);
|
||||
return element ? element.tagName.toLowerCase() : null;
|
||||
}
|
||||
|
||||
// the reason mentioned above is the same reason we're not using buildQueries
|
||||
const getMultipleError = (c, text) => `Found multiple elements with the text of: ${text}`;
|
||||
const queryByLabelText = exports.queryByLabelText = (0, _allUtils.wrapSingleQueryWithSuggestion)((0, _allUtils.makeSingleQuery)(queryAllByLabelText, getMultipleError), queryAllByLabelText.name, 'query');
|
||||
const getByLabelText = (0, _allUtils.makeSingleQuery)(getAllByLabelText, getMultipleError);
|
||||
const findAllByLabelText = exports.findAllByLabelText = (0, _allUtils.makeFindQuery)((0, _allUtils.wrapAllByQueryWithSuggestion)(getAllByLabelText, getAllByLabelText.name, 'findAll'));
|
||||
const findByLabelText = exports.findByLabelText = (0, _allUtils.makeFindQuery)((0, _allUtils.wrapSingleQueryWithSuggestion)(getByLabelText, getAllByLabelText.name, 'find'));
|
||||
const getAllByLabelTextWithSuggestions = exports.getAllByLabelText = (0, _allUtils.wrapAllByQueryWithSuggestion)(getAllByLabelText, getAllByLabelText.name, 'getAll');
|
||||
const getByLabelTextWithSuggestions = exports.getByLabelText = (0, _allUtils.wrapSingleQueryWithSuggestion)(getByLabelText, getAllByLabelText.name, 'get');
|
||||
const queryAllByLabelTextWithSuggestions = exports.queryAllByLabelText = (0, _allUtils.wrapAllByQueryWithSuggestion)(queryAllByLabelText, queryAllByLabelText.name, 'queryAll');
|
||||
22
frontend/node_modules/@testing-library/dom/dist/queries/placeholder-text.js
generated
vendored
Normal file
22
frontend/node_modules/@testing-library/dom/dist/queries/placeholder-text.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.queryByPlaceholderText = exports.queryAllByPlaceholderText = exports.getByPlaceholderText = exports.getAllByPlaceholderText = exports.findByPlaceholderText = exports.findAllByPlaceholderText = void 0;
|
||||
var _queryHelpers = require("../query-helpers");
|
||||
var _helpers = require("../helpers");
|
||||
var _allUtils = require("./all-utils");
|
||||
const queryAllByPlaceholderText = (...args) => {
|
||||
(0, _helpers.checkContainerType)(args[0]);
|
||||
return (0, _allUtils.queryAllByAttribute)('placeholder', ...args);
|
||||
};
|
||||
const getMultipleError = (c, text) => `Found multiple elements with the placeholder text of: ${text}`;
|
||||
const getMissingError = (c, text) => `Unable to find an element with the placeholder text of: ${text}`;
|
||||
const queryAllByPlaceholderTextWithSuggestions = exports.queryAllByPlaceholderText = (0, _queryHelpers.wrapAllByQueryWithSuggestion)(queryAllByPlaceholderText, queryAllByPlaceholderText.name, 'queryAll');
|
||||
const [queryByPlaceholderText, getAllByPlaceholderText, getByPlaceholderText, findAllByPlaceholderText, findByPlaceholderText] = (0, _allUtils.buildQueries)(queryAllByPlaceholderText, getMultipleError, getMissingError);
|
||||
exports.findByPlaceholderText = findByPlaceholderText;
|
||||
exports.findAllByPlaceholderText = findAllByPlaceholderText;
|
||||
exports.getByPlaceholderText = getByPlaceholderText;
|
||||
exports.getAllByPlaceholderText = getAllByPlaceholderText;
|
||||
exports.queryByPlaceholderText = queryByPlaceholderText;
|
||||
274
frontend/node_modules/@testing-library/dom/dist/queries/role.js
generated
vendored
Normal file
274
frontend/node_modules/@testing-library/dom/dist/queries/role.js
generated
vendored
Normal file
@@ -0,0 +1,274 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.queryByRole = exports.queryAllByRole = exports.getByRole = exports.getAllByRole = exports.findByRole = exports.findAllByRole = void 0;
|
||||
var _domAccessibilityApi = require("dom-accessibility-api");
|
||||
var _ariaQuery = require("aria-query");
|
||||
var _roleHelpers = require("../role-helpers");
|
||||
var _queryHelpers = require("../query-helpers");
|
||||
var _helpers = require("../helpers");
|
||||
var _allUtils = require("./all-utils");
|
||||
/* eslint-disable complexity */
|
||||
|
||||
const queryAllByRole = (container, role, {
|
||||
hidden = (0, _allUtils.getConfig)().defaultHidden,
|
||||
name,
|
||||
description,
|
||||
queryFallbacks = false,
|
||||
selected,
|
||||
busy,
|
||||
checked,
|
||||
pressed,
|
||||
current,
|
||||
level,
|
||||
expanded,
|
||||
value: {
|
||||
now: valueNow,
|
||||
min: valueMin,
|
||||
max: valueMax,
|
||||
text: valueText
|
||||
} = {}
|
||||
} = {}) => {
|
||||
(0, _helpers.checkContainerType)(container);
|
||||
if (selected !== undefined) {
|
||||
// guard against unknown roles
|
||||
if (_ariaQuery.roles.get(role)?.props['aria-selected'] === undefined) {
|
||||
throw new Error(`"aria-selected" is not supported on role "${role}".`);
|
||||
}
|
||||
}
|
||||
if (busy !== undefined) {
|
||||
// guard against unknown roles
|
||||
if (_ariaQuery.roles.get(role)?.props['aria-busy'] === undefined) {
|
||||
throw new Error(`"aria-busy" is not supported on role "${role}".`);
|
||||
}
|
||||
}
|
||||
if (checked !== undefined) {
|
||||
// guard against unknown roles
|
||||
if (_ariaQuery.roles.get(role)?.props['aria-checked'] === undefined) {
|
||||
throw new Error(`"aria-checked" is not supported on role "${role}".`);
|
||||
}
|
||||
}
|
||||
if (pressed !== undefined) {
|
||||
// guard against unknown roles
|
||||
if (_ariaQuery.roles.get(role)?.props['aria-pressed'] === undefined) {
|
||||
throw new Error(`"aria-pressed" is not supported on role "${role}".`);
|
||||
}
|
||||
}
|
||||
if (current !== undefined) {
|
||||
/* istanbul ignore next */
|
||||
// guard against unknown roles
|
||||
// All currently released ARIA versions support `aria-current` on all roles.
|
||||
// Leaving this for symmetry and forward compatibility
|
||||
if (_ariaQuery.roles.get(role)?.props['aria-current'] === undefined) {
|
||||
throw new Error(`"aria-current" is not supported on role "${role}".`);
|
||||
}
|
||||
}
|
||||
if (level !== undefined) {
|
||||
// guard against using `level` option with any role other than `heading`
|
||||
if (role !== 'heading') {
|
||||
throw new Error(`Role "${role}" cannot have "level" property.`);
|
||||
}
|
||||
}
|
||||
if (valueNow !== undefined) {
|
||||
// guard against unknown roles
|
||||
if (_ariaQuery.roles.get(role)?.props['aria-valuenow'] === undefined) {
|
||||
throw new Error(`"aria-valuenow" is not supported on role "${role}".`);
|
||||
}
|
||||
}
|
||||
if (valueMax !== undefined) {
|
||||
// guard against unknown roles
|
||||
if (_ariaQuery.roles.get(role)?.props['aria-valuemax'] === undefined) {
|
||||
throw new Error(`"aria-valuemax" is not supported on role "${role}".`);
|
||||
}
|
||||
}
|
||||
if (valueMin !== undefined) {
|
||||
// guard against unknown roles
|
||||
if (_ariaQuery.roles.get(role)?.props['aria-valuemin'] === undefined) {
|
||||
throw new Error(`"aria-valuemin" is not supported on role "${role}".`);
|
||||
}
|
||||
}
|
||||
if (valueText !== undefined) {
|
||||
// guard against unknown roles
|
||||
if (_ariaQuery.roles.get(role)?.props['aria-valuetext'] === undefined) {
|
||||
throw new Error(`"aria-valuetext" is not supported on role "${role}".`);
|
||||
}
|
||||
}
|
||||
if (expanded !== undefined) {
|
||||
// guard against unknown roles
|
||||
if (_ariaQuery.roles.get(role)?.props['aria-expanded'] === undefined) {
|
||||
throw new Error(`"aria-expanded" is not supported on role "${role}".`);
|
||||
}
|
||||
}
|
||||
const subtreeIsInaccessibleCache = new WeakMap();
|
||||
function cachedIsSubtreeInaccessible(element) {
|
||||
if (!subtreeIsInaccessibleCache.has(element)) {
|
||||
subtreeIsInaccessibleCache.set(element, (0, _roleHelpers.isSubtreeInaccessible)(element));
|
||||
}
|
||||
return subtreeIsInaccessibleCache.get(element);
|
||||
}
|
||||
return Array.from(container.querySelectorAll(
|
||||
// Only query elements that can be matched by the following filters
|
||||
makeRoleSelector(role))).filter(node => {
|
||||
const isRoleSpecifiedExplicitly = node.hasAttribute('role');
|
||||
if (isRoleSpecifiedExplicitly) {
|
||||
const roleValue = node.getAttribute('role');
|
||||
if (queryFallbacks) {
|
||||
return roleValue.split(' ').filter(Boolean).some(roleAttributeToken => roleAttributeToken === role);
|
||||
}
|
||||
// other wise only send the first token to match
|
||||
const [firstRoleAttributeToken] = roleValue.split(' ');
|
||||
return firstRoleAttributeToken === role;
|
||||
}
|
||||
const implicitRoles = (0, _roleHelpers.getImplicitAriaRoles)(node);
|
||||
return implicitRoles.some(implicitRole => {
|
||||
return implicitRole === role;
|
||||
});
|
||||
}).filter(element => {
|
||||
if (selected !== undefined) {
|
||||
return selected === (0, _roleHelpers.computeAriaSelected)(element);
|
||||
}
|
||||
if (busy !== undefined) {
|
||||
return busy === (0, _roleHelpers.computeAriaBusy)(element);
|
||||
}
|
||||
if (checked !== undefined) {
|
||||
return checked === (0, _roleHelpers.computeAriaChecked)(element);
|
||||
}
|
||||
if (pressed !== undefined) {
|
||||
return pressed === (0, _roleHelpers.computeAriaPressed)(element);
|
||||
}
|
||||
if (current !== undefined) {
|
||||
return current === (0, _roleHelpers.computeAriaCurrent)(element);
|
||||
}
|
||||
if (expanded !== undefined) {
|
||||
return expanded === (0, _roleHelpers.computeAriaExpanded)(element);
|
||||
}
|
||||
if (level !== undefined) {
|
||||
return level === (0, _roleHelpers.computeHeadingLevel)(element);
|
||||
}
|
||||
if (valueNow !== undefined || valueMax !== undefined || valueMin !== undefined || valueText !== undefined) {
|
||||
let valueMatches = true;
|
||||
if (valueNow !== undefined) {
|
||||
valueMatches &&= valueNow === (0, _roleHelpers.computeAriaValueNow)(element);
|
||||
}
|
||||
if (valueMax !== undefined) {
|
||||
valueMatches &&= valueMax === (0, _roleHelpers.computeAriaValueMax)(element);
|
||||
}
|
||||
if (valueMin !== undefined) {
|
||||
valueMatches &&= valueMin === (0, _roleHelpers.computeAriaValueMin)(element);
|
||||
}
|
||||
if (valueText !== undefined) {
|
||||
valueMatches &&= (0, _allUtils.matches)((0, _roleHelpers.computeAriaValueText)(element) ?? null, element, valueText, text => text);
|
||||
}
|
||||
return valueMatches;
|
||||
}
|
||||
// don't care if aria attributes are unspecified
|
||||
return true;
|
||||
}).filter(element => {
|
||||
if (name === undefined) {
|
||||
// Don't care
|
||||
return true;
|
||||
}
|
||||
return (0, _allUtils.matches)((0, _domAccessibilityApi.computeAccessibleName)(element, {
|
||||
computedStyleSupportsPseudoElements: (0, _allUtils.getConfig)().computedStyleSupportsPseudoElements
|
||||
}), element, name, text => text);
|
||||
}).filter(element => {
|
||||
if (description === undefined) {
|
||||
// Don't care
|
||||
return true;
|
||||
}
|
||||
return (0, _allUtils.matches)((0, _domAccessibilityApi.computeAccessibleDescription)(element, {
|
||||
computedStyleSupportsPseudoElements: (0, _allUtils.getConfig)().computedStyleSupportsPseudoElements
|
||||
}), element, description, text => text);
|
||||
}).filter(element => {
|
||||
return hidden === false ? (0, _roleHelpers.isInaccessible)(element, {
|
||||
isSubtreeInaccessible: cachedIsSubtreeInaccessible
|
||||
}) === false : true;
|
||||
});
|
||||
};
|
||||
function makeRoleSelector(role) {
|
||||
const explicitRoleSelector = `*[role~="${role}"]`;
|
||||
const roleRelations = _ariaQuery.roleElements.get(role) ?? new Set();
|
||||
const implicitRoleSelectors = new Set(Array.from(roleRelations).map(({
|
||||
name
|
||||
}) => name));
|
||||
|
||||
// Current transpilation config sometimes assumes `...` is always applied to arrays.
|
||||
// `...` is equivalent to `Array.prototype.concat` for arrays.
|
||||
// If you replace this code with `[explicitRoleSelector, ...implicitRoleSelectors]`, make sure every transpilation target retains the `...` in favor of `Array.prototype.concat`.
|
||||
return [explicitRoleSelector].concat(Array.from(implicitRoleSelectors)).join(',');
|
||||
}
|
||||
const getNameHint = name => {
|
||||
let nameHint = '';
|
||||
if (name === undefined) {
|
||||
nameHint = '';
|
||||
} else if (typeof name === 'string') {
|
||||
nameHint = ` and name "${name}"`;
|
||||
} else {
|
||||
nameHint = ` and name \`${name}\``;
|
||||
}
|
||||
return nameHint;
|
||||
};
|
||||
const getMultipleError = (c, role, {
|
||||
name
|
||||
} = {}) => {
|
||||
return `Found multiple elements with the role "${role}"${getNameHint(name)}`;
|
||||
};
|
||||
const getMissingError = (container, role, {
|
||||
hidden = (0, _allUtils.getConfig)().defaultHidden,
|
||||
name,
|
||||
description
|
||||
} = {}) => {
|
||||
if ((0, _allUtils.getConfig)()._disableExpensiveErrorDiagnostics) {
|
||||
return `Unable to find role="${role}"${getNameHint(name)}`;
|
||||
}
|
||||
let roles = '';
|
||||
Array.from(container.children).forEach(childElement => {
|
||||
roles += (0, _roleHelpers.prettyRoles)(childElement, {
|
||||
hidden,
|
||||
includeDescription: description !== undefined
|
||||
});
|
||||
});
|
||||
let roleMessage;
|
||||
if (roles.length === 0) {
|
||||
if (hidden === false) {
|
||||
roleMessage = 'There are no accessible roles. But there might be some inaccessible roles. ' + 'If you wish to access them, then set the `hidden` option to `true`. ' + 'Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole';
|
||||
} else {
|
||||
roleMessage = 'There are no available roles.';
|
||||
}
|
||||
} else {
|
||||
roleMessage = `
|
||||
Here are the ${hidden === false ? 'accessible' : 'available'} roles:
|
||||
|
||||
${roles.replace(/\n/g, '\n ').replace(/\n\s\s\n/g, '\n\n')}
|
||||
`.trim();
|
||||
}
|
||||
let nameHint = '';
|
||||
if (name === undefined) {
|
||||
nameHint = '';
|
||||
} else if (typeof name === 'string') {
|
||||
nameHint = ` and name "${name}"`;
|
||||
} else {
|
||||
nameHint = ` and name \`${name}\``;
|
||||
}
|
||||
let descriptionHint = '';
|
||||
if (description === undefined) {
|
||||
descriptionHint = '';
|
||||
} else if (typeof description === 'string') {
|
||||
descriptionHint = ` and description "${description}"`;
|
||||
} else {
|
||||
descriptionHint = ` and description \`${description}\``;
|
||||
}
|
||||
return `
|
||||
Unable to find an ${hidden === false ? 'accessible ' : ''}element with the role "${role}"${nameHint}${descriptionHint}
|
||||
|
||||
${roleMessage}`.trim();
|
||||
};
|
||||
const queryAllByRoleWithSuggestions = exports.queryAllByRole = (0, _queryHelpers.wrapAllByQueryWithSuggestion)(queryAllByRole, queryAllByRole.name, 'queryAll');
|
||||
const [queryByRole, getAllByRole, getByRole, findAllByRole, findByRole] = (0, _allUtils.buildQueries)(queryAllByRole, getMultipleError, getMissingError);
|
||||
exports.findByRole = findByRole;
|
||||
exports.findAllByRole = findAllByRole;
|
||||
exports.getByRole = getByRole;
|
||||
exports.getAllByRole = getAllByRole;
|
||||
exports.queryByRole = queryByRole;
|
||||
23
frontend/node_modules/@testing-library/dom/dist/queries/test-id.js
generated
vendored
Normal file
23
frontend/node_modules/@testing-library/dom/dist/queries/test-id.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.queryByTestId = exports.queryAllByTestId = exports.getByTestId = exports.getAllByTestId = exports.findByTestId = exports.findAllByTestId = void 0;
|
||||
var _helpers = require("../helpers");
|
||||
var _queryHelpers = require("../query-helpers");
|
||||
var _allUtils = require("./all-utils");
|
||||
const getTestIdAttribute = () => (0, _allUtils.getConfig)().testIdAttribute;
|
||||
const queryAllByTestId = (...args) => {
|
||||
(0, _helpers.checkContainerType)(args[0]);
|
||||
return (0, _allUtils.queryAllByAttribute)(getTestIdAttribute(), ...args);
|
||||
};
|
||||
const getMultipleError = (c, id) => `Found multiple elements by: [${getTestIdAttribute()}="${id}"]`;
|
||||
const getMissingError = (c, id) => `Unable to find an element by: [${getTestIdAttribute()}="${id}"]`;
|
||||
const queryAllByTestIdWithSuggestions = exports.queryAllByTestId = (0, _queryHelpers.wrapAllByQueryWithSuggestion)(queryAllByTestId, queryAllByTestId.name, 'queryAll');
|
||||
const [queryByTestId, getAllByTestId, getByTestId, findAllByTestId, findByTestId] = (0, _allUtils.buildQueries)(queryAllByTestId, getMultipleError, getMissingError);
|
||||
exports.findByTestId = findByTestId;
|
||||
exports.findAllByTestId = findAllByTestId;
|
||||
exports.getByTestId = getByTestId;
|
||||
exports.getAllByTestId = getAllByTestId;
|
||||
exports.queryByTestId = queryByTestId;
|
||||
57
frontend/node_modules/@testing-library/dom/dist/queries/text.js
generated
vendored
Normal file
57
frontend/node_modules/@testing-library/dom/dist/queries/text.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.queryByText = exports.queryAllByText = exports.getByText = exports.getAllByText = exports.findByText = exports.findAllByText = void 0;
|
||||
var _queryHelpers = require("../query-helpers");
|
||||
var _helpers = require("../helpers");
|
||||
var _allUtils = require("./all-utils");
|
||||
const queryAllByText = (container, text, {
|
||||
selector = '*',
|
||||
exact = true,
|
||||
collapseWhitespace,
|
||||
trim,
|
||||
ignore = (0, _allUtils.getConfig)().defaultIgnore,
|
||||
normalizer
|
||||
} = {}) => {
|
||||
(0, _helpers.checkContainerType)(container);
|
||||
const matcher = exact ? _allUtils.matches : _allUtils.fuzzyMatches;
|
||||
const matchNormalizer = (0, _allUtils.makeNormalizer)({
|
||||
collapseWhitespace,
|
||||
trim,
|
||||
normalizer
|
||||
});
|
||||
let baseArray = [];
|
||||
if (typeof container.matches === 'function' && container.matches(selector)) {
|
||||
baseArray = [container];
|
||||
}
|
||||
return [...baseArray, ...Array.from(container.querySelectorAll(selector))]
|
||||
// TODO: `matches` according lib.dom.d.ts can get only `string` but according our code it can handle also boolean :)
|
||||
.filter(node => !ignore || !node.matches(ignore)).filter(node => matcher((0, _allUtils.getNodeText)(node), node, text, matchNormalizer));
|
||||
};
|
||||
const getMultipleError = (c, text) => `Found multiple elements with the text: ${text}`;
|
||||
const getMissingError = (c, text, options = {}) => {
|
||||
const {
|
||||
collapseWhitespace,
|
||||
trim,
|
||||
normalizer,
|
||||
selector
|
||||
} = options;
|
||||
const matchNormalizer = (0, _allUtils.makeNormalizer)({
|
||||
collapseWhitespace,
|
||||
trim,
|
||||
normalizer
|
||||
});
|
||||
const normalizedText = matchNormalizer(text.toString());
|
||||
const isNormalizedDifferent = normalizedText !== text.toString();
|
||||
const isCustomSelector = (selector ?? '*') !== '*';
|
||||
return `Unable to find an element with the text: ${isNormalizedDifferent ? `${normalizedText} (normalized from '${text}')` : text}${isCustomSelector ? `, which matches selector '${selector}'` : ''}. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.`;
|
||||
};
|
||||
const queryAllByTextWithSuggestions = exports.queryAllByText = (0, _queryHelpers.wrapAllByQueryWithSuggestion)(queryAllByText, queryAllByText.name, 'queryAll');
|
||||
const [queryByText, getAllByText, getByText, findAllByText, findByText] = (0, _allUtils.buildQueries)(queryAllByText, getMultipleError, getMissingError);
|
||||
exports.findByText = findByText;
|
||||
exports.findAllByText = findAllByText;
|
||||
exports.getByText = getByText;
|
||||
exports.getAllByText = getAllByText;
|
||||
exports.queryByText = queryByText;
|
||||
34
frontend/node_modules/@testing-library/dom/dist/queries/title.js
generated
vendored
Normal file
34
frontend/node_modules/@testing-library/dom/dist/queries/title.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.queryByTitle = exports.queryAllByTitle = exports.getByTitle = exports.getAllByTitle = exports.findByTitle = exports.findAllByTitle = void 0;
|
||||
var _queryHelpers = require("../query-helpers");
|
||||
var _helpers = require("../helpers");
|
||||
var _allUtils = require("./all-utils");
|
||||
const isSvgTitle = node => node.tagName.toLowerCase() === 'title' && node.parentElement?.tagName.toLowerCase() === 'svg';
|
||||
const queryAllByTitle = (container, text, {
|
||||
exact = true,
|
||||
collapseWhitespace,
|
||||
trim,
|
||||
normalizer
|
||||
} = {}) => {
|
||||
(0, _helpers.checkContainerType)(container);
|
||||
const matcher = exact ? _allUtils.matches : _allUtils.fuzzyMatches;
|
||||
const matchNormalizer = (0, _allUtils.makeNormalizer)({
|
||||
collapseWhitespace,
|
||||
trim,
|
||||
normalizer
|
||||
});
|
||||
return Array.from(container.querySelectorAll('[title], svg > title')).filter(node => matcher(node.getAttribute('title'), node, text, matchNormalizer) || isSvgTitle(node) && matcher((0, _allUtils.getNodeText)(node), node, text, matchNormalizer));
|
||||
};
|
||||
const getMultipleError = (c, title) => `Found multiple elements with the title: ${title}.`;
|
||||
const getMissingError = (c, title) => `Unable to find an element with the title: ${title}.`;
|
||||
const queryAllByTitleWithSuggestions = exports.queryAllByTitle = (0, _queryHelpers.wrapAllByQueryWithSuggestion)(queryAllByTitle, queryAllByTitle.name, 'queryAll');
|
||||
const [queryByTitle, getAllByTitle, getByTitle, findAllByTitle, findByTitle] = (0, _allUtils.buildQueries)(queryAllByTitle, getMultipleError, getMissingError);
|
||||
exports.findByTitle = findByTitle;
|
||||
exports.findAllByTitle = findAllByTitle;
|
||||
exports.getByTitle = getByTitle;
|
||||
exports.getAllByTitle = getAllByTitle;
|
||||
exports.queryByTitle = queryByTitle;
|
||||
141
frontend/node_modules/@testing-library/dom/dist/query-helpers.js
generated
vendored
Normal file
141
frontend/node_modules/@testing-library/dom/dist/query-helpers.js
generated
vendored
Normal file
@@ -0,0 +1,141 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.buildQueries = buildQueries;
|
||||
exports.getElementError = getElementError;
|
||||
exports.getMultipleElementsFoundError = getMultipleElementsFoundError;
|
||||
exports.makeFindQuery = makeFindQuery;
|
||||
exports.makeGetAllQuery = makeGetAllQuery;
|
||||
exports.makeSingleQuery = makeSingleQuery;
|
||||
exports.queryAllByAttribute = queryAllByAttribute;
|
||||
exports.queryByAttribute = queryByAttribute;
|
||||
exports.wrapSingleQueryWithSuggestion = exports.wrapAllByQueryWithSuggestion = void 0;
|
||||
var _suggestions = require("./suggestions");
|
||||
var _matches = require("./matches");
|
||||
var _waitFor = require("./wait-for");
|
||||
var _config = require("./config");
|
||||
function getElementError(message, container) {
|
||||
return (0, _config.getConfig)().getElementError(message, container);
|
||||
}
|
||||
function getMultipleElementsFoundError(message, container) {
|
||||
return getElementError(`${message}\n\n(If this is intentional, then use the \`*AllBy*\` variant of the query (like \`queryAllByText\`, \`getAllByText\`, or \`findAllByText\`)).`, container);
|
||||
}
|
||||
function queryAllByAttribute(attribute, container, text, {
|
||||
exact = true,
|
||||
collapseWhitespace,
|
||||
trim,
|
||||
normalizer
|
||||
} = {}) {
|
||||
const matcher = exact ? _matches.matches : _matches.fuzzyMatches;
|
||||
const matchNormalizer = (0, _matches.makeNormalizer)({
|
||||
collapseWhitespace,
|
||||
trim,
|
||||
normalizer
|
||||
});
|
||||
return Array.from(container.querySelectorAll(`[${attribute}]`)).filter(node => matcher(node.getAttribute(attribute), node, text, matchNormalizer));
|
||||
}
|
||||
function queryByAttribute(attribute, container, text, options) {
|
||||
const els = queryAllByAttribute(attribute, container, text, options);
|
||||
if (els.length > 1) {
|
||||
throw getMultipleElementsFoundError(`Found multiple elements by [${attribute}=${text}]`, container);
|
||||
}
|
||||
return els[0] || null;
|
||||
}
|
||||
|
||||
// this accepts a query function and returns a function which throws an error
|
||||
// if more than one elements is returned, otherwise it returns the first
|
||||
// element or null
|
||||
function makeSingleQuery(allQuery, getMultipleError) {
|
||||
return (container, ...args) => {
|
||||
const els = allQuery(container, ...args);
|
||||
if (els.length > 1) {
|
||||
const elementStrings = els.map(element => getElementError(null, element).message).join('\n\n');
|
||||
throw getMultipleElementsFoundError(`${getMultipleError(container, ...args)}
|
||||
|
||||
Here are the matching elements:
|
||||
|
||||
${elementStrings}`, container);
|
||||
}
|
||||
return els[0] || null;
|
||||
};
|
||||
}
|
||||
function getSuggestionError(suggestion, container) {
|
||||
return (0, _config.getConfig)().getElementError(`A better query is available, try this:
|
||||
${suggestion.toString()}
|
||||
`, container);
|
||||
}
|
||||
|
||||
// this accepts a query function and returns a function which throws an error
|
||||
// if an empty list of elements is returned
|
||||
function makeGetAllQuery(allQuery, getMissingError) {
|
||||
return (container, ...args) => {
|
||||
const els = allQuery(container, ...args);
|
||||
if (!els.length) {
|
||||
throw (0, _config.getConfig)().getElementError(getMissingError(container, ...args), container);
|
||||
}
|
||||
return els;
|
||||
};
|
||||
}
|
||||
|
||||
// this accepts a getter query function and returns a function which calls
|
||||
// waitFor and passing a function which invokes the getter.
|
||||
function makeFindQuery(getter) {
|
||||
return (container, text, options, waitForOptions) => {
|
||||
return (0, _waitFor.waitFor)(() => {
|
||||
return getter(container, text, options);
|
||||
}, {
|
||||
container,
|
||||
...waitForOptions
|
||||
});
|
||||
};
|
||||
}
|
||||
const wrapSingleQueryWithSuggestion = (query, queryAllByName, variant) => (container, ...args) => {
|
||||
const element = query(container, ...args);
|
||||
const [{
|
||||
suggest = (0, _config.getConfig)().throwSuggestions
|
||||
} = {}] = args.slice(-1);
|
||||
if (element && suggest) {
|
||||
const suggestion = (0, _suggestions.getSuggestedQuery)(element, variant);
|
||||
if (suggestion && !queryAllByName.endsWith(suggestion.queryName)) {
|
||||
throw getSuggestionError(suggestion.toString(), container);
|
||||
}
|
||||
}
|
||||
return element;
|
||||
};
|
||||
exports.wrapSingleQueryWithSuggestion = wrapSingleQueryWithSuggestion;
|
||||
const wrapAllByQueryWithSuggestion = (query, queryAllByName, variant) => (container, ...args) => {
|
||||
const els = query(container, ...args);
|
||||
const [{
|
||||
suggest = (0, _config.getConfig)().throwSuggestions
|
||||
} = {}] = args.slice(-1);
|
||||
if (els.length && suggest) {
|
||||
// get a unique list of all suggestion messages. We are only going to make a suggestion if
|
||||
// all the suggestions are the same
|
||||
const uniqueSuggestionMessages = [...new Set(els.map(element => (0, _suggestions.getSuggestedQuery)(element, variant)?.toString()))];
|
||||
if (
|
||||
// only want to suggest if all the els have the same suggestion.
|
||||
uniqueSuggestionMessages.length === 1 && !queryAllByName.endsWith(
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- TODO: Can this be null at runtime?
|
||||
(0, _suggestions.getSuggestedQuery)(els[0], variant).queryName)) {
|
||||
throw getSuggestionError(uniqueSuggestionMessages[0], container);
|
||||
}
|
||||
}
|
||||
return els;
|
||||
};
|
||||
|
||||
// TODO: This deviates from the published declarations
|
||||
// However, the implementation always required a dyadic (after `container`) not variadic `queryAllBy` considering the implementation of `makeFindQuery`
|
||||
// This is at least statically true and can be verified by accepting `QueryMethod<Arguments, HTMLElement[]>`
|
||||
exports.wrapAllByQueryWithSuggestion = wrapAllByQueryWithSuggestion;
|
||||
function buildQueries(queryAllBy, getMultipleError, getMissingError) {
|
||||
const queryBy = wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllBy, getMultipleError), queryAllBy.name, 'query');
|
||||
const getAllBy = makeGetAllQuery(queryAllBy, getMissingError);
|
||||
const getBy = makeSingleQuery(getAllBy, getMultipleError);
|
||||
const getByWithSuggestions = wrapSingleQueryWithSuggestion(getBy, queryAllBy.name, 'get');
|
||||
const getAllWithSuggestions = wrapAllByQueryWithSuggestion(getAllBy, queryAllBy.name.replace('query', 'get'), 'getAll');
|
||||
const findAllBy = makeFindQuery(wrapAllByQueryWithSuggestion(getAllBy, queryAllBy.name, 'findAll'));
|
||||
const findBy = makeFindQuery(wrapSingleQueryWithSuggestion(getBy, queryAllBy.name, 'find'));
|
||||
return [queryBy, getAllWithSuggestions, getByWithSuggestions, findAllBy, findBy];
|
||||
}
|
||||
355
frontend/node_modules/@testing-library/dom/dist/role-helpers.js
generated
vendored
Normal file
355
frontend/node_modules/@testing-library/dom/dist/role-helpers.js
generated
vendored
Normal file
@@ -0,0 +1,355 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.computeAriaBusy = computeAriaBusy;
|
||||
exports.computeAriaChecked = computeAriaChecked;
|
||||
exports.computeAriaCurrent = computeAriaCurrent;
|
||||
exports.computeAriaExpanded = computeAriaExpanded;
|
||||
exports.computeAriaPressed = computeAriaPressed;
|
||||
exports.computeAriaSelected = computeAriaSelected;
|
||||
exports.computeAriaValueMax = computeAriaValueMax;
|
||||
exports.computeAriaValueMin = computeAriaValueMin;
|
||||
exports.computeAriaValueNow = computeAriaValueNow;
|
||||
exports.computeAriaValueText = computeAriaValueText;
|
||||
exports.computeHeadingLevel = computeHeadingLevel;
|
||||
exports.getImplicitAriaRoles = getImplicitAriaRoles;
|
||||
exports.getRoles = getRoles;
|
||||
exports.isInaccessible = isInaccessible;
|
||||
exports.isSubtreeInaccessible = isSubtreeInaccessible;
|
||||
exports.logRoles = void 0;
|
||||
exports.prettyRoles = prettyRoles;
|
||||
var _ariaQuery = require("aria-query");
|
||||
var _domAccessibilityApi = require("dom-accessibility-api");
|
||||
var _prettyDom = require("./pretty-dom");
|
||||
var _config = require("./config");
|
||||
const elementRoleList = buildElementRoleList(_ariaQuery.elementRoles);
|
||||
|
||||
/**
|
||||
* @param {Element} element -
|
||||
* @returns {boolean} - `true` if `element` and its subtree are inaccessible
|
||||
*/
|
||||
function isSubtreeInaccessible(element) {
|
||||
if (element.hidden === true) {
|
||||
return true;
|
||||
}
|
||||
if (element.getAttribute('aria-hidden') === 'true') {
|
||||
return true;
|
||||
}
|
||||
const window = element.ownerDocument.defaultView;
|
||||
if (window.getComputedStyle(element).display === 'none') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Partial implementation https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion
|
||||
* which should only be used for elements with a non-presentational role i.e.
|
||||
* `role="none"` and `role="presentation"` will not be excluded.
|
||||
*
|
||||
* Implements aria-hidden semantics (i.e. parent overrides child)
|
||||
* Ignores "Child Presentational: True" characteristics
|
||||
*
|
||||
* @param {Element} element -
|
||||
* @param {object} [options] -
|
||||
* @param {function (element: Element): boolean} options.isSubtreeInaccessible -
|
||||
* can be used to return cached results from previous isSubtreeInaccessible calls
|
||||
* @returns {boolean} true if excluded, otherwise false
|
||||
*/
|
||||
function isInaccessible(element, options = {}) {
|
||||
const {
|
||||
isSubtreeInaccessible: isSubtreeInaccessibleImpl = isSubtreeInaccessible
|
||||
} = options;
|
||||
const window = element.ownerDocument.defaultView;
|
||||
// since visibility is inherited we can exit early
|
||||
if (window.getComputedStyle(element).visibility === 'hidden') {
|
||||
return true;
|
||||
}
|
||||
let currentElement = element;
|
||||
while (currentElement) {
|
||||
if (isSubtreeInaccessibleImpl(currentElement)) {
|
||||
return true;
|
||||
}
|
||||
currentElement = currentElement.parentElement;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function getImplicitAriaRoles(currentNode) {
|
||||
// eslint bug here:
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
for (const {
|
||||
match,
|
||||
roles
|
||||
} of elementRoleList) {
|
||||
if (match(currentNode)) {
|
||||
return [...roles];
|
||||
}
|
||||
}
|
||||
return [];
|
||||
}
|
||||
function buildElementRoleList(elementRolesMap) {
|
||||
function makeElementSelector({
|
||||
name,
|
||||
attributes
|
||||
}) {
|
||||
return `${name}${attributes.map(({
|
||||
name: attributeName,
|
||||
value,
|
||||
constraints = []
|
||||
}) => {
|
||||
const shouldNotExist = constraints.indexOf('undefined') !== -1;
|
||||
const shouldBeNonEmpty = constraints.indexOf('set') !== -1;
|
||||
const hasExplicitValue = typeof value !== 'undefined';
|
||||
if (hasExplicitValue) {
|
||||
return `[${attributeName}="${value}"]`;
|
||||
} else if (shouldNotExist) {
|
||||
return `:not([${attributeName}])`;
|
||||
} else if (shouldBeNonEmpty) {
|
||||
return `[${attributeName}]:not([${attributeName}=""])`;
|
||||
}
|
||||
return `[${attributeName}]`;
|
||||
}).join('')}`;
|
||||
}
|
||||
function getSelectorSpecificity({
|
||||
attributes = []
|
||||
}) {
|
||||
return attributes.length;
|
||||
}
|
||||
function bySelectorSpecificity({
|
||||
specificity: leftSpecificity
|
||||
}, {
|
||||
specificity: rightSpecificity
|
||||
}) {
|
||||
return rightSpecificity - leftSpecificity;
|
||||
}
|
||||
function match(element) {
|
||||
let {
|
||||
attributes = []
|
||||
} = element;
|
||||
|
||||
// https://github.com/testing-library/dom-testing-library/issues/814
|
||||
const typeTextIndex = attributes.findIndex(attribute => attribute.value && attribute.name === 'type' && attribute.value === 'text');
|
||||
if (typeTextIndex >= 0) {
|
||||
// not using splice to not mutate the attributes array
|
||||
attributes = [...attributes.slice(0, typeTextIndex), ...attributes.slice(typeTextIndex + 1)];
|
||||
}
|
||||
const selector = makeElementSelector({
|
||||
...element,
|
||||
attributes
|
||||
});
|
||||
return node => {
|
||||
if (typeTextIndex >= 0 && node.type !== 'text') {
|
||||
return false;
|
||||
}
|
||||
return node.matches(selector);
|
||||
};
|
||||
}
|
||||
let result = [];
|
||||
|
||||
// eslint bug here:
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
for (const [element, roles] of elementRolesMap.entries()) {
|
||||
result = [...result, {
|
||||
match: match(element),
|
||||
roles: Array.from(roles),
|
||||
specificity: getSelectorSpecificity(element)
|
||||
}];
|
||||
}
|
||||
return result.sort(bySelectorSpecificity);
|
||||
}
|
||||
function getRoles(container, {
|
||||
hidden = false
|
||||
} = {}) {
|
||||
function flattenDOM(node) {
|
||||
return [node, ...Array.from(node.children).reduce((acc, child) => [...acc, ...flattenDOM(child)], [])];
|
||||
}
|
||||
return flattenDOM(container).filter(element => {
|
||||
return hidden === false ? isInaccessible(element) === false : true;
|
||||
}).reduce((acc, node) => {
|
||||
let roles = [];
|
||||
// TODO: This violates html-aria which does not allow any role on every element
|
||||
if (node.hasAttribute('role')) {
|
||||
roles = node.getAttribute('role').split(' ').slice(0, 1);
|
||||
} else {
|
||||
roles = getImplicitAriaRoles(node);
|
||||
}
|
||||
return roles.reduce((rolesAcc, role) => Array.isArray(rolesAcc[role]) ? {
|
||||
...rolesAcc,
|
||||
[role]: [...rolesAcc[role], node]
|
||||
} : {
|
||||
...rolesAcc,
|
||||
[role]: [node]
|
||||
}, acc);
|
||||
}, {});
|
||||
}
|
||||
function prettyRoles(dom, {
|
||||
hidden,
|
||||
includeDescription
|
||||
}) {
|
||||
const roles = getRoles(dom, {
|
||||
hidden
|
||||
});
|
||||
// We prefer to skip generic role, we don't recommend it
|
||||
return Object.entries(roles).filter(([role]) => role !== 'generic').map(([role, elements]) => {
|
||||
const delimiterBar = '-'.repeat(50);
|
||||
const elementsString = elements.map(el => {
|
||||
const nameString = `Name "${(0, _domAccessibilityApi.computeAccessibleName)(el, {
|
||||
computedStyleSupportsPseudoElements: (0, _config.getConfig)().computedStyleSupportsPseudoElements
|
||||
})}":\n`;
|
||||
const domString = (0, _prettyDom.prettyDOM)(el.cloneNode(false));
|
||||
if (includeDescription) {
|
||||
const descriptionString = `Description "${(0, _domAccessibilityApi.computeAccessibleDescription)(el, {
|
||||
computedStyleSupportsPseudoElements: (0, _config.getConfig)().computedStyleSupportsPseudoElements
|
||||
})}":\n`;
|
||||
return `${nameString}${descriptionString}${domString}`;
|
||||
}
|
||||
return `${nameString}${domString}`;
|
||||
}).join('\n\n');
|
||||
return `${role}:\n\n${elementsString}\n\n${delimiterBar}`;
|
||||
}).join('\n');
|
||||
}
|
||||
const logRoles = (dom, {
|
||||
hidden = false
|
||||
} = {}) => console.log(prettyRoles(dom, {
|
||||
hidden
|
||||
}));
|
||||
|
||||
/**
|
||||
* @param {Element} element -
|
||||
* @returns {boolean | undefined} - false/true if (not)selected, undefined if not selectable
|
||||
*/
|
||||
exports.logRoles = logRoles;
|
||||
function computeAriaSelected(element) {
|
||||
// implicit value from html-aam mappings: https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings
|
||||
// https://www.w3.org/TR/html-aam-1.0/#details-id-97
|
||||
if (element.tagName === 'OPTION') {
|
||||
return element.selected;
|
||||
}
|
||||
|
||||
// explicit value
|
||||
return checkBooleanAttribute(element, 'aria-selected');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Element} element -
|
||||
* @returns {boolean} -
|
||||
*/
|
||||
function computeAriaBusy(element) {
|
||||
// https://www.w3.org/TR/wai-aria-1.1/#aria-busy
|
||||
return element.getAttribute('aria-busy') === 'true';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Element} element -
|
||||
* @returns {boolean | undefined} - false/true if (not)checked, undefined if not checked-able
|
||||
*/
|
||||
function computeAriaChecked(element) {
|
||||
// implicit value from html-aam mappings: https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings
|
||||
// https://www.w3.org/TR/html-aam-1.0/#details-id-56
|
||||
// https://www.w3.org/TR/html-aam-1.0/#details-id-67
|
||||
if ('indeterminate' in element && element.indeterminate) {
|
||||
return undefined;
|
||||
}
|
||||
if ('checked' in element) {
|
||||
return element.checked;
|
||||
}
|
||||
|
||||
// explicit value
|
||||
return checkBooleanAttribute(element, 'aria-checked');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Element} element -
|
||||
* @returns {boolean | undefined} - false/true if (not)pressed, undefined if not press-able
|
||||
*/
|
||||
function computeAriaPressed(element) {
|
||||
// https://www.w3.org/TR/wai-aria-1.1/#aria-pressed
|
||||
return checkBooleanAttribute(element, 'aria-pressed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Element} element -
|
||||
* @returns {boolean | string | null} -
|
||||
*/
|
||||
function computeAriaCurrent(element) {
|
||||
// https://www.w3.org/TR/wai-aria-1.1/#aria-current
|
||||
return checkBooleanAttribute(element, 'aria-current') ?? element.getAttribute('aria-current') ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Element} element -
|
||||
* @returns {boolean | undefined} - false/true if (not)expanded, undefined if not expand-able
|
||||
*/
|
||||
function computeAriaExpanded(element) {
|
||||
// https://www.w3.org/TR/wai-aria-1.1/#aria-expanded
|
||||
return checkBooleanAttribute(element, 'aria-expanded');
|
||||
}
|
||||
function checkBooleanAttribute(element, attribute) {
|
||||
const attributeValue = element.getAttribute(attribute);
|
||||
if (attributeValue === 'true') {
|
||||
return true;
|
||||
}
|
||||
if (attributeValue === 'false') {
|
||||
return false;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Element} element -
|
||||
* @returns {number | undefined} - number if implicit heading or aria-level present, otherwise undefined
|
||||
*/
|
||||
function computeHeadingLevel(element) {
|
||||
// https://w3c.github.io/html-aam/#el-h1-h6
|
||||
// https://w3c.github.io/html-aam/#el-h1-h6
|
||||
const implicitHeadingLevels = {
|
||||
H1: 1,
|
||||
H2: 2,
|
||||
H3: 3,
|
||||
H4: 4,
|
||||
H5: 5,
|
||||
H6: 6
|
||||
};
|
||||
// explicit aria-level value
|
||||
// https://www.w3.org/TR/wai-aria-1.2/#aria-level
|
||||
const ariaLevelAttribute = element.getAttribute('aria-level') && Number(element.getAttribute('aria-level'));
|
||||
return ariaLevelAttribute || implicitHeadingLevels[element.tagName];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Element} element -
|
||||
* @returns {number | undefined} -
|
||||
*/
|
||||
function computeAriaValueNow(element) {
|
||||
const valueNow = element.getAttribute('aria-valuenow');
|
||||
return valueNow === null ? undefined : +valueNow;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Element} element -
|
||||
* @returns {number | undefined} -
|
||||
*/
|
||||
function computeAriaValueMax(element) {
|
||||
const valueMax = element.getAttribute('aria-valuemax');
|
||||
return valueMax === null ? undefined : +valueMax;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Element} element -
|
||||
* @returns {number | undefined} -
|
||||
*/
|
||||
function computeAriaValueMin(element) {
|
||||
const valueMin = element.getAttribute('aria-valuemin');
|
||||
return valueMin === null ? undefined : +valueMin;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Element} element -
|
||||
* @returns {string | undefined} -
|
||||
*/
|
||||
function computeAriaValueText(element) {
|
||||
const valueText = element.getAttribute('aria-valuetext');
|
||||
return valueText === null ? undefined : valueText;
|
||||
}
|
||||
58
frontend/node_modules/@testing-library/dom/dist/screen.js
generated
vendored
Normal file
58
frontend/node_modules/@testing-library/dom/dist/screen.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.screen = void 0;
|
||||
var _lzString = _interopRequireDefault(require("lz-string"));
|
||||
var _getQueriesForElement = require("./get-queries-for-element");
|
||||
var _helpers = require("./helpers");
|
||||
var _prettyDom = require("./pretty-dom");
|
||||
var queries = _interopRequireWildcard(require("./queries"));
|
||||
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
||||
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
||||
// WARNING: `lz-string` only has a default export but statically we assume named exports are allowed
|
||||
// TODO: Statically verify we don't rely on NodeJS implicit named imports.
|
||||
|
||||
function unindent(string) {
|
||||
// remove white spaces first, to save a few bytes.
|
||||
// testing-playground will reformat on load any ways.
|
||||
return string.replace(/[ \t]*[\n][ \t]*/g, '\n');
|
||||
}
|
||||
function encode(value) {
|
||||
return _lzString.default.compressToEncodedURIComponent(unindent(value));
|
||||
}
|
||||
function getPlaygroundUrl(markup) {
|
||||
return `https://testing-playground.com/#markup=${encode(markup)}`;
|
||||
}
|
||||
const debug = (element, maxLength, options) => Array.isArray(element) ? element.forEach(el => (0, _prettyDom.logDOM)(el, maxLength, options)) : (0, _prettyDom.logDOM)(element, maxLength, options);
|
||||
const logTestingPlaygroundURL = (element = (0, _helpers.getDocument)().body) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||
if (!element || !('innerHTML' in element)) {
|
||||
console.log(`The element you're providing isn't a valid DOM element.`);
|
||||
return;
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||
if (!element.innerHTML) {
|
||||
console.log(`The provided element doesn't have any children.`);
|
||||
return;
|
||||
}
|
||||
const playgroundUrl = getPlaygroundUrl(element.innerHTML);
|
||||
console.log(`Open this URL in your browser\n\n${playgroundUrl}`);
|
||||
return playgroundUrl;
|
||||
};
|
||||
const initialValue = {
|
||||
debug,
|
||||
logTestingPlaygroundURL
|
||||
};
|
||||
const screen = exports.screen = typeof document !== 'undefined' && document.body // eslint-disable-line @typescript-eslint/no-unnecessary-condition
|
||||
? (0, _getQueriesForElement.getQueriesForElement)(document.body, queries, initialValue) : Object.keys(queries).reduce((helpers, key) => {
|
||||
// `key` is for all intents and purposes the type of keyof `helpers`, which itself is the type of `initialValue` plus incoming properties from `queries`
|
||||
// if `Object.keys(something)` returned Array<keyof typeof something> this explicit type assertion would not be necessary
|
||||
// see https://stackoverflow.com/questions/55012174/why-doesnt-object-keys-return-a-keyof-type-in-typescript
|
||||
helpers[key] = () => {
|
||||
throw new TypeError('For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error');
|
||||
};
|
||||
return helpers;
|
||||
}, initialValue);
|
||||
118
frontend/node_modules/@testing-library/dom/dist/suggestions.js
generated
vendored
Normal file
118
frontend/node_modules/@testing-library/dom/dist/suggestions.js
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.getSuggestedQuery = getSuggestedQuery;
|
||||
var _domAccessibilityApi = require("dom-accessibility-api");
|
||||
var _matches = require("./matches");
|
||||
var _getNodeText = require("./get-node-text");
|
||||
var _config = require("./config");
|
||||
var _roleHelpers = require("./role-helpers");
|
||||
var _labelHelpers = require("./label-helpers");
|
||||
const normalize = (0, _matches.getDefaultNormalizer)();
|
||||
function escapeRegExp(string) {
|
||||
return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||
}
|
||||
function getRegExpMatcher(string) {
|
||||
return new RegExp(escapeRegExp(string.toLowerCase()), 'i');
|
||||
}
|
||||
function makeSuggestion(queryName, element, content, {
|
||||
variant,
|
||||
name
|
||||
}) {
|
||||
let warning = '';
|
||||
const queryOptions = {};
|
||||
const queryArgs = [['Role', 'TestId'].includes(queryName) ? content : getRegExpMatcher(content)];
|
||||
if (name) {
|
||||
queryOptions.name = getRegExpMatcher(name);
|
||||
}
|
||||
if (queryName === 'Role' && (0, _roleHelpers.isInaccessible)(element)) {
|
||||
queryOptions.hidden = true;
|
||||
warning = `Element is inaccessible. This means that the element and all its children are invisible to screen readers.
|
||||
If you are using the aria-hidden prop, make sure this is the right choice for your case.
|
||||
`;
|
||||
}
|
||||
if (Object.keys(queryOptions).length > 0) {
|
||||
queryArgs.push(queryOptions);
|
||||
}
|
||||
const queryMethod = `${variant}By${queryName}`;
|
||||
return {
|
||||
queryName,
|
||||
queryMethod,
|
||||
queryArgs,
|
||||
variant,
|
||||
warning,
|
||||
toString() {
|
||||
if (warning) {
|
||||
console.warn(warning);
|
||||
}
|
||||
let [text, options] = queryArgs;
|
||||
text = typeof text === 'string' ? `'${text}'` : text;
|
||||
options = options ? `, { ${Object.entries(options).map(([k, v]) => `${k}: ${v}`).join(', ')} }` : '';
|
||||
return `${queryMethod}(${text}${options})`;
|
||||
}
|
||||
};
|
||||
}
|
||||
function canSuggest(currentMethod, requestedMethod, data) {
|
||||
return data && (!requestedMethod || requestedMethod.toLowerCase() === currentMethod.toLowerCase());
|
||||
}
|
||||
function getSuggestedQuery(element, variant = 'get', method) {
|
||||
// don't create suggestions for script and style elements
|
||||
if (element.matches((0, _config.getConfig)().defaultIgnore)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
//We prefer to suggest something else if the role is generic
|
||||
const role = element.getAttribute('role') ?? (0, _roleHelpers.getImplicitAriaRoles)(element)?.[0];
|
||||
if (role !== 'generic' && canSuggest('Role', method, role)) {
|
||||
return makeSuggestion('Role', element, role, {
|
||||
variant,
|
||||
name: (0, _domAccessibilityApi.computeAccessibleName)(element, {
|
||||
computedStyleSupportsPseudoElements: (0, _config.getConfig)().computedStyleSupportsPseudoElements
|
||||
})
|
||||
});
|
||||
}
|
||||
const labelText = (0, _labelHelpers.getLabels)(document, element).map(label => label.content).join(' ');
|
||||
if (canSuggest('LabelText', method, labelText)) {
|
||||
return makeSuggestion('LabelText', element, labelText, {
|
||||
variant
|
||||
});
|
||||
}
|
||||
const placeholderText = element.getAttribute('placeholder');
|
||||
if (canSuggest('PlaceholderText', method, placeholderText)) {
|
||||
return makeSuggestion('PlaceholderText', element, placeholderText, {
|
||||
variant
|
||||
});
|
||||
}
|
||||
const textContent = normalize((0, _getNodeText.getNodeText)(element));
|
||||
if (canSuggest('Text', method, textContent)) {
|
||||
return makeSuggestion('Text', element, textContent, {
|
||||
variant
|
||||
});
|
||||
}
|
||||
if (canSuggest('DisplayValue', method, element.value)) {
|
||||
return makeSuggestion('DisplayValue', element, normalize(element.value), {
|
||||
variant
|
||||
});
|
||||
}
|
||||
const alt = element.getAttribute('alt');
|
||||
if (canSuggest('AltText', method, alt)) {
|
||||
return makeSuggestion('AltText', element, alt, {
|
||||
variant
|
||||
});
|
||||
}
|
||||
const title = element.getAttribute('title');
|
||||
if (canSuggest('Title', method, title)) {
|
||||
return makeSuggestion('Title', element, title, {
|
||||
variant
|
||||
});
|
||||
}
|
||||
const testId = element.getAttribute((0, _config.getConfig)().testIdAttribute);
|
||||
if (canSuggest('TestId', method, testId)) {
|
||||
return makeSuggestion('TestId', element, testId, {
|
||||
variant
|
||||
});
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
52
frontend/node_modules/@testing-library/dom/dist/wait-for-element-to-be-removed.js
generated
vendored
Normal file
52
frontend/node_modules/@testing-library/dom/dist/wait-for-element-to-be-removed.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.waitForElementToBeRemoved = waitForElementToBeRemoved;
|
||||
var _waitFor = require("./wait-for");
|
||||
const isRemoved = result => !result || Array.isArray(result) && !result.length;
|
||||
|
||||
// Check if the element is not present.
|
||||
// As the name implies, waitForElementToBeRemoved should check `present` --> `removed`
|
||||
function initialCheck(elements) {
|
||||
if (isRemoved(elements)) {
|
||||
throw new Error('The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.');
|
||||
}
|
||||
}
|
||||
async function waitForElementToBeRemoved(callback, options) {
|
||||
// created here so we get a nice stacktrace
|
||||
const timeoutError = new Error('Timed out in waitForElementToBeRemoved.');
|
||||
if (typeof callback !== 'function') {
|
||||
initialCheck(callback);
|
||||
const elements = Array.isArray(callback) ? callback : [callback];
|
||||
const getRemainingElements = elements.map(element => {
|
||||
let parent = element.parentElement;
|
||||
if (parent === null) return () => null;
|
||||
while (parent.parentElement) parent = parent.parentElement;
|
||||
return () => parent.contains(element) ? element : null;
|
||||
});
|
||||
callback = () => getRemainingElements.map(c => c()).filter(Boolean);
|
||||
}
|
||||
initialCheck(callback());
|
||||
return (0, _waitFor.waitFor)(() => {
|
||||
let result;
|
||||
try {
|
||||
result = callback();
|
||||
} catch (error) {
|
||||
if (error.name === 'TestingLibraryElementError') {
|
||||
return undefined;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
if (!isRemoved(result)) {
|
||||
throw timeoutError;
|
||||
}
|
||||
return undefined;
|
||||
}, options);
|
||||
}
|
||||
|
||||
/*
|
||||
eslint
|
||||
require-await: "off"
|
||||
*/
|
||||
173
frontend/node_modules/@testing-library/dom/dist/wait-for.js
generated
vendored
Normal file
173
frontend/node_modules/@testing-library/dom/dist/wait-for.js
generated
vendored
Normal file
@@ -0,0 +1,173 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.waitFor = waitForWrapper;
|
||||
var _helpers = require("./helpers");
|
||||
var _config = require("./config");
|
||||
// This is so the stack trace the developer sees is one that's
|
||||
// closer to their code (because async stack traces are hard to follow).
|
||||
function copyStackTrace(target, source) {
|
||||
target.stack = source.stack.replace(source.message, target.message);
|
||||
}
|
||||
function waitFor(callback, {
|
||||
container = (0, _helpers.getDocument)(),
|
||||
timeout = (0, _config.getConfig)().asyncUtilTimeout,
|
||||
showOriginalStackTrace = (0, _config.getConfig)().showOriginalStackTrace,
|
||||
stackTraceError,
|
||||
interval = 50,
|
||||
onTimeout = error => {
|
||||
Object.defineProperty(error, 'message', {
|
||||
value: (0, _config.getConfig)().getElementError(error.message, container).message
|
||||
});
|
||||
return error;
|
||||
},
|
||||
mutationObserverOptions = {
|
||||
subtree: true,
|
||||
childList: true,
|
||||
attributes: true,
|
||||
characterData: true
|
||||
}
|
||||
}) {
|
||||
if (typeof callback !== 'function') {
|
||||
throw new TypeError('Received `callback` arg must be a function');
|
||||
}
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let lastError, intervalId, observer;
|
||||
let finished = false;
|
||||
let promiseStatus = 'idle';
|
||||
const overallTimeoutTimer = setTimeout(handleTimeout, timeout);
|
||||
const usingJestFakeTimers = (0, _helpers.jestFakeTimersAreEnabled)();
|
||||
if (usingJestFakeTimers) {
|
||||
const {
|
||||
unstable_advanceTimersWrapper: advanceTimersWrapper
|
||||
} = (0, _config.getConfig)();
|
||||
checkCallback();
|
||||
// this is a dangerous rule to disable because it could lead to an
|
||||
// infinite loop. However, eslint isn't smart enough to know that we're
|
||||
// setting finished inside `onDone` which will be called when we're done
|
||||
// waiting or when we've timed out.
|
||||
// eslint-disable-next-line no-unmodified-loop-condition
|
||||
while (!finished) {
|
||||
if (!(0, _helpers.jestFakeTimersAreEnabled)()) {
|
||||
const error = new Error(`Changed from using fake timers to real timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to real timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830`);
|
||||
if (!showOriginalStackTrace) copyStackTrace(error, stackTraceError);
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
// In this rare case, we *need* to wait for in-flight promises
|
||||
// to resolve before continuing. We don't need to take advantage
|
||||
// of parallelization so we're fine.
|
||||
// https://stackoverflow.com/a/59243586/971592
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await advanceTimersWrapper(async () => {
|
||||
// we *could* (maybe should?) use `advanceTimersToNextTimer` but it's
|
||||
// possible that could make this loop go on forever if someone is using
|
||||
// third party code that's setting up recursive timers so rapidly that
|
||||
// the user's timer's don't get a chance to resolve. So we'll advance
|
||||
// by an interval instead. (We have a test for this case).
|
||||
jest.advanceTimersByTime(interval);
|
||||
});
|
||||
|
||||
// Could have timed-out
|
||||
if (finished) {
|
||||
break;
|
||||
}
|
||||
// It's really important that checkCallback is run *before* we flush
|
||||
// in-flight promises. To be honest, I'm not sure why, and I can't quite
|
||||
// think of a way to reproduce the problem in a test, but I spent
|
||||
// an entire day banging my head against a wall on this.
|
||||
checkCallback();
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
(0, _helpers.checkContainerType)(container);
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
return;
|
||||
}
|
||||
intervalId = setInterval(checkRealTimersCallback, interval);
|
||||
const {
|
||||
MutationObserver
|
||||
} = (0, _helpers.getWindowFromNode)(container);
|
||||
observer = new MutationObserver(checkRealTimersCallback);
|
||||
observer.observe(container, mutationObserverOptions);
|
||||
checkCallback();
|
||||
}
|
||||
function onDone(error, result) {
|
||||
finished = true;
|
||||
clearTimeout(overallTimeoutTimer);
|
||||
if (!usingJestFakeTimers) {
|
||||
clearInterval(intervalId);
|
||||
observer.disconnect();
|
||||
}
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
resolve(result);
|
||||
}
|
||||
}
|
||||
function checkRealTimersCallback() {
|
||||
if ((0, _helpers.jestFakeTimersAreEnabled)()) {
|
||||
const error = new Error(`Changed from using real timers to fake timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to fake timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830`);
|
||||
if (!showOriginalStackTrace) copyStackTrace(error, stackTraceError);
|
||||
return reject(error);
|
||||
} else {
|
||||
return checkCallback();
|
||||
}
|
||||
}
|
||||
function checkCallback() {
|
||||
if (promiseStatus === 'pending') return;
|
||||
try {
|
||||
const result = (0, _config.runWithExpensiveErrorDiagnosticsDisabled)(callback);
|
||||
if (typeof result?.then === 'function') {
|
||||
promiseStatus = 'pending';
|
||||
result.then(resolvedValue => {
|
||||
promiseStatus = 'resolved';
|
||||
onDone(null, resolvedValue);
|
||||
}, rejectedValue => {
|
||||
promiseStatus = 'rejected';
|
||||
lastError = rejectedValue;
|
||||
});
|
||||
} else {
|
||||
onDone(null, result);
|
||||
}
|
||||
// If `callback` throws, wait for the next mutation, interval, or timeout.
|
||||
} catch (error) {
|
||||
// Save the most recent callback error to reject the promise with it in the event of a timeout
|
||||
lastError = error;
|
||||
}
|
||||
}
|
||||
function handleTimeout() {
|
||||
let error;
|
||||
if (lastError) {
|
||||
error = lastError;
|
||||
if (!showOriginalStackTrace && error.name === 'TestingLibraryElementError') {
|
||||
copyStackTrace(error, stackTraceError);
|
||||
}
|
||||
} else {
|
||||
error = new Error('Timed out in waitFor.');
|
||||
if (!showOriginalStackTrace) {
|
||||
copyStackTrace(error, stackTraceError);
|
||||
}
|
||||
}
|
||||
onDone(onTimeout(error), null);
|
||||
}
|
||||
});
|
||||
}
|
||||
function waitForWrapper(callback, options) {
|
||||
// create the error here so its stack trace is as close to the
|
||||
// calling code as possible
|
||||
const stackTraceError = new Error('STACK_TRACE_MESSAGE');
|
||||
return (0, _config.getConfig)().asyncWrapper(() => waitFor(callback, {
|
||||
stackTraceError,
|
||||
...options
|
||||
}));
|
||||
}
|
||||
|
||||
/*
|
||||
eslint
|
||||
max-lines-per-function: ["error", {"max": 200}],
|
||||
*/
|
||||
119
frontend/node_modules/@testing-library/dom/package.json
generated
vendored
Normal file
119
frontend/node_modules/@testing-library/dom/package.json
generated
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
{
|
||||
"name": "@testing-library/dom",
|
||||
"version": "10.4.0",
|
||||
"description": "Simple and complete DOM testing utilities that encourage good testing practices.",
|
||||
"main": "dist/index.js",
|
||||
"types": "types/index.d.ts",
|
||||
"module": "dist/@testing-library/dom.esm.js",
|
||||
"umd:main": "dist/@testing-library/dom.umd.js",
|
||||
"source": "src/index.js",
|
||||
"keywords": [
|
||||
"testing",
|
||||
"ui",
|
||||
"dom",
|
||||
"jsdom",
|
||||
"unit",
|
||||
"integration",
|
||||
"functional",
|
||||
"end-to-end",
|
||||
"e2e"
|
||||
],
|
||||
"author": "Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"browserslist": [
|
||||
"and_chr 103",
|
||||
"and_ff 101",
|
||||
"and_qq 10.4",
|
||||
"and_uc 12.12",
|
||||
"android 103",
|
||||
"chrome 102",
|
||||
"edge 102",
|
||||
"firefox 91",
|
||||
"ios_saf 12.2-12.5",
|
||||
"kaios 2.5",
|
||||
"op_mini all",
|
||||
"op_mob 64",
|
||||
"opera 88",
|
||||
"safari 15.5",
|
||||
"samsung 17.0",
|
||||
"samsung 16.0",
|
||||
"node 18.0"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "kcd-scripts build --no-ts-defs --ignore \"**/__tests__/**,**/__node_tests__/**,**/__mocks__/**\" && kcd-scripts build --no-ts-defs --bundle --no-clean",
|
||||
"format": "kcd-scripts format",
|
||||
"install:csb": "npm install",
|
||||
"lint": "kcd-scripts lint",
|
||||
"setup": "npm install && npm run validate -s",
|
||||
"test": "kcd-scripts test",
|
||||
"test:debug": "node --inspect-brk ./node_modules/.bin/jest --watch --runInBand",
|
||||
"test:update": "npm test -- --updateSnapshot --coverage",
|
||||
"validate": "kcd-scripts validate",
|
||||
"typecheck": "kcd-scripts typecheck --build types"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"types/*.d.ts"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"@types/aria-query": "^5.0.1",
|
||||
"aria-query": "5.3.0",
|
||||
"chalk": "^4.1.0",
|
||||
"dom-accessibility-api": "^0.5.9",
|
||||
"lz-string": "^1.5.0",
|
||||
"pretty-format": "^27.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/jest-dom": "^5.11.6",
|
||||
"browserslist": "4.21.8",
|
||||
"caniuse-lite": "1.0.30001502",
|
||||
"jest-in-case": "^1.0.2",
|
||||
"jest-snapshot-serializer-ansi": "^1.0.0",
|
||||
"jest-watch-select-projects": "^2.0.0",
|
||||
"jsdom": "20.0.0",
|
||||
"kcd-scripts": "^13.0.0",
|
||||
"typescript": "^4.1.2"
|
||||
},
|
||||
"overrides": {
|
||||
"browserslist": "4.21.8",
|
||||
"caniuse-lite": "1.0.30001502"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"./node_modules/kcd-scripts/eslint.js",
|
||||
"plugin:import/typescript"
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2020
|
||||
},
|
||||
"rules": {
|
||||
"@typescript-eslint/prefer-optional-chain": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-unsafe-member-access": "off",
|
||||
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
|
||||
"@typescript-eslint/prefer-includes": "off",
|
||||
"import/prefer-default-export": "off",
|
||||
"import/no-unassigned-import": "off",
|
||||
"import/no-useless-path-segments": "off",
|
||||
"no-console": "off"
|
||||
}
|
||||
},
|
||||
"eslintIgnore": [
|
||||
"node_modules",
|
||||
"coverage",
|
||||
"dist"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/testing-library/dom-testing-library"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/testing-library/dom-testing-library/issues"
|
||||
},
|
||||
"homepage": "https://github.com/testing-library/dom-testing-library#readme"
|
||||
}
|
||||
27
frontend/node_modules/@testing-library/dom/types/config.d.ts
generated
vendored
Normal file
27
frontend/node_modules/@testing-library/dom/types/config.d.ts
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
export interface Config {
|
||||
testIdAttribute: string
|
||||
/**
|
||||
* WARNING: `unstable` prefix means this API may change in patch and minor releases.
|
||||
* @param cb
|
||||
*/
|
||||
unstable_advanceTimersWrapper(cb: (...args: unknown[]) => unknown): unknown
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
asyncWrapper(cb: (...args: any[]) => any): Promise<any>
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
eventWrapper(cb: (...args: any[]) => any): void
|
||||
asyncUtilTimeout: number
|
||||
computedStyleSupportsPseudoElements: boolean
|
||||
defaultHidden: boolean
|
||||
/** default value for the `ignore` option in `ByText` queries */
|
||||
defaultIgnore: string
|
||||
showOriginalStackTrace: boolean
|
||||
throwSuggestions: boolean
|
||||
getElementError: (message: string | null, container: Element) => Error
|
||||
}
|
||||
|
||||
export interface ConfigFn {
|
||||
(existingConfig: Config): Partial<Config>
|
||||
}
|
||||
|
||||
export function configure(configDelta: ConfigFn | Partial<Config>): void
|
||||
export function getConfig(): Config
|
||||
118
frontend/node_modules/@testing-library/dom/types/events.d.ts
generated
vendored
Normal file
118
frontend/node_modules/@testing-library/dom/types/events.d.ts
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
export type EventType =
|
||||
| 'copy'
|
||||
| 'cut'
|
||||
| 'paste'
|
||||
| 'compositionEnd'
|
||||
| 'compositionStart'
|
||||
| 'compositionUpdate'
|
||||
| 'keyDown'
|
||||
| 'keyPress'
|
||||
| 'keyUp'
|
||||
| 'focus'
|
||||
| 'blur'
|
||||
| 'focusIn'
|
||||
| 'focusOut'
|
||||
| 'change'
|
||||
| 'input'
|
||||
| 'invalid'
|
||||
| 'submit'
|
||||
| 'reset'
|
||||
| 'click'
|
||||
| 'contextMenu'
|
||||
| 'dblClick'
|
||||
| 'drag'
|
||||
| 'dragEnd'
|
||||
| 'dragEnter'
|
||||
| 'dragExit'
|
||||
| 'dragLeave'
|
||||
| 'dragOver'
|
||||
| 'dragStart'
|
||||
| 'drop'
|
||||
| 'mouseDown'
|
||||
| 'mouseEnter'
|
||||
| 'mouseLeave'
|
||||
| 'mouseMove'
|
||||
| 'mouseOut'
|
||||
| 'mouseOver'
|
||||
| 'mouseUp'
|
||||
| 'popState'
|
||||
| 'select'
|
||||
| 'touchCancel'
|
||||
| 'touchEnd'
|
||||
| 'touchMove'
|
||||
| 'touchStart'
|
||||
| 'resize'
|
||||
| 'scroll'
|
||||
| 'wheel'
|
||||
| 'abort'
|
||||
| 'canPlay'
|
||||
| 'canPlayThrough'
|
||||
| 'durationChange'
|
||||
| 'emptied'
|
||||
| 'encrypted'
|
||||
| 'ended'
|
||||
| 'loadedData'
|
||||
| 'loadedMetadata'
|
||||
| 'loadStart'
|
||||
| 'pause'
|
||||
| 'play'
|
||||
| 'playing'
|
||||
| 'progress'
|
||||
| 'rateChange'
|
||||
| 'seeked'
|
||||
| 'seeking'
|
||||
| 'stalled'
|
||||
| 'suspend'
|
||||
| 'timeUpdate'
|
||||
| 'volumeChange'
|
||||
| 'waiting'
|
||||
| 'load'
|
||||
| 'error'
|
||||
| 'animationStart'
|
||||
| 'animationEnd'
|
||||
| 'animationIteration'
|
||||
| 'transitionCancel'
|
||||
| 'transitionEnd'
|
||||
| 'transitionRun'
|
||||
| 'transitionStart'
|
||||
| 'doubleClick'
|
||||
| 'pointerOver'
|
||||
| 'pointerEnter'
|
||||
| 'pointerDown'
|
||||
| 'pointerMove'
|
||||
| 'pointerUp'
|
||||
| 'pointerCancel'
|
||||
| 'pointerOut'
|
||||
| 'pointerLeave'
|
||||
| 'gotPointerCapture'
|
||||
| 'lostPointerCapture'
|
||||
| 'offline'
|
||||
| 'online'
|
||||
| 'pageHide'
|
||||
| 'pageShow'
|
||||
|
||||
export type FireFunction = (
|
||||
element: Document | Element | Window | Node,
|
||||
event: Event,
|
||||
) => boolean
|
||||
export type FireObject = {
|
||||
[K in EventType]: (
|
||||
element: Document | Element | Window | Node,
|
||||
options?: {},
|
||||
) => boolean
|
||||
}
|
||||
export type CreateFunction = (
|
||||
eventName: string,
|
||||
node: Document | Element | Window | Node,
|
||||
init?: {},
|
||||
options?: {EventType?: string; defaultInit?: {}},
|
||||
) => Event
|
||||
export type CreateObject = {
|
||||
[K in EventType]: (
|
||||
element: Document | Element | Window | Node,
|
||||
options?: {},
|
||||
) => Event
|
||||
}
|
||||
|
||||
export const createEvent: CreateObject & CreateFunction
|
||||
export const fireEvent: FireFunction & FireObject
|
||||
1
frontend/node_modules/@testing-library/dom/types/get-node-text.d.ts
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/dom/types/get-node-text.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export function getNodeText(node: HTMLElement): string
|
||||
182
frontend/node_modules/@testing-library/dom/types/get-queries-for-element.d.ts
generated
vendored
Normal file
182
frontend/node_modules/@testing-library/dom/types/get-queries-for-element.d.ts
generated
vendored
Normal file
@@ -0,0 +1,182 @@
|
||||
import * as queries from './queries'
|
||||
|
||||
export type BoundFunction<T> = T extends (
|
||||
container: HTMLElement,
|
||||
...args: infer P
|
||||
) => infer R
|
||||
? (...args: P) => R
|
||||
: never
|
||||
|
||||
export type BoundFunctions<Q> = Q extends typeof queries
|
||||
? {
|
||||
getByLabelText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.GetByText<T>>>
|
||||
): ReturnType<queries.GetByText<T>>
|
||||
getAllByLabelText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.AllByText<T>>>
|
||||
): ReturnType<queries.AllByText<T>>
|
||||
queryByLabelText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.QueryByText<T>>>
|
||||
): ReturnType<queries.QueryByText<T>>
|
||||
queryAllByLabelText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.AllByText<T>>>
|
||||
): ReturnType<queries.AllByText<T>>
|
||||
findByLabelText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.FindByText<T>>>
|
||||
): ReturnType<queries.FindByText<T>>
|
||||
findAllByLabelText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.FindAllByText<T>>>
|
||||
): ReturnType<queries.FindAllByText<T>>
|
||||
getByPlaceholderText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.GetByBoundAttribute<T>>>
|
||||
): ReturnType<queries.GetByBoundAttribute<T>>
|
||||
getAllByPlaceholderText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.AllByBoundAttribute<T>>>
|
||||
): ReturnType<queries.AllByBoundAttribute<T>>
|
||||
queryByPlaceholderText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.QueryByBoundAttribute<T>>>
|
||||
): ReturnType<queries.QueryByBoundAttribute<T>>
|
||||
queryAllByPlaceholderText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.AllByBoundAttribute<T>>>
|
||||
): ReturnType<queries.AllByBoundAttribute<T>>
|
||||
findByPlaceholderText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.FindByBoundAttribute<T>>>
|
||||
): ReturnType<queries.FindByBoundAttribute<T>>
|
||||
findAllByPlaceholderText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.FindAllByBoundAttribute<T>>>
|
||||
): ReturnType<queries.FindAllByBoundAttribute<T>>
|
||||
getByText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.GetByText<T>>>
|
||||
): ReturnType<queries.GetByText<T>>
|
||||
getAllByText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.AllByText<T>>>
|
||||
): ReturnType<queries.AllByText<T>>
|
||||
queryByText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.QueryByText<T>>>
|
||||
): ReturnType<queries.QueryByText<T>>
|
||||
queryAllByText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.AllByText<T>>>
|
||||
): ReturnType<queries.AllByText<T>>
|
||||
findByText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.FindByText<T>>>
|
||||
): ReturnType<queries.FindByText<T>>
|
||||
findAllByText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.FindAllByText<T>>>
|
||||
): ReturnType<queries.FindAllByText<T>>
|
||||
getByAltText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.GetByBoundAttribute<T>>>
|
||||
): ReturnType<queries.GetByBoundAttribute<T>>
|
||||
getAllByAltText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.AllByBoundAttribute<T>>>
|
||||
): ReturnType<queries.AllByBoundAttribute<T>>
|
||||
queryByAltText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.QueryByBoundAttribute<T>>>
|
||||
): ReturnType<queries.QueryByBoundAttribute<T>>
|
||||
queryAllByAltText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.AllByBoundAttribute<T>>>
|
||||
): ReturnType<queries.AllByBoundAttribute<T>>
|
||||
findByAltText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.FindByBoundAttribute<T>>>
|
||||
): ReturnType<queries.FindByBoundAttribute<T>>
|
||||
findAllByAltText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.FindAllByBoundAttribute<T>>>
|
||||
): ReturnType<queries.FindAllByBoundAttribute<T>>
|
||||
getByTitle<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.GetByBoundAttribute<T>>>
|
||||
): ReturnType<queries.GetByBoundAttribute<T>>
|
||||
getAllByTitle<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.AllByBoundAttribute<T>>>
|
||||
): ReturnType<queries.AllByBoundAttribute<T>>
|
||||
queryByTitle<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.QueryByBoundAttribute<T>>>
|
||||
): ReturnType<queries.QueryByBoundAttribute<T>>
|
||||
queryAllByTitle<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.AllByBoundAttribute<T>>>
|
||||
): ReturnType<queries.AllByBoundAttribute<T>>
|
||||
findByTitle<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.FindByBoundAttribute<T>>>
|
||||
): ReturnType<queries.FindByBoundAttribute<T>>
|
||||
findAllByTitle<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.FindAllByBoundAttribute<T>>>
|
||||
): ReturnType<queries.FindAllByBoundAttribute<T>>
|
||||
getByDisplayValue<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.GetByBoundAttribute<T>>>
|
||||
): ReturnType<queries.GetByBoundAttribute<T>>
|
||||
getAllByDisplayValue<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.AllByBoundAttribute<T>>>
|
||||
): ReturnType<queries.AllByBoundAttribute<T>>
|
||||
queryByDisplayValue<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.QueryByBoundAttribute<T>>>
|
||||
): ReturnType<queries.QueryByBoundAttribute<T>>
|
||||
queryAllByDisplayValue<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.AllByBoundAttribute<T>>>
|
||||
): ReturnType<queries.AllByBoundAttribute<T>>
|
||||
findByDisplayValue<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.FindByBoundAttribute<T>>>
|
||||
): ReturnType<queries.FindByBoundAttribute<T>>
|
||||
findAllByDisplayValue<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.FindAllByBoundAttribute<T>>>
|
||||
): ReturnType<queries.FindAllByBoundAttribute<T>>
|
||||
getByRole<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.GetByRole<T>>>
|
||||
): ReturnType<queries.GetByRole<T>>
|
||||
getAllByRole<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.AllByRole<T>>>
|
||||
): ReturnType<queries.AllByRole<T>>
|
||||
queryByRole<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.QueryByRole<T>>>
|
||||
): ReturnType<queries.QueryByRole<T>>
|
||||
queryAllByRole<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.AllByRole<T>>>
|
||||
): ReturnType<queries.AllByRole<T>>
|
||||
findByRole<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.FindByRole<T>>>
|
||||
): ReturnType<queries.FindByRole<T>>
|
||||
findAllByRole<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.FindAllByRole<T>>>
|
||||
): ReturnType<queries.FindAllByRole<T>>
|
||||
getByTestId<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.GetByBoundAttribute<T>>>
|
||||
): ReturnType<queries.GetByBoundAttribute<T>>
|
||||
getAllByTestId<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.AllByBoundAttribute<T>>>
|
||||
): ReturnType<queries.AllByBoundAttribute<T>>
|
||||
queryByTestId<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.QueryByBoundAttribute<T>>>
|
||||
): ReturnType<queries.QueryByBoundAttribute<T>>
|
||||
queryAllByTestId<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.AllByBoundAttribute<T>>>
|
||||
): ReturnType<queries.AllByBoundAttribute<T>>
|
||||
findByTestId<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.FindByBoundAttribute<T>>>
|
||||
): ReturnType<queries.FindByBoundAttribute<T>>
|
||||
findAllByTestId<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<BoundFunction<queries.FindAllByBoundAttribute<T>>>
|
||||
): ReturnType<queries.FindAllByBoundAttribute<T>>
|
||||
} & {
|
||||
[P in keyof Q]: BoundFunction<Q[P]>
|
||||
}
|
||||
: {
|
||||
[P in keyof Q]: BoundFunction<Q[P]>
|
||||
}
|
||||
|
||||
export type Query = (
|
||||
container: HTMLElement,
|
||||
...args: any[]
|
||||
) =>
|
||||
| Error
|
||||
| HTMLElement
|
||||
| HTMLElement[]
|
||||
| Promise<HTMLElement[]>
|
||||
| Promise<HTMLElement>
|
||||
| null
|
||||
|
||||
export interface Queries {
|
||||
[T: string]: Query
|
||||
}
|
||||
|
||||
export function getQueriesForElement<
|
||||
QueriesToBind extends Queries = typeof queries,
|
||||
// Extra type parameter required for reassignment.
|
||||
T extends QueriesToBind = QueriesToBind,
|
||||
>(element: HTMLElement, queriesToBind?: T): BoundFunctions<T>
|
||||
22
frontend/node_modules/@testing-library/dom/types/index.d.ts
generated
vendored
Normal file
22
frontend/node_modules/@testing-library/dom/types/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
// TypeScript Version: 3.8
|
||||
|
||||
import {getQueriesForElement} from './get-queries-for-element'
|
||||
import * as queries from './queries'
|
||||
import * as queryHelpers from './query-helpers'
|
||||
|
||||
declare const within: typeof getQueriesForElement
|
||||
export {queries, queryHelpers, within}
|
||||
|
||||
export * from './queries'
|
||||
export * from './query-helpers'
|
||||
export * from './screen'
|
||||
export * from './wait-for'
|
||||
export * from './wait-for-element-to-be-removed'
|
||||
export * from './matches'
|
||||
export * from './get-node-text'
|
||||
export * from './events'
|
||||
export * from './get-queries-for-element'
|
||||
export * from './pretty-dom'
|
||||
export * from './role-helpers'
|
||||
export * from './config'
|
||||
export * from './suggestions'
|
||||
46
frontend/node_modules/@testing-library/dom/types/matches.d.ts
generated
vendored
Normal file
46
frontend/node_modules/@testing-library/dom/types/matches.d.ts
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
import {ARIARole} from 'aria-query'
|
||||
|
||||
export type MatcherFunction = (
|
||||
content: string,
|
||||
element: Element | null,
|
||||
) => boolean
|
||||
export type Matcher = MatcherFunction | RegExp | number | string
|
||||
|
||||
// Get autocomplete for ARIARole union types, while still supporting another string
|
||||
// Ref: https://github.com/microsoft/TypeScript/issues/29729#issuecomment-567871939
|
||||
export type ByRoleMatcher = ARIARole | (string & {})
|
||||
|
||||
export type NormalizerFn = (text: string) => string
|
||||
|
||||
export interface NormalizerOptions extends DefaultNormalizerOptions {
|
||||
normalizer?: NormalizerFn
|
||||
}
|
||||
|
||||
export interface MatcherOptions {
|
||||
exact?: boolean
|
||||
/** Use normalizer with getDefaultNormalizer instead */
|
||||
trim?: boolean
|
||||
/** Use normalizer with getDefaultNormalizer instead */
|
||||
collapseWhitespace?: boolean
|
||||
normalizer?: NormalizerFn
|
||||
/** suppress suggestions for a specific query */
|
||||
suggest?: boolean
|
||||
}
|
||||
|
||||
export type Match = (
|
||||
textToMatch: string,
|
||||
node: HTMLElement | null,
|
||||
matcher: Matcher,
|
||||
options?: MatcherOptions,
|
||||
) => boolean
|
||||
|
||||
export interface DefaultNormalizerOptions {
|
||||
trim?: boolean
|
||||
collapseWhitespace?: boolean
|
||||
}
|
||||
|
||||
export function getDefaultNormalizer(
|
||||
options?: DefaultNormalizerOptions,
|
||||
): NormalizerFn
|
||||
|
||||
// N.B. Don't expose fuzzyMatches + matches here: they're not public API
|
||||
21
frontend/node_modules/@testing-library/dom/types/pretty-dom.d.ts
generated
vendored
Normal file
21
frontend/node_modules/@testing-library/dom/types/pretty-dom.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import * as prettyFormat from 'pretty-format'
|
||||
|
||||
export interface PrettyDOMOptions extends prettyFormat.OptionsReceived {
|
||||
/**
|
||||
* Given a `Node` return `false` if you wish to ignore that node in the output.
|
||||
* By default, ignores `<style />`, `<script />` and comment nodes.
|
||||
*/
|
||||
filterNode?: (node: Node) => boolean
|
||||
}
|
||||
|
||||
export function prettyDOM(
|
||||
dom?: Element | HTMLDocument,
|
||||
maxLength?: number,
|
||||
options?: PrettyDOMOptions,
|
||||
): string | false
|
||||
export function logDOM(
|
||||
dom?: Element | HTMLDocument,
|
||||
maxLength?: number,
|
||||
options?: PrettyDOMOptions,
|
||||
): void
|
||||
export {prettyFormat}
|
||||
315
frontend/node_modules/@testing-library/dom/types/queries.d.ts
generated
vendored
Normal file
315
frontend/node_modules/@testing-library/dom/types/queries.d.ts
generated
vendored
Normal file
@@ -0,0 +1,315 @@
|
||||
import {ByRoleMatcher, Matcher, MatcherOptions} from './matches'
|
||||
import {SelectorMatcherOptions} from './query-helpers'
|
||||
import {waitForOptions} from './wait-for'
|
||||
|
||||
export type QueryByBoundAttribute<T extends HTMLElement = HTMLElement> = (
|
||||
container: HTMLElement,
|
||||
id: Matcher,
|
||||
options?: MatcherOptions,
|
||||
) => T | null
|
||||
|
||||
export type AllByBoundAttribute<T extends HTMLElement = HTMLElement> = (
|
||||
container: HTMLElement,
|
||||
id: Matcher,
|
||||
options?: MatcherOptions,
|
||||
) => T[]
|
||||
|
||||
export type FindAllByBoundAttribute<T extends HTMLElement = HTMLElement> = (
|
||||
container: HTMLElement,
|
||||
id: Matcher,
|
||||
options?: MatcherOptions,
|
||||
waitForElementOptions?: waitForOptions,
|
||||
) => Promise<T[]>
|
||||
|
||||
export type GetByBoundAttribute<T extends HTMLElement = HTMLElement> = (
|
||||
container: HTMLElement,
|
||||
id: Matcher,
|
||||
options?: MatcherOptions,
|
||||
) => T
|
||||
|
||||
export type FindByBoundAttribute<T extends HTMLElement = HTMLElement> = (
|
||||
container: HTMLElement,
|
||||
id: Matcher,
|
||||
options?: MatcherOptions,
|
||||
waitForElementOptions?: waitForOptions,
|
||||
) => Promise<T>
|
||||
|
||||
export type QueryByText<T extends HTMLElement = HTMLElement> = (
|
||||
container: HTMLElement,
|
||||
id: Matcher,
|
||||
options?: SelectorMatcherOptions,
|
||||
) => T | null
|
||||
|
||||
export type AllByText<T extends HTMLElement = HTMLElement> = (
|
||||
container: HTMLElement,
|
||||
id: Matcher,
|
||||
options?: SelectorMatcherOptions,
|
||||
) => T[]
|
||||
|
||||
export type FindAllByText<T extends HTMLElement = HTMLElement> = (
|
||||
container: HTMLElement,
|
||||
id: Matcher,
|
||||
options?: SelectorMatcherOptions,
|
||||
waitForElementOptions?: waitForOptions,
|
||||
) => Promise<T[]>
|
||||
|
||||
export type GetByText<T extends HTMLElement = HTMLElement> = (
|
||||
container: HTMLElement,
|
||||
id: Matcher,
|
||||
options?: SelectorMatcherOptions,
|
||||
) => T
|
||||
|
||||
export type FindByText<T extends HTMLElement = HTMLElement> = (
|
||||
container: HTMLElement,
|
||||
id: Matcher,
|
||||
options?: SelectorMatcherOptions,
|
||||
waitForElementOptions?: waitForOptions,
|
||||
) => Promise<T>
|
||||
|
||||
export interface ByRoleOptions {
|
||||
/** suppress suggestions for a specific query */
|
||||
suggest?: boolean
|
||||
/**
|
||||
* If true includes elements in the query set that are usually excluded from
|
||||
* the accessibility tree. `role="none"` or `role="presentation"` are included
|
||||
* in either case.
|
||||
*/
|
||||
hidden?: boolean
|
||||
/**
|
||||
* If true only includes elements in the query set that are marked as
|
||||
* selected in the accessibility tree, i.e., `aria-selected="true"`
|
||||
*/
|
||||
selected?: boolean
|
||||
/**
|
||||
* If true only includes elements in the query set that are marked as
|
||||
* busy in the accessibility tree, i.e., `aria-busy="true"`
|
||||
*/
|
||||
busy?: boolean
|
||||
/**
|
||||
* If true only includes elements in the query set that are marked as
|
||||
* checked in the accessibility tree, i.e., `aria-checked="true"`
|
||||
*/
|
||||
checked?: boolean
|
||||
/**
|
||||
* If true only includes elements in the query set that are marked as
|
||||
* pressed in the accessibility tree, i.e., `aria-pressed="true"`
|
||||
*/
|
||||
pressed?: boolean
|
||||
/**
|
||||
* Filters elements by their `aria-current` state. `true` and `false` match `aria-current="true"` and `aria-current="false"` (as well as a missing `aria-current` attribute) respectively.
|
||||
*/
|
||||
current?: boolean | string
|
||||
/**
|
||||
* If true only includes elements in the query set that are marked as
|
||||
* expanded in the accessibility tree, i.e., `aria-expanded="true"`
|
||||
*/
|
||||
expanded?: boolean
|
||||
/**
|
||||
* Includes elements with the `"heading"` role matching the indicated level,
|
||||
* either by the semantic HTML heading elements `<h1>-<h6>` or matching
|
||||
* the `aria-level` attribute.
|
||||
*/
|
||||
level?: number
|
||||
value?: {
|
||||
now?: number
|
||||
min?: number
|
||||
max?: number
|
||||
text?: Matcher
|
||||
}
|
||||
/**
|
||||
* Includes every role used in the `role` attribute
|
||||
* For example *ByRole('progressbar', {queryFallbacks: true})` will find <div role="meter progressbar">`.
|
||||
*/
|
||||
queryFallbacks?: boolean
|
||||
/**
|
||||
* Only considers elements with the specified accessible name.
|
||||
*/
|
||||
name?:
|
||||
| RegExp
|
||||
| string
|
||||
| ((accessibleName: string, element: Element) => boolean)
|
||||
/**
|
||||
* Only considers elements with the specified accessible description.
|
||||
*/
|
||||
description?:
|
||||
| RegExp
|
||||
| string
|
||||
| ((accessibleDescription: string, element: Element) => boolean)
|
||||
}
|
||||
|
||||
export type AllByRole<T extends HTMLElement = HTMLElement> = (
|
||||
container: HTMLElement,
|
||||
role: ByRoleMatcher,
|
||||
options?: ByRoleOptions,
|
||||
) => T[]
|
||||
|
||||
export type GetByRole<T extends HTMLElement = HTMLElement> = (
|
||||
container: HTMLElement,
|
||||
role: ByRoleMatcher,
|
||||
options?: ByRoleOptions,
|
||||
) => T
|
||||
|
||||
export type QueryByRole<T extends HTMLElement = HTMLElement> = (
|
||||
container: HTMLElement,
|
||||
role: ByRoleMatcher,
|
||||
options?: ByRoleOptions,
|
||||
) => T | null
|
||||
|
||||
export type FindByRole<T extends HTMLElement = HTMLElement> = (
|
||||
container: HTMLElement,
|
||||
role: ByRoleMatcher,
|
||||
options?: ByRoleOptions,
|
||||
waitForElementOptions?: waitForOptions,
|
||||
) => Promise<T>
|
||||
|
||||
export type FindAllByRole<T extends HTMLElement = HTMLElement> = (
|
||||
container: HTMLElement,
|
||||
role: ByRoleMatcher,
|
||||
options?: ByRoleOptions,
|
||||
waitForElementOptions?: waitForOptions,
|
||||
) => Promise<T[]>
|
||||
|
||||
export function getByLabelText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<GetByText<T>>
|
||||
): ReturnType<GetByText<T>>
|
||||
export function getAllByLabelText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<AllByText<T>>
|
||||
): ReturnType<AllByText<T>>
|
||||
export function queryByLabelText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<QueryByText<T>>
|
||||
): ReturnType<QueryByText<T>>
|
||||
export function queryAllByLabelText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<AllByText<T>>
|
||||
): ReturnType<AllByText<T>>
|
||||
export function findByLabelText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<FindByText<T>>
|
||||
): ReturnType<FindByText<T>>
|
||||
export function findAllByLabelText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<FindAllByText<T>>
|
||||
): ReturnType<FindAllByText<T>>
|
||||
export function getByPlaceholderText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<GetByBoundAttribute<T>>
|
||||
): ReturnType<GetByBoundAttribute<T>>
|
||||
export function getAllByPlaceholderText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<AllByBoundAttribute<T>>
|
||||
): ReturnType<AllByBoundAttribute<T>>
|
||||
export function queryByPlaceholderText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<QueryByBoundAttribute<T>>
|
||||
): ReturnType<QueryByBoundAttribute<T>>
|
||||
export function queryAllByPlaceholderText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<AllByBoundAttribute<T>>
|
||||
): ReturnType<AllByBoundAttribute<T>>
|
||||
export function findByPlaceholderText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<FindByBoundAttribute<T>>
|
||||
): ReturnType<FindByBoundAttribute<T>>
|
||||
export function findAllByPlaceholderText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<FindAllByBoundAttribute<T>>
|
||||
): ReturnType<FindAllByBoundAttribute<T>>
|
||||
export function getByText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<GetByText<T>>
|
||||
): ReturnType<GetByText<T>>
|
||||
export function getAllByText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<AllByText<T>>
|
||||
): ReturnType<AllByText<T>>
|
||||
export function queryByText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<QueryByText<T>>
|
||||
): ReturnType<QueryByText<T>>
|
||||
export function queryAllByText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<AllByText<T>>
|
||||
): ReturnType<AllByText<T>>
|
||||
export function findByText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<FindByText<T>>
|
||||
): ReturnType<FindByText<T>>
|
||||
export function findAllByText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<FindAllByText<T>>
|
||||
): ReturnType<FindAllByText<T>>
|
||||
export function getByAltText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<GetByBoundAttribute<T>>
|
||||
): ReturnType<GetByBoundAttribute<T>>
|
||||
export function getAllByAltText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<AllByBoundAttribute<T>>
|
||||
): ReturnType<AllByBoundAttribute<T>>
|
||||
export function queryByAltText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<QueryByBoundAttribute<T>>
|
||||
): ReturnType<QueryByBoundAttribute<T>>
|
||||
export function queryAllByAltText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<AllByBoundAttribute<T>>
|
||||
): ReturnType<AllByBoundAttribute<T>>
|
||||
export function findByAltText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<FindByBoundAttribute<T>>
|
||||
): ReturnType<FindByBoundAttribute<T>>
|
||||
export function findAllByAltText<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<FindAllByBoundAttribute<T>>
|
||||
): ReturnType<FindAllByBoundAttribute<T>>
|
||||
export function getByTitle<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<GetByBoundAttribute<T>>
|
||||
): ReturnType<GetByBoundAttribute<T>>
|
||||
export function getAllByTitle<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<AllByBoundAttribute<T>>
|
||||
): ReturnType<AllByBoundAttribute<T>>
|
||||
export function queryByTitle<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<QueryByBoundAttribute<T>>
|
||||
): ReturnType<QueryByBoundAttribute<T>>
|
||||
export function queryAllByTitle<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<AllByBoundAttribute<T>>
|
||||
): ReturnType<AllByBoundAttribute<T>>
|
||||
export function findByTitle<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<FindByBoundAttribute<T>>
|
||||
): ReturnType<FindByBoundAttribute<T>>
|
||||
export function findAllByTitle<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<FindAllByBoundAttribute<T>>
|
||||
): ReturnType<FindAllByBoundAttribute<T>>
|
||||
export function getByDisplayValue<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<GetByBoundAttribute<T>>
|
||||
): ReturnType<GetByBoundAttribute<T>>
|
||||
export function getAllByDisplayValue<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<AllByBoundAttribute<T>>
|
||||
): ReturnType<AllByBoundAttribute<T>>
|
||||
export function queryByDisplayValue<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<QueryByBoundAttribute<T>>
|
||||
): ReturnType<QueryByBoundAttribute<T>>
|
||||
export function queryAllByDisplayValue<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<AllByBoundAttribute<T>>
|
||||
): ReturnType<AllByBoundAttribute<T>>
|
||||
export function findByDisplayValue<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<FindByBoundAttribute<T>>
|
||||
): ReturnType<FindByBoundAttribute<T>>
|
||||
export function findAllByDisplayValue<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<FindAllByBoundAttribute<T>>
|
||||
): ReturnType<FindAllByBoundAttribute<T>>
|
||||
export function getByRole<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<GetByRole<T>>
|
||||
): ReturnType<GetByRole<T>>
|
||||
export function getAllByRole<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<AllByRole<T>>
|
||||
): ReturnType<AllByRole<T>>
|
||||
export function queryByRole<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<QueryByRole<T>>
|
||||
): ReturnType<QueryByRole<T>>
|
||||
export function queryAllByRole<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<AllByRole<T>>
|
||||
): ReturnType<AllByRole<T>>
|
||||
export function findByRole<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<FindByRole<T>>
|
||||
): ReturnType<FindByRole<T>>
|
||||
export function findAllByRole<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<FindAllByRole<T>>
|
||||
): ReturnType<FindAllByRole<T>>
|
||||
export function getByTestId<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<GetByBoundAttribute<T>>
|
||||
): ReturnType<GetByBoundAttribute<T>>
|
||||
export function getAllByTestId<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<AllByBoundAttribute<T>>
|
||||
): ReturnType<AllByBoundAttribute<T>>
|
||||
export function queryByTestId<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<QueryByBoundAttribute<T>>
|
||||
): ReturnType<QueryByBoundAttribute<T>>
|
||||
export function queryAllByTestId<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<AllByBoundAttribute<T>>
|
||||
): ReturnType<AllByBoundAttribute<T>>
|
||||
export function findByTestId<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<FindByBoundAttribute<T>>
|
||||
): ReturnType<FindByBoundAttribute<T>>
|
||||
export function findAllByTestId<T extends HTMLElement = HTMLElement>(
|
||||
...args: Parameters<FindAllByBoundAttribute<T>>
|
||||
): ReturnType<FindAllByBoundAttribute<T>>
|
||||
74
frontend/node_modules/@testing-library/dom/types/query-helpers.d.ts
generated
vendored
Normal file
74
frontend/node_modules/@testing-library/dom/types/query-helpers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
import {Matcher, MatcherOptions} from './matches'
|
||||
import {waitForOptions} from './wait-for'
|
||||
|
||||
export type WithSuggest = {suggest?: boolean}
|
||||
|
||||
export type GetErrorFunction<Arguments extends any[] = [string]> = (
|
||||
c: Element | null,
|
||||
...args: Arguments
|
||||
) => string
|
||||
|
||||
export interface SelectorMatcherOptions extends MatcherOptions {
|
||||
selector?: string
|
||||
ignore?: boolean | string
|
||||
}
|
||||
|
||||
export type QueryByAttribute = (
|
||||
attribute: string,
|
||||
container: HTMLElement,
|
||||
id: Matcher,
|
||||
options?: MatcherOptions,
|
||||
) => HTMLElement | null
|
||||
|
||||
export type AllByAttribute = (
|
||||
attribute: string,
|
||||
container: HTMLElement,
|
||||
id: Matcher,
|
||||
options?: MatcherOptions,
|
||||
) => HTMLElement[]
|
||||
|
||||
export const queryByAttribute: QueryByAttribute
|
||||
export const queryAllByAttribute: AllByAttribute
|
||||
export function getElementError(
|
||||
message: string | null,
|
||||
container: HTMLElement,
|
||||
): Error
|
||||
|
||||
/**
|
||||
* query methods have a common call signature. Only the return type differs.
|
||||
*/
|
||||
export type QueryMethod<Arguments extends any[], Return> = (
|
||||
container: HTMLElement,
|
||||
...args: Arguments
|
||||
) => Return
|
||||
export type QueryBy<Arguments extends any[]> = QueryMethod<
|
||||
Arguments,
|
||||
HTMLElement | null
|
||||
>
|
||||
export type GetAllBy<Arguments extends any[]> = QueryMethod<
|
||||
Arguments,
|
||||
HTMLElement[]
|
||||
>
|
||||
export type FindAllBy<Arguments extends any[]> = QueryMethod<
|
||||
[Arguments[0], Arguments[1]?, waitForOptions?],
|
||||
Promise<HTMLElement[]>
|
||||
>
|
||||
export type GetBy<Arguments extends any[]> = QueryMethod<Arguments, HTMLElement>
|
||||
export type FindBy<Arguments extends any[]> = QueryMethod<
|
||||
[Arguments[0], Arguments[1]?, waitForOptions?],
|
||||
Promise<HTMLElement>
|
||||
>
|
||||
|
||||
export type BuiltQueryMethods<Arguments extends any[]> = [
|
||||
QueryBy<Arguments>,
|
||||
GetAllBy<Arguments>,
|
||||
GetBy<Arguments>,
|
||||
FindAllBy<Arguments>,
|
||||
FindBy<Arguments>,
|
||||
]
|
||||
|
||||
export function buildQueries<Arguments extends any[]>(
|
||||
queryAllBy: GetAllBy<Arguments>,
|
||||
getMultipleError: GetErrorFunction<Arguments>,
|
||||
getMissingError: GetErrorFunction<Arguments>,
|
||||
): BuiltQueryMethods<Arguments>
|
||||
19
frontend/node_modules/@testing-library/dom/types/role-helpers.d.ts
generated
vendored
Normal file
19
frontend/node_modules/@testing-library/dom/types/role-helpers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
export function logRoles(
|
||||
container: HTMLElement,
|
||||
options?: LogRolesOptions,
|
||||
): string
|
||||
|
||||
interface LogRolesOptions {
|
||||
hidden?: boolean
|
||||
}
|
||||
|
||||
export function getRoles(container: HTMLElement): {
|
||||
[index: string]: HTMLElement[]
|
||||
}
|
||||
|
||||
/**
|
||||
* https://testing-library.com/docs/dom-testing-library/api-helpers#isinaccessible
|
||||
*/
|
||||
export function isInaccessible(element: Element): boolean
|
||||
|
||||
export function computeHeadingLevel(element: Element): number | undefined
|
||||
22
frontend/node_modules/@testing-library/dom/types/screen.d.ts
generated
vendored
Normal file
22
frontend/node_modules/@testing-library/dom/types/screen.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import {OptionsReceived} from 'pretty-format'
|
||||
import {BoundFunctions, Queries} from './get-queries-for-element'
|
||||
import * as queries from './queries'
|
||||
|
||||
export type Screen<Q extends Queries = typeof queries> = BoundFunctions<Q> & {
|
||||
/**
|
||||
* Convenience function for `pretty-dom` which also allows an array
|
||||
* of elements
|
||||
*/
|
||||
debug: (
|
||||
element?: Array<Element | HTMLDocument> | Element | HTMLDocument,
|
||||
maxLength?: number,
|
||||
options?: OptionsReceived,
|
||||
) => void
|
||||
/**
|
||||
* Convenience function for `Testing Playground` which logs and returns the URL that
|
||||
* can be opened in a browser
|
||||
*/
|
||||
logTestingPlaygroundURL: (element?: Element | HTMLDocument) => string
|
||||
}
|
||||
|
||||
export const screen: Screen
|
||||
46
frontend/node_modules/@testing-library/dom/types/suggestions.d.ts
generated
vendored
Normal file
46
frontend/node_modules/@testing-library/dom/types/suggestions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
export interface QueryOptions {
|
||||
[key: string]: RegExp | boolean
|
||||
}
|
||||
|
||||
export type QueryArgs = [string, QueryOptions?]
|
||||
|
||||
export interface Suggestion {
|
||||
queryName: string
|
||||
queryMethod: string
|
||||
queryArgs: QueryArgs
|
||||
variant: string
|
||||
warning?: string
|
||||
toString(): string
|
||||
}
|
||||
|
||||
export type Variant =
|
||||
| 'find'
|
||||
| 'findAll'
|
||||
| 'get'
|
||||
| 'getAll'
|
||||
| 'query'
|
||||
| 'queryAll'
|
||||
|
||||
export type Method =
|
||||
| 'AltText'
|
||||
| 'alttext'
|
||||
| 'DisplayValue'
|
||||
| 'displayvalue'
|
||||
| 'LabelText'
|
||||
| 'labeltext'
|
||||
| 'PlaceholderText'
|
||||
| 'placeholdertext'
|
||||
| 'Role'
|
||||
| 'role'
|
||||
| 'TestId'
|
||||
| 'testid'
|
||||
| 'Text'
|
||||
| 'text'
|
||||
| 'Title'
|
||||
| 'title'
|
||||
|
||||
export function getSuggestedQuery(
|
||||
element: HTMLElement,
|
||||
variant?: Variant,
|
||||
method?: Method,
|
||||
): Suggestion | undefined
|
||||
6
frontend/node_modules/@testing-library/dom/types/wait-for-element-to-be-removed.d.ts
generated
vendored
Normal file
6
frontend/node_modules/@testing-library/dom/types/wait-for-element-to-be-removed.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import {waitForOptions} from './wait-for'
|
||||
|
||||
export function waitForElementToBeRemoved<T>(
|
||||
callback: T | (() => T),
|
||||
options?: waitForOptions,
|
||||
): Promise<void>
|
||||
12
frontend/node_modules/@testing-library/dom/types/wait-for.d.ts
generated
vendored
Normal file
12
frontend/node_modules/@testing-library/dom/types/wait-for.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
export interface waitForOptions {
|
||||
container?: HTMLElement
|
||||
timeout?: number
|
||||
interval?: number
|
||||
onTimeout?: (error: Error) => Error
|
||||
mutationObserverOptions?: MutationObserverInit
|
||||
}
|
||||
|
||||
export function waitFor<T>(
|
||||
callback: () => Promise<T> | T,
|
||||
options?: waitForOptions,
|
||||
): Promise<T>
|
||||
5
frontend/node_modules/@testing-library/jest-dom/CHANGELOG.md
generated
vendored
Normal file
5
frontend/node_modules/@testing-library/jest-dom/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# CHANGELOG
|
||||
|
||||
The changelog is automatically updated using
|
||||
[semantic-release](https://github.com/semantic-release/semantic-release). You
|
||||
can see it on the [releases page](../../releases).
|
||||
20
frontend/node_modules/@testing-library/jest-dom/LICENSE
generated
vendored
Normal file
20
frontend/node_modules/@testing-library/jest-dom/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
Copyright (c) 2017 Kent C. Dodds
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
1706
frontend/node_modules/@testing-library/jest-dom/README.md
generated
vendored
Normal file
1706
frontend/node_modules/@testing-library/jest-dom/README.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
12
frontend/node_modules/@testing-library/jest-dom/dist/index.js
generated
vendored
Normal file
12
frontend/node_modules/@testing-library/jest-dom/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
var matchers = require('./matchers-7fb38cd4.js');
|
||||
require('redent');
|
||||
require('@adobe/css-tools');
|
||||
require('dom-accessibility-api');
|
||||
require('aria-query');
|
||||
require('chalk');
|
||||
require('lodash/isEqualWith.js');
|
||||
require('css.escape');
|
||||
|
||||
expect.extend(matchers.extensions);
|
||||
10
frontend/node_modules/@testing-library/jest-dom/dist/index.mjs
generated
vendored
Normal file
10
frontend/node_modules/@testing-library/jest-dom/dist/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { e as extensions } from './matchers-c85aadf8.mjs';
|
||||
import 'redent';
|
||||
import '@adobe/css-tools';
|
||||
import 'dom-accessibility-api';
|
||||
import 'aria-query';
|
||||
import 'chalk';
|
||||
import 'lodash/isEqualWith.js';
|
||||
import 'css.escape';
|
||||
|
||||
expect.extend(extensions);
|
||||
16
frontend/node_modules/@testing-library/jest-dom/dist/jest-globals.js
generated
vendored
Normal file
16
frontend/node_modules/@testing-library/jest-dom/dist/jest-globals.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
var globals = require('@jest/globals');
|
||||
var matchers = require('./matchers-7fb38cd4.js');
|
||||
require('redent');
|
||||
require('@adobe/css-tools');
|
||||
require('dom-accessibility-api');
|
||||
require('aria-query');
|
||||
require('chalk');
|
||||
require('lodash/isEqualWith.js');
|
||||
require('css.escape');
|
||||
|
||||
/* istanbul ignore file */
|
||||
|
||||
|
||||
globals.expect.extend(matchers.extensions);
|
||||
14
frontend/node_modules/@testing-library/jest-dom/dist/jest-globals.mjs
generated
vendored
Normal file
14
frontend/node_modules/@testing-library/jest-dom/dist/jest-globals.mjs
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { expect } from '@jest/globals';
|
||||
import { e as extensions } from './matchers-c85aadf8.mjs';
|
||||
import 'redent';
|
||||
import '@adobe/css-tools';
|
||||
import 'dom-accessibility-api';
|
||||
import 'aria-query';
|
||||
import 'chalk';
|
||||
import 'lodash/isEqualWith.js';
|
||||
import 'css.escape';
|
||||
|
||||
/* istanbul ignore file */
|
||||
|
||||
|
||||
expect.extend(extensions);
|
||||
1945
frontend/node_modules/@testing-library/jest-dom/dist/matchers-7fb38cd4.js
generated
vendored
Normal file
1945
frontend/node_modules/@testing-library/jest-dom/dist/matchers-7fb38cd4.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1914
frontend/node_modules/@testing-library/jest-dom/dist/matchers-c85aadf8.mjs
generated
vendored
Normal file
1914
frontend/node_modules/@testing-library/jest-dom/dist/matchers-c85aadf8.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
42
frontend/node_modules/@testing-library/jest-dom/dist/matchers.js
generated
vendored
Normal file
42
frontend/node_modules/@testing-library/jest-dom/dist/matchers.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
'use strict';
|
||||
|
||||
var matchers = require('./matchers-7fb38cd4.js');
|
||||
require('redent');
|
||||
require('@adobe/css-tools');
|
||||
require('dom-accessibility-api');
|
||||
require('aria-query');
|
||||
require('chalk');
|
||||
require('lodash/isEqualWith.js');
|
||||
require('css.escape');
|
||||
|
||||
|
||||
|
||||
exports.toBeChecked = matchers.toBeChecked;
|
||||
exports.toBeDisabled = matchers.toBeDisabled;
|
||||
exports.toBeEmpty = matchers.toBeEmpty;
|
||||
exports.toBeEmptyDOMElement = matchers.toBeEmptyDOMElement;
|
||||
exports.toBeEnabled = matchers.toBeEnabled;
|
||||
exports.toBeInTheDOM = matchers.toBeInTheDOM;
|
||||
exports.toBeInTheDocument = matchers.toBeInTheDocument;
|
||||
exports.toBeInvalid = matchers.toBeInvalid;
|
||||
exports.toBePartiallyChecked = matchers.toBePartiallyChecked;
|
||||
exports.toBeRequired = matchers.toBeRequired;
|
||||
exports.toBeValid = matchers.toBeValid;
|
||||
exports.toBeVisible = matchers.toBeVisible;
|
||||
exports.toContainElement = matchers.toContainElement;
|
||||
exports.toContainHTML = matchers.toContainHTML;
|
||||
exports.toHaveAccessibleDescription = matchers.toHaveAccessibleDescription;
|
||||
exports.toHaveAccessibleErrorMessage = matchers.toHaveAccessibleErrorMessage;
|
||||
exports.toHaveAccessibleName = matchers.toHaveAccessibleName;
|
||||
exports.toHaveAttribute = matchers.toHaveAttribute;
|
||||
exports.toHaveClass = matchers.toHaveClass;
|
||||
exports.toHaveDescription = matchers.toHaveDescription;
|
||||
exports.toHaveDisplayValue = matchers.toHaveDisplayValue;
|
||||
exports.toHaveErrorMessage = matchers.toHaveErrorMessage;
|
||||
exports.toHaveFocus = matchers.toHaveFocus;
|
||||
exports.toHaveFormValues = matchers.toHaveFormValues;
|
||||
exports.toHaveRole = matchers.toHaveRole;
|
||||
exports.toHaveSelection = matchers.toHaveSelection;
|
||||
exports.toHaveStyle = matchers.toHaveStyle;
|
||||
exports.toHaveTextContent = matchers.toHaveTextContent;
|
||||
exports.toHaveValue = matchers.toHaveValue;
|
||||
8
frontend/node_modules/@testing-library/jest-dom/dist/matchers.mjs
generated
vendored
Normal file
8
frontend/node_modules/@testing-library/jest-dom/dist/matchers.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export { z as toBeChecked, r as toBeDisabled, b as toBeEmpty, c as toBeEmptyDOMElement, s as toBeEnabled, t as toBeInTheDOM, a as toBeInTheDocument, v as toBeInvalid, A as toBePartiallyChecked, u as toBeRequired, w as toBeValid, q as toBeVisible, d as toContainElement, f as toContainHTML, h as toHaveAccessibleDescription, i as toHaveAccessibleErrorMessage, k as toHaveAccessibleName, l as toHaveAttribute, m as toHaveClass, B as toHaveDescription, y as toHaveDisplayValue, C as toHaveErrorMessage, o as toHaveFocus, p as toHaveFormValues, j as toHaveRole, D as toHaveSelection, n as toHaveStyle, g as toHaveTextContent, x as toHaveValue } from './matchers-c85aadf8.mjs';
|
||||
import 'redent';
|
||||
import '@adobe/css-tools';
|
||||
import 'dom-accessibility-api';
|
||||
import 'aria-query';
|
||||
import 'chalk';
|
||||
import 'lodash/isEqualWith.js';
|
||||
import 'css.escape';
|
||||
16
frontend/node_modules/@testing-library/jest-dom/dist/vitest.js
generated
vendored
Normal file
16
frontend/node_modules/@testing-library/jest-dom/dist/vitest.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
var vitest = require('vitest');
|
||||
var matchers = require('./matchers-7fb38cd4.js');
|
||||
require('redent');
|
||||
require('@adobe/css-tools');
|
||||
require('dom-accessibility-api');
|
||||
require('aria-query');
|
||||
require('chalk');
|
||||
require('lodash/isEqualWith.js');
|
||||
require('css.escape');
|
||||
|
||||
/* istanbul ignore file */
|
||||
|
||||
|
||||
vitest.expect.extend(matchers.extensions);
|
||||
14
frontend/node_modules/@testing-library/jest-dom/dist/vitest.mjs
generated
vendored
Normal file
14
frontend/node_modules/@testing-library/jest-dom/dist/vitest.mjs
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { expect } from 'vitest';
|
||||
import { e as extensions } from './matchers-c85aadf8.mjs';
|
||||
import 'redent';
|
||||
import '@adobe/css-tools';
|
||||
import 'dom-accessibility-api';
|
||||
import 'aria-query';
|
||||
import 'chalk';
|
||||
import 'lodash/isEqualWith.js';
|
||||
import 'css.escape';
|
||||
|
||||
/* istanbul ignore file */
|
||||
|
||||
|
||||
expect.extend(extensions);
|
||||
1
frontend/node_modules/@testing-library/jest-dom/jest-globals.d.ts
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/jest-globals.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/// <reference path="types/jest-globals.d.ts" />
|
||||
4
frontend/node_modules/@testing-library/jest-dom/jest-globals.js
generated
vendored
Normal file
4
frontend/node_modules/@testing-library/jest-dom/jest-globals.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
const globals = require('@jest/globals')
|
||||
const extensions = require('./dist/matchers')
|
||||
|
||||
globals.expect.extend(extensions)
|
||||
3
frontend/node_modules/@testing-library/jest-dom/matchers.d.ts
generated
vendored
Normal file
3
frontend/node_modules/@testing-library/jest-dom/matchers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import * as matchers from './types/matchers'
|
||||
|
||||
export = matchers
|
||||
2
frontend/node_modules/@testing-library/jest-dom/matchers.js
generated
vendored
Normal file
2
frontend/node_modules/@testing-library/jest-dom/matchers.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
const matchers = require('./dist/matchers')
|
||||
module.exports = matchers
|
||||
411
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/index.d.ts
generated
vendored
Normal file
411
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,411 @@
|
||||
declare const enum LevelEnum {
|
||||
/**
|
||||
All colors disabled.
|
||||
*/
|
||||
None = 0,
|
||||
|
||||
/**
|
||||
Basic 16 colors support.
|
||||
*/
|
||||
Basic = 1,
|
||||
|
||||
/**
|
||||
ANSI 256 colors support.
|
||||
*/
|
||||
Ansi256 = 2,
|
||||
|
||||
/**
|
||||
Truecolor 16 million colors support.
|
||||
*/
|
||||
TrueColor = 3
|
||||
}
|
||||
|
||||
/**
|
||||
Basic foreground colors.
|
||||
|
||||
[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
|
||||
*/
|
||||
declare type ForegroundColor =
|
||||
| 'black'
|
||||
| 'red'
|
||||
| 'green'
|
||||
| 'yellow'
|
||||
| 'blue'
|
||||
| 'magenta'
|
||||
| 'cyan'
|
||||
| 'white'
|
||||
| 'gray'
|
||||
| 'grey'
|
||||
| 'blackBright'
|
||||
| 'redBright'
|
||||
| 'greenBright'
|
||||
| 'yellowBright'
|
||||
| 'blueBright'
|
||||
| 'magentaBright'
|
||||
| 'cyanBright'
|
||||
| 'whiteBright';
|
||||
|
||||
/**
|
||||
Basic background colors.
|
||||
|
||||
[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
|
||||
*/
|
||||
declare type BackgroundColor =
|
||||
| 'bgBlack'
|
||||
| 'bgRed'
|
||||
| 'bgGreen'
|
||||
| 'bgYellow'
|
||||
| 'bgBlue'
|
||||
| 'bgMagenta'
|
||||
| 'bgCyan'
|
||||
| 'bgWhite'
|
||||
| 'bgGray'
|
||||
| 'bgGrey'
|
||||
| 'bgBlackBright'
|
||||
| 'bgRedBright'
|
||||
| 'bgGreenBright'
|
||||
| 'bgYellowBright'
|
||||
| 'bgBlueBright'
|
||||
| 'bgMagentaBright'
|
||||
| 'bgCyanBright'
|
||||
| 'bgWhiteBright';
|
||||
|
||||
/**
|
||||
Basic colors.
|
||||
|
||||
[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
|
||||
*/
|
||||
declare type Color = ForegroundColor | BackgroundColor;
|
||||
|
||||
declare type Modifiers =
|
||||
| 'reset'
|
||||
| 'bold'
|
||||
| 'dim'
|
||||
| 'italic'
|
||||
| 'underline'
|
||||
| 'inverse'
|
||||
| 'hidden'
|
||||
| 'strikethrough'
|
||||
| 'visible';
|
||||
|
||||
declare namespace chalk {
|
||||
type Level = LevelEnum;
|
||||
|
||||
interface Options {
|
||||
/**
|
||||
Specify the color support for Chalk.
|
||||
By default, color support is automatically detected based on the environment.
|
||||
*/
|
||||
level?: Level;
|
||||
}
|
||||
|
||||
interface Instance {
|
||||
/**
|
||||
Return a new Chalk instance.
|
||||
*/
|
||||
new (options?: Options): Chalk;
|
||||
}
|
||||
|
||||
/**
|
||||
Detect whether the terminal supports color.
|
||||
*/
|
||||
interface ColorSupport {
|
||||
/**
|
||||
The color level used by Chalk.
|
||||
*/
|
||||
level: Level;
|
||||
|
||||
/**
|
||||
Return whether Chalk supports basic 16 colors.
|
||||
*/
|
||||
hasBasic: boolean;
|
||||
|
||||
/**
|
||||
Return whether Chalk supports ANSI 256 colors.
|
||||
*/
|
||||
has256: boolean;
|
||||
|
||||
/**
|
||||
Return whether Chalk supports Truecolor 16 million colors.
|
||||
*/
|
||||
has16m: boolean;
|
||||
}
|
||||
|
||||
interface ChalkFunction {
|
||||
/**
|
||||
Use a template string.
|
||||
|
||||
@remarks Template literals are unsupported for nested calls (see [issue #341](https://github.com/chalk/chalk/issues/341))
|
||||
|
||||
@example
|
||||
```
|
||||
import chalk = require('chalk');
|
||||
|
||||
log(chalk`
|
||||
CPU: {red ${cpu.totalPercent}%}
|
||||
RAM: {green ${ram.used / ram.total * 100}%}
|
||||
DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%}
|
||||
`);
|
||||
```
|
||||
*/
|
||||
(text: TemplateStringsArray, ...placeholders: unknown[]): string;
|
||||
|
||||
(...text: unknown[]): string;
|
||||
}
|
||||
|
||||
interface Chalk extends ChalkFunction {
|
||||
/**
|
||||
Return a new Chalk instance.
|
||||
*/
|
||||
Instance: Instance;
|
||||
|
||||
/**
|
||||
The color support for Chalk.
|
||||
By default, color support is automatically detected based on the environment.
|
||||
*/
|
||||
level: Level;
|
||||
|
||||
/**
|
||||
Use HEX value to set text color.
|
||||
|
||||
@param color - Hexadecimal value representing the desired color.
|
||||
|
||||
@example
|
||||
```
|
||||
import chalk = require('chalk');
|
||||
|
||||
chalk.hex('#DEADED');
|
||||
```
|
||||
*/
|
||||
hex(color: string): Chalk;
|
||||
|
||||
/**
|
||||
Use keyword color value to set text color.
|
||||
|
||||
@param color - Keyword value representing the desired color.
|
||||
|
||||
@example
|
||||
```
|
||||
import chalk = require('chalk');
|
||||
|
||||
chalk.keyword('orange');
|
||||
```
|
||||
*/
|
||||
keyword(color: string): Chalk;
|
||||
|
||||
/**
|
||||
Use RGB values to set text color.
|
||||
*/
|
||||
rgb(red: number, green: number, blue: number): Chalk;
|
||||
|
||||
/**
|
||||
Use HSL values to set text color.
|
||||
*/
|
||||
hsl(hue: number, saturation: number, lightness: number): Chalk;
|
||||
|
||||
/**
|
||||
Use HSV values to set text color.
|
||||
*/
|
||||
hsv(hue: number, saturation: number, value: number): Chalk;
|
||||
|
||||
/**
|
||||
Use HWB values to set text color.
|
||||
*/
|
||||
hwb(hue: number, whiteness: number, blackness: number): Chalk;
|
||||
|
||||
/**
|
||||
Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set text color.
|
||||
|
||||
30 <= code && code < 38 || 90 <= code && code < 98
|
||||
For example, 31 for red, 91 for redBright.
|
||||
*/
|
||||
ansi(code: number): Chalk;
|
||||
|
||||
/**
|
||||
Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color.
|
||||
*/
|
||||
ansi256(index: number): Chalk;
|
||||
|
||||
/**
|
||||
Use HEX value to set background color.
|
||||
|
||||
@param color - Hexadecimal value representing the desired color.
|
||||
|
||||
@example
|
||||
```
|
||||
import chalk = require('chalk');
|
||||
|
||||
chalk.bgHex('#DEADED');
|
||||
```
|
||||
*/
|
||||
bgHex(color: string): Chalk;
|
||||
|
||||
/**
|
||||
Use keyword color value to set background color.
|
||||
|
||||
@param color - Keyword value representing the desired color.
|
||||
|
||||
@example
|
||||
```
|
||||
import chalk = require('chalk');
|
||||
|
||||
chalk.bgKeyword('orange');
|
||||
```
|
||||
*/
|
||||
bgKeyword(color: string): Chalk;
|
||||
|
||||
/**
|
||||
Use RGB values to set background color.
|
||||
*/
|
||||
bgRgb(red: number, green: number, blue: number): Chalk;
|
||||
|
||||
/**
|
||||
Use HSL values to set background color.
|
||||
*/
|
||||
bgHsl(hue: number, saturation: number, lightness: number): Chalk;
|
||||
|
||||
/**
|
||||
Use HSV values to set background color.
|
||||
*/
|
||||
bgHsv(hue: number, saturation: number, value: number): Chalk;
|
||||
|
||||
/**
|
||||
Use HWB values to set background color.
|
||||
*/
|
||||
bgHwb(hue: number, whiteness: number, blackness: number): Chalk;
|
||||
|
||||
/**
|
||||
Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set background color.
|
||||
|
||||
30 <= code && code < 38 || 90 <= code && code < 98
|
||||
For example, 31 for red, 91 for redBright.
|
||||
Use the foreground code, not the background code (for example, not 41, nor 101).
|
||||
*/
|
||||
bgAnsi(code: number): Chalk;
|
||||
|
||||
/**
|
||||
Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color.
|
||||
*/
|
||||
bgAnsi256(index: number): Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Resets the current color chain.
|
||||
*/
|
||||
readonly reset: Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Make text bold.
|
||||
*/
|
||||
readonly bold: Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Emitting only a small amount of light.
|
||||
*/
|
||||
readonly dim: Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Make text italic. (Not widely supported)
|
||||
*/
|
||||
readonly italic: Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Make text underline. (Not widely supported)
|
||||
*/
|
||||
readonly underline: Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Inverse background and foreground colors.
|
||||
*/
|
||||
readonly inverse: Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Prints the text, but makes it invisible.
|
||||
*/
|
||||
readonly hidden: Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Puts a horizontal line through the center of the text. (Not widely supported)
|
||||
*/
|
||||
readonly strikethrough: Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Prints the text only when Chalk has a color support level > 0.
|
||||
Can be useful for things that are purely cosmetic.
|
||||
*/
|
||||
readonly visible: Chalk;
|
||||
|
||||
readonly black: Chalk;
|
||||
readonly red: Chalk;
|
||||
readonly green: Chalk;
|
||||
readonly yellow: Chalk;
|
||||
readonly blue: Chalk;
|
||||
readonly magenta: Chalk;
|
||||
readonly cyan: Chalk;
|
||||
readonly white: Chalk;
|
||||
|
||||
/*
|
||||
Alias for `blackBright`.
|
||||
*/
|
||||
readonly gray: Chalk;
|
||||
|
||||
/*
|
||||
Alias for `blackBright`.
|
||||
*/
|
||||
readonly grey: Chalk;
|
||||
|
||||
readonly blackBright: Chalk;
|
||||
readonly redBright: Chalk;
|
||||
readonly greenBright: Chalk;
|
||||
readonly yellowBright: Chalk;
|
||||
readonly blueBright: Chalk;
|
||||
readonly magentaBright: Chalk;
|
||||
readonly cyanBright: Chalk;
|
||||
readonly whiteBright: Chalk;
|
||||
|
||||
readonly bgBlack: Chalk;
|
||||
readonly bgRed: Chalk;
|
||||
readonly bgGreen: Chalk;
|
||||
readonly bgYellow: Chalk;
|
||||
readonly bgBlue: Chalk;
|
||||
readonly bgMagenta: Chalk;
|
||||
readonly bgCyan: Chalk;
|
||||
readonly bgWhite: Chalk;
|
||||
|
||||
/*
|
||||
Alias for `bgBlackBright`.
|
||||
*/
|
||||
readonly bgGray: Chalk;
|
||||
|
||||
/*
|
||||
Alias for `bgBlackBright`.
|
||||
*/
|
||||
readonly bgGrey: Chalk;
|
||||
|
||||
readonly bgBlackBright: Chalk;
|
||||
readonly bgRedBright: Chalk;
|
||||
readonly bgGreenBright: Chalk;
|
||||
readonly bgYellowBright: Chalk;
|
||||
readonly bgBlueBright: Chalk;
|
||||
readonly bgMagentaBright: Chalk;
|
||||
readonly bgCyanBright: Chalk;
|
||||
readonly bgWhiteBright: Chalk;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Main Chalk object that allows to chain styles together.
|
||||
Call the last one as a method with a string argument.
|
||||
Order doesn't matter, and later styles take precedent in case of a conflict.
|
||||
This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
|
||||
*/
|
||||
declare const chalk: chalk.Chalk & chalk.ChalkFunction & {
|
||||
supportsColor: chalk.ColorSupport | false;
|
||||
Level: typeof LevelEnum;
|
||||
Color: Color;
|
||||
ForegroundColor: ForegroundColor;
|
||||
BackgroundColor: BackgroundColor;
|
||||
Modifiers: Modifiers;
|
||||
stderr: chalk.Chalk & {supportsColor: chalk.ColorSupport | false};
|
||||
};
|
||||
|
||||
export = chalk;
|
||||
9
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/license
generated
vendored
Normal file
9
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/license
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
63
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/package.json
generated
vendored
Normal file
63
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/package.json
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"name": "chalk",
|
||||
"version": "3.0.0",
|
||||
"description": "Terminal string styling done right",
|
||||
"license": "MIT",
|
||||
"repository": "chalk/chalk",
|
||||
"main": "source",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && nyc ava && tsd",
|
||||
"bench": "matcha benchmark.js"
|
||||
},
|
||||
"files": [
|
||||
"source",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"str",
|
||||
"ansi",
|
||||
"style",
|
||||
"styles",
|
||||
"tty",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"log",
|
||||
"logging",
|
||||
"command-line",
|
||||
"text"
|
||||
],
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^2.4.0",
|
||||
"coveralls": "^3.0.7",
|
||||
"execa": "^3.2.0",
|
||||
"import-fresh": "^3.1.0",
|
||||
"matcha": "^0.7.0",
|
||||
"nyc": "^14.1.1",
|
||||
"resolve-from": "^5.0.0",
|
||||
"tsd": "^0.7.4",
|
||||
"xo": "^0.25.3"
|
||||
},
|
||||
"xo": {
|
||||
"rules": {
|
||||
"unicorn/prefer-string-slice": "off",
|
||||
"unicorn/prefer-includes": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
304
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/readme.md
generated
vendored
Normal file
304
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/readme.md
generated
vendored
Normal file
@@ -0,0 +1,304 @@
|
||||
<h1 align="center">
|
||||
<br>
|
||||
<br>
|
||||
<img width="320" src="media/logo.svg" alt="Chalk">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</h1>
|
||||
|
||||
> Terminal string styling done right
|
||||
|
||||
[](https://travis-ci.org/chalk/chalk) [](https://coveralls.io/github/chalk/chalk?branch=master) [](https://www.npmjs.com/package/chalk?activeTab=dependents) [](https://www.npmjs.com/package/chalk) [](https://www.youtube.com/watch?v=9auOCbH5Ns4) [](https://github.com/xojs/xo) 
|
||||
|
||||
<img src="https://cdn.jsdelivr.net/gh/chalk/ansi-styles@8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900">
|
||||
|
||||
|
||||
## Highlights
|
||||
|
||||
- Expressive API
|
||||
- Highly performant
|
||||
- Ability to nest styles
|
||||
- [256/Truecolor color support](#256-and-truecolor-color-support)
|
||||
- Auto-detects color support
|
||||
- Doesn't extend `String.prototype`
|
||||
- Clean and focused
|
||||
- Actively maintained
|
||||
- [Used by ~46,000 packages](https://www.npmjs.com/browse/depended/chalk) as of October 1, 2019
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```console
|
||||
$ npm install chalk
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const chalk = require('chalk');
|
||||
|
||||
console.log(chalk.blue('Hello world!'));
|
||||
```
|
||||
|
||||
Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
|
||||
|
||||
```js
|
||||
const chalk = require('chalk');
|
||||
const log = console.log;
|
||||
|
||||
// Combine styled and normal strings
|
||||
log(chalk.blue('Hello') + ' World' + chalk.red('!'));
|
||||
|
||||
// Compose multiple styles using the chainable API
|
||||
log(chalk.blue.bgRed.bold('Hello world!'));
|
||||
|
||||
// Pass in multiple arguments
|
||||
log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'));
|
||||
|
||||
// Nest styles
|
||||
log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!'));
|
||||
|
||||
// Nest styles of the same type even (color, underline, background)
|
||||
log(chalk.green(
|
||||
'I am a green line ' +
|
||||
chalk.blue.underline.bold('with a blue substring') +
|
||||
' that becomes green again!'
|
||||
));
|
||||
|
||||
// ES2015 template literal
|
||||
log(`
|
||||
CPU: ${chalk.red('90%')}
|
||||
RAM: ${chalk.green('40%')}
|
||||
DISK: ${chalk.yellow('70%')}
|
||||
`);
|
||||
|
||||
// ES2015 tagged template literal
|
||||
log(chalk`
|
||||
CPU: {red ${cpu.totalPercent}%}
|
||||
RAM: {green ${ram.used / ram.total * 100}%}
|
||||
DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%}
|
||||
`);
|
||||
|
||||
// Use RGB colors in terminal emulators that support it.
|
||||
log(chalk.keyword('orange')('Yay for orange colored text!'));
|
||||
log(chalk.rgb(123, 45, 67).underline('Underlined reddish color'));
|
||||
log(chalk.hex('#DEADED').bold('Bold gray!'));
|
||||
```
|
||||
|
||||
Easily define your own themes:
|
||||
|
||||
```js
|
||||
const chalk = require('chalk');
|
||||
|
||||
const error = chalk.bold.red;
|
||||
const warning = chalk.keyword('orange');
|
||||
|
||||
console.log(error('Error!'));
|
||||
console.log(warning('Warning!'));
|
||||
```
|
||||
|
||||
Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args):
|
||||
|
||||
```js
|
||||
const name = 'Sindre';
|
||||
console.log(chalk.green('Hello %s'), name);
|
||||
//=> 'Hello Sindre'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### chalk.`<style>[.<style>...](string, [string...])`
|
||||
|
||||
Example: `chalk.red.bold.underline('Hello', 'world');`
|
||||
|
||||
Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
|
||||
|
||||
Multiple arguments will be separated by space.
|
||||
|
||||
### chalk.level
|
||||
|
||||
Specifies the level of color support.
|
||||
|
||||
Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers.
|
||||
|
||||
If you need to change this in a reusable module, create a new instance:
|
||||
|
||||
```js
|
||||
const ctx = new chalk.Instance({level: 0});
|
||||
```
|
||||
|
||||
| Level | Description |
|
||||
| :---: | :--- |
|
||||
| `0` | All colors disabled |
|
||||
| `1` | Basic color support (16 colors) |
|
||||
| `2` | 256 color support |
|
||||
| `3` | Truecolor support (16 million colors) |
|
||||
|
||||
### chalk.supportsColor
|
||||
|
||||
Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.
|
||||
|
||||
Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
|
||||
|
||||
Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
|
||||
|
||||
### chalk.stderr and chalk.stderr.supportsColor
|
||||
|
||||
`chalk.stderr` contains a separate instance configured with color support detected for `stderr` stream instead of `stdout`. Override rules from `chalk.supportsColor` apply to this too. `chalk.stderr.supportsColor` is exposed for convenience.
|
||||
|
||||
|
||||
## Styles
|
||||
|
||||
### Modifiers
|
||||
|
||||
- `reset` - Resets the current color chain.
|
||||
- `bold` - Make text bold.
|
||||
- `dim` - Emitting only a small amount of light.
|
||||
- `italic` - Make text italic. *(Not widely supported)*
|
||||
- `underline` - Make text underline. *(Not widely supported)*
|
||||
- `inverse`- Inverse background and foreground colors.
|
||||
- `hidden` - Prints the text, but makes it invisible.
|
||||
- `strikethrough` - Puts a horizontal line through the center of the text. *(Not widely supported)*
|
||||
- `visible`- Prints the text only when Chalk has a color level > 0. Can be useful for things that are purely cosmetic.
|
||||
|
||||
### Colors
|
||||
|
||||
- `black`
|
||||
- `red`
|
||||
- `green`
|
||||
- `yellow`
|
||||
- `blue`
|
||||
- `magenta`
|
||||
- `cyan`
|
||||
- `white`
|
||||
- `blackBright` (alias: `gray`, `grey`)
|
||||
- `redBright`
|
||||
- `greenBright`
|
||||
- `yellowBright`
|
||||
- `blueBright`
|
||||
- `magentaBright`
|
||||
- `cyanBright`
|
||||
- `whiteBright`
|
||||
|
||||
### Background colors
|
||||
|
||||
- `bgBlack`
|
||||
- `bgRed`
|
||||
- `bgGreen`
|
||||
- `bgYellow`
|
||||
- `bgBlue`
|
||||
- `bgMagenta`
|
||||
- `bgCyan`
|
||||
- `bgWhite`
|
||||
- `bgBlackBright` (alias: `bgGray`, `bgGrey`)
|
||||
- `bgRedBright`
|
||||
- `bgGreenBright`
|
||||
- `bgYellowBright`
|
||||
- `bgBlueBright`
|
||||
- `bgMagentaBright`
|
||||
- `bgCyanBright`
|
||||
- `bgWhiteBright`
|
||||
|
||||
|
||||
## Tagged template literal
|
||||
|
||||
Chalk can be used as a [tagged template literal](http://exploringjs.com/es6/ch_template-literals.html#_tagged-template-literals).
|
||||
|
||||
```js
|
||||
const chalk = require('chalk');
|
||||
|
||||
const miles = 18;
|
||||
const calculateFeet = miles => miles * 5280;
|
||||
|
||||
console.log(chalk`
|
||||
There are {bold 5280 feet} in a mile.
|
||||
In {bold ${miles} miles}, there are {green.bold ${calculateFeet(miles)} feet}.
|
||||
`);
|
||||
```
|
||||
|
||||
Blocks are delimited by an opening curly brace (`{`), a style, some content, and a closing curly brace (`}`).
|
||||
|
||||
Template styles are chained exactly like normal Chalk styles. The following two statements are equivalent:
|
||||
|
||||
```js
|
||||
console.log(chalk.bold.rgb(10, 100, 200)('Hello!'));
|
||||
console.log(chalk`{bold.rgb(10,100,200) Hello!}`);
|
||||
```
|
||||
|
||||
Note that function styles (`rgb()`, `hsl()`, `keyword()`, etc.) may not contain spaces between parameters.
|
||||
|
||||
All interpolated values (`` chalk`${foo}` ``) are converted to strings via the `.toString()` method. All curly braces (`{` and `}`) in interpolated value strings are escaped.
|
||||
|
||||
|
||||
## 256 and Truecolor color support
|
||||
|
||||
Chalk supports 256 colors and [Truecolor](https://gist.github.com/XVilka/8346728) (16 million colors) on supported terminal apps.
|
||||
|
||||
Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying `{level: n}` as a Chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red).
|
||||
|
||||
Examples:
|
||||
|
||||
- `chalk.hex('#DEADED').underline('Hello, world!')`
|
||||
- `chalk.keyword('orange')('Some orange text')`
|
||||
- `chalk.rgb(15, 100, 204).inverse('Hello!')`
|
||||
|
||||
Background versions of these models are prefixed with `bg` and the first level of the module capitalized (e.g. `keyword` for foreground colors and `bgKeyword` for background colors).
|
||||
|
||||
- `chalk.bgHex('#DEADED').underline('Hello, world!')`
|
||||
- `chalk.bgKeyword('orange')('Some orange text')`
|
||||
- `chalk.bgRgb(15, 100, 204).inverse('Hello!')`
|
||||
|
||||
The following color models can be used:
|
||||
|
||||
- [`rgb`](https://en.wikipedia.org/wiki/RGB_color_model) - Example: `chalk.rgb(255, 136, 0).bold('Orange!')`
|
||||
- [`hex`](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) - Example: `chalk.hex('#FF8800').bold('Orange!')`
|
||||
- [`keyword`](https://www.w3.org/wiki/CSS/Properties/color/keywords) (CSS keywords) - Example: `chalk.keyword('orange').bold('Orange!')`
|
||||
- [`hsl`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 100, 50).bold('Orange!')`
|
||||
- [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsv(32, 100, 100).bold('Orange!')`
|
||||
- [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hwb(32, 0, 50).bold('Orange!')`
|
||||
- [`ansi`](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) - Example: `chalk.ansi(31).bgAnsi(93)('red on yellowBright')`
|
||||
- [`ansi256`](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) - Example: `chalk.bgAnsi256(194)('Honeydew, more or less')`
|
||||
|
||||
|
||||
## Windows
|
||||
|
||||
If you're on Windows, do yourself a favor and use [Windows Terminal](https://github.com/microsoft/terminal) instead of `cmd.exe`.
|
||||
|
||||
|
||||
## Origin story
|
||||
|
||||
[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative.
|
||||
|
||||
|
||||
## chalk for enterprise
|
||||
|
||||
Available as part of the Tidelift Subscription.
|
||||
|
||||
The maintainers of chalk and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-chalk?utm_source=npm-chalk&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module
|
||||
- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal
|
||||
- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
|
||||
- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes
|
||||
- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Strip ANSI escape codes from a stream
|
||||
- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
|
||||
- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
|
||||
- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
|
||||
- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes
|
||||
- [color-convert](https://github.com/qix-/color-convert) - Converts colors between different models
|
||||
- [chalk-animation](https://github.com/bokub/chalk-animation) - Animate strings in the terminal
|
||||
- [gradient-string](https://github.com/bokub/gradient-string) - Apply color gradients to strings
|
||||
- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings
|
||||
- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
- [Sindre Sorhus](https://github.com/sindresorhus)
|
||||
- [Josh Junon](https://github.com/qix-)
|
||||
233
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/source/index.js
generated
vendored
Normal file
233
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/source/index.js
generated
vendored
Normal file
@@ -0,0 +1,233 @@
|
||||
'use strict';
|
||||
const ansiStyles = require('ansi-styles');
|
||||
const {stdout: stdoutColor, stderr: stderrColor} = require('supports-color');
|
||||
const {
|
||||
stringReplaceAll,
|
||||
stringEncaseCRLFWithFirstIndex
|
||||
} = require('./util');
|
||||
|
||||
// `supportsColor.level` → `ansiStyles.color[name]` mapping
|
||||
const levelMapping = [
|
||||
'ansi',
|
||||
'ansi',
|
||||
'ansi256',
|
||||
'ansi16m'
|
||||
];
|
||||
|
||||
const styles = Object.create(null);
|
||||
|
||||
const applyOptions = (object, options = {}) => {
|
||||
if (options.level > 3 || options.level < 0) {
|
||||
throw new Error('The `level` option should be an integer from 0 to 3');
|
||||
}
|
||||
|
||||
// Detect level if not set manually
|
||||
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
||||
object.level = options.level === undefined ? colorLevel : options.level;
|
||||
};
|
||||
|
||||
class ChalkClass {
|
||||
constructor(options) {
|
||||
return chalkFactory(options);
|
||||
}
|
||||
}
|
||||
|
||||
const chalkFactory = options => {
|
||||
const chalk = {};
|
||||
applyOptions(chalk, options);
|
||||
|
||||
chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);
|
||||
|
||||
Object.setPrototypeOf(chalk, Chalk.prototype);
|
||||
Object.setPrototypeOf(chalk.template, chalk);
|
||||
|
||||
chalk.template.constructor = () => {
|
||||
throw new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');
|
||||
};
|
||||
|
||||
chalk.template.Instance = ChalkClass;
|
||||
|
||||
return chalk.template;
|
||||
};
|
||||
|
||||
function Chalk(options) {
|
||||
return chalkFactory(options);
|
||||
}
|
||||
|
||||
for (const [styleName, style] of Object.entries(ansiStyles)) {
|
||||
styles[styleName] = {
|
||||
get() {
|
||||
const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
|
||||
Object.defineProperty(this, styleName, {value: builder});
|
||||
return builder;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
styles.visible = {
|
||||
get() {
|
||||
const builder = createBuilder(this, this._styler, true);
|
||||
Object.defineProperty(this, 'visible', {value: builder});
|
||||
return builder;
|
||||
}
|
||||
};
|
||||
|
||||
const usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256'];
|
||||
|
||||
for (const model of usedModels) {
|
||||
styles[model] = {
|
||||
get() {
|
||||
const {level} = this;
|
||||
return function (...arguments_) {
|
||||
const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
|
||||
return createBuilder(this, styler, this._isEmpty);
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
for (const model of usedModels) {
|
||||
const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
|
||||
styles[bgModel] = {
|
||||
get() {
|
||||
const {level} = this;
|
||||
return function (...arguments_) {
|
||||
const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
|
||||
return createBuilder(this, styler, this._isEmpty);
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const proto = Object.defineProperties(() => {}, {
|
||||
...styles,
|
||||
level: {
|
||||
enumerable: true,
|
||||
get() {
|
||||
return this._generator.level;
|
||||
},
|
||||
set(level) {
|
||||
this._generator.level = level;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const createStyler = (open, close, parent) => {
|
||||
let openAll;
|
||||
let closeAll;
|
||||
if (parent === undefined) {
|
||||
openAll = open;
|
||||
closeAll = close;
|
||||
} else {
|
||||
openAll = parent.openAll + open;
|
||||
closeAll = close + parent.closeAll;
|
||||
}
|
||||
|
||||
return {
|
||||
open,
|
||||
close,
|
||||
openAll,
|
||||
closeAll,
|
||||
parent
|
||||
};
|
||||
};
|
||||
|
||||
const createBuilder = (self, _styler, _isEmpty) => {
|
||||
const builder = (...arguments_) => {
|
||||
// Single argument is hot path, implicit coercion is faster than anything
|
||||
// eslint-disable-next-line no-implicit-coercion
|
||||
return applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));
|
||||
};
|
||||
|
||||
// `__proto__` is used because we must return a function, but there is
|
||||
// no way to create a function with a different prototype
|
||||
builder.__proto__ = proto; // eslint-disable-line no-proto
|
||||
|
||||
builder._generator = self;
|
||||
builder._styler = _styler;
|
||||
builder._isEmpty = _isEmpty;
|
||||
|
||||
return builder;
|
||||
};
|
||||
|
||||
const applyStyle = (self, string) => {
|
||||
if (self.level <= 0 || !string) {
|
||||
return self._isEmpty ? '' : string;
|
||||
}
|
||||
|
||||
let styler = self._styler;
|
||||
|
||||
if (styler === undefined) {
|
||||
return string;
|
||||
}
|
||||
|
||||
const {openAll, closeAll} = styler;
|
||||
if (string.indexOf('\u001B') !== -1) {
|
||||
while (styler !== undefined) {
|
||||
// Replace any instances already present with a re-opening code
|
||||
// otherwise only the part of the string until said closing code
|
||||
// will be colored, and the rest will simply be 'plain'.
|
||||
string = stringReplaceAll(string, styler.close, styler.open);
|
||||
|
||||
styler = styler.parent;
|
||||
}
|
||||
}
|
||||
|
||||
// We can move both next actions out of loop, because remaining actions in loop won't have
|
||||
// any/visible effect on parts we add here. Close the styling before a linebreak and reopen
|
||||
// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
|
||||
const lfIndex = string.indexOf('\n');
|
||||
if (lfIndex !== -1) {
|
||||
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
||||
}
|
||||
|
||||
return openAll + string + closeAll;
|
||||
};
|
||||
|
||||
let template;
|
||||
const chalkTag = (chalk, ...strings) => {
|
||||
const [firstString] = strings;
|
||||
|
||||
if (!Array.isArray(firstString)) {
|
||||
// If chalk() was called by itself or with a string,
|
||||
// return the string itself as a string.
|
||||
return strings.join(' ');
|
||||
}
|
||||
|
||||
const arguments_ = strings.slice(1);
|
||||
const parts = [firstString.raw[0]];
|
||||
|
||||
for (let i = 1; i < firstString.length; i++) {
|
||||
parts.push(
|
||||
String(arguments_[i - 1]).replace(/[{}\\]/g, '\\$&'),
|
||||
String(firstString.raw[i])
|
||||
);
|
||||
}
|
||||
|
||||
if (template === undefined) {
|
||||
template = require('./templates');
|
||||
}
|
||||
|
||||
return template(chalk, parts.join(''));
|
||||
};
|
||||
|
||||
Object.defineProperties(Chalk.prototype, styles);
|
||||
|
||||
const chalk = Chalk(); // eslint-disable-line new-cap
|
||||
chalk.supportsColor = stdoutColor;
|
||||
chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap
|
||||
chalk.stderr.supportsColor = stderrColor;
|
||||
|
||||
// For TypeScript
|
||||
chalk.Level = {
|
||||
None: 0,
|
||||
Basic: 1,
|
||||
Ansi256: 2,
|
||||
TrueColor: 3,
|
||||
0: 'None',
|
||||
1: 'Basic',
|
||||
2: 'Ansi256',
|
||||
3: 'TrueColor'
|
||||
};
|
||||
|
||||
module.exports = chalk;
|
||||
134
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/source/templates.js
generated
vendored
Normal file
134
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/source/templates.js
generated
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
'use strict';
|
||||
const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
||||
const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
||||
const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
||||
const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi;
|
||||
|
||||
const ESCAPES = new Map([
|
||||
['n', '\n'],
|
||||
['r', '\r'],
|
||||
['t', '\t'],
|
||||
['b', '\b'],
|
||||
['f', '\f'],
|
||||
['v', '\v'],
|
||||
['0', '\0'],
|
||||
['\\', '\\'],
|
||||
['e', '\u001B'],
|
||||
['a', '\u0007']
|
||||
]);
|
||||
|
||||
function unescape(c) {
|
||||
const u = c[0] === 'u';
|
||||
const bracket = c[1] === '{';
|
||||
|
||||
if ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) {
|
||||
return String.fromCharCode(parseInt(c.slice(1), 16));
|
||||
}
|
||||
|
||||
if (u && bracket) {
|
||||
return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
|
||||
}
|
||||
|
||||
return ESCAPES.get(c) || c;
|
||||
}
|
||||
|
||||
function parseArguments(name, arguments_) {
|
||||
const results = [];
|
||||
const chunks = arguments_.trim().split(/\s*,\s*/g);
|
||||
let matches;
|
||||
|
||||
for (const chunk of chunks) {
|
||||
const number = Number(chunk);
|
||||
if (!Number.isNaN(number)) {
|
||||
results.push(number);
|
||||
} else if ((matches = chunk.match(STRING_REGEX))) {
|
||||
results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
|
||||
} else {
|
||||
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
function parseStyle(style) {
|
||||
STYLE_REGEX.lastIndex = 0;
|
||||
|
||||
const results = [];
|
||||
let matches;
|
||||
|
||||
while ((matches = STYLE_REGEX.exec(style)) !== null) {
|
||||
const name = matches[1];
|
||||
|
||||
if (matches[2]) {
|
||||
const args = parseArguments(name, matches[2]);
|
||||
results.push([name].concat(args));
|
||||
} else {
|
||||
results.push([name]);
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
function buildStyle(chalk, styles) {
|
||||
const enabled = {};
|
||||
|
||||
for (const layer of styles) {
|
||||
for (const style of layer.styles) {
|
||||
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
||||
}
|
||||
}
|
||||
|
||||
let current = chalk;
|
||||
for (const [styleName, styles] of Object.entries(enabled)) {
|
||||
if (!Array.isArray(styles)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!(styleName in current)) {
|
||||
throw new Error(`Unknown Chalk style: ${styleName}`);
|
||||
}
|
||||
|
||||
current = styles.length > 0 ? current[styleName](...styles) : current[styleName];
|
||||
}
|
||||
|
||||
return current;
|
||||
}
|
||||
|
||||
module.exports = (chalk, temporary) => {
|
||||
const styles = [];
|
||||
const chunks = [];
|
||||
let chunk = [];
|
||||
|
||||
// eslint-disable-next-line max-params
|
||||
temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
|
||||
if (escapeCharacter) {
|
||||
chunk.push(unescape(escapeCharacter));
|
||||
} else if (style) {
|
||||
const string = chunk.join('');
|
||||
chunk = [];
|
||||
chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
|
||||
styles.push({inverse, styles: parseStyle(style)});
|
||||
} else if (close) {
|
||||
if (styles.length === 0) {
|
||||
throw new Error('Found extraneous } in Chalk template literal');
|
||||
}
|
||||
|
||||
chunks.push(buildStyle(chalk, styles)(chunk.join('')));
|
||||
chunk = [];
|
||||
styles.pop();
|
||||
} else {
|
||||
chunk.push(character);
|
||||
}
|
||||
});
|
||||
|
||||
chunks.push(chunk.join(''));
|
||||
|
||||
if (styles.length > 0) {
|
||||
const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
|
||||
throw new Error(errMsg);
|
||||
}
|
||||
|
||||
return chunks.join('');
|
||||
};
|
||||
39
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/source/util.js
generated
vendored
Normal file
39
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/source/util.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
|
||||
const stringReplaceAll = (string, substring, replacer) => {
|
||||
let index = string.indexOf(substring);
|
||||
if (index === -1) {
|
||||
return string;
|
||||
}
|
||||
|
||||
const substringLength = substring.length;
|
||||
let endIndex = 0;
|
||||
let returnValue = '';
|
||||
do {
|
||||
returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
|
||||
endIndex = index + substringLength;
|
||||
index = string.indexOf(substring, endIndex);
|
||||
} while (index !== -1);
|
||||
|
||||
returnValue += string.substr(endIndex);
|
||||
return returnValue;
|
||||
};
|
||||
|
||||
const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
|
||||
let endIndex = 0;
|
||||
let returnValue = '';
|
||||
do {
|
||||
const gotCR = string[index - 1] === '\r';
|
||||
returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
|
||||
endIndex = index + 1;
|
||||
index = string.indexOf('\n', endIndex);
|
||||
} while (index !== -1);
|
||||
|
||||
returnValue += string.substr(endIndex);
|
||||
return returnValue;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
stringReplaceAll,
|
||||
stringEncaseCRLFWithFirstIndex
|
||||
};
|
||||
21
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/LICENSE.md
generated
vendored
Normal file
21
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Sebastian Silbermann
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
220
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/README.md
generated
vendored
Normal file
220
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/README.md
generated
vendored
Normal file
@@ -0,0 +1,220 @@
|
||||
# dom-accessibility-api
|
||||
|
||||
[](https://badge.fury.io/js/dom-accessibility-api)
|
||||
[](https://dev.azure.com/silbermannsebastian/dom-accessibility-api/_build/latest?definitionId=6&branchName=main)
|
||||

|
||||
|
||||
Computes the accessible name or description of a given DOM Element.
|
||||
https://w3c.github.io/accname/ implemented in JavaScript for testing.
|
||||
|
||||
```bash
|
||||
$ yarn add dom-accessibility-api
|
||||
```
|
||||
|
||||
```js
|
||||
import {
|
||||
computeAccessibleName,
|
||||
computeAccessibleDescription,
|
||||
} from "dom-accessibility-api";
|
||||
```
|
||||
|
||||
I'm not an editor of any of the referenced specs (nor very experience with using them) so if you got any insights, something catches
|
||||
your eye please open an issue.
|
||||
|
||||
## Supported environments
|
||||
|
||||
**WARNING**: Only [active node versions](https://nodejs.org/en/about/releases/) are supported.
|
||||
Inactive node versions can stop working in a SemVer MINOR release.
|
||||
|
||||
```bash
|
||||
ie 11
|
||||
edge >= 14
|
||||
firefox >= 52
|
||||
chrome >= 49
|
||||
safari >= 10
|
||||
node 10.0
|
||||
```
|
||||
|
||||
## progress
|
||||
|
||||
Using https://github.com/web-platform-tests/wpt. Be sure to init submodules when
|
||||
cloning. See [the test readme](/tests/README.md) for more info about the test setup.
|
||||
|
||||
### browser (Chrome)
|
||||
|
||||
153/159
|
||||
|
||||
### jsdom
|
||||
|
||||
<details>
|
||||
<summary>report 138/159 passing of which 15 are due `::before { content }`, one might be a wrong test, 5 are pathological </summary>
|
||||
|
||||
```bash
|
||||
web-platform-tests
|
||||
accname
|
||||
✓ [expected fail] description_1.0_combobox-focusable-manual.html
|
||||
✓ [expected fail] description_from_content_of_describedby_element-manual.html
|
||||
✓ description_link-with-label-manual.html
|
||||
✓ description_test_case_557-manual.html
|
||||
✓ description_test_case_664-manual.html
|
||||
✓ description_test_case_665-manual.html
|
||||
✓ description_test_case_666-manual.html
|
||||
✓ description_test_case_772-manual.html
|
||||
✓ description_test_case_773-manual.html
|
||||
✓ description_test_case_774-manual.html
|
||||
✓ description_test_case_838-manual.html
|
||||
✓ description_test_case_broken_reference-manual.html
|
||||
✓ description_test_case_one_valid_reference-manual.html
|
||||
✓ description_title-same-element-manual.html
|
||||
✓ name_1.0_combobox-focusable-alternative-manual.html
|
||||
✓ name_1.0_combobox-focusable-manual.html
|
||||
✓ name_checkbox-label-embedded-combobox-manual.html
|
||||
✓ name_checkbox-label-embedded-listbox-manual.html
|
||||
✓ name_checkbox-label-embedded-menu-manual.html
|
||||
✓ name_checkbox-label-embedded-select-manual.html
|
||||
✓ name_checkbox-label-embedded-slider-manual.html
|
||||
✓ name_checkbox-label-embedded-spinbutton-manual.html
|
||||
✓ name_checkbox-label-embedded-textbox-manual.html
|
||||
✓ name_checkbox-label-multiple-label-alternative-manual.html
|
||||
✓ name_checkbox-label-multiple-label-manual.html
|
||||
✓ name_checkbox-title-manual.html
|
||||
✓ name_file-label-embedded-combobox-manual.html
|
||||
✓ name_file-label-embedded-menu-manual.html
|
||||
✓ name_file-label-embedded-select-manual.html
|
||||
✓ name_file-label-embedded-slider-manual.html
|
||||
✓ name_file-label-embedded-spinbutton-manual.html
|
||||
✓ [expected fail] name_file-label-inline-block-elements-manual.html
|
||||
✓ [expected fail] name_file-label-inline-block-styles-manual.html
|
||||
✓ name_file-label-inline-hidden-elements-manual.html
|
||||
✓ name_file-label-owned-combobox-manual.html
|
||||
✓ name_file-label-owned-combobox-owned-listbox-manual.html
|
||||
✓ name_file-title-manual.html
|
||||
✓ name_from_content-manual.html
|
||||
✓ name_from_content_of_label-manual.html
|
||||
✓ name_from_content_of_labelledby_element-manual.html
|
||||
✓ name_from_content_of_labelledby_elements_one_of_which_is_hidden-manual.html
|
||||
✓ name_heading-combobox-focusable-alternative-manual.html
|
||||
✓ name_image-title-manual.html
|
||||
✓ name_link-mixed-content-manual.html
|
||||
✓ name_link-with-label-manual.html
|
||||
✓ name_password-label-embedded-combobox-manual.html
|
||||
✓ name_password-label-embedded-menu-manual.html
|
||||
✓ name_password-label-embedded-select-manual.html
|
||||
✓ name_password-label-embedded-slider-manual.html
|
||||
✓ name_password-label-embedded-spinbutton-manual.html
|
||||
✓ name_password-title-manual.html
|
||||
✓ name_radio-label-embedded-combobox-manual.html
|
||||
✓ name_radio-label-embedded-menu-manual.html
|
||||
✓ name_radio-label-embedded-select-manual.html
|
||||
✓ name_radio-label-embedded-slider-manual.html
|
||||
✓ name_radio-label-embedded-spinbutton-manual.html
|
||||
✓ name_radio-title-manual.html
|
||||
✓ name_test_case_539-manual.html
|
||||
✓ name_test_case_540-manual.html
|
||||
✓ name_test_case_541-manual.html
|
||||
✓ name_test_case_543-manual.html
|
||||
✓ name_test_case_544-manual.html
|
||||
✓ name_test_case_545-manual.html
|
||||
✓ name_test_case_546-manual.html
|
||||
✓ name_test_case_547-manual.html
|
||||
✓ name_test_case_548-manual.html
|
||||
✓ name_test_case_549-manual.html
|
||||
✓ name_test_case_550-manual.html
|
||||
✓ name_test_case_551-manual.html
|
||||
✓ [expected fail] name_test_case_552-manual.html
|
||||
✓ [expected fail] name_test_case_553-manual.html
|
||||
✓ name_test_case_556-manual.html
|
||||
✓ name_test_case_557-manual.html
|
||||
✓ name_test_case_558-manual.html
|
||||
✓ name_test_case_559-manual.html
|
||||
✓ name_test_case_560-manual.html
|
||||
✓ name_test_case_561-manual.html
|
||||
✓ name_test_case_562-manual.html
|
||||
✓ name_test_case_563-manual.html
|
||||
✓ name_test_case_564-manual.html
|
||||
✓ name_test_case_565-manual.html
|
||||
✓ name_test_case_566-manual.html
|
||||
✓ name_test_case_596-manual.html
|
||||
✓ name_test_case_597-manual.html
|
||||
✓ name_test_case_598-manual.html
|
||||
✓ name_test_case_599-manual.html
|
||||
✓ name_test_case_600-manual.html
|
||||
✓ name_test_case_601-manual.html
|
||||
✓ name_test_case_602-manual.html
|
||||
✓ name_test_case_603-manual.html
|
||||
✓ name_test_case_604-manual.html
|
||||
✓ name_test_case_605-manual.html
|
||||
✓ name_test_case_606-manual.html
|
||||
✓ name_test_case_607-manual.html
|
||||
✓ name_test_case_608-manual.html
|
||||
✓ name_test_case_609-manual.html
|
||||
✓ name_test_case_610-manual.html
|
||||
✓ name_test_case_611-manual.html
|
||||
✓ name_test_case_612-manual.html
|
||||
✓ name_test_case_613-manual.html
|
||||
✓ name_test_case_614-manual.html
|
||||
✓ name_test_case_615-manual.html
|
||||
✓ name_test_case_616-manual.html
|
||||
✓ name_test_case_617-manual.html
|
||||
✓ name_test_case_618-manual.html
|
||||
✓ name_test_case_619-manual.html
|
||||
✓ name_test_case_620-manual.html
|
||||
✓ name_test_case_621-manual.html
|
||||
✓ [expected fail] name_test_case_659-manual.html
|
||||
✓ [expected fail] name_test_case_660-manual.html
|
||||
✓ [expected fail] name_test_case_661-manual.html
|
||||
✓ [expected fail] name_test_case_662-manual.html
|
||||
✓ [expected fail] name_test_case_663a-manual.html
|
||||
✓ name_test_case_721-manual.html
|
||||
✓ name_test_case_723-manual.html
|
||||
✓ name_test_case_724-manual.html
|
||||
✓ name_test_case_725-manual.html
|
||||
✓ name_test_case_726-manual.html
|
||||
✓ name_test_case_727-manual.html
|
||||
✓ name_test_case_728-manual.html
|
||||
✓ name_test_case_729-manual.html
|
||||
✓ name_test_case_730-manual.html
|
||||
✓ name_test_case_731-manual.html
|
||||
✓ name_test_case_733-manual.html
|
||||
✓ name_test_case_734-manual.html
|
||||
✓ name_test_case_735-manual.html
|
||||
✓ name_test_case_736-manual.html
|
||||
✓ name_test_case_737-manual.html
|
||||
✓ name_test_case_738-manual.html
|
||||
✓ name_test_case_739-manual.html
|
||||
✓ name_test_case_740-manual.html
|
||||
✓ name_test_case_741-manual.html
|
||||
✓ name_test_case_742-manual.html
|
||||
✓ name_test_case_743-manual.html
|
||||
✓ name_test_case_744-manual.html
|
||||
✓ name_test_case_745-manual.html
|
||||
✓ name_test_case_746-manual.html
|
||||
✓ name_test_case_747-manual.html
|
||||
✓ name_test_case_748-manual.html
|
||||
✓ name_test_case_749-manual.html
|
||||
✓ name_test_case_750-manual.html
|
||||
✓ name_test_case_751-manual.html
|
||||
✓ name_test_case_752-manual.html
|
||||
✓ [expected fail] name_test_case_753-manual.html
|
||||
✓ [expected fail] name_test_case_754-manual.html
|
||||
✓ [expected fail] name_test_case_755-manual.html
|
||||
✓ [expected fail] name_test_case_756-manual.html
|
||||
✓ [expected fail] name_test_case_757-manual.html
|
||||
✓ [expected fail] name_test_case_758-manual.html
|
||||
✓ [expected fail] name_test_case_759-manual.html
|
||||
✓ [expected fail] name_test_case_760-manual.html
|
||||
✓ [expected fail] name_test_case_761-manual.html
|
||||
✓ [expected fail] name_test_case_762-manual.html
|
||||
✓ name_text-label-embedded-combobox-manual.html
|
||||
✓ name_text-label-embedded-menu-manual.html
|
||||
✓ name_text-label-embedded-select-manual.html
|
||||
✓ name_text-label-embedded-slider-manual.html
|
||||
✓ name_text-label-embedded-spinbutton-manual.html
|
||||
✓ name_text-title-manual.html
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## missing
|
||||
|
||||
- visibility context (inherited but can reappear; currently reappearing wont't work)
|
||||
8
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.d.ts
generated
vendored
Normal file
8
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { ComputeTextAlternativeOptions } from "./accessible-name-and-description";
|
||||
/**
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
export declare function computeAccessibleDescription(root: Element, options?: ComputeTextAlternativeOptions): string;
|
||||
//# sourceMappingURL=accessible-description.d.ts.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.d.ts.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"accessible-description.d.ts","sourceRoot":"","sources":["../sources/accessible-description.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,6BAA6B,EAC7B,MAAM,mCAAmC,CAAC;AAG3C;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC3C,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,6BAAkC,GACzC,MAAM,CA6BR"}
|
||||
45
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.js
generated
vendored
Normal file
45
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.computeAccessibleDescription = computeAccessibleDescription;
|
||||
var _accessibleNameAndDescription = require("./accessible-name-and-description");
|
||||
var _util = require("./util");
|
||||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
||||
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
||||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
/**
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
function computeAccessibleDescription(root) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var description = (0, _util.queryIdRefs)(root, "aria-describedby").map(function (element) {
|
||||
return (0, _accessibleNameAndDescription.computeTextAlternative)(element, _objectSpread(_objectSpread({}, options), {}, {
|
||||
compute: "description"
|
||||
}));
|
||||
}).join(" ");
|
||||
|
||||
// TODO: Technically we need to make sure that node wasn't used for the accessible name
|
||||
// This causes `description_1.0_combobox-focusable-manual` to fail
|
||||
|
||||
// https://w3c.github.io/aria/#aria-description
|
||||
// mentions that aria-description should only be calculated if aria-describedby didn't provide
|
||||
// a description
|
||||
if (description === "") {
|
||||
var ariaDescription = root.getAttribute("aria-description");
|
||||
description = ariaDescription === null ? "" : ariaDescription;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/html-aam-1.0/#accessible-name-and-description-computation
|
||||
// says for so many elements to use the `title` that we assume all elements are considered
|
||||
if (description === "") {
|
||||
var title = root.getAttribute("title");
|
||||
description = title === null ? "" : title;
|
||||
}
|
||||
return description;
|
||||
}
|
||||
//# sourceMappingURL=accessible-description.js.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"accessible-description.js","names":["_accessibleNameAndDescription","require","_util","_typeof","o","Symbol","iterator","constructor","prototype","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","key","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","call","TypeError","Number","computeAccessibleDescription","root","options","description","queryIdRefs","map","element","computeTextAlternative","compute","join","ariaDescription","getAttribute","title"],"sources":["../sources/accessible-description.ts"],"sourcesContent":["import {\n\tcomputeTextAlternative,\n\tComputeTextAlternativeOptions,\n} from \"./accessible-name-and-description\";\nimport { queryIdRefs } from \"./util\";\n\n/**\n * @param root\n * @param options\n * @returns\n */\nexport function computeAccessibleDescription(\n\troot: Element,\n\toptions: ComputeTextAlternativeOptions = {},\n): string {\n\tlet description = queryIdRefs(root, \"aria-describedby\")\n\t\t.map((element) => {\n\t\t\treturn computeTextAlternative(element, {\n\t\t\t\t...options,\n\t\t\t\tcompute: \"description\",\n\t\t\t});\n\t\t})\n\t\t.join(\" \");\n\n\t// TODO: Technically we need to make sure that node wasn't used for the accessible name\n\t// This causes `description_1.0_combobox-focusable-manual` to fail\n\n\t// https://w3c.github.io/aria/#aria-description\n\t// mentions that aria-description should only be calculated if aria-describedby didn't provide\n\t// a description\n\tif (description === \"\") {\n\t\tconst ariaDescription = root.getAttribute(\"aria-description\");\n\t\tdescription = ariaDescription === null ? \"\" : ariaDescription;\n\t}\n\n\t// https://www.w3.org/TR/html-aam-1.0/#accessible-name-and-description-computation\n\t// says for so many elements to use the `title` that we assume all elements are considered\n\tif (description === \"\") {\n\t\tconst title = root.getAttribute(\"title\");\n\t\tdescription = title === null ? \"\" : title;\n\t}\n\n\treturn description;\n}\n"],"mappings":";;;;AAAA,IAAAA,6BAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AAAqC,SAAAE,QAAAC,CAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,CAAA,kBAAAA,CAAA,gBAAAA,CAAA,WAAAA,CAAA,yBAAAC,MAAA,IAAAD,CAAA,CAAAG,WAAA,KAAAF,MAAA,IAAAD,CAAA,KAAAC,MAAA,CAAAG,SAAA,qBAAAJ,CAAA,KAAAD,OAAA,CAAAC,CAAA;AAAA,SAAAK,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAX,CAAA,GAAAS,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAP,CAAA,GAAAA,CAAA,CAAAY,MAAA,WAAAL,CAAA,WAAAE,MAAA,CAAAI,wBAAA,CAAAP,CAAA,EAAAC,CAAA,EAAAO,UAAA,OAAAN,CAAA,CAAAO,IAAA,CAAAC,KAAA,CAAAR,CAAA,EAAAR,CAAA,YAAAQ,CAAA;AAAA,SAAAS,cAAAX,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAW,SAAA,CAAAC,MAAA,EAAAZ,CAAA,UAAAC,CAAA,WAAAU,SAAA,CAAAX,CAAA,IAAAW,SAAA,CAAAX,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAY,OAAA,WAAAb,CAAA,IAAAc,eAAA,CAAAf,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAE,MAAA,CAAAa,yBAAA,GAAAb,MAAA,CAAAc,gBAAA,CAAAjB,CAAA,EAAAG,MAAA,CAAAa,yBAAA,CAAAd,CAAA,KAAAH,OAAA,CAAAI,MAAA,CAAAD,CAAA,GAAAY,OAAA,WAAAb,CAAA,IAAAE,MAAA,CAAAe,cAAA,CAAAlB,CAAA,EAAAC,CAAA,EAAAE,MAAA,CAAAI,wBAAA,CAAAL,CAAA,EAAAD,CAAA,iBAAAD,CAAA;AAAA,SAAAe,gBAAAI,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAhB,MAAA,CAAAe,cAAA,CAAAC,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAb,UAAA,QAAAe,YAAA,QAAAC,QAAA,oBAAAL,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAG,GAAA,QAAAL,GAAA,GAAAM,YAAA,CAAAD,GAAA,oBAAAhC,OAAA,CAAA2B,GAAA,iBAAAA,GAAA,GAAAO,MAAA,CAAAP,GAAA;AAAA,SAAAM,aAAAE,KAAA,EAAAC,IAAA,QAAApC,OAAA,CAAAmC,KAAA,kBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IAAA,GAAAF,KAAA,CAAAjC,MAAA,CAAAoC,WAAA,OAAAD,IAAA,KAAAE,SAAA,QAAAC,GAAA,GAAAH,IAAA,CAAAI,IAAA,CAAAN,KAAA,EAAAC,IAAA,oBAAApC,OAAA,CAAAwC,GAAA,uBAAAA,GAAA,YAAAE,SAAA,4DAAAN,IAAA,gBAAAF,MAAA,GAAAS,MAAA,EAAAR,KAAA;AAErC;AACA;AACA;AACA;AACA;AACO,SAASS,4BAA4BA,CAC3CC,IAAa,EAEJ;EAAA,IADTC,OAAsC,GAAA3B,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAoB,SAAA,GAAApB,SAAA,MAAG,CAAC,CAAC;EAE3C,IAAI4B,WAAW,GAAG,IAAAC,iBAAW,EAACH,IAAI,EAAE,kBAAkB,CAAC,CACrDI,GAAG,CAAC,UAACC,OAAO,EAAK;IACjB,OAAO,IAAAC,oDAAsB,EAACD,OAAO,EAAAhC,aAAA,CAAAA,aAAA,KACjC4B,OAAO;MACVM,OAAO,EAAE;IAAa,EACtB,CAAC;EACH,CAAC,CAAC,CACDC,IAAI,CAAC,GAAG,CAAC;;EAEX;EACA;;EAEA;EACA;EACA;EACA,IAAIN,WAAW,KAAK,EAAE,EAAE;IACvB,IAAMO,eAAe,GAAGT,IAAI,CAACU,YAAY,CAAC,kBAAkB,CAAC;IAC7DR,WAAW,GAAGO,eAAe,KAAK,IAAI,GAAG,EAAE,GAAGA,eAAe;EAC9D;;EAEA;EACA;EACA,IAAIP,WAAW,KAAK,EAAE,EAAE;IACvB,IAAMS,KAAK,GAAGX,IAAI,CAACU,YAAY,CAAC,OAAO,CAAC;IACxCR,WAAW,GAAGS,KAAK,KAAK,IAAI,GAAG,EAAE,GAAGA,KAAK;EAC1C;EAEA,OAAOT,WAAW;AACnB"}
|
||||
42
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.mjs
generated
vendored
Normal file
42
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.mjs
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
||||
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
||||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
import { computeTextAlternative } from "./accessible-name-and-description.mjs";
|
||||
import { queryIdRefs } from "./util.mjs";
|
||||
|
||||
/**
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
export function computeAccessibleDescription(root) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var description = queryIdRefs(root, "aria-describedby").map(function (element) {
|
||||
return computeTextAlternative(element, _objectSpread(_objectSpread({}, options), {}, {
|
||||
compute: "description"
|
||||
}));
|
||||
}).join(" ");
|
||||
|
||||
// TODO: Technically we need to make sure that node wasn't used for the accessible name
|
||||
// This causes `description_1.0_combobox-focusable-manual` to fail
|
||||
|
||||
// https://w3c.github.io/aria/#aria-description
|
||||
// mentions that aria-description should only be calculated if aria-describedby didn't provide
|
||||
// a description
|
||||
if (description === "") {
|
||||
var ariaDescription = root.getAttribute("aria-description");
|
||||
description = ariaDescription === null ? "" : ariaDescription;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/html-aam-1.0/#accessible-name-and-description-computation
|
||||
// says for so many elements to use the `title` that we assume all elements are considered
|
||||
if (description === "") {
|
||||
var title = root.getAttribute("title");
|
||||
description = title === null ? "" : title;
|
||||
}
|
||||
return description;
|
||||
}
|
||||
//# sourceMappingURL=accessible-description.mjs.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"accessible-description.mjs","names":["computeTextAlternative","queryIdRefs","computeAccessibleDescription","root","options","arguments","length","undefined","description","map","element","_objectSpread","compute","join","ariaDescription","getAttribute","title"],"sources":["../sources/accessible-description.ts"],"sourcesContent":["import {\n\tcomputeTextAlternative,\n\tComputeTextAlternativeOptions,\n} from \"./accessible-name-and-description\";\nimport { queryIdRefs } from \"./util\";\n\n/**\n * @param root\n * @param options\n * @returns\n */\nexport function computeAccessibleDescription(\n\troot: Element,\n\toptions: ComputeTextAlternativeOptions = {},\n): string {\n\tlet description = queryIdRefs(root, \"aria-describedby\")\n\t\t.map((element) => {\n\t\t\treturn computeTextAlternative(element, {\n\t\t\t\t...options,\n\t\t\t\tcompute: \"description\",\n\t\t\t});\n\t\t})\n\t\t.join(\" \");\n\n\t// TODO: Technically we need to make sure that node wasn't used for the accessible name\n\t// This causes `description_1.0_combobox-focusable-manual` to fail\n\n\t// https://w3c.github.io/aria/#aria-description\n\t// mentions that aria-description should only be calculated if aria-describedby didn't provide\n\t// a description\n\tif (description === \"\") {\n\t\tconst ariaDescription = root.getAttribute(\"aria-description\");\n\t\tdescription = ariaDescription === null ? \"\" : ariaDescription;\n\t}\n\n\t// https://www.w3.org/TR/html-aam-1.0/#accessible-name-and-description-computation\n\t// says for so many elements to use the `title` that we assume all elements are considered\n\tif (description === \"\") {\n\t\tconst title = root.getAttribute(\"title\");\n\t\tdescription = title === null ? \"\" : title;\n\t}\n\n\treturn description;\n}\n"],"mappings":";;;;;;AAAA,SACCA,sBAAsB,QAEhB,uCAAmC;AAC1C,SAASC,WAAW,QAAQ,YAAQ;;AAEpC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,4BAA4BA,CAC3CC,IAAa,EAEJ;EAAA,IADTC,OAAsC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAE3C,IAAIG,WAAW,GAAGP,WAAW,CAACE,IAAI,EAAE,kBAAkB,CAAC,CACrDM,GAAG,CAAC,UAACC,OAAO,EAAK;IACjB,OAAOV,sBAAsB,CAACU,OAAO,EAAAC,aAAA,CAAAA,aAAA,KACjCP,OAAO;MACVQ,OAAO,EAAE;IAAa,EACtB,CAAC;EACH,CAAC,CAAC,CACDC,IAAI,CAAC,GAAG,CAAC;;EAEX;EACA;;EAEA;EACA;EACA;EACA,IAAIL,WAAW,KAAK,EAAE,EAAE;IACvB,IAAMM,eAAe,GAAGX,IAAI,CAACY,YAAY,CAAC,kBAAkB,CAAC;IAC7DP,WAAW,GAAGM,eAAe,KAAK,IAAI,GAAG,EAAE,GAAGA,eAAe;EAC9D;;EAEA;EACA;EACA,IAAIN,WAAW,KAAK,EAAE,EAAE;IACvB,IAAMQ,KAAK,GAAGb,IAAI,CAACY,YAAY,CAAC,OAAO,CAAC;IACxCP,WAAW,GAAGQ,KAAK,KAAK,IAAI,GAAG,EAAE,GAAGA,KAAK;EAC1C;EAEA,OAAOR,WAAW;AACnB"}
|
||||
29
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.d.ts
generated
vendored
Normal file
29
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.d.ts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* interface for an options-bag where `window.getComputedStyle` can be mocked
|
||||
*/
|
||||
export interface ComputeTextAlternativeOptions {
|
||||
compute?: "description" | "name";
|
||||
/**
|
||||
* Set to true if window.computedStyle supports the second argument.
|
||||
* This should be false in JSDOM. Otherwise JSDOM will log console errors.
|
||||
*/
|
||||
computedStyleSupportsPseudoElements?: boolean;
|
||||
/**
|
||||
* mock window.getComputedStyle. Needs `content`, `display` and `visibility`
|
||||
*/
|
||||
getComputedStyle?: typeof window.getComputedStyle;
|
||||
/**
|
||||
* Set to `true` if you want to include hidden elements in the accessible name and description computation.
|
||||
* Skips 2A in https://w3c.github.io/accname/#computation-steps.
|
||||
* @default false
|
||||
*/
|
||||
hidden?: boolean;
|
||||
}
|
||||
/**
|
||||
* implements https://w3c.github.io/accname/#mapping_additional_nd_te
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
export declare function computeTextAlternative(root: Element, options?: ComputeTextAlternativeOptions): string;
|
||||
//# sourceMappingURL=accessible-name-and-description.d.ts.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.d.ts.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"accessible-name-and-description.d.ts","sourceRoot":"","sources":["../sources/accessible-name-and-description.ts"],"names":[],"mappings":"AAgCA;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC7C,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;IACjC;;;OAGG;IACH,mCAAmC,CAAC,EAAE,OAAO,CAAC;IAC9C;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,MAAM,CAAC,gBAAgB,CAAC;IAClD;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAqRD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACrC,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,6BAAkC,GACzC,MAAM,CAsYR"}
|
||||
542
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.js
generated
vendored
Normal file
542
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.js
generated
vendored
Normal file
@@ -0,0 +1,542 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.computeTextAlternative = computeTextAlternative;
|
||||
var _array = _interopRequireDefault(require("./polyfills/array.from"));
|
||||
var _SetLike = _interopRequireDefault(require("./polyfills/SetLike"));
|
||||
var _util = require("./util");
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
/**
|
||||
* implements https://w3c.github.io/accname/
|
||||
*/
|
||||
|
||||
/**
|
||||
* A string of characters where all carriage returns, newlines, tabs, and form-feeds are replaced with a single space, and multiple spaces are reduced to a single space. The string contains only character data; it does not contain any markup.
|
||||
*/
|
||||
|
||||
/**
|
||||
* interface for an options-bag where `window.getComputedStyle` can be mocked
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} string -
|
||||
* @returns {FlatString} -
|
||||
*/
|
||||
function asFlatString(s) {
|
||||
return s.trim().replace(/\s\s+/g, " ");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param node -
|
||||
* @param options - These are not optional to prevent accidentally calling it without options in `computeAccessibleName`
|
||||
* @returns {boolean} -
|
||||
*/
|
||||
function isHidden(node, getComputedStyleImplementation) {
|
||||
if (!(0, _util.isElement)(node)) {
|
||||
return false;
|
||||
}
|
||||
if (node.hasAttribute("hidden") || node.getAttribute("aria-hidden") === "true") {
|
||||
return true;
|
||||
}
|
||||
var style = getComputedStyleImplementation(node);
|
||||
return style.getPropertyValue("display") === "none" || style.getPropertyValue("visibility") === "hidden";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Node} node -
|
||||
* @returns {boolean} - As defined in step 2E of https://w3c.github.io/accname/#mapping_additional_nd_te
|
||||
*/
|
||||
function isControl(node) {
|
||||
return (0, _util.hasAnyConcreteRoles)(node, ["button", "combobox", "listbox", "textbox"]) || hasAbstractRole(node, "range");
|
||||
}
|
||||
function hasAbstractRole(node, role) {
|
||||
if (!(0, _util.isElement)(node)) {
|
||||
return false;
|
||||
}
|
||||
switch (role) {
|
||||
case "range":
|
||||
return (0, _util.hasAnyConcreteRoles)(node, ["meter", "progressbar", "scrollbar", "slider", "spinbutton"]);
|
||||
default:
|
||||
throw new TypeError("No knowledge about abstract role '".concat(role, "'. This is likely a bug :("));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* element.querySelectorAll but also considers owned tree
|
||||
* @param element
|
||||
* @param selectors
|
||||
*/
|
||||
function querySelectorAllSubtree(element, selectors) {
|
||||
var elements = (0, _array.default)(element.querySelectorAll(selectors));
|
||||
(0, _util.queryIdRefs)(element, "aria-owns").forEach(function (root) {
|
||||
// babel transpiles this assuming an iterator
|
||||
elements.push.apply(elements, (0, _array.default)(root.querySelectorAll(selectors)));
|
||||
});
|
||||
return elements;
|
||||
}
|
||||
function querySelectedOptions(listbox) {
|
||||
if ((0, _util.isHTMLSelectElement)(listbox)) {
|
||||
// IE11 polyfill
|
||||
return listbox.selectedOptions || querySelectorAllSubtree(listbox, "[selected]");
|
||||
}
|
||||
return querySelectorAllSubtree(listbox, '[aria-selected="true"]');
|
||||
}
|
||||
function isMarkedPresentational(node) {
|
||||
return (0, _util.hasAnyConcreteRoles)(node, _util.presentationRoles);
|
||||
}
|
||||
|
||||
/**
|
||||
* Elements specifically listed in html-aam
|
||||
*
|
||||
* We don't need this for `label` or `legend` elements.
|
||||
* Their implicit roles already allow "naming from content".
|
||||
*
|
||||
* sources:
|
||||
*
|
||||
* - https://w3c.github.io/html-aam/#table-element
|
||||
*/
|
||||
function isNativeHostLanguageTextAlternativeElement(node) {
|
||||
return (0, _util.isHTMLTableCaptionElement)(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* https://w3c.github.io/aria/#namefromcontent
|
||||
*/
|
||||
function allowsNameFromContent(node) {
|
||||
return (0, _util.hasAnyConcreteRoles)(node, ["button", "cell", "checkbox", "columnheader", "gridcell", "heading", "label", "legend", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "row", "rowheader", "switch", "tab", "tooltip", "treeitem"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO https://github.com/eps1lon/dom-accessibility-api/issues/100
|
||||
*/
|
||||
function isDescendantOfNativeHostLanguageTextAlternativeElement(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- not implemented yet
|
||||
node) {
|
||||
return false;
|
||||
}
|
||||
function getValueOfTextbox(element) {
|
||||
if ((0, _util.isHTMLInputElement)(element) || (0, _util.isHTMLTextAreaElement)(element)) {
|
||||
return element.value;
|
||||
}
|
||||
// https://github.com/eps1lon/dom-accessibility-api/issues/4
|
||||
return element.textContent || "";
|
||||
}
|
||||
function getTextualContent(declaration) {
|
||||
var content = declaration.getPropertyValue("content");
|
||||
if (/^["'].*["']$/.test(content)) {
|
||||
return content.slice(1, -1);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* https://html.spec.whatwg.org/multipage/forms.html#category-label
|
||||
* TODO: form-associated custom elements
|
||||
* @param element
|
||||
*/
|
||||
function isLabelableElement(element) {
|
||||
var localName = (0, _util.getLocalName)(element);
|
||||
return localName === "button" || localName === "input" && element.getAttribute("type") !== "hidden" || localName === "meter" || localName === "output" || localName === "progress" || localName === "select" || localName === "textarea";
|
||||
}
|
||||
|
||||
/**
|
||||
* > [...], then the first such descendant in tree order is the label element's labeled control.
|
||||
* -- https://html.spec.whatwg.org/multipage/forms.html#labeled-control
|
||||
* @param element
|
||||
*/
|
||||
function findLabelableElement(element) {
|
||||
if (isLabelableElement(element)) {
|
||||
return element;
|
||||
}
|
||||
var labelableElement = null;
|
||||
element.childNodes.forEach(function (childNode) {
|
||||
if (labelableElement === null && (0, _util.isElement)(childNode)) {
|
||||
var descendantLabelableElement = findLabelableElement(childNode);
|
||||
if (descendantLabelableElement !== null) {
|
||||
labelableElement = descendantLabelableElement;
|
||||
}
|
||||
}
|
||||
});
|
||||
return labelableElement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Polyfill of HTMLLabelElement.control
|
||||
* https://html.spec.whatwg.org/multipage/forms.html#labeled-control
|
||||
* @param label
|
||||
*/
|
||||
function getControlOfLabel(label) {
|
||||
if (label.control !== undefined) {
|
||||
return label.control;
|
||||
}
|
||||
var htmlFor = label.getAttribute("for");
|
||||
if (htmlFor !== null) {
|
||||
return label.ownerDocument.getElementById(htmlFor);
|
||||
}
|
||||
return findLabelableElement(label);
|
||||
}
|
||||
|
||||
/**
|
||||
* Polyfill of HTMLInputElement.labels
|
||||
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/labels
|
||||
* @param element
|
||||
*/
|
||||
function getLabels(element) {
|
||||
var labelsProperty = element.labels;
|
||||
if (labelsProperty === null) {
|
||||
return labelsProperty;
|
||||
}
|
||||
if (labelsProperty !== undefined) {
|
||||
return (0, _array.default)(labelsProperty);
|
||||
}
|
||||
|
||||
// polyfill
|
||||
if (!isLabelableElement(element)) {
|
||||
return null;
|
||||
}
|
||||
var document = element.ownerDocument;
|
||||
return (0, _array.default)(document.querySelectorAll("label")).filter(function (label) {
|
||||
return getControlOfLabel(label) === element;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the contents of a slot used for computing the accname
|
||||
* @param slot
|
||||
*/
|
||||
function getSlotContents(slot) {
|
||||
// Computing the accessible name for elements containing slots is not
|
||||
// currently defined in the spec. This implementation reflects the
|
||||
// behavior of NVDA 2020.2/Firefox 81 and iOS VoiceOver/Safari 13.6.
|
||||
var assignedNodes = slot.assignedNodes();
|
||||
if (assignedNodes.length === 0) {
|
||||
// if no nodes are assigned to the slot, it displays the default content
|
||||
return (0, _array.default)(slot.childNodes);
|
||||
}
|
||||
return assignedNodes;
|
||||
}
|
||||
|
||||
/**
|
||||
* implements https://w3c.github.io/accname/#mapping_additional_nd_te
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
function computeTextAlternative(root) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var consultedNodes = new _SetLike.default();
|
||||
var window = (0, _util.safeWindow)(root);
|
||||
var _options$compute = options.compute,
|
||||
compute = _options$compute === void 0 ? "name" : _options$compute,
|
||||
_options$computedStyl = options.computedStyleSupportsPseudoElements,
|
||||
computedStyleSupportsPseudoElements = _options$computedStyl === void 0 ? options.getComputedStyle !== undefined : _options$computedStyl,
|
||||
_options$getComputedS = options.getComputedStyle,
|
||||
getComputedStyle = _options$getComputedS === void 0 ? window.getComputedStyle.bind(window) : _options$getComputedS,
|
||||
_options$hidden = options.hidden,
|
||||
hidden = _options$hidden === void 0 ? false : _options$hidden;
|
||||
|
||||
// 2F.i
|
||||
function computeMiscTextAlternative(node, context) {
|
||||
var accumulatedText = "";
|
||||
if ((0, _util.isElement)(node) && computedStyleSupportsPseudoElements) {
|
||||
var pseudoBefore = getComputedStyle(node, "::before");
|
||||
var beforeContent = getTextualContent(pseudoBefore);
|
||||
accumulatedText = "".concat(beforeContent, " ").concat(accumulatedText);
|
||||
}
|
||||
|
||||
// FIXME: Including aria-owns is not defined in the spec
|
||||
// But it is required in the web-platform-test
|
||||
var childNodes = (0, _util.isHTMLSlotElement)(node) ? getSlotContents(node) : (0, _array.default)(node.childNodes).concat((0, _util.queryIdRefs)(node, "aria-owns"));
|
||||
childNodes.forEach(function (child) {
|
||||
var result = computeTextAlternative(child, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: false,
|
||||
recursion: true
|
||||
});
|
||||
// TODO: Unclear why display affects delimiter
|
||||
// see https://github.com/w3c/accname/issues/3
|
||||
var display = (0, _util.isElement)(child) ? getComputedStyle(child).getPropertyValue("display") : "inline";
|
||||
var separator = display !== "inline" ? " " : "";
|
||||
// trailing separator for wpt tests
|
||||
accumulatedText += "".concat(separator).concat(result).concat(separator);
|
||||
});
|
||||
if ((0, _util.isElement)(node) && computedStyleSupportsPseudoElements) {
|
||||
var pseudoAfter = getComputedStyle(node, "::after");
|
||||
var afterContent = getTextualContent(pseudoAfter);
|
||||
accumulatedText = "".concat(accumulatedText, " ").concat(afterContent);
|
||||
}
|
||||
return accumulatedText.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param element
|
||||
* @param attributeName
|
||||
* @returns A string non-empty string or `null`
|
||||
*/
|
||||
function useAttribute(element, attributeName) {
|
||||
var attribute = element.getAttributeNode(attributeName);
|
||||
if (attribute !== null && !consultedNodes.has(attribute) && attribute.value.trim() !== "") {
|
||||
consultedNodes.add(attribute);
|
||||
return attribute.value;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function computeTooltipAttributeValue(node) {
|
||||
if (!(0, _util.isElement)(node)) {
|
||||
return null;
|
||||
}
|
||||
return useAttribute(node, "title");
|
||||
}
|
||||
function computeElementTextAlternative(node) {
|
||||
if (!(0, _util.isElement)(node)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// https://w3c.github.io/html-aam/#fieldset-and-legend-elements
|
||||
if ((0, _util.isHTMLFieldSetElement)(node)) {
|
||||
consultedNodes.add(node);
|
||||
var children = (0, _array.default)(node.childNodes);
|
||||
for (var i = 0; i < children.length; i += 1) {
|
||||
var child = children[i];
|
||||
if ((0, _util.isHTMLLegendElement)(child)) {
|
||||
return computeTextAlternative(child, {
|
||||
isEmbeddedInLabel: false,
|
||||
isReferenced: false,
|
||||
recursion: false
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if ((0, _util.isHTMLTableElement)(node)) {
|
||||
// https://w3c.github.io/html-aam/#table-element
|
||||
consultedNodes.add(node);
|
||||
var _children = (0, _array.default)(node.childNodes);
|
||||
for (var _i = 0; _i < _children.length; _i += 1) {
|
||||
var _child = _children[_i];
|
||||
if ((0, _util.isHTMLTableCaptionElement)(_child)) {
|
||||
return computeTextAlternative(_child, {
|
||||
isEmbeddedInLabel: false,
|
||||
isReferenced: false,
|
||||
recursion: false
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if ((0, _util.isSVGSVGElement)(node)) {
|
||||
// https://www.w3.org/TR/svg-aam-1.0/
|
||||
consultedNodes.add(node);
|
||||
var _children2 = (0, _array.default)(node.childNodes);
|
||||
for (var _i2 = 0; _i2 < _children2.length; _i2 += 1) {
|
||||
var _child2 = _children2[_i2];
|
||||
if ((0, _util.isSVGTitleElement)(_child2)) {
|
||||
return _child2.textContent;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
} else if ((0, _util.getLocalName)(node) === "img" || (0, _util.getLocalName)(node) === "area") {
|
||||
// https://w3c.github.io/html-aam/#area-element
|
||||
// https://w3c.github.io/html-aam/#img-element
|
||||
var nameFromAlt = useAttribute(node, "alt");
|
||||
if (nameFromAlt !== null) {
|
||||
return nameFromAlt;
|
||||
}
|
||||
} else if ((0, _util.isHTMLOptGroupElement)(node)) {
|
||||
var nameFromLabel = useAttribute(node, "label");
|
||||
if (nameFromLabel !== null) {
|
||||
return nameFromLabel;
|
||||
}
|
||||
}
|
||||
if ((0, _util.isHTMLInputElement)(node) && (node.type === "button" || node.type === "submit" || node.type === "reset")) {
|
||||
// https://w3c.github.io/html-aam/#input-type-text-input-type-password-input-type-search-input-type-tel-input-type-email-input-type-url-and-textarea-element-accessible-description-computation
|
||||
var nameFromValue = useAttribute(node, "value");
|
||||
if (nameFromValue !== null) {
|
||||
return nameFromValue;
|
||||
}
|
||||
|
||||
// TODO: l10n
|
||||
if (node.type === "submit") {
|
||||
return "Submit";
|
||||
}
|
||||
// TODO: l10n
|
||||
if (node.type === "reset") {
|
||||
return "Reset";
|
||||
}
|
||||
}
|
||||
var labels = getLabels(node);
|
||||
if (labels !== null && labels.length !== 0) {
|
||||
consultedNodes.add(node);
|
||||
return (0, _array.default)(labels).map(function (element) {
|
||||
return computeTextAlternative(element, {
|
||||
isEmbeddedInLabel: true,
|
||||
isReferenced: false,
|
||||
recursion: true
|
||||
});
|
||||
}).filter(function (label) {
|
||||
return label.length > 0;
|
||||
}).join(" ");
|
||||
}
|
||||
|
||||
// https://w3c.github.io/html-aam/#input-type-image-accessible-name-computation
|
||||
// TODO: wpt test consider label elements but html-aam does not mention them
|
||||
// We follow existing implementations over spec
|
||||
if ((0, _util.isHTMLInputElement)(node) && node.type === "image") {
|
||||
var _nameFromAlt = useAttribute(node, "alt");
|
||||
if (_nameFromAlt !== null) {
|
||||
return _nameFromAlt;
|
||||
}
|
||||
var nameFromTitle = useAttribute(node, "title");
|
||||
if (nameFromTitle !== null) {
|
||||
return nameFromTitle;
|
||||
}
|
||||
|
||||
// TODO: l10n
|
||||
return "Submit Query";
|
||||
}
|
||||
if ((0, _util.hasAnyConcreteRoles)(node, ["button"])) {
|
||||
// https://www.w3.org/TR/html-aam-1.0/#button-element
|
||||
var nameFromSubTree = computeMiscTextAlternative(node, {
|
||||
isEmbeddedInLabel: false,
|
||||
isReferenced: false
|
||||
});
|
||||
if (nameFromSubTree !== "") {
|
||||
return nameFromSubTree;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function computeTextAlternative(current, context) {
|
||||
if (consultedNodes.has(current)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
// 2A
|
||||
if (!hidden && isHidden(current, getComputedStyle) && !context.isReferenced) {
|
||||
consultedNodes.add(current);
|
||||
return "";
|
||||
}
|
||||
|
||||
// 2B
|
||||
var labelAttributeNode = (0, _util.isElement)(current) ? current.getAttributeNode("aria-labelledby") : null;
|
||||
// TODO: Do we generally need to block query IdRefs of attributes we have already consulted?
|
||||
var labelElements = labelAttributeNode !== null && !consultedNodes.has(labelAttributeNode) ? (0, _util.queryIdRefs)(current, "aria-labelledby") : [];
|
||||
if (compute === "name" && !context.isReferenced && labelElements.length > 0) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- Can't be null here otherwise labelElements would be empty
|
||||
consultedNodes.add(labelAttributeNode);
|
||||
return labelElements.map(function (element) {
|
||||
// TODO: Chrome will consider repeated values i.e. use a node multiple times while we'll bail out in computeTextAlternative.
|
||||
return computeTextAlternative(element, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: true,
|
||||
// this isn't recursion as specified, otherwise we would skip
|
||||
// `aria-label` in
|
||||
// <input id="myself" aria-label="foo" aria-labelledby="myself"
|
||||
recursion: false
|
||||
});
|
||||
}).join(" ");
|
||||
}
|
||||
|
||||
// 2C
|
||||
// Changed from the spec in anticipation of https://github.com/w3c/accname/issues/64
|
||||
// spec says we should only consider skipping if we have a non-empty label
|
||||
var skipToStep2E = context.recursion && isControl(current) && compute === "name";
|
||||
if (!skipToStep2E) {
|
||||
var ariaLabel = ((0, _util.isElement)(current) && current.getAttribute("aria-label") || "").trim();
|
||||
if (ariaLabel !== "" && compute === "name") {
|
||||
consultedNodes.add(current);
|
||||
return ariaLabel;
|
||||
}
|
||||
|
||||
// 2D
|
||||
if (!isMarkedPresentational(current)) {
|
||||
var elementTextAlternative = computeElementTextAlternative(current);
|
||||
if (elementTextAlternative !== null) {
|
||||
consultedNodes.add(current);
|
||||
return elementTextAlternative;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// special casing, cheating to make tests pass
|
||||
// https://github.com/w3c/accname/issues/67
|
||||
if ((0, _util.hasAnyConcreteRoles)(current, ["menu"])) {
|
||||
consultedNodes.add(current);
|
||||
return "";
|
||||
}
|
||||
|
||||
// 2E
|
||||
if (skipToStep2E || context.isEmbeddedInLabel || context.isReferenced) {
|
||||
if ((0, _util.hasAnyConcreteRoles)(current, ["combobox", "listbox"])) {
|
||||
consultedNodes.add(current);
|
||||
var selectedOptions = querySelectedOptions(current);
|
||||
if (selectedOptions.length === 0) {
|
||||
// defined per test `name_heading_combobox`
|
||||
return (0, _util.isHTMLInputElement)(current) ? current.value : "";
|
||||
}
|
||||
return (0, _array.default)(selectedOptions).map(function (selectedOption) {
|
||||
return computeTextAlternative(selectedOption, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: false,
|
||||
recursion: true
|
||||
});
|
||||
}).join(" ");
|
||||
}
|
||||
if (hasAbstractRole(current, "range")) {
|
||||
consultedNodes.add(current);
|
||||
if (current.hasAttribute("aria-valuetext")) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute guard
|
||||
return current.getAttribute("aria-valuetext");
|
||||
}
|
||||
if (current.hasAttribute("aria-valuenow")) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute guard
|
||||
return current.getAttribute("aria-valuenow");
|
||||
}
|
||||
// Otherwise, use the value as specified by a host language attribute.
|
||||
return current.getAttribute("value") || "";
|
||||
}
|
||||
if ((0, _util.hasAnyConcreteRoles)(current, ["textbox"])) {
|
||||
consultedNodes.add(current);
|
||||
return getValueOfTextbox(current);
|
||||
}
|
||||
}
|
||||
|
||||
// 2F: https://w3c.github.io/accname/#step2F
|
||||
if (allowsNameFromContent(current) || (0, _util.isElement)(current) && context.isReferenced || isNativeHostLanguageTextAlternativeElement(current) || isDescendantOfNativeHostLanguageTextAlternativeElement(current)) {
|
||||
var accumulatedText2F = computeMiscTextAlternative(current, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: false
|
||||
});
|
||||
if (accumulatedText2F !== "") {
|
||||
consultedNodes.add(current);
|
||||
return accumulatedText2F;
|
||||
}
|
||||
}
|
||||
if (current.nodeType === current.TEXT_NODE) {
|
||||
consultedNodes.add(current);
|
||||
return current.textContent || "";
|
||||
}
|
||||
if (context.recursion) {
|
||||
consultedNodes.add(current);
|
||||
return computeMiscTextAlternative(current, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: false
|
||||
});
|
||||
}
|
||||
var tooltipAttributeValue = computeTooltipAttributeValue(current);
|
||||
if (tooltipAttributeValue !== null) {
|
||||
consultedNodes.add(current);
|
||||
return tooltipAttributeValue;
|
||||
}
|
||||
|
||||
// TODO should this be reachable?
|
||||
consultedNodes.add(current);
|
||||
return "";
|
||||
}
|
||||
return asFlatString(computeTextAlternative(root, {
|
||||
isEmbeddedInLabel: false,
|
||||
// by spec computeAccessibleDescription starts with the referenced elements as roots
|
||||
isReferenced: compute === "description",
|
||||
recursion: false
|
||||
}));
|
||||
}
|
||||
//# sourceMappingURL=accessible-name-and-description.js.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
537
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs
generated
vendored
Normal file
537
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs
generated
vendored
Normal file
@@ -0,0 +1,537 @@
|
||||
/**
|
||||
* implements https://w3c.github.io/accname/
|
||||
*/
|
||||
import ArrayFrom from "./polyfills/array.from.mjs";
|
||||
import SetLike from "./polyfills/SetLike.mjs";
|
||||
import { hasAnyConcreteRoles, isElement, isHTMLTableCaptionElement, isHTMLInputElement, isHTMLSelectElement, isHTMLTextAreaElement, safeWindow, isHTMLFieldSetElement, isHTMLLegendElement, isHTMLOptGroupElement, isHTMLTableElement, isHTMLSlotElement, isSVGSVGElement, isSVGTitleElement, queryIdRefs, getLocalName, presentationRoles } from "./util.mjs";
|
||||
|
||||
/**
|
||||
* A string of characters where all carriage returns, newlines, tabs, and form-feeds are replaced with a single space, and multiple spaces are reduced to a single space. The string contains only character data; it does not contain any markup.
|
||||
*/
|
||||
|
||||
/**
|
||||
* interface for an options-bag where `window.getComputedStyle` can be mocked
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} string -
|
||||
* @returns {FlatString} -
|
||||
*/
|
||||
function asFlatString(s) {
|
||||
return s.trim().replace(/\s\s+/g, " ");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param node -
|
||||
* @param options - These are not optional to prevent accidentally calling it without options in `computeAccessibleName`
|
||||
* @returns {boolean} -
|
||||
*/
|
||||
function isHidden(node, getComputedStyleImplementation) {
|
||||
if (!isElement(node)) {
|
||||
return false;
|
||||
}
|
||||
if (node.hasAttribute("hidden") || node.getAttribute("aria-hidden") === "true") {
|
||||
return true;
|
||||
}
|
||||
var style = getComputedStyleImplementation(node);
|
||||
return style.getPropertyValue("display") === "none" || style.getPropertyValue("visibility") === "hidden";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Node} node -
|
||||
* @returns {boolean} - As defined in step 2E of https://w3c.github.io/accname/#mapping_additional_nd_te
|
||||
*/
|
||||
function isControl(node) {
|
||||
return hasAnyConcreteRoles(node, ["button", "combobox", "listbox", "textbox"]) || hasAbstractRole(node, "range");
|
||||
}
|
||||
function hasAbstractRole(node, role) {
|
||||
if (!isElement(node)) {
|
||||
return false;
|
||||
}
|
||||
switch (role) {
|
||||
case "range":
|
||||
return hasAnyConcreteRoles(node, ["meter", "progressbar", "scrollbar", "slider", "spinbutton"]);
|
||||
default:
|
||||
throw new TypeError("No knowledge about abstract role '".concat(role, "'. This is likely a bug :("));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* element.querySelectorAll but also considers owned tree
|
||||
* @param element
|
||||
* @param selectors
|
||||
*/
|
||||
function querySelectorAllSubtree(element, selectors) {
|
||||
var elements = ArrayFrom(element.querySelectorAll(selectors));
|
||||
queryIdRefs(element, "aria-owns").forEach(function (root) {
|
||||
// babel transpiles this assuming an iterator
|
||||
elements.push.apply(elements, ArrayFrom(root.querySelectorAll(selectors)));
|
||||
});
|
||||
return elements;
|
||||
}
|
||||
function querySelectedOptions(listbox) {
|
||||
if (isHTMLSelectElement(listbox)) {
|
||||
// IE11 polyfill
|
||||
return listbox.selectedOptions || querySelectorAllSubtree(listbox, "[selected]");
|
||||
}
|
||||
return querySelectorAllSubtree(listbox, '[aria-selected="true"]');
|
||||
}
|
||||
function isMarkedPresentational(node) {
|
||||
return hasAnyConcreteRoles(node, presentationRoles);
|
||||
}
|
||||
|
||||
/**
|
||||
* Elements specifically listed in html-aam
|
||||
*
|
||||
* We don't need this for `label` or `legend` elements.
|
||||
* Their implicit roles already allow "naming from content".
|
||||
*
|
||||
* sources:
|
||||
*
|
||||
* - https://w3c.github.io/html-aam/#table-element
|
||||
*/
|
||||
function isNativeHostLanguageTextAlternativeElement(node) {
|
||||
return isHTMLTableCaptionElement(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* https://w3c.github.io/aria/#namefromcontent
|
||||
*/
|
||||
function allowsNameFromContent(node) {
|
||||
return hasAnyConcreteRoles(node, ["button", "cell", "checkbox", "columnheader", "gridcell", "heading", "label", "legend", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "row", "rowheader", "switch", "tab", "tooltip", "treeitem"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO https://github.com/eps1lon/dom-accessibility-api/issues/100
|
||||
*/
|
||||
function isDescendantOfNativeHostLanguageTextAlternativeElement(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- not implemented yet
|
||||
node) {
|
||||
return false;
|
||||
}
|
||||
function getValueOfTextbox(element) {
|
||||
if (isHTMLInputElement(element) || isHTMLTextAreaElement(element)) {
|
||||
return element.value;
|
||||
}
|
||||
// https://github.com/eps1lon/dom-accessibility-api/issues/4
|
||||
return element.textContent || "";
|
||||
}
|
||||
function getTextualContent(declaration) {
|
||||
var content = declaration.getPropertyValue("content");
|
||||
if (/^["'].*["']$/.test(content)) {
|
||||
return content.slice(1, -1);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* https://html.spec.whatwg.org/multipage/forms.html#category-label
|
||||
* TODO: form-associated custom elements
|
||||
* @param element
|
||||
*/
|
||||
function isLabelableElement(element) {
|
||||
var localName = getLocalName(element);
|
||||
return localName === "button" || localName === "input" && element.getAttribute("type") !== "hidden" || localName === "meter" || localName === "output" || localName === "progress" || localName === "select" || localName === "textarea";
|
||||
}
|
||||
|
||||
/**
|
||||
* > [...], then the first such descendant in tree order is the label element's labeled control.
|
||||
* -- https://html.spec.whatwg.org/multipage/forms.html#labeled-control
|
||||
* @param element
|
||||
*/
|
||||
function findLabelableElement(element) {
|
||||
if (isLabelableElement(element)) {
|
||||
return element;
|
||||
}
|
||||
var labelableElement = null;
|
||||
element.childNodes.forEach(function (childNode) {
|
||||
if (labelableElement === null && isElement(childNode)) {
|
||||
var descendantLabelableElement = findLabelableElement(childNode);
|
||||
if (descendantLabelableElement !== null) {
|
||||
labelableElement = descendantLabelableElement;
|
||||
}
|
||||
}
|
||||
});
|
||||
return labelableElement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Polyfill of HTMLLabelElement.control
|
||||
* https://html.spec.whatwg.org/multipage/forms.html#labeled-control
|
||||
* @param label
|
||||
*/
|
||||
function getControlOfLabel(label) {
|
||||
if (label.control !== undefined) {
|
||||
return label.control;
|
||||
}
|
||||
var htmlFor = label.getAttribute("for");
|
||||
if (htmlFor !== null) {
|
||||
return label.ownerDocument.getElementById(htmlFor);
|
||||
}
|
||||
return findLabelableElement(label);
|
||||
}
|
||||
|
||||
/**
|
||||
* Polyfill of HTMLInputElement.labels
|
||||
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/labels
|
||||
* @param element
|
||||
*/
|
||||
function getLabels(element) {
|
||||
var labelsProperty = element.labels;
|
||||
if (labelsProperty === null) {
|
||||
return labelsProperty;
|
||||
}
|
||||
if (labelsProperty !== undefined) {
|
||||
return ArrayFrom(labelsProperty);
|
||||
}
|
||||
|
||||
// polyfill
|
||||
if (!isLabelableElement(element)) {
|
||||
return null;
|
||||
}
|
||||
var document = element.ownerDocument;
|
||||
return ArrayFrom(document.querySelectorAll("label")).filter(function (label) {
|
||||
return getControlOfLabel(label) === element;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the contents of a slot used for computing the accname
|
||||
* @param slot
|
||||
*/
|
||||
function getSlotContents(slot) {
|
||||
// Computing the accessible name for elements containing slots is not
|
||||
// currently defined in the spec. This implementation reflects the
|
||||
// behavior of NVDA 2020.2/Firefox 81 and iOS VoiceOver/Safari 13.6.
|
||||
var assignedNodes = slot.assignedNodes();
|
||||
if (assignedNodes.length === 0) {
|
||||
// if no nodes are assigned to the slot, it displays the default content
|
||||
return ArrayFrom(slot.childNodes);
|
||||
}
|
||||
return assignedNodes;
|
||||
}
|
||||
|
||||
/**
|
||||
* implements https://w3c.github.io/accname/#mapping_additional_nd_te
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
export function computeTextAlternative(root) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var consultedNodes = new SetLike();
|
||||
var window = safeWindow(root);
|
||||
var _options$compute = options.compute,
|
||||
compute = _options$compute === void 0 ? "name" : _options$compute,
|
||||
_options$computedStyl = options.computedStyleSupportsPseudoElements,
|
||||
computedStyleSupportsPseudoElements = _options$computedStyl === void 0 ? options.getComputedStyle !== undefined : _options$computedStyl,
|
||||
_options$getComputedS = options.getComputedStyle,
|
||||
getComputedStyle = _options$getComputedS === void 0 ? window.getComputedStyle.bind(window) : _options$getComputedS,
|
||||
_options$hidden = options.hidden,
|
||||
hidden = _options$hidden === void 0 ? false : _options$hidden;
|
||||
|
||||
// 2F.i
|
||||
function computeMiscTextAlternative(node, context) {
|
||||
var accumulatedText = "";
|
||||
if (isElement(node) && computedStyleSupportsPseudoElements) {
|
||||
var pseudoBefore = getComputedStyle(node, "::before");
|
||||
var beforeContent = getTextualContent(pseudoBefore);
|
||||
accumulatedText = "".concat(beforeContent, " ").concat(accumulatedText);
|
||||
}
|
||||
|
||||
// FIXME: Including aria-owns is not defined in the spec
|
||||
// But it is required in the web-platform-test
|
||||
var childNodes = isHTMLSlotElement(node) ? getSlotContents(node) : ArrayFrom(node.childNodes).concat(queryIdRefs(node, "aria-owns"));
|
||||
childNodes.forEach(function (child) {
|
||||
var result = computeTextAlternative(child, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: false,
|
||||
recursion: true
|
||||
});
|
||||
// TODO: Unclear why display affects delimiter
|
||||
// see https://github.com/w3c/accname/issues/3
|
||||
var display = isElement(child) ? getComputedStyle(child).getPropertyValue("display") : "inline";
|
||||
var separator = display !== "inline" ? " " : "";
|
||||
// trailing separator for wpt tests
|
||||
accumulatedText += "".concat(separator).concat(result).concat(separator);
|
||||
});
|
||||
if (isElement(node) && computedStyleSupportsPseudoElements) {
|
||||
var pseudoAfter = getComputedStyle(node, "::after");
|
||||
var afterContent = getTextualContent(pseudoAfter);
|
||||
accumulatedText = "".concat(accumulatedText, " ").concat(afterContent);
|
||||
}
|
||||
return accumulatedText.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param element
|
||||
* @param attributeName
|
||||
* @returns A string non-empty string or `null`
|
||||
*/
|
||||
function useAttribute(element, attributeName) {
|
||||
var attribute = element.getAttributeNode(attributeName);
|
||||
if (attribute !== null && !consultedNodes.has(attribute) && attribute.value.trim() !== "") {
|
||||
consultedNodes.add(attribute);
|
||||
return attribute.value;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function computeTooltipAttributeValue(node) {
|
||||
if (!isElement(node)) {
|
||||
return null;
|
||||
}
|
||||
return useAttribute(node, "title");
|
||||
}
|
||||
function computeElementTextAlternative(node) {
|
||||
if (!isElement(node)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// https://w3c.github.io/html-aam/#fieldset-and-legend-elements
|
||||
if (isHTMLFieldSetElement(node)) {
|
||||
consultedNodes.add(node);
|
||||
var children = ArrayFrom(node.childNodes);
|
||||
for (var i = 0; i < children.length; i += 1) {
|
||||
var child = children[i];
|
||||
if (isHTMLLegendElement(child)) {
|
||||
return computeTextAlternative(child, {
|
||||
isEmbeddedInLabel: false,
|
||||
isReferenced: false,
|
||||
recursion: false
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if (isHTMLTableElement(node)) {
|
||||
// https://w3c.github.io/html-aam/#table-element
|
||||
consultedNodes.add(node);
|
||||
var _children = ArrayFrom(node.childNodes);
|
||||
for (var _i = 0; _i < _children.length; _i += 1) {
|
||||
var _child = _children[_i];
|
||||
if (isHTMLTableCaptionElement(_child)) {
|
||||
return computeTextAlternative(_child, {
|
||||
isEmbeddedInLabel: false,
|
||||
isReferenced: false,
|
||||
recursion: false
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if (isSVGSVGElement(node)) {
|
||||
// https://www.w3.org/TR/svg-aam-1.0/
|
||||
consultedNodes.add(node);
|
||||
var _children2 = ArrayFrom(node.childNodes);
|
||||
for (var _i2 = 0; _i2 < _children2.length; _i2 += 1) {
|
||||
var _child2 = _children2[_i2];
|
||||
if (isSVGTitleElement(_child2)) {
|
||||
return _child2.textContent;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
} else if (getLocalName(node) === "img" || getLocalName(node) === "area") {
|
||||
// https://w3c.github.io/html-aam/#area-element
|
||||
// https://w3c.github.io/html-aam/#img-element
|
||||
var nameFromAlt = useAttribute(node, "alt");
|
||||
if (nameFromAlt !== null) {
|
||||
return nameFromAlt;
|
||||
}
|
||||
} else if (isHTMLOptGroupElement(node)) {
|
||||
var nameFromLabel = useAttribute(node, "label");
|
||||
if (nameFromLabel !== null) {
|
||||
return nameFromLabel;
|
||||
}
|
||||
}
|
||||
if (isHTMLInputElement(node) && (node.type === "button" || node.type === "submit" || node.type === "reset")) {
|
||||
// https://w3c.github.io/html-aam/#input-type-text-input-type-password-input-type-search-input-type-tel-input-type-email-input-type-url-and-textarea-element-accessible-description-computation
|
||||
var nameFromValue = useAttribute(node, "value");
|
||||
if (nameFromValue !== null) {
|
||||
return nameFromValue;
|
||||
}
|
||||
|
||||
// TODO: l10n
|
||||
if (node.type === "submit") {
|
||||
return "Submit";
|
||||
}
|
||||
// TODO: l10n
|
||||
if (node.type === "reset") {
|
||||
return "Reset";
|
||||
}
|
||||
}
|
||||
var labels = getLabels(node);
|
||||
if (labels !== null && labels.length !== 0) {
|
||||
consultedNodes.add(node);
|
||||
return ArrayFrom(labels).map(function (element) {
|
||||
return computeTextAlternative(element, {
|
||||
isEmbeddedInLabel: true,
|
||||
isReferenced: false,
|
||||
recursion: true
|
||||
});
|
||||
}).filter(function (label) {
|
||||
return label.length > 0;
|
||||
}).join(" ");
|
||||
}
|
||||
|
||||
// https://w3c.github.io/html-aam/#input-type-image-accessible-name-computation
|
||||
// TODO: wpt test consider label elements but html-aam does not mention them
|
||||
// We follow existing implementations over spec
|
||||
if (isHTMLInputElement(node) && node.type === "image") {
|
||||
var _nameFromAlt = useAttribute(node, "alt");
|
||||
if (_nameFromAlt !== null) {
|
||||
return _nameFromAlt;
|
||||
}
|
||||
var nameFromTitle = useAttribute(node, "title");
|
||||
if (nameFromTitle !== null) {
|
||||
return nameFromTitle;
|
||||
}
|
||||
|
||||
// TODO: l10n
|
||||
return "Submit Query";
|
||||
}
|
||||
if (hasAnyConcreteRoles(node, ["button"])) {
|
||||
// https://www.w3.org/TR/html-aam-1.0/#button-element
|
||||
var nameFromSubTree = computeMiscTextAlternative(node, {
|
||||
isEmbeddedInLabel: false,
|
||||
isReferenced: false
|
||||
});
|
||||
if (nameFromSubTree !== "") {
|
||||
return nameFromSubTree;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function computeTextAlternative(current, context) {
|
||||
if (consultedNodes.has(current)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
// 2A
|
||||
if (!hidden && isHidden(current, getComputedStyle) && !context.isReferenced) {
|
||||
consultedNodes.add(current);
|
||||
return "";
|
||||
}
|
||||
|
||||
// 2B
|
||||
var labelAttributeNode = isElement(current) ? current.getAttributeNode("aria-labelledby") : null;
|
||||
// TODO: Do we generally need to block query IdRefs of attributes we have already consulted?
|
||||
var labelElements = labelAttributeNode !== null && !consultedNodes.has(labelAttributeNode) ? queryIdRefs(current, "aria-labelledby") : [];
|
||||
if (compute === "name" && !context.isReferenced && labelElements.length > 0) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- Can't be null here otherwise labelElements would be empty
|
||||
consultedNodes.add(labelAttributeNode);
|
||||
return labelElements.map(function (element) {
|
||||
// TODO: Chrome will consider repeated values i.e. use a node multiple times while we'll bail out in computeTextAlternative.
|
||||
return computeTextAlternative(element, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: true,
|
||||
// this isn't recursion as specified, otherwise we would skip
|
||||
// `aria-label` in
|
||||
// <input id="myself" aria-label="foo" aria-labelledby="myself"
|
||||
recursion: false
|
||||
});
|
||||
}).join(" ");
|
||||
}
|
||||
|
||||
// 2C
|
||||
// Changed from the spec in anticipation of https://github.com/w3c/accname/issues/64
|
||||
// spec says we should only consider skipping if we have a non-empty label
|
||||
var skipToStep2E = context.recursion && isControl(current) && compute === "name";
|
||||
if (!skipToStep2E) {
|
||||
var ariaLabel = (isElement(current) && current.getAttribute("aria-label") || "").trim();
|
||||
if (ariaLabel !== "" && compute === "name") {
|
||||
consultedNodes.add(current);
|
||||
return ariaLabel;
|
||||
}
|
||||
|
||||
// 2D
|
||||
if (!isMarkedPresentational(current)) {
|
||||
var elementTextAlternative = computeElementTextAlternative(current);
|
||||
if (elementTextAlternative !== null) {
|
||||
consultedNodes.add(current);
|
||||
return elementTextAlternative;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// special casing, cheating to make tests pass
|
||||
// https://github.com/w3c/accname/issues/67
|
||||
if (hasAnyConcreteRoles(current, ["menu"])) {
|
||||
consultedNodes.add(current);
|
||||
return "";
|
||||
}
|
||||
|
||||
// 2E
|
||||
if (skipToStep2E || context.isEmbeddedInLabel || context.isReferenced) {
|
||||
if (hasAnyConcreteRoles(current, ["combobox", "listbox"])) {
|
||||
consultedNodes.add(current);
|
||||
var selectedOptions = querySelectedOptions(current);
|
||||
if (selectedOptions.length === 0) {
|
||||
// defined per test `name_heading_combobox`
|
||||
return isHTMLInputElement(current) ? current.value : "";
|
||||
}
|
||||
return ArrayFrom(selectedOptions).map(function (selectedOption) {
|
||||
return computeTextAlternative(selectedOption, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: false,
|
||||
recursion: true
|
||||
});
|
||||
}).join(" ");
|
||||
}
|
||||
if (hasAbstractRole(current, "range")) {
|
||||
consultedNodes.add(current);
|
||||
if (current.hasAttribute("aria-valuetext")) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute guard
|
||||
return current.getAttribute("aria-valuetext");
|
||||
}
|
||||
if (current.hasAttribute("aria-valuenow")) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute guard
|
||||
return current.getAttribute("aria-valuenow");
|
||||
}
|
||||
// Otherwise, use the value as specified by a host language attribute.
|
||||
return current.getAttribute("value") || "";
|
||||
}
|
||||
if (hasAnyConcreteRoles(current, ["textbox"])) {
|
||||
consultedNodes.add(current);
|
||||
return getValueOfTextbox(current);
|
||||
}
|
||||
}
|
||||
|
||||
// 2F: https://w3c.github.io/accname/#step2F
|
||||
if (allowsNameFromContent(current) || isElement(current) && context.isReferenced || isNativeHostLanguageTextAlternativeElement(current) || isDescendantOfNativeHostLanguageTextAlternativeElement(current)) {
|
||||
var accumulatedText2F = computeMiscTextAlternative(current, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: false
|
||||
});
|
||||
if (accumulatedText2F !== "") {
|
||||
consultedNodes.add(current);
|
||||
return accumulatedText2F;
|
||||
}
|
||||
}
|
||||
if (current.nodeType === current.TEXT_NODE) {
|
||||
consultedNodes.add(current);
|
||||
return current.textContent || "";
|
||||
}
|
||||
if (context.recursion) {
|
||||
consultedNodes.add(current);
|
||||
return computeMiscTextAlternative(current, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: false
|
||||
});
|
||||
}
|
||||
var tooltipAttributeValue = computeTooltipAttributeValue(current);
|
||||
if (tooltipAttributeValue !== null) {
|
||||
consultedNodes.add(current);
|
||||
return tooltipAttributeValue;
|
||||
}
|
||||
|
||||
// TODO should this be reachable?
|
||||
consultedNodes.add(current);
|
||||
return "";
|
||||
}
|
||||
return asFlatString(computeTextAlternative(root, {
|
||||
isEmbeddedInLabel: false,
|
||||
// by spec computeAccessibleDescription starts with the referenced elements as roots
|
||||
isReferenced: compute === "description",
|
||||
recursion: false
|
||||
}));
|
||||
}
|
||||
//# sourceMappingURL=accessible-name-and-description.mjs.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
9
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.d.ts
generated
vendored
Normal file
9
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { ComputeTextAlternativeOptions } from "./accessible-name-and-description";
|
||||
/**
|
||||
* implements https://w3c.github.io/accname/#mapping_additional_nd_name
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
export declare function computeAccessibleName(root: Element, options?: ComputeTextAlternativeOptions): string;
|
||||
//# sourceMappingURL=accessible-name.d.ts.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.d.ts.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"accessible-name.d.ts","sourceRoot":"","sources":["../sources/accessible-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,6BAA6B,EAC7B,MAAM,mCAAmC,CAAC;AAuB3C;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,6BAAkC,GACzC,MAAM,CAMR"}
|
||||
27
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.js
generated
vendored
Normal file
27
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.computeAccessibleName = computeAccessibleName;
|
||||
var _accessibleNameAndDescription = require("./accessible-name-and-description");
|
||||
var _util = require("./util");
|
||||
/**
|
||||
* https://w3c.github.io/aria/#namefromprohibited
|
||||
*/
|
||||
function prohibitsNaming(node) {
|
||||
return (0, _util.hasAnyConcreteRoles)(node, ["caption", "code", "deletion", "emphasis", "generic", "insertion", "none", "paragraph", "presentation", "strong", "subscript", "superscript"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* implements https://w3c.github.io/accname/#mapping_additional_nd_name
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
function computeAccessibleName(root) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
if (prohibitsNaming(root)) {
|
||||
return "";
|
||||
}
|
||||
return (0, _accessibleNameAndDescription.computeTextAlternative)(root, options);
|
||||
}
|
||||
//# sourceMappingURL=accessible-name.js.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"accessible-name.js","names":["_accessibleNameAndDescription","require","_util","prohibitsNaming","node","hasAnyConcreteRoles","computeAccessibleName","root","options","arguments","length","undefined","computeTextAlternative"],"sources":["../sources/accessible-name.ts"],"sourcesContent":["import {\n\tcomputeTextAlternative,\n\tComputeTextAlternativeOptions,\n} from \"./accessible-name-and-description\";\nimport { hasAnyConcreteRoles } from \"./util\";\n\n/**\n * https://w3c.github.io/aria/#namefromprohibited\n */\nfunction prohibitsNaming(node: Node): boolean {\n\treturn hasAnyConcreteRoles(node, [\n\t\t\"caption\",\n\t\t\"code\",\n\t\t\"deletion\",\n\t\t\"emphasis\",\n\t\t\"generic\",\n\t\t\"insertion\",\n\t\t\"none\",\n\t\t\"paragraph\",\n\t\t\"presentation\",\n\t\t\"strong\",\n\t\t\"subscript\",\n\t\t\"superscript\",\n\t]);\n}\n\n/**\n * implements https://w3c.github.io/accname/#mapping_additional_nd_name\n * @param root\n * @param options\n * @returns\n */\nexport function computeAccessibleName(\n\troot: Element,\n\toptions: ComputeTextAlternativeOptions = {},\n): string {\n\tif (prohibitsNaming(root)) {\n\t\treturn \"\";\n\t}\n\n\treturn computeTextAlternative(root, options);\n}\n"],"mappings":";;;;AAAA,IAAAA,6BAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA,SAASE,eAAeA,CAACC,IAAU,EAAW;EAC7C,OAAO,IAAAC,yBAAmB,EAACD,IAAI,EAAE,CAChC,SAAS,EACT,MAAM,EACN,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,MAAM,EACN,WAAW,EACX,cAAc,EACd,QAAQ,EACR,WAAW,EACX,aAAa,CACb,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,qBAAqBA,CACpCC,IAAa,EAEJ;EAAA,IADTC,OAAsC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAE3C,IAAIN,eAAe,CAACI,IAAI,CAAC,EAAE;IAC1B,OAAO,EAAE;EACV;EAEA,OAAO,IAAAK,oDAAsB,EAACL,IAAI,EAAEC,OAAO,CAAC;AAC7C"}
|
||||
24
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.mjs
generated
vendored
Normal file
24
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.mjs
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import { computeTextAlternative } from "./accessible-name-and-description.mjs";
|
||||
import { hasAnyConcreteRoles } from "./util.mjs";
|
||||
|
||||
/**
|
||||
* https://w3c.github.io/aria/#namefromprohibited
|
||||
*/
|
||||
function prohibitsNaming(node) {
|
||||
return hasAnyConcreteRoles(node, ["caption", "code", "deletion", "emphasis", "generic", "insertion", "none", "paragraph", "presentation", "strong", "subscript", "superscript"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* implements https://w3c.github.io/accname/#mapping_additional_nd_name
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
export function computeAccessibleName(root) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
if (prohibitsNaming(root)) {
|
||||
return "";
|
||||
}
|
||||
return computeTextAlternative(root, options);
|
||||
}
|
||||
//# sourceMappingURL=accessible-name.mjs.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"accessible-name.mjs","names":["computeTextAlternative","hasAnyConcreteRoles","prohibitsNaming","node","computeAccessibleName","root","options","arguments","length","undefined"],"sources":["../sources/accessible-name.ts"],"sourcesContent":["import {\n\tcomputeTextAlternative,\n\tComputeTextAlternativeOptions,\n} from \"./accessible-name-and-description\";\nimport { hasAnyConcreteRoles } from \"./util\";\n\n/**\n * https://w3c.github.io/aria/#namefromprohibited\n */\nfunction prohibitsNaming(node: Node): boolean {\n\treturn hasAnyConcreteRoles(node, [\n\t\t\"caption\",\n\t\t\"code\",\n\t\t\"deletion\",\n\t\t\"emphasis\",\n\t\t\"generic\",\n\t\t\"insertion\",\n\t\t\"none\",\n\t\t\"paragraph\",\n\t\t\"presentation\",\n\t\t\"strong\",\n\t\t\"subscript\",\n\t\t\"superscript\",\n\t]);\n}\n\n/**\n * implements https://w3c.github.io/accname/#mapping_additional_nd_name\n * @param root\n * @param options\n * @returns\n */\nexport function computeAccessibleName(\n\troot: Element,\n\toptions: ComputeTextAlternativeOptions = {},\n): string {\n\tif (prohibitsNaming(root)) {\n\t\treturn \"\";\n\t}\n\n\treturn computeTextAlternative(root, options);\n}\n"],"mappings":"AAAA,SACCA,sBAAsB,QAEhB,uCAAmC;AAC1C,SAASC,mBAAmB,QAAQ,YAAQ;;AAE5C;AACA;AACA;AACA,SAASC,eAAeA,CAACC,IAAU,EAAW;EAC7C,OAAOF,mBAAmB,CAACE,IAAI,EAAE,CAChC,SAAS,EACT,MAAM,EACN,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,MAAM,EACN,WAAW,EACX,cAAc,EACd,QAAQ,EACR,WAAW,EACX,aAAa,CACb,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CACpCC,IAAa,EAEJ;EAAA,IADTC,OAAsC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAE3C,IAAIL,eAAe,CAACG,IAAI,CAAC,EAAE;IAC1B,OAAO,EAAE;EACV;EAEA,OAAOL,sBAAsB,CAACK,IAAI,EAAEC,OAAO,CAAC;AAC7C"}
|
||||
7
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.d.ts
generated
vendored
Normal file
7
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Safe Element.localName for all supported environments
|
||||
* @param element
|
||||
*/
|
||||
export declare function getLocalName(element: Element): string;
|
||||
export default function getRole(element: Element): string | null;
|
||||
//# sourceMappingURL=getRole.d.ts.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.d.ts.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"getRole.d.ts","sourceRoot":"","sources":["../sources/getRole.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAOrD;AAkHD,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAa/D"}
|
||||
192
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.js
generated
vendored
Normal file
192
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.js
generated
vendored
Normal file
@@ -0,0 +1,192 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = getRole;
|
||||
exports.getLocalName = getLocalName;
|
||||
var _util = require("./util");
|
||||
// https://w3c.github.io/html-aria/#document-conformance-requirements-for-use-of-aria-attributes-in-html
|
||||
|
||||
/**
|
||||
* Safe Element.localName for all supported environments
|
||||
* @param element
|
||||
*/
|
||||
function getLocalName(element) {
|
||||
var _element$localName;
|
||||
return (// eslint-disable-next-line no-restricted-properties -- actual guard for environments without localName
|
||||
(_element$localName = element.localName) !== null && _element$localName !== void 0 ? _element$localName :
|
||||
// eslint-disable-next-line no-restricted-properties -- required for the fallback
|
||||
element.tagName.toLowerCase()
|
||||
);
|
||||
}
|
||||
var localNameToRoleMappings = {
|
||||
article: "article",
|
||||
aside: "complementary",
|
||||
button: "button",
|
||||
datalist: "listbox",
|
||||
dd: "definition",
|
||||
details: "group",
|
||||
dialog: "dialog",
|
||||
dt: "term",
|
||||
fieldset: "group",
|
||||
figure: "figure",
|
||||
// WARNING: Only with an accessible name
|
||||
form: "form",
|
||||
footer: "contentinfo",
|
||||
h1: "heading",
|
||||
h2: "heading",
|
||||
h3: "heading",
|
||||
h4: "heading",
|
||||
h5: "heading",
|
||||
h6: "heading",
|
||||
header: "banner",
|
||||
hr: "separator",
|
||||
html: "document",
|
||||
legend: "legend",
|
||||
li: "listitem",
|
||||
math: "math",
|
||||
main: "main",
|
||||
menu: "list",
|
||||
nav: "navigation",
|
||||
ol: "list",
|
||||
optgroup: "group",
|
||||
// WARNING: Only in certain context
|
||||
option: "option",
|
||||
output: "status",
|
||||
progress: "progressbar",
|
||||
// WARNING: Only with an accessible name
|
||||
section: "region",
|
||||
summary: "button",
|
||||
table: "table",
|
||||
tbody: "rowgroup",
|
||||
textarea: "textbox",
|
||||
tfoot: "rowgroup",
|
||||
// WARNING: Only in certain context
|
||||
td: "cell",
|
||||
th: "columnheader",
|
||||
thead: "rowgroup",
|
||||
tr: "row",
|
||||
ul: "list"
|
||||
};
|
||||
var prohibitedAttributes = {
|
||||
caption: new Set(["aria-label", "aria-labelledby"]),
|
||||
code: new Set(["aria-label", "aria-labelledby"]),
|
||||
deletion: new Set(["aria-label", "aria-labelledby"]),
|
||||
emphasis: new Set(["aria-label", "aria-labelledby"]),
|
||||
generic: new Set(["aria-label", "aria-labelledby", "aria-roledescription"]),
|
||||
insertion: new Set(["aria-label", "aria-labelledby"]),
|
||||
none: new Set(["aria-label", "aria-labelledby"]),
|
||||
paragraph: new Set(["aria-label", "aria-labelledby"]),
|
||||
presentation: new Set(["aria-label", "aria-labelledby"]),
|
||||
strong: new Set(["aria-label", "aria-labelledby"]),
|
||||
subscript: new Set(["aria-label", "aria-labelledby"]),
|
||||
superscript: new Set(["aria-label", "aria-labelledby"])
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param element
|
||||
* @param role The role used for this element. This is specified to control whether you want to use the implicit or explicit role.
|
||||
*/
|
||||
function hasGlobalAriaAttributes(element, role) {
|
||||
// https://rawgit.com/w3c/aria/stable/#global_states
|
||||
// commented attributes are deprecated
|
||||
return ["aria-atomic", "aria-busy", "aria-controls", "aria-current", "aria-description", "aria-describedby", "aria-details",
|
||||
// "disabled",
|
||||
"aria-dropeffect",
|
||||
// "errormessage",
|
||||
"aria-flowto", "aria-grabbed",
|
||||
// "haspopup",
|
||||
"aria-hidden",
|
||||
// "invalid",
|
||||
"aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-relevant", "aria-roledescription"].some(function (attributeName) {
|
||||
var _prohibitedAttributes;
|
||||
return element.hasAttribute(attributeName) && !((_prohibitedAttributes = prohibitedAttributes[role]) !== null && _prohibitedAttributes !== void 0 && _prohibitedAttributes.has(attributeName));
|
||||
});
|
||||
}
|
||||
function ignorePresentationalRole(element, implicitRole) {
|
||||
// https://rawgit.com/w3c/aria/stable/#conflict_resolution_presentation_none
|
||||
return hasGlobalAriaAttributes(element, implicitRole);
|
||||
}
|
||||
function getRole(element) {
|
||||
var explicitRole = getExplicitRole(element);
|
||||
if (explicitRole === null || _util.presentationRoles.indexOf(explicitRole) !== -1) {
|
||||
var implicitRole = getImplicitRole(element);
|
||||
if (_util.presentationRoles.indexOf(explicitRole || "") === -1 || ignorePresentationalRole(element, implicitRole || "")) {
|
||||
return implicitRole;
|
||||
}
|
||||
}
|
||||
return explicitRole;
|
||||
}
|
||||
function getImplicitRole(element) {
|
||||
var mappedByTag = localNameToRoleMappings[getLocalName(element)];
|
||||
if (mappedByTag !== undefined) {
|
||||
return mappedByTag;
|
||||
}
|
||||
switch (getLocalName(element)) {
|
||||
case "a":
|
||||
case "area":
|
||||
case "link":
|
||||
if (element.hasAttribute("href")) {
|
||||
return "link";
|
||||
}
|
||||
break;
|
||||
case "img":
|
||||
if (element.getAttribute("alt") === "" && !ignorePresentationalRole(element, "img")) {
|
||||
return "presentation";
|
||||
}
|
||||
return "img";
|
||||
case "input":
|
||||
{
|
||||
var _ref = element,
|
||||
type = _ref.type;
|
||||
switch (type) {
|
||||
case "button":
|
||||
case "image":
|
||||
case "reset":
|
||||
case "submit":
|
||||
return "button";
|
||||
case "checkbox":
|
||||
case "radio":
|
||||
return type;
|
||||
case "range":
|
||||
return "slider";
|
||||
case "email":
|
||||
case "tel":
|
||||
case "text":
|
||||
case "url":
|
||||
if (element.hasAttribute("list")) {
|
||||
return "combobox";
|
||||
}
|
||||
return "textbox";
|
||||
case "search":
|
||||
if (element.hasAttribute("list")) {
|
||||
return "combobox";
|
||||
}
|
||||
return "searchbox";
|
||||
case "number":
|
||||
return "spinbutton";
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
case "select":
|
||||
if (element.hasAttribute("multiple") || element.size > 1) {
|
||||
return "listbox";
|
||||
}
|
||||
return "combobox";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function getExplicitRole(element) {
|
||||
var role = element.getAttribute("role");
|
||||
if (role !== null) {
|
||||
var explicitRole = role.trim().split(" ")[0];
|
||||
// String.prototype.split(sep, limit) will always return an array with at least one member
|
||||
// as long as limit is either undefined or > 0
|
||||
if (explicitRole.length > 0) {
|
||||
return explicitRole;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
//# sourceMappingURL=getRole.js.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
188
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.mjs
generated
vendored
Normal file
188
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.mjs
generated
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
// https://w3c.github.io/html-aria/#document-conformance-requirements-for-use-of-aria-attributes-in-html
|
||||
|
||||
import { presentationRoles } from "./util.mjs";
|
||||
|
||||
/**
|
||||
* Safe Element.localName for all supported environments
|
||||
* @param element
|
||||
*/
|
||||
export function getLocalName(element) {
|
||||
var _element$localName;
|
||||
return (// eslint-disable-next-line no-restricted-properties -- actual guard for environments without localName
|
||||
(_element$localName = element.localName) !== null && _element$localName !== void 0 ? _element$localName :
|
||||
// eslint-disable-next-line no-restricted-properties -- required for the fallback
|
||||
element.tagName.toLowerCase()
|
||||
);
|
||||
}
|
||||
var localNameToRoleMappings = {
|
||||
article: "article",
|
||||
aside: "complementary",
|
||||
button: "button",
|
||||
datalist: "listbox",
|
||||
dd: "definition",
|
||||
details: "group",
|
||||
dialog: "dialog",
|
||||
dt: "term",
|
||||
fieldset: "group",
|
||||
figure: "figure",
|
||||
// WARNING: Only with an accessible name
|
||||
form: "form",
|
||||
footer: "contentinfo",
|
||||
h1: "heading",
|
||||
h2: "heading",
|
||||
h3: "heading",
|
||||
h4: "heading",
|
||||
h5: "heading",
|
||||
h6: "heading",
|
||||
header: "banner",
|
||||
hr: "separator",
|
||||
html: "document",
|
||||
legend: "legend",
|
||||
li: "listitem",
|
||||
math: "math",
|
||||
main: "main",
|
||||
menu: "list",
|
||||
nav: "navigation",
|
||||
ol: "list",
|
||||
optgroup: "group",
|
||||
// WARNING: Only in certain context
|
||||
option: "option",
|
||||
output: "status",
|
||||
progress: "progressbar",
|
||||
// WARNING: Only with an accessible name
|
||||
section: "region",
|
||||
summary: "button",
|
||||
table: "table",
|
||||
tbody: "rowgroup",
|
||||
textarea: "textbox",
|
||||
tfoot: "rowgroup",
|
||||
// WARNING: Only in certain context
|
||||
td: "cell",
|
||||
th: "columnheader",
|
||||
thead: "rowgroup",
|
||||
tr: "row",
|
||||
ul: "list"
|
||||
};
|
||||
var prohibitedAttributes = {
|
||||
caption: new Set(["aria-label", "aria-labelledby"]),
|
||||
code: new Set(["aria-label", "aria-labelledby"]),
|
||||
deletion: new Set(["aria-label", "aria-labelledby"]),
|
||||
emphasis: new Set(["aria-label", "aria-labelledby"]),
|
||||
generic: new Set(["aria-label", "aria-labelledby", "aria-roledescription"]),
|
||||
insertion: new Set(["aria-label", "aria-labelledby"]),
|
||||
none: new Set(["aria-label", "aria-labelledby"]),
|
||||
paragraph: new Set(["aria-label", "aria-labelledby"]),
|
||||
presentation: new Set(["aria-label", "aria-labelledby"]),
|
||||
strong: new Set(["aria-label", "aria-labelledby"]),
|
||||
subscript: new Set(["aria-label", "aria-labelledby"]),
|
||||
superscript: new Set(["aria-label", "aria-labelledby"])
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param element
|
||||
* @param role The role used for this element. This is specified to control whether you want to use the implicit or explicit role.
|
||||
*/
|
||||
function hasGlobalAriaAttributes(element, role) {
|
||||
// https://rawgit.com/w3c/aria/stable/#global_states
|
||||
// commented attributes are deprecated
|
||||
return ["aria-atomic", "aria-busy", "aria-controls", "aria-current", "aria-description", "aria-describedby", "aria-details",
|
||||
// "disabled",
|
||||
"aria-dropeffect",
|
||||
// "errormessage",
|
||||
"aria-flowto", "aria-grabbed",
|
||||
// "haspopup",
|
||||
"aria-hidden",
|
||||
// "invalid",
|
||||
"aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-relevant", "aria-roledescription"].some(function (attributeName) {
|
||||
var _prohibitedAttributes;
|
||||
return element.hasAttribute(attributeName) && !((_prohibitedAttributes = prohibitedAttributes[role]) !== null && _prohibitedAttributes !== void 0 && _prohibitedAttributes.has(attributeName));
|
||||
});
|
||||
}
|
||||
function ignorePresentationalRole(element, implicitRole) {
|
||||
// https://rawgit.com/w3c/aria/stable/#conflict_resolution_presentation_none
|
||||
return hasGlobalAriaAttributes(element, implicitRole);
|
||||
}
|
||||
export default function getRole(element) {
|
||||
var explicitRole = getExplicitRole(element);
|
||||
if (explicitRole === null || presentationRoles.indexOf(explicitRole) !== -1) {
|
||||
var implicitRole = getImplicitRole(element);
|
||||
if (presentationRoles.indexOf(explicitRole || "") === -1 || ignorePresentationalRole(element, implicitRole || "")) {
|
||||
return implicitRole;
|
||||
}
|
||||
}
|
||||
return explicitRole;
|
||||
}
|
||||
function getImplicitRole(element) {
|
||||
var mappedByTag = localNameToRoleMappings[getLocalName(element)];
|
||||
if (mappedByTag !== undefined) {
|
||||
return mappedByTag;
|
||||
}
|
||||
switch (getLocalName(element)) {
|
||||
case "a":
|
||||
case "area":
|
||||
case "link":
|
||||
if (element.hasAttribute("href")) {
|
||||
return "link";
|
||||
}
|
||||
break;
|
||||
case "img":
|
||||
if (element.getAttribute("alt") === "" && !ignorePresentationalRole(element, "img")) {
|
||||
return "presentation";
|
||||
}
|
||||
return "img";
|
||||
case "input":
|
||||
{
|
||||
var _ref = element,
|
||||
type = _ref.type;
|
||||
switch (type) {
|
||||
case "button":
|
||||
case "image":
|
||||
case "reset":
|
||||
case "submit":
|
||||
return "button";
|
||||
case "checkbox":
|
||||
case "radio":
|
||||
return type;
|
||||
case "range":
|
||||
return "slider";
|
||||
case "email":
|
||||
case "tel":
|
||||
case "text":
|
||||
case "url":
|
||||
if (element.hasAttribute("list")) {
|
||||
return "combobox";
|
||||
}
|
||||
return "textbox";
|
||||
case "search":
|
||||
if (element.hasAttribute("list")) {
|
||||
return "combobox";
|
||||
}
|
||||
return "searchbox";
|
||||
case "number":
|
||||
return "spinbutton";
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
case "select":
|
||||
if (element.hasAttribute("multiple") || element.size > 1) {
|
||||
return "listbox";
|
||||
}
|
||||
return "combobox";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function getExplicitRole(element) {
|
||||
var role = element.getAttribute("role");
|
||||
if (role !== null) {
|
||||
var explicitRole = role.trim().split(" ")[0];
|
||||
// String.prototype.split(sep, limit) will always return an array with at least one member
|
||||
// as long as limit is either undefined or > 0
|
||||
if (explicitRole.length > 0) {
|
||||
return explicitRole;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
//# sourceMappingURL=getRole.mjs.map
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user