@mirai/core 0.3.407 → 0.3.408
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__tests__/Finder/workflows/occupation.workflow.js +16 -2
- package/__tests__/Rates/__mocks__/extras-one-success.json +138 -0
- package/__tests__/Rates/__mocks__/extras-success.json +397 -0
- package/__tests__/Rates/workflows/extras.js +9 -0
- package/__tests__/Rates/workflows/extrasExpect.js +11 -0
- package/__tests__/Rates/workflows/index.js +4 -0
- package/__tests__/Rates/workflows/multiroom.js +26 -0
- package/__tests__/Rates/workflows/rates.js +9 -0
- package/__tests__/__screenshots__/rates.spec.jsx/Desktop/Search-multiroom-with-one-extras-1.png +0 -0
- package/__tests__/__screenshots__/rates.spec.jsx/Desktop/Search-multiroom-with-some-extras-1.png +0 -0
- package/__tests__/__screenshots__/rates.spec.jsx/iPhone-12/Search-multiroom-with-one-extras-1.png +0 -0
- package/__tests__/__screenshots__/rates.spec.jsx/iPhone-12/Search-multiroom-with-some-extras-1.png +0 -0
- package/__tests__/finder.spec.js +10 -0
- package/__tests__/rates.spec.jsx +31 -12
- package/build/components/Rates/Rates.Footer.js +5 -1
- package/build/components/Rates/Rates.Footer.js.map +1 -1
- package/build/components/Rates/Rates.js +14 -6
- package/build/components/Rates/Rates.js.map +1 -1
- package/build/components/Rates/__tests__/__snapshots__/Rates.test.js.snap +70 -59
- package/build/components/Rates/components/Item/Item.Summary.js +7 -2
- package/build/components/Rates/components/Item/Item.Summary.js.map +1 -1
- package/build/components/Rates/components/Item/components/PriceDetails/PriceDetails.module.css +2 -2
- package/build/components/Rates/components/ModalExtras/ModalExtras.js +7 -2
- package/build/components/Rates/components/ModalExtras/ModalExtras.js.map +1 -1
- package/package.json +1 -1
- package/playwright.config.js +1 -0
- package/public/routes/Step1-Rates.jsx +1 -1
|
@@ -1,13 +1,27 @@
|
|
|
1
|
-
export const occupation = async ({
|
|
1
|
+
export const occupation = async ({
|
|
2
|
+
addAdult,
|
|
3
|
+
addAgeChild = true,
|
|
4
|
+
addChild,
|
|
5
|
+
addRoom,
|
|
6
|
+
isMobile,
|
|
7
|
+
page,
|
|
8
|
+
search,
|
|
9
|
+
testId,
|
|
10
|
+
}) => {
|
|
2
11
|
await page.getByTestId(`${testId}-occupation-field`).click();
|
|
3
12
|
if (addAdult) {
|
|
4
13
|
await page.getByTestId('group-0-button-max').click();
|
|
5
14
|
}
|
|
15
|
+
if (addRoom) {
|
|
16
|
+
await page.getByTestId(`${testId}-occupation-add-room`).click();
|
|
17
|
+
}
|
|
6
18
|
if (addChild) {
|
|
7
19
|
await page.getByTestId('group-1-button-max').click();
|
|
8
20
|
addAgeChild && (await page.getByTestId('group-1-select-0').selectOption('1'));
|
|
9
21
|
}
|
|
10
|
-
if (
|
|
22
|
+
if (search) {
|
|
23
|
+
await page.getByTestId(`${testId}-occupation-submit`).click();
|
|
24
|
+
} else if (isMobile) {
|
|
11
25
|
await page.getByTestId(`${testId}-occupation-field-modal-button-close`).click();
|
|
12
26
|
}
|
|
13
27
|
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"status": "OK",
|
|
3
|
+
"message": "",
|
|
4
|
+
"data": {
|
|
5
|
+
"extras": [
|
|
6
|
+
{
|
|
7
|
+
"id": 64954,
|
|
8
|
+
"title": "Por tramo de personas / una vez",
|
|
9
|
+
"included": false,
|
|
10
|
+
"conditions": "Nulla at condimentum libero. Nullam eget tempor nisi, eget convallis sem. Duis in neque in massa rutrum vehicula. Curabitur a rutrum ante.",
|
|
11
|
+
"accommodationThreshold": 0,
|
|
12
|
+
"guestThreshold": 0,
|
|
13
|
+
"nights": 5,
|
|
14
|
+
"image": "https://images.mirai.com/EXTRAS%2FSHARED%2Fbeach%2Fniza_8_1480593296621.jpg",
|
|
15
|
+
"text": "Pellentesque convallis accumsan nunc. Sed accumsan interdum augue, a vestibulum quam consectetur eu. Vestibulum elementum convallis auctor. Nullam cursus pellentesque magna a euismod. In dignissim urna eu mi egestas, nec fringilla tortor fringilla",
|
|
16
|
+
"inputNights": false,
|
|
17
|
+
"inputGuests": true,
|
|
18
|
+
"frequency": 0,
|
|
19
|
+
"guestType": 1,
|
|
20
|
+
"type": 2,
|
|
21
|
+
"amount": 2,
|
|
22
|
+
"taxes": "Taxes included",
|
|
23
|
+
"value": {
|
|
24
|
+
"1": {
|
|
25
|
+
"1": {
|
|
26
|
+
"basePrice": 10.0,
|
|
27
|
+
"price": 11.0,
|
|
28
|
+
"taxes": 1.0
|
|
29
|
+
},
|
|
30
|
+
"2": {
|
|
31
|
+
"basePrice": 10.0,
|
|
32
|
+
"price": 11.0,
|
|
33
|
+
"taxes": 1.0
|
|
34
|
+
},
|
|
35
|
+
"3": {
|
|
36
|
+
"basePrice": 10.0,
|
|
37
|
+
"price": 11.0,
|
|
38
|
+
"taxes": 1.0
|
|
39
|
+
},
|
|
40
|
+
"4": {
|
|
41
|
+
"basePrice": 10.0,
|
|
42
|
+
"price": 11.0,
|
|
43
|
+
"taxes": 1.0
|
|
44
|
+
},
|
|
45
|
+
"5": {
|
|
46
|
+
"basePrice": 10.0,
|
|
47
|
+
"price": 11.0,
|
|
48
|
+
"taxes": 1.0
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"2": {
|
|
52
|
+
"1": {
|
|
53
|
+
"basePrice": 20.0,
|
|
54
|
+
"price": 22.0,
|
|
55
|
+
"taxes": 2.0
|
|
56
|
+
},
|
|
57
|
+
"2": {
|
|
58
|
+
"basePrice": 20.0,
|
|
59
|
+
"price": 22.0,
|
|
60
|
+
"taxes": 2.0
|
|
61
|
+
},
|
|
62
|
+
"3": {
|
|
63
|
+
"basePrice": 20.0,
|
|
64
|
+
"price": 22.0,
|
|
65
|
+
"taxes": 2.0
|
|
66
|
+
},
|
|
67
|
+
"4": {
|
|
68
|
+
"basePrice": 20.0,
|
|
69
|
+
"price": 22.0,
|
|
70
|
+
"taxes": 2.0
|
|
71
|
+
},
|
|
72
|
+
"5": {
|
|
73
|
+
"basePrice": 20.0,
|
|
74
|
+
"price": 22.0,
|
|
75
|
+
"taxes": 2.0
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"baseValue": {
|
|
80
|
+
"1": {
|
|
81
|
+
"1": {
|
|
82
|
+
"basePrice": 10.0,
|
|
83
|
+
"price": 11.0,
|
|
84
|
+
"taxes": 1.0
|
|
85
|
+
},
|
|
86
|
+
"2": {
|
|
87
|
+
"basePrice": 10.0,
|
|
88
|
+
"price": 11.0,
|
|
89
|
+
"taxes": 1.0
|
|
90
|
+
},
|
|
91
|
+
"3": {
|
|
92
|
+
"basePrice": 10.0,
|
|
93
|
+
"price": 11.0,
|
|
94
|
+
"taxes": 1.0
|
|
95
|
+
},
|
|
96
|
+
"4": {
|
|
97
|
+
"basePrice": 10.0,
|
|
98
|
+
"price": 11.0,
|
|
99
|
+
"taxes": 1.0
|
|
100
|
+
},
|
|
101
|
+
"5": {
|
|
102
|
+
"basePrice": 10.0,
|
|
103
|
+
"price": 11.0,
|
|
104
|
+
"taxes": 1.0
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"2": {
|
|
108
|
+
"1": {
|
|
109
|
+
"basePrice": 20.0,
|
|
110
|
+
"price": 22.0,
|
|
111
|
+
"taxes": 2.0
|
|
112
|
+
},
|
|
113
|
+
"2": {
|
|
114
|
+
"basePrice": 20.0,
|
|
115
|
+
"price": 22.0,
|
|
116
|
+
"taxes": 2.0
|
|
117
|
+
},
|
|
118
|
+
"3": {
|
|
119
|
+
"basePrice": 20.0,
|
|
120
|
+
"price": 22.0,
|
|
121
|
+
"taxes": 2.0
|
|
122
|
+
},
|
|
123
|
+
"4": {
|
|
124
|
+
"basePrice": 20.0,
|
|
125
|
+
"price": 22.0,
|
|
126
|
+
"taxes": 2.0
|
|
127
|
+
},
|
|
128
|
+
"5": {
|
|
129
|
+
"basePrice": 20.0,
|
|
130
|
+
"price": 22.0,
|
|
131
|
+
"taxes": 2.0
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
{
|
|
2
|
+
"status": "OK",
|
|
3
|
+
"message": "",
|
|
4
|
+
"data": {
|
|
5
|
+
"extras": [
|
|
6
|
+
{
|
|
7
|
+
"id": 64954,
|
|
8
|
+
"title": "Por tramo de personas / una vez",
|
|
9
|
+
"included": false,
|
|
10
|
+
"conditions": "Nulla at condimentum libero. Nullam eget tempor nisi, eget convallis sem. Duis in neque in massa rutrum vehicula. Curabitur a rutrum ante.",
|
|
11
|
+
"accommodationThreshold": 0,
|
|
12
|
+
"guestThreshold": 0,
|
|
13
|
+
"nights": 5,
|
|
14
|
+
"image": "https://images.mirai.com/EXTRAS%2FSHARED%2Fbeach%2Fniza_8_1480593296621.jpg",
|
|
15
|
+
"text": "Pellentesque convallis accumsan nunc. Sed accumsan interdum augue, a vestibulum quam consectetur eu. Vestibulum elementum convallis auctor. Nullam cursus pellentesque magna a euismod. In dignissim urna eu mi egestas, nec fringilla tortor fringilla",
|
|
16
|
+
"inputNights": false,
|
|
17
|
+
"inputGuests": true,
|
|
18
|
+
"frequency": 0,
|
|
19
|
+
"guestType": 1,
|
|
20
|
+
"type": 2,
|
|
21
|
+
"amount": 2,
|
|
22
|
+
"taxes": "Taxes included",
|
|
23
|
+
"value": {
|
|
24
|
+
"1": {
|
|
25
|
+
"1": {
|
|
26
|
+
"basePrice": 10.0,
|
|
27
|
+
"price": 11.0,
|
|
28
|
+
"taxes": 1.0
|
|
29
|
+
},
|
|
30
|
+
"2": {
|
|
31
|
+
"basePrice": 10.0,
|
|
32
|
+
"price": 11.0,
|
|
33
|
+
"taxes": 1.0
|
|
34
|
+
},
|
|
35
|
+
"3": {
|
|
36
|
+
"basePrice": 10.0,
|
|
37
|
+
"price": 11.0,
|
|
38
|
+
"taxes": 1.0
|
|
39
|
+
},
|
|
40
|
+
"4": {
|
|
41
|
+
"basePrice": 10.0,
|
|
42
|
+
"price": 11.0,
|
|
43
|
+
"taxes": 1.0
|
|
44
|
+
},
|
|
45
|
+
"5": {
|
|
46
|
+
"basePrice": 10.0,
|
|
47
|
+
"price": 11.0,
|
|
48
|
+
"taxes": 1.0
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"2": {
|
|
52
|
+
"1": {
|
|
53
|
+
"basePrice": 20.0,
|
|
54
|
+
"price": 22.0,
|
|
55
|
+
"taxes": 2.0
|
|
56
|
+
},
|
|
57
|
+
"2": {
|
|
58
|
+
"basePrice": 20.0,
|
|
59
|
+
"price": 22.0,
|
|
60
|
+
"taxes": 2.0
|
|
61
|
+
},
|
|
62
|
+
"3": {
|
|
63
|
+
"basePrice": 20.0,
|
|
64
|
+
"price": 22.0,
|
|
65
|
+
"taxes": 2.0
|
|
66
|
+
},
|
|
67
|
+
"4": {
|
|
68
|
+
"basePrice": 20.0,
|
|
69
|
+
"price": 22.0,
|
|
70
|
+
"taxes": 2.0
|
|
71
|
+
},
|
|
72
|
+
"5": {
|
|
73
|
+
"basePrice": 20.0,
|
|
74
|
+
"price": 22.0,
|
|
75
|
+
"taxes": 2.0
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"baseValue": {
|
|
80
|
+
"1": {
|
|
81
|
+
"1": {
|
|
82
|
+
"basePrice": 10.0,
|
|
83
|
+
"price": 11.0,
|
|
84
|
+
"taxes": 1.0
|
|
85
|
+
},
|
|
86
|
+
"2": {
|
|
87
|
+
"basePrice": 10.0,
|
|
88
|
+
"price": 11.0,
|
|
89
|
+
"taxes": 1.0
|
|
90
|
+
},
|
|
91
|
+
"3": {
|
|
92
|
+
"basePrice": 10.0,
|
|
93
|
+
"price": 11.0,
|
|
94
|
+
"taxes": 1.0
|
|
95
|
+
},
|
|
96
|
+
"4": {
|
|
97
|
+
"basePrice": 10.0,
|
|
98
|
+
"price": 11.0,
|
|
99
|
+
"taxes": 1.0
|
|
100
|
+
},
|
|
101
|
+
"5": {
|
|
102
|
+
"basePrice": 10.0,
|
|
103
|
+
"price": 11.0,
|
|
104
|
+
"taxes": 1.0
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"2": {
|
|
108
|
+
"1": {
|
|
109
|
+
"basePrice": 20.0,
|
|
110
|
+
"price": 22.0,
|
|
111
|
+
"taxes": 2.0
|
|
112
|
+
},
|
|
113
|
+
"2": {
|
|
114
|
+
"basePrice": 20.0,
|
|
115
|
+
"price": 22.0,
|
|
116
|
+
"taxes": 2.0
|
|
117
|
+
},
|
|
118
|
+
"3": {
|
|
119
|
+
"basePrice": 20.0,
|
|
120
|
+
"price": 22.0,
|
|
121
|
+
"taxes": 2.0
|
|
122
|
+
},
|
|
123
|
+
"4": {
|
|
124
|
+
"basePrice": 20.0,
|
|
125
|
+
"price": 22.0,
|
|
126
|
+
"taxes": 2.0
|
|
127
|
+
},
|
|
128
|
+
"5": {
|
|
129
|
+
"basePrice": 20.0,
|
|
130
|
+
"price": 22.0,
|
|
131
|
+
"taxes": 2.0
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"id": 69632,
|
|
138
|
+
"title": "only adults, choose adults",
|
|
139
|
+
"included": false,
|
|
140
|
+
"conditions": "Sólo si falta alguna condición o restricción que quieres que quede por escrito (este texto irá en las confirmaciones de reservas).",
|
|
141
|
+
"accommodationThreshold": 0,
|
|
142
|
+
"guestThreshold": 0,
|
|
143
|
+
"nights": 5,
|
|
144
|
+
"image": "https://images.mirai.com/EXTRAS%2FSHARED%2Fbilbao%2F7986957_s_1480593294671.jpg",
|
|
145
|
+
"text": "Lo que pongas aquí no aparecerá en la confirmación escrita así que no pongas detalles o condiciones importantes.",
|
|
146
|
+
"inputNights": false,
|
|
147
|
+
"inputGuests": true,
|
|
148
|
+
"frequency": 0,
|
|
149
|
+
"guestType": 2,
|
|
150
|
+
"type": 1,
|
|
151
|
+
"amount": 2,
|
|
152
|
+
"taxes": "Taxes included",
|
|
153
|
+
"value": {
|
|
154
|
+
"1": {
|
|
155
|
+
"1": {
|
|
156
|
+
"basePrice": 20.0,
|
|
157
|
+
"price": 22.0,
|
|
158
|
+
"taxes": 2.0
|
|
159
|
+
},
|
|
160
|
+
"2": {
|
|
161
|
+
"basePrice": 20.0,
|
|
162
|
+
"price": 22.0,
|
|
163
|
+
"taxes": 2.0
|
|
164
|
+
},
|
|
165
|
+
"3": {
|
|
166
|
+
"basePrice": 20.0,
|
|
167
|
+
"price": 22.0,
|
|
168
|
+
"taxes": 2.0
|
|
169
|
+
},
|
|
170
|
+
"4": {
|
|
171
|
+
"basePrice": 20.0,
|
|
172
|
+
"price": 22.0,
|
|
173
|
+
"taxes": 2.0
|
|
174
|
+
},
|
|
175
|
+
"5": {
|
|
176
|
+
"basePrice": 20.0,
|
|
177
|
+
"price": 22.0,
|
|
178
|
+
"taxes": 2.0
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"2": {
|
|
182
|
+
"1": {
|
|
183
|
+
"basePrice": 40.0,
|
|
184
|
+
"price": 44.0,
|
|
185
|
+
"taxes": 4.0
|
|
186
|
+
},
|
|
187
|
+
"2": {
|
|
188
|
+
"basePrice": 40.0,
|
|
189
|
+
"price": 44.0,
|
|
190
|
+
"taxes": 4.0
|
|
191
|
+
},
|
|
192
|
+
"3": {
|
|
193
|
+
"basePrice": 40.0,
|
|
194
|
+
"price": 44.0,
|
|
195
|
+
"taxes": 4.0
|
|
196
|
+
},
|
|
197
|
+
"4": {
|
|
198
|
+
"basePrice": 40.0,
|
|
199
|
+
"price": 44.0,
|
|
200
|
+
"taxes": 4.0
|
|
201
|
+
},
|
|
202
|
+
"5": {
|
|
203
|
+
"basePrice": 40.0,
|
|
204
|
+
"price": 44.0,
|
|
205
|
+
"taxes": 4.0
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"baseValue": {
|
|
210
|
+
"1": {
|
|
211
|
+
"1": {
|
|
212
|
+
"basePrice": 20.0,
|
|
213
|
+
"price": 22.0,
|
|
214
|
+
"taxes": 2.0
|
|
215
|
+
},
|
|
216
|
+
"2": {
|
|
217
|
+
"basePrice": 20.0,
|
|
218
|
+
"price": 22.0,
|
|
219
|
+
"taxes": 2.0
|
|
220
|
+
},
|
|
221
|
+
"3": {
|
|
222
|
+
"basePrice": 20.0,
|
|
223
|
+
"price": 22.0,
|
|
224
|
+
"taxes": 2.0
|
|
225
|
+
},
|
|
226
|
+
"4": {
|
|
227
|
+
"basePrice": 20.0,
|
|
228
|
+
"price": 22.0,
|
|
229
|
+
"taxes": 2.0
|
|
230
|
+
},
|
|
231
|
+
"5": {
|
|
232
|
+
"basePrice": 20.0,
|
|
233
|
+
"price": 22.0,
|
|
234
|
+
"taxes": 2.0
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"2": {
|
|
238
|
+
"1": {
|
|
239
|
+
"basePrice": 40.0,
|
|
240
|
+
"price": 44.0,
|
|
241
|
+
"taxes": 4.0
|
|
242
|
+
},
|
|
243
|
+
"2": {
|
|
244
|
+
"basePrice": 40.0,
|
|
245
|
+
"price": 44.0,
|
|
246
|
+
"taxes": 4.0
|
|
247
|
+
},
|
|
248
|
+
"3": {
|
|
249
|
+
"basePrice": 40.0,
|
|
250
|
+
"price": 44.0,
|
|
251
|
+
"taxes": 4.0
|
|
252
|
+
},
|
|
253
|
+
"4": {
|
|
254
|
+
"basePrice": 40.0,
|
|
255
|
+
"price": 44.0,
|
|
256
|
+
"taxes": 4.0
|
|
257
|
+
},
|
|
258
|
+
"5": {
|
|
259
|
+
"basePrice": 40.0,
|
|
260
|
+
"price": 44.0,
|
|
261
|
+
"taxes": 4.0
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"id": 69633,
|
|
268
|
+
"title": "only adults",
|
|
269
|
+
"included": false,
|
|
270
|
+
"accommodationThreshold": 0,
|
|
271
|
+
"guestThreshold": 0,
|
|
272
|
+
"nights": 5,
|
|
273
|
+
"image": "https://images.mirai.com/EXTRAS%2FSHARED%2Fbilbao%2F21659247_s_1480593294733.jpg",
|
|
274
|
+
"text": "Lo que pongas aquí no aparecerá en la confirmación escrita así que no pongas detalles o condiciones importantes.",
|
|
275
|
+
"inputNights": false,
|
|
276
|
+
"inputGuests": false,
|
|
277
|
+
"frequency": 0,
|
|
278
|
+
"guestType": 2,
|
|
279
|
+
"type": 1,
|
|
280
|
+
"amount": 2,
|
|
281
|
+
"taxes": "Taxes included",
|
|
282
|
+
"value": {
|
|
283
|
+
"1": {
|
|
284
|
+
"1": {
|
|
285
|
+
"basePrice": 20.0,
|
|
286
|
+
"price": 22.0,
|
|
287
|
+
"taxes": 2.0
|
|
288
|
+
},
|
|
289
|
+
"2": {
|
|
290
|
+
"basePrice": 20.0,
|
|
291
|
+
"price": 22.0,
|
|
292
|
+
"taxes": 2.0
|
|
293
|
+
},
|
|
294
|
+
"3": {
|
|
295
|
+
"basePrice": 20.0,
|
|
296
|
+
"price": 22.0,
|
|
297
|
+
"taxes": 2.0
|
|
298
|
+
},
|
|
299
|
+
"4": {
|
|
300
|
+
"basePrice": 20.0,
|
|
301
|
+
"price": 22.0,
|
|
302
|
+
"taxes": 2.0
|
|
303
|
+
},
|
|
304
|
+
"5": {
|
|
305
|
+
"basePrice": 20.0,
|
|
306
|
+
"price": 22.0,
|
|
307
|
+
"taxes": 2.0
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"2": {
|
|
311
|
+
"1": {
|
|
312
|
+
"basePrice": 40.0,
|
|
313
|
+
"price": 44.0,
|
|
314
|
+
"taxes": 4.0
|
|
315
|
+
},
|
|
316
|
+
"2": {
|
|
317
|
+
"basePrice": 40.0,
|
|
318
|
+
"price": 44.0,
|
|
319
|
+
"taxes": 4.0
|
|
320
|
+
},
|
|
321
|
+
"3": {
|
|
322
|
+
"basePrice": 40.0,
|
|
323
|
+
"price": 44.0,
|
|
324
|
+
"taxes": 4.0
|
|
325
|
+
},
|
|
326
|
+
"4": {
|
|
327
|
+
"basePrice": 40.0,
|
|
328
|
+
"price": 44.0,
|
|
329
|
+
"taxes": 4.0
|
|
330
|
+
},
|
|
331
|
+
"5": {
|
|
332
|
+
"basePrice": 40.0,
|
|
333
|
+
"price": 44.0,
|
|
334
|
+
"taxes": 4.0
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
"baseValue": {
|
|
339
|
+
"1": {
|
|
340
|
+
"1": {
|
|
341
|
+
"basePrice": 20.0,
|
|
342
|
+
"price": 22.0,
|
|
343
|
+
"taxes": 2.0
|
|
344
|
+
},
|
|
345
|
+
"2": {
|
|
346
|
+
"basePrice": 20.0,
|
|
347
|
+
"price": 22.0,
|
|
348
|
+
"taxes": 2.0
|
|
349
|
+
},
|
|
350
|
+
"3": {
|
|
351
|
+
"basePrice": 20.0,
|
|
352
|
+
"price": 22.0,
|
|
353
|
+
"taxes": 2.0
|
|
354
|
+
},
|
|
355
|
+
"4": {
|
|
356
|
+
"basePrice": 20.0,
|
|
357
|
+
"price": 22.0,
|
|
358
|
+
"taxes": 2.0
|
|
359
|
+
},
|
|
360
|
+
"5": {
|
|
361
|
+
"basePrice": 20.0,
|
|
362
|
+
"price": 22.0,
|
|
363
|
+
"taxes": 2.0
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"2": {
|
|
367
|
+
"1": {
|
|
368
|
+
"basePrice": 40.0,
|
|
369
|
+
"price": 44.0,
|
|
370
|
+
"taxes": 4.0
|
|
371
|
+
},
|
|
372
|
+
"2": {
|
|
373
|
+
"basePrice": 40.0,
|
|
374
|
+
"price": 44.0,
|
|
375
|
+
"taxes": 4.0
|
|
376
|
+
},
|
|
377
|
+
"3": {
|
|
378
|
+
"basePrice": 40.0,
|
|
379
|
+
"price": 44.0,
|
|
380
|
+
"taxes": 4.0
|
|
381
|
+
},
|
|
382
|
+
"4": {
|
|
383
|
+
"basePrice": 40.0,
|
|
384
|
+
"price": 44.0,
|
|
385
|
+
"taxes": 4.0
|
|
386
|
+
},
|
|
387
|
+
"5": {
|
|
388
|
+
"basePrice": 40.0,
|
|
389
|
+
"price": 44.0,
|
|
390
|
+
"taxes": 4.0
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
]
|
|
396
|
+
}
|
|
397
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const extras = async ({ page, empty, onlyOne }) => {
|
|
2
|
+
await page.route('https://reservation.mirai.com/XMAS/reservation/v2/booking/extras*', (route) => {
|
|
3
|
+
route.fulfill({
|
|
4
|
+
status: 200,
|
|
5
|
+
contentType: 'application/json',
|
|
6
|
+
body: JSON.stringify(empty ? {} : require(`../__mocks__/extras${onlyOne ? '-one' : ''}-success.json`)),
|
|
7
|
+
});
|
|
8
|
+
});
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { expect } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
export const extrasExpect = async ({ page, testId }) => {
|
|
4
|
+
await page.waitForTimeout(500);
|
|
5
|
+
await expect(page).toHaveScreenshot({
|
|
6
|
+
clip: await (await page.getByTestId(`${testId}-modalExtras`)).boundingBox(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
await page.getByTestId(`${testId}-modalExtras-submit`).click();
|
|
10
|
+
await expect(page).toHaveURL(/.*step2-checkout/, { timeout: 10000 });
|
|
11
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { expect } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
import { occupation } from '../../Finder/workflows';
|
|
4
|
+
|
|
5
|
+
const WAIT_URL = 'https://reservation.mirai.com/XMAS/reservation/v2/booking/rates*';
|
|
6
|
+
|
|
7
|
+
export const multiroom = async ({ isMobile, page, testId }) => {
|
|
8
|
+
await expect(await page.getByTestId(`${testId}-multiroom`)).toBeHidden();
|
|
9
|
+
|
|
10
|
+
await occupation({ addRoom: true, isMobile, page, search: true, testId: `${testId}-finder` });
|
|
11
|
+
await expect(await page.getByTestId(`${testId}-multiroom`)).toBeVisible();
|
|
12
|
+
|
|
13
|
+
await page.waitForResponse(WAIT_URL);
|
|
14
|
+
const buttons = await page.getByTestId(`${testId}-multiroom`).locator('ui-button').all();
|
|
15
|
+
expect(buttons.length).toBe(2);
|
|
16
|
+
expect(buttons[0]).not.toHaveAttribute('disabled');
|
|
17
|
+
expect(buttons[1]).toHaveAttribute('disabled');
|
|
18
|
+
|
|
19
|
+
await page.getByTestId(`${testId}-item-0-select`).click();
|
|
20
|
+
await page.waitForResponse(WAIT_URL);
|
|
21
|
+
expect(buttons[0]).not.toHaveAttribute('disabled');
|
|
22
|
+
expect(buttons[1]).not.toHaveAttribute('disabled');
|
|
23
|
+
|
|
24
|
+
await page.getByTestId(`${testId}-item-0-select`).click();
|
|
25
|
+
await page.getByTestId(`${testId}-footer-reserve`).click();
|
|
26
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const rates = async ({ page }) => {
|
|
2
|
+
await page.route('https://reservation.mirai.com/XMAS/reservation/v2/booking/rates*', (route) => {
|
|
3
|
+
route.fulfill({
|
|
4
|
+
status: 200,
|
|
5
|
+
contentType: 'application/json',
|
|
6
|
+
body: JSON.stringify(require('../__mocks__/rates-success.json')),
|
|
7
|
+
});
|
|
8
|
+
});
|
|
9
|
+
};
|
package/__tests__/__screenshots__/rates.spec.jsx/Desktop/Search-multiroom-with-one-extras-1.png
ADDED
|
Binary file
|
package/__tests__/__screenshots__/rates.spec.jsx/Desktop/Search-multiroom-with-some-extras-1.png
ADDED
|
Binary file
|
package/__tests__/__screenshots__/rates.spec.jsx/iPhone-12/Search-multiroom-with-one-extras-1.png
ADDED
|
Binary file
|
package/__tests__/__screenshots__/rates.spec.jsx/iPhone-12/Search-multiroom-with-some-extras-1.png
ADDED
|
Binary file
|
package/__tests__/finder.spec.js
CHANGED
|
@@ -63,3 +63,13 @@ test('Search w/ +1 adult & promocode', async ({ isMobile, page }) => {
|
|
|
63
63
|
|
|
64
64
|
await expect(page).toHaveURL(/.step1-rates/, { timeout: 10000 });
|
|
65
65
|
});
|
|
66
|
+
|
|
67
|
+
test('Search w/ +1 adult, +1 room & promocode', async ({ isMobile, page }) => {
|
|
68
|
+
await calendar({ isMobile, page, testId });
|
|
69
|
+
await occupation({ addAdult: true, addRoom: true, isMobile, page, testId });
|
|
70
|
+
await promocode({ isMobile, page, testId });
|
|
71
|
+
|
|
72
|
+
await page.getByTestId(`${testId}-submit`).click();
|
|
73
|
+
|
|
74
|
+
await expect(page).toHaveURL(/.step1-rates/, { timeout: 10000 });
|
|
75
|
+
});
|