From f41e1a20fc3305ee93a403dfb984c3fd7aee699e Mon Sep 17 00:00:00 2001 From: equiman Date: Mon, 17 Apr 2023 17:37:05 -0500 Subject: [PATCH 1/3] added cheat sheet helper --- .vscode/settings.json | 2 ++ README.md | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 1328677..cce166f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -26,6 +26,8 @@ "rewi", "rswi", "sltp", + "SWPM", + "testid", "volta" ], "markdownlint.config": { diff --git a/README.md b/README.md index 0ac61f7..effc340 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ The quick and easy way to create and use Testing Library with [VS Code](https:// - [Extension Manager](#extension-manager) - [Marketplace](#marketplace) - [Supported Languages](#supported-languages) +- [Cheat Sheet](#cheat-sheet) - [Snippets](#snippets) - [Import](#import) - [User Event](#user-event) @@ -68,6 +69,32 @@ Open the extension manager with ctrl+shift+X (W --- +## Cheat Sheet + +| Search Variants | Result | +| ---------------- | --------------------------------------------- | +| `getBy...` | `Element` or `Error` | +| `getAllBy...` | `Element[]` or `Error` | +| `queryBy...` | `Element` or `null` | +| `queryAllBy...` | `Element[]` or `null` | +| `findBy...` | `Promise` or `Promise` | +| `findAllBy...` | `Promise` or `Promise` | + +| Search Types | Result | +| --------------------- | --------------------------------------------- | +| `...Role` | `
` or [Aria Roles](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques#roles) | +| `...LabelText` | `