-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpaw.code-snippets
87 lines (87 loc) · 2.06 KB
/
paw.code-snippets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{
"paw:cypress:fetch": {
"prefix": "paw",
"body": [
"Cypress.on(\"window:before:load\", win => {",
" win.fetch = null;",
"});"
]
},
"paw:home:spec": {
"prefix": "paw",
"body": [
"describe(\"Home\", () => {",
" beforeEach(() => {",
" cy.visit(\"/\");",
" });",
"});"
]
},
"paw:home:wellcome": {
"prefix": "paw",
"body": [
"it(\"should show wellcome info\", () => {",
" cy.get(\".wellcome-title\").should(\"have.text\", \"Wellcome to ReactWars!!\");",
"});"
]
},
"paw:home:menu": {
"prefix": "paw",
"body": [
"it(\"should allow to visit application areas throught the menu\", () => {",
" cy.get(\".menu\").contains(\"available actions\");",
"});"
]
},
"paw:home:menu-films": {
"prefix": "paw",
"body": [
"it(\"should allow to explore StarWars films\", () => {",
" cy.get(\".menu-films\").click();",
" cy.url().should(\"include\", \"/films\");",
"});"
]
},
"paw:films:spec": {
"prefix": "paw",
"body": [
"describe(\"Films List\", () => {",
" beforeEach(() => {",
" cy.visit(\"/films\");",
" });",
"});"
]
},
"paw:films:header-title": {
"prefix": "paw",
"body": [
"it(\"should show films list header title\", () => {",
" cy.get(\".films-title\").should(\"have.text\", \"List of registered movies:\");",
"});"
]
},
"paw:films:list": {
"prefix": "paw",
"body": [
"it(\"should show available films\", () => {",
" cy.get(\".films-episodes\").should(\"have.length.greaterThan\", 0);",
"});"
]
},
"paw:films:filmsrepository": {
"prefix": "paw",
"body": [
"export default {",
" async retrieveFilms() {",
" const response = await fetch(\"/api/films\");",
" const { results } = await response.json();",
" return results;",
" }",
"}"
]
},
"paw:films:proxy": {
"prefix": "paw",
"body": ["\"proxy\": \"https://swapi.co\""]
}
}