A short guide to all the exported functions in DOM Testing Library
- CSS Cheat Sheet contains the most common style snippets: CSS gradient, background, button, font-family, border, radius, box and text shadow generators, color picker and more. All these and other useful web designer tools can be found on a single page.
- This cheat sheet co-authored by Ravi Kiran and Suprotim Agarwal, aims at providing a quick reference to the most commonly used features in AngularJS. It will also make you quickly productive with Angular. This article is from the Free DNC Magazine for.Net and JavaScript developers.
- INSTANT POT CHEAT SHEETINSTANT POT CHEAT SHEET FOR ALL ITEMS LISTED: fresh (not frozen) Pressure: high Setting: manual Liquid: minimum 1 cup water. Basmati, Jasmine Rice, Brown Rice, White Rice, Wild Spaghetti Steel Cut Oats DRIED rice & grains LIQUID RELEASE RATIO 1:3 1:2 1:2 1:2 1:1.75 1:2 1:1 1:2.5 1:4 1:1 1:1 1:1 1:1 1:2 1:2 1:3 QPR QPR.
Jasmine is my testing framework of choice when I’m writing Angular. And I was just getting used to all those spy methods with the help of Toby Ho’s cheat sheet, and then Jasmine 2 came along and changed all the method names. So here’s an updated cheat sheet for spying with Jasmine 2. Create a spy Spy on an existing method.
Queries#
See Which query should I use?
No Match | 1 Match | 1+ Match | Await? | |
---|---|---|---|---|
getBy | throw | return | throw | No |
findBy | throw | return | throw | Yes |
queryBy | null | return | throw | No |
getAllBy | throw | array | array | No |
findAllBy | throw | array | array | Yes |
queryAllBy | [] | array | array | No |
- ByLabelText find by label or aria-label text content
- getByLabelText
- queryByLabelText
- getAllByLabelText
- queryAllByLabelText
- findByLabelText
- findAllByLabelText
- ByPlaceholderText find by input placeholder value
- getByPlaceholderText
- queryByPlaceholderText
- getAllByPlaceholderText
- queryAllByPlaceholderText
- findByPlaceholderText
- findAllByPlaceholderText
- ByText find by element text content
- getByText
- queryByText
- getAllByText
- queryAllByText
- findByText
- findAllByText
- ByDisplayValue find by form element current value
- getByDisplayValue
- queryByDisplayValue
- getAllByDisplayValue
- queryAllByDisplayValue
- findByDisplayValue
- findAllByDisplayValue
- ByAltText find by img alt attribute
- getByAltText
- queryByAltText
- getAllByAltText
- queryAllByAltText
- findByAltText
- findAllByAltText
- ByTitle find by title attribute or svg title tag
- getByTitle
- queryByTitle
- getAllByTitle
- queryAllByTitle
- findByTitle
- findAllByTitle
- ByRole find by aria role
- getByRole
- queryByRole
- getAllByRole
- queryAllByRole
- findByRole
- findAllByRole
- ByTestId find by)
- configure change global options:
configure({testIdAttribute: 'my-data-test-id'})
Text Match Options#
Given the following HTML:
Will find the div:
Karma Jasmine Angular Cheat Sheet
Jasmine Cheat Sheet
Given a button that updates the page after some time:
Protractor Jasmine Cheat Sheet
jQuery Matchers
Only for tags that have checked attribute. | |
Checks for child DOM elements or text. | |
Elements can be considered hidden for several reasons:
| |
Checks to see if the matched element is attached to the DOM. | |
Check to see if the set of matched elements matches the given selector.
| |
Only for tags that have selected attribute. | |
Elements are considered visible if they consume space in the document. Visible elements have a width or height that is greater than zero. | |
| |
Attribute value is optional, if omitted it will check only if attribute exists. | |
If event has been triggered on selector. | |
If event has been triggered on selector. | |
toHaveBeenTriggeredOnAndWith(selector, extraParameters) If event has been triggered on selector and with extraParameters. | |
If event has been prevented on selector. | |
If event has been prevented on selector. | |
Open mac app store. Value is optional, if omitted it will check only if an entry for that key exists. | |
Property value is optional, if omitted it will check only if property exists. | |
Accepts a String or regular expression. | |
Only for elements on which |