|
1 | 1 | { |
2 | | - "beforeEach": { |
3 | | - "prefix": "beus", |
4 | | - "body": ["beforeEach(() => {", "\tuser.setup()", "})$0"], |
5 | | - "description": "beforeEach user setup function is called once before each spec" |
| 2 | + "userEvent.setup": { |
| 3 | + "prefix": "es", |
| 4 | + "body": ["userEvent.setup()$0"], |
| 5 | + "description": "userEvent setup function" |
| 6 | + }, |
| 7 | + "userEvent.beforeEach": { |
| 8 | + "prefix": "bees", |
| 9 | + "body": ["beforeEach(() => {", "\tuserEvent.setup()", "})$0"], |
| 10 | + "description": "beforeEach userEvent setup function is called once before each spec" |
| 11 | + }, |
| 12 | + "userEvent.click": { |
| 13 | + "prefix": "ec", |
| 14 | + "body": ["await userEvent.click(${1:element})$0"], |
| 15 | + "description": "userEvent click" |
| 16 | + }, |
| 17 | + "userEvent.dblClick": { |
| 18 | + "prefix": "edc", |
| 19 | + "body": ["await userEvent.dblClick(${1:element})$0"], |
| 20 | + "description": "userEvent dblClick" |
| 21 | + }, |
| 22 | + "userEvent.type": { |
| 23 | + "prefix": "et", |
| 24 | + "body": ["await userEvent.type(${1:element}, '${2:text}')$0"], |
| 25 | + "description": "userEvent type in a field" |
| 26 | + }, |
| 27 | + "userEvent.type+submit": { |
| 28 | + "prefix": "ets", |
| 29 | + "body": ["await userEvent.type(${1:element}, `${2:text}{enter}`)$0"], |
| 30 | + "description": "userEvent type in a field and press enter to submit form" |
| 31 | + }, |
| 32 | + "userEvent.clear": { |
| 33 | + "prefix": "ecl", |
| 34 | + "body": ["await userEvent.clear(${1:element})$0"], |
| 35 | + "description": "userEvent to clear a field" |
| 36 | + }, |
| 37 | + "userEvent.selectOptions": { |
| 38 | + "prefix": "eso", |
| 39 | + "body": [ |
| 40 | + "await userEvent.selectOptions(${1:listBoxElement}, ['value/label'])$0" |
| 41 | + ], |
| 42 | + "description": "userEvent to select options" |
| 43 | + }, |
| 44 | + "userEvent.deselectOptions": { |
| 45 | + "prefix": "edo", |
| 46 | + "body": [ |
| 47 | + "await userEvent.deselectOptions(${1:listBoxElement}, ['value/label'])$0" |
| 48 | + ], |
| 49 | + "description": "userEvent to deselect options" |
| 50 | + }, |
| 51 | + "userEvent.tab": { |
| 52 | + "prefix": "etb", |
| 53 | + "body": ["await userEvent.tab()$0"], |
| 54 | + "description": "userEvent tab" |
| 55 | + }, |
| 56 | + "userEvent.hover": { |
| 57 | + "prefix": "eh", |
| 58 | + "body": ["await userEvent.hover(${1:element})$0"], |
| 59 | + "description": "userEvent hover" |
| 60 | + }, |
| 61 | + "userEvent.unhover": { |
| 62 | + "prefix": "euh", |
| 63 | + "body": ["await userEvent.unhover(${1:element})$0"], |
| 64 | + "description": "userEvent unhover" |
| 65 | + }, |
| 66 | + "userEvent.paste": { |
| 67 | + "prefix": "ep", |
| 68 | + "body": ["await userEvent.paste(${1:element}, '${2:text}')$0"], |
| 69 | + "description": "userEvent paste" |
6 | 70 | } |
7 | 71 | } |
0 commit comments