@storybook/addon-interactions 6.4.0-beta.32 → 6.4.0-rc.10
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/dist/cjs/Panel.js +83 -110
- package/dist/cjs/Panel.stories.js +23 -9
- package/dist/cjs/components/AccountForm/addon-interactions.stories.js +207 -155
- package/dist/cjs/components/Interaction/Interaction.js +16 -15
- package/dist/cjs/components/Interaction/Interaction.stories.js +9 -3
- package/dist/cjs/components/Subnav/Subnav.js +15 -20
- package/dist/cjs/components/Subnav/Subnav.stories.js +54 -16
- package/dist/cjs/mocks/index.js +4 -3
- package/dist/esm/Panel.js +84 -109
- package/dist/esm/Panel.stories.js +20 -9
- package/dist/esm/components/AccountForm/addon-interactions.stories.js +203 -154
- package/dist/esm/components/Interaction/Interaction.js +16 -15
- package/dist/esm/components/Interaction/Interaction.stories.js +6 -3
- package/dist/esm/components/Subnav/Subnav.js +15 -20
- package/dist/esm/components/Subnav/Subnav.stories.js +49 -13
- package/dist/esm/mocks/index.js +4 -3
- package/dist/modern/Panel.js +58 -80
- package/dist/modern/Panel.stories.js +19 -9
- package/dist/modern/components/AccountForm/addon-interactions.stories.js +19 -0
- package/dist/modern/components/Interaction/Interaction.js +14 -15
- package/dist/modern/components/Interaction/Interaction.stories.js +6 -3
- package/dist/modern/components/Subnav/Subnav.js +15 -20
- package/dist/modern/components/Subnav/Subnav.stories.js +49 -13
- package/dist/modern/mocks/index.js +4 -3
- package/dist/ts3.4/Panel.d.ts +29 -0
- package/dist/ts3.4/Tool.d.ts +2 -0
- package/dist/ts3.4/components/AccountForm/AccountForm.d.ts +15 -0
- package/dist/ts3.4/components/Interaction/Interaction.d.ts +9 -0
- package/dist/ts3.4/components/List.d.ts +14 -0
- package/dist/ts3.4/components/MatcherResult.d.ts +12 -0
- package/dist/ts3.4/components/MethodCall.d.ts +55 -0
- package/dist/ts3.4/components/StatusBadge/StatusBadge.d.ts +6 -0
- package/dist/ts3.4/components/StatusIcon/StatusIcon.d.ts +7 -0
- package/dist/ts3.4/components/Subnav/Subnav.d.ts +12 -0
- package/dist/ts3.4/constants.d.ts +3 -0
- package/dist/ts3.4/index.d.ts +2 -0
- package/dist/ts3.4/mocks/index.d.ts +2 -0
- package/dist/ts3.4/preset/argsEnhancers.d.ts +3 -0
- package/dist/ts3.4/preset/checkActionsLoaded.d.ts +1 -0
- package/dist/ts3.4/register.d.ts +1 -0
- package/dist/ts3.4/theme.d.ts +14 -0
- package/dist/ts3.9/Panel.d.ts +29 -0
- package/dist/ts3.9/Tool.d.ts +2 -0
- package/dist/ts3.9/components/AccountForm/AccountForm.d.ts +15 -0
- package/dist/ts3.9/components/Interaction/Interaction.d.ts +9 -0
- package/dist/ts3.9/components/List.d.ts +14 -0
- package/dist/ts3.9/components/MatcherResult.d.ts +12 -0
- package/dist/ts3.9/components/MethodCall.d.ts +55 -0
- package/dist/ts3.9/components/StatusBadge/StatusBadge.d.ts +6 -0
- package/dist/ts3.9/components/StatusIcon/StatusIcon.d.ts +7 -0
- package/dist/ts3.9/components/Subnav/Subnav.d.ts +12 -0
- package/dist/ts3.9/constants.d.ts +3 -0
- package/dist/ts3.9/index.d.ts +2 -0
- package/dist/ts3.9/mocks/index.d.ts +2 -0
- package/dist/ts3.9/preset/argsEnhancers.d.ts +3 -0
- package/dist/ts3.9/preset/checkActionsLoaded.d.ts +1 -0
- package/dist/ts3.9/register.d.ts +1 -0
- package/dist/ts3.9/theme.d.ts +14 -0
- package/package.json +11 -11
|
@@ -86,6 +86,51 @@ Demo.play = /*#__PURE__*/function () {
|
|
|
86
86
|
};
|
|
87
87
|
}();
|
|
88
88
|
|
|
89
|
+
export var FindBy = function FindBy(args) {
|
|
90
|
+
var _React$useState = React.useState(true),
|
|
91
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
92
|
+
isLoading = _React$useState2[0],
|
|
93
|
+
setIsLoading = _React$useState2[1];
|
|
94
|
+
|
|
95
|
+
React.useEffect(function () {
|
|
96
|
+
setTimeout(function () {
|
|
97
|
+
return setIsLoading(false);
|
|
98
|
+
}, 500);
|
|
99
|
+
}, []);
|
|
100
|
+
return isLoading ? /*#__PURE__*/React.createElement("div", null, "Loading...") : /*#__PURE__*/React.createElement("button", {
|
|
101
|
+
type: "button"
|
|
102
|
+
}, "Loaded!");
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
FindBy.play = /*#__PURE__*/function () {
|
|
106
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(_ref3) {
|
|
107
|
+
var canvasElement, canvas;
|
|
108
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
109
|
+
while (1) {
|
|
110
|
+
switch (_context2.prev = _context2.next) {
|
|
111
|
+
case 0:
|
|
112
|
+
canvasElement = _ref3.canvasElement;
|
|
113
|
+
canvas = within(canvasElement);
|
|
114
|
+
_context2.next = 4;
|
|
115
|
+
return canvas.findByRole('button');
|
|
116
|
+
|
|
117
|
+
case 4:
|
|
118
|
+
_context2.next = 6;
|
|
119
|
+
return expect(true).toBe(true);
|
|
120
|
+
|
|
121
|
+
case 6:
|
|
122
|
+
case "end":
|
|
123
|
+
return _context2.stop();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}, _callee2);
|
|
127
|
+
}));
|
|
128
|
+
|
|
129
|
+
return function (_x2) {
|
|
130
|
+
return _ref4.apply(this, arguments);
|
|
131
|
+
};
|
|
132
|
+
}();
|
|
133
|
+
|
|
89
134
|
export var WaitFor = function WaitFor(args) {
|
|
90
135
|
return /*#__PURE__*/React.createElement("button", {
|
|
91
136
|
type: "button",
|
|
@@ -98,58 +143,62 @@ export var WaitFor = function WaitFor(args) {
|
|
|
98
143
|
};
|
|
99
144
|
|
|
100
145
|
WaitFor.play = /*#__PURE__*/function () {
|
|
101
|
-
var
|
|
146
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(_ref5) {
|
|
102
147
|
var args, canvasElement;
|
|
103
|
-
return regeneratorRuntime.wrap(function
|
|
148
|
+
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
104
149
|
while (1) {
|
|
105
|
-
switch (
|
|
150
|
+
switch (_context4.prev = _context4.next) {
|
|
106
151
|
case 0:
|
|
107
|
-
args =
|
|
108
|
-
|
|
109
|
-
|
|
152
|
+
args = _ref5.args, canvasElement = _ref5.canvasElement;
|
|
153
|
+
_context4.t0 = userEvent;
|
|
154
|
+
_context4.next = 4;
|
|
110
155
|
return within(canvasElement).findByText('Click');
|
|
111
156
|
|
|
112
157
|
case 4:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return
|
|
158
|
+
_context4.t1 = _context4.sent;
|
|
159
|
+
_context4.next = 7;
|
|
160
|
+
return _context4.t0.click.call(_context4.t0, _context4.t1);
|
|
116
161
|
|
|
117
162
|
case 7:
|
|
118
|
-
|
|
119
|
-
return waitFor( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
120
|
-
return regeneratorRuntime.wrap(function
|
|
163
|
+
_context4.next = 9;
|
|
164
|
+
return waitFor( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
165
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
121
166
|
while (1) {
|
|
122
|
-
switch (
|
|
167
|
+
switch (_context3.prev = _context3.next) {
|
|
123
168
|
case 0:
|
|
124
|
-
|
|
169
|
+
_context3.next = 2;
|
|
125
170
|
return expect(args.onSubmit).toHaveBeenCalledWith(expect.stringMatching(/([A-Z])\w+/gi));
|
|
126
171
|
|
|
127
172
|
case 2:
|
|
173
|
+
_context3.next = 4;
|
|
174
|
+
return expect(true).toBe(true);
|
|
175
|
+
|
|
176
|
+
case 4:
|
|
128
177
|
case "end":
|
|
129
|
-
return
|
|
178
|
+
return _context3.stop();
|
|
130
179
|
}
|
|
131
180
|
}
|
|
132
|
-
},
|
|
181
|
+
}, _callee3);
|
|
133
182
|
})));
|
|
134
183
|
|
|
135
184
|
case 9:
|
|
136
185
|
case "end":
|
|
137
|
-
return
|
|
186
|
+
return _context4.stop();
|
|
138
187
|
}
|
|
139
188
|
}
|
|
140
|
-
},
|
|
189
|
+
}, _callee4);
|
|
141
190
|
}));
|
|
142
191
|
|
|
143
|
-
return function (
|
|
144
|
-
return
|
|
192
|
+
return function (_x3) {
|
|
193
|
+
return _ref6.apply(this, arguments);
|
|
145
194
|
};
|
|
146
195
|
}();
|
|
147
196
|
|
|
148
197
|
export var WaitForElementToBeRemoved = function WaitForElementToBeRemoved() {
|
|
149
|
-
var _React$
|
|
150
|
-
_React$
|
|
151
|
-
isLoading = _React$
|
|
152
|
-
setIsLoading = _React$
|
|
198
|
+
var _React$useState3 = React.useState(true),
|
|
199
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
200
|
+
isLoading = _React$useState4[0],
|
|
201
|
+
setIsLoading = _React$useState4[1];
|
|
153
202
|
|
|
154
203
|
React.useEffect(function () {
|
|
155
204
|
setTimeout(function () {
|
|
@@ -162,67 +211,67 @@ export var WaitForElementToBeRemoved = function WaitForElementToBeRemoved() {
|
|
|
162
211
|
};
|
|
163
212
|
|
|
164
213
|
WaitForElementToBeRemoved.play = /*#__PURE__*/function () {
|
|
165
|
-
var
|
|
214
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(_ref8) {
|
|
166
215
|
var canvasElement, canvas, button;
|
|
167
|
-
return regeneratorRuntime.wrap(function
|
|
216
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
168
217
|
while (1) {
|
|
169
|
-
switch (
|
|
218
|
+
switch (_context5.prev = _context5.next) {
|
|
170
219
|
case 0:
|
|
171
|
-
canvasElement =
|
|
220
|
+
canvasElement = _ref8.canvasElement;
|
|
172
221
|
canvas = within(canvasElement);
|
|
173
|
-
|
|
174
|
-
|
|
222
|
+
_context5.t0 = waitForElementToBeRemoved;
|
|
223
|
+
_context5.next = 5;
|
|
175
224
|
return canvas.findByText('Loading...');
|
|
176
225
|
|
|
177
226
|
case 5:
|
|
178
|
-
|
|
179
|
-
|
|
227
|
+
_context5.t1 = _context5.sent;
|
|
228
|
+
_context5.t2 = {
|
|
180
229
|
timeout: 2000
|
|
181
230
|
};
|
|
182
|
-
|
|
183
|
-
return (0,
|
|
231
|
+
_context5.next = 9;
|
|
232
|
+
return (0, _context5.t0)(_context5.t1, _context5.t2);
|
|
184
233
|
|
|
185
234
|
case 9:
|
|
186
|
-
|
|
235
|
+
_context5.next = 11;
|
|
187
236
|
return canvas.findByText('Loaded!');
|
|
188
237
|
|
|
189
238
|
case 11:
|
|
190
|
-
button =
|
|
191
|
-
|
|
239
|
+
button = _context5.sent;
|
|
240
|
+
_context5.next = 14;
|
|
192
241
|
return expect(button).not.toBeNull();
|
|
193
242
|
|
|
194
243
|
case 14:
|
|
195
244
|
case "end":
|
|
196
|
-
return
|
|
245
|
+
return _context5.stop();
|
|
197
246
|
}
|
|
198
247
|
}
|
|
199
|
-
},
|
|
248
|
+
}, _callee5);
|
|
200
249
|
}));
|
|
201
250
|
|
|
202
|
-
return function (
|
|
203
|
-
return
|
|
251
|
+
return function (_x4) {
|
|
252
|
+
return _ref9.apply(this, arguments);
|
|
204
253
|
};
|
|
205
254
|
}();
|
|
206
255
|
|
|
207
|
-
export var WithLoaders = function WithLoaders(args,
|
|
208
|
-
var todo =
|
|
256
|
+
export var WithLoaders = function WithLoaders(args, _ref10) {
|
|
257
|
+
var todo = _ref10.loaded.todo;
|
|
209
258
|
return /*#__PURE__*/React.createElement("button", {
|
|
210
259
|
type: "button",
|
|
211
260
|
onClick: args.onSubmit(todo.title)
|
|
212
261
|
}, "Todo: ", todo.title);
|
|
213
262
|
};
|
|
214
|
-
WithLoaders.loaders = [/*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
215
|
-
return regeneratorRuntime.wrap(function
|
|
263
|
+
WithLoaders.loaders = [/*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
|
|
264
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
216
265
|
while (1) {
|
|
217
|
-
switch (
|
|
266
|
+
switch (_context6.prev = _context6.next) {
|
|
218
267
|
case 0:
|
|
219
|
-
|
|
268
|
+
_context6.next = 2;
|
|
220
269
|
return new Promise(function (resolve) {
|
|
221
270
|
return setTimeout(resolve, 2000);
|
|
222
271
|
});
|
|
223
272
|
|
|
224
273
|
case 2:
|
|
225
|
-
return
|
|
274
|
+
return _context6.abrupt("return", {
|
|
226
275
|
todo: {
|
|
227
276
|
userId: 1,
|
|
228
277
|
id: 1,
|
|
@@ -233,43 +282,43 @@ WithLoaders.loaders = [/*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorR
|
|
|
233
282
|
|
|
234
283
|
case 3:
|
|
235
284
|
case "end":
|
|
236
|
-
return
|
|
285
|
+
return _context6.stop();
|
|
237
286
|
}
|
|
238
287
|
}
|
|
239
|
-
},
|
|
288
|
+
}, _callee6);
|
|
240
289
|
}))];
|
|
241
290
|
|
|
242
291
|
WithLoaders.play = /*#__PURE__*/function () {
|
|
243
|
-
var
|
|
292
|
+
var _ref13 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(_ref12) {
|
|
244
293
|
var args, canvasElement, canvas, todoItem;
|
|
245
|
-
return regeneratorRuntime.wrap(function
|
|
294
|
+
return regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
246
295
|
while (1) {
|
|
247
|
-
switch (
|
|
296
|
+
switch (_context7.prev = _context7.next) {
|
|
248
297
|
case 0:
|
|
249
|
-
args =
|
|
298
|
+
args = _ref12.args, canvasElement = _ref12.canvasElement;
|
|
250
299
|
canvas = within(canvasElement);
|
|
251
|
-
|
|
300
|
+
_context7.next = 4;
|
|
252
301
|
return canvas.findByText('Todo: delectus aut autem');
|
|
253
302
|
|
|
254
303
|
case 4:
|
|
255
|
-
todoItem =
|
|
256
|
-
|
|
304
|
+
todoItem = _context7.sent;
|
|
305
|
+
_context7.next = 7;
|
|
257
306
|
return userEvent.click(todoItem);
|
|
258
307
|
|
|
259
308
|
case 7:
|
|
260
|
-
|
|
309
|
+
_context7.next = 9;
|
|
261
310
|
return expect(args.onSubmit).toHaveBeenCalledWith('delectus aut autem');
|
|
262
311
|
|
|
263
312
|
case 9:
|
|
264
313
|
case "end":
|
|
265
|
-
return
|
|
314
|
+
return _context7.stop();
|
|
266
315
|
}
|
|
267
316
|
}
|
|
268
|
-
},
|
|
317
|
+
}, _callee7);
|
|
269
318
|
}));
|
|
270
319
|
|
|
271
|
-
return function (
|
|
272
|
-
return
|
|
320
|
+
return function (_x5) {
|
|
321
|
+
return _ref13.apply(this, arguments);
|
|
273
322
|
};
|
|
274
323
|
}();
|
|
275
324
|
|
|
@@ -280,15 +329,15 @@ export var Standard = {
|
|
|
280
329
|
};
|
|
281
330
|
export var StandardEmailFilled = Object.assign({}, Standard, {
|
|
282
331
|
play: function () {
|
|
283
|
-
var _play = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
332
|
+
var _play = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(_ref14) {
|
|
284
333
|
var canvasElement, canvas;
|
|
285
|
-
return regeneratorRuntime.wrap(function
|
|
334
|
+
return regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
286
335
|
while (1) {
|
|
287
|
-
switch (
|
|
336
|
+
switch (_context8.prev = _context8.next) {
|
|
288
337
|
case 0:
|
|
289
|
-
canvasElement =
|
|
338
|
+
canvasElement = _ref14.canvasElement;
|
|
290
339
|
canvas = within(canvasElement);
|
|
291
|
-
|
|
340
|
+
_context8.next = 4;
|
|
292
341
|
return fireEvent.change(canvas.getByTestId('email'), {
|
|
293
342
|
target: {
|
|
294
343
|
value: 'michael@chromatic.com'
|
|
@@ -297,13 +346,13 @@ export var StandardEmailFilled = Object.assign({}, Standard, {
|
|
|
297
346
|
|
|
298
347
|
case 4:
|
|
299
348
|
case "end":
|
|
300
|
-
return
|
|
349
|
+
return _context8.stop();
|
|
301
350
|
}
|
|
302
351
|
}
|
|
303
|
-
},
|
|
352
|
+
}, _callee8);
|
|
304
353
|
}));
|
|
305
354
|
|
|
306
|
-
function play(
|
|
355
|
+
function play(_x6) {
|
|
307
356
|
return _play.apply(this, arguments);
|
|
308
357
|
}
|
|
309
358
|
|
|
@@ -312,29 +361,29 @@ export var StandardEmailFilled = Object.assign({}, Standard, {
|
|
|
312
361
|
});
|
|
313
362
|
export var StandardEmailFailed = Object.assign({}, Standard, {
|
|
314
363
|
play: function () {
|
|
315
|
-
var _play2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
364
|
+
var _play2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(_ref15) {
|
|
316
365
|
var args, canvasElement, canvas;
|
|
317
|
-
return regeneratorRuntime.wrap(function
|
|
366
|
+
return regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
318
367
|
while (1) {
|
|
319
|
-
switch (
|
|
368
|
+
switch (_context9.prev = _context9.next) {
|
|
320
369
|
case 0:
|
|
321
|
-
args =
|
|
370
|
+
args = _ref15.args, canvasElement = _ref15.canvasElement;
|
|
322
371
|
canvas = within(canvasElement);
|
|
323
|
-
|
|
372
|
+
_context9.next = 4;
|
|
324
373
|
return userEvent.type(canvas.getByTestId('email'), 'gert@chromatic');
|
|
325
374
|
|
|
326
375
|
case 4:
|
|
327
|
-
|
|
376
|
+
_context9.next = 6;
|
|
328
377
|
return userEvent.type(canvas.getByTestId('password1'), 'supersecret');
|
|
329
378
|
|
|
330
379
|
case 6:
|
|
331
|
-
|
|
380
|
+
_context9.next = 8;
|
|
332
381
|
return userEvent.click(canvas.getByRole('button', {
|
|
333
382
|
name: /create account/i
|
|
334
383
|
}));
|
|
335
384
|
|
|
336
385
|
case 8:
|
|
337
|
-
|
|
386
|
+
_context9.next = 10;
|
|
338
387
|
return canvas.findByText('Please enter a correctly formatted email address');
|
|
339
388
|
|
|
340
389
|
case 10:
|
|
@@ -342,13 +391,13 @@ export var StandardEmailFailed = Object.assign({}, Standard, {
|
|
|
342
391
|
|
|
343
392
|
case 11:
|
|
344
393
|
case "end":
|
|
345
|
-
return
|
|
394
|
+
return _context9.stop();
|
|
346
395
|
}
|
|
347
396
|
}
|
|
348
|
-
},
|
|
397
|
+
}, _callee9);
|
|
349
398
|
}));
|
|
350
399
|
|
|
351
|
-
function play(
|
|
400
|
+
function play(_x7) {
|
|
352
401
|
return _play2.apply(this, arguments);
|
|
353
402
|
}
|
|
354
403
|
|
|
@@ -357,37 +406,37 @@ export var StandardEmailFailed = Object.assign({}, Standard, {
|
|
|
357
406
|
});
|
|
358
407
|
export var StandardEmailSuccess = Object.assign({}, Standard, {
|
|
359
408
|
play: function () {
|
|
360
|
-
var _play3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
409
|
+
var _play3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(_ref16) {
|
|
361
410
|
var args, canvasElement, canvas;
|
|
362
|
-
return regeneratorRuntime.wrap(function
|
|
411
|
+
return regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
363
412
|
while (1) {
|
|
364
|
-
switch (
|
|
413
|
+
switch (_context11.prev = _context11.next) {
|
|
365
414
|
case 0:
|
|
366
|
-
args =
|
|
415
|
+
args = _ref16.args, canvasElement = _ref16.canvasElement;
|
|
367
416
|
canvas = within(canvasElement);
|
|
368
|
-
|
|
417
|
+
_context11.next = 4;
|
|
369
418
|
return userEvent.type(canvas.getByTestId('email'), 'michael@chromatic.com');
|
|
370
419
|
|
|
371
420
|
case 4:
|
|
372
|
-
|
|
421
|
+
_context11.next = 6;
|
|
373
422
|
return userEvent.type(canvas.getByTestId('password1'), 'testpasswordthatwontfail');
|
|
374
423
|
|
|
375
424
|
case 6:
|
|
376
|
-
|
|
425
|
+
_context11.next = 8;
|
|
377
426
|
return userEvent.click(canvas.getByTestId('submit'));
|
|
378
427
|
|
|
379
428
|
case 8:
|
|
380
|
-
|
|
381
|
-
return waitFor( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
382
|
-
return regeneratorRuntime.wrap(function
|
|
429
|
+
_context11.next = 10;
|
|
430
|
+
return waitFor( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
|
|
431
|
+
return regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
383
432
|
while (1) {
|
|
384
|
-
switch (
|
|
433
|
+
switch (_context10.prev = _context10.next) {
|
|
385
434
|
case 0:
|
|
386
|
-
|
|
435
|
+
_context10.next = 2;
|
|
387
436
|
return expect(args.onSubmit).toHaveBeenCalledTimes(1);
|
|
388
437
|
|
|
389
438
|
case 2:
|
|
390
|
-
|
|
439
|
+
_context10.next = 4;
|
|
391
440
|
return expect(args.onSubmit).toHaveBeenCalledWith({
|
|
392
441
|
email: 'michael@chromatic.com',
|
|
393
442
|
password: 'testpasswordthatwontfail'
|
|
@@ -395,21 +444,21 @@ export var StandardEmailSuccess = Object.assign({}, Standard, {
|
|
|
395
444
|
|
|
396
445
|
case 4:
|
|
397
446
|
case "end":
|
|
398
|
-
return
|
|
447
|
+
return _context10.stop();
|
|
399
448
|
}
|
|
400
449
|
}
|
|
401
|
-
},
|
|
450
|
+
}, _callee10);
|
|
402
451
|
})));
|
|
403
452
|
|
|
404
453
|
case 10:
|
|
405
454
|
case "end":
|
|
406
|
-
return
|
|
455
|
+
return _context11.stop();
|
|
407
456
|
}
|
|
408
457
|
}
|
|
409
|
-
},
|
|
458
|
+
}, _callee11);
|
|
410
459
|
}));
|
|
411
460
|
|
|
412
|
-
function play(
|
|
461
|
+
function play(_x8) {
|
|
413
462
|
return _play3.apply(this, arguments);
|
|
414
463
|
}
|
|
415
464
|
|
|
@@ -418,33 +467,33 @@ export var StandardEmailSuccess = Object.assign({}, Standard, {
|
|
|
418
467
|
});
|
|
419
468
|
export var StandardPasswordFailed = Object.assign({}, Standard, {
|
|
420
469
|
play: function () {
|
|
421
|
-
var _play4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
470
|
+
var _play4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(context) {
|
|
422
471
|
var canvas;
|
|
423
|
-
return regeneratorRuntime.wrap(function
|
|
472
|
+
return regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
424
473
|
while (1) {
|
|
425
|
-
switch (
|
|
474
|
+
switch (_context12.prev = _context12.next) {
|
|
426
475
|
case 0:
|
|
427
476
|
canvas = within(context.canvasElement);
|
|
428
|
-
|
|
477
|
+
_context12.next = 3;
|
|
429
478
|
return StandardEmailFilled.play(context);
|
|
430
479
|
|
|
431
480
|
case 3:
|
|
432
|
-
|
|
481
|
+
_context12.next = 5;
|
|
433
482
|
return userEvent.type(canvas.getByTestId('password1'), 'asdf');
|
|
434
483
|
|
|
435
484
|
case 5:
|
|
436
|
-
|
|
485
|
+
_context12.next = 7;
|
|
437
486
|
return userEvent.click(canvas.getByTestId('submit'));
|
|
438
487
|
|
|
439
488
|
case 7:
|
|
440
489
|
case "end":
|
|
441
|
-
return
|
|
490
|
+
return _context12.stop();
|
|
442
491
|
}
|
|
443
492
|
}
|
|
444
|
-
},
|
|
493
|
+
}, _callee12);
|
|
445
494
|
}));
|
|
446
495
|
|
|
447
|
-
function play(
|
|
496
|
+
function play(_x9) {
|
|
448
497
|
return _play4.apply(this, arguments);
|
|
449
498
|
}
|
|
450
499
|
|
|
@@ -453,43 +502,43 @@ export var StandardPasswordFailed = Object.assign({}, Standard, {
|
|
|
453
502
|
});
|
|
454
503
|
export var StandardFailHover = Object.assign({}, StandardPasswordFailed, {
|
|
455
504
|
play: function () {
|
|
456
|
-
var _play5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
505
|
+
var _play5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14(context) {
|
|
457
506
|
var canvas;
|
|
458
|
-
return regeneratorRuntime.wrap(function
|
|
507
|
+
return regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
459
508
|
while (1) {
|
|
460
|
-
switch (
|
|
509
|
+
switch (_context14.prev = _context14.next) {
|
|
461
510
|
case 0:
|
|
462
511
|
canvas = within(context.canvasElement);
|
|
463
|
-
|
|
512
|
+
_context14.next = 3;
|
|
464
513
|
return StandardPasswordFailed.play(context);
|
|
465
514
|
|
|
466
515
|
case 3:
|
|
467
|
-
|
|
468
|
-
return waitFor( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
469
|
-
return regeneratorRuntime.wrap(function
|
|
516
|
+
_context14.next = 5;
|
|
517
|
+
return waitFor( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
|
|
518
|
+
return regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
470
519
|
while (1) {
|
|
471
|
-
switch (
|
|
520
|
+
switch (_context13.prev = _context13.next) {
|
|
472
521
|
case 0:
|
|
473
|
-
|
|
522
|
+
_context13.next = 2;
|
|
474
523
|
return userEvent.hover(canvas.getByTestId('password-error-info'));
|
|
475
524
|
|
|
476
525
|
case 2:
|
|
477
526
|
case "end":
|
|
478
|
-
return
|
|
527
|
+
return _context13.stop();
|
|
479
528
|
}
|
|
480
529
|
}
|
|
481
|
-
},
|
|
530
|
+
}, _callee13);
|
|
482
531
|
})));
|
|
483
532
|
|
|
484
533
|
case 5:
|
|
485
534
|
case "end":
|
|
486
|
-
return
|
|
535
|
+
return _context14.stop();
|
|
487
536
|
}
|
|
488
537
|
}
|
|
489
|
-
},
|
|
538
|
+
}, _callee14);
|
|
490
539
|
}));
|
|
491
540
|
|
|
492
|
-
function play(
|
|
541
|
+
function play(_x10) {
|
|
493
542
|
return _play5.apply(this, arguments);
|
|
494
543
|
}
|
|
495
544
|
|
|
@@ -508,33 +557,33 @@ export var Verification = {
|
|
|
508
557
|
};
|
|
509
558
|
export var VerificationPasssword1 = Object.assign({}, Verification, {
|
|
510
559
|
play: function () {
|
|
511
|
-
var _play6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
560
|
+
var _play6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15(context) {
|
|
512
561
|
var canvas;
|
|
513
|
-
return regeneratorRuntime.wrap(function
|
|
562
|
+
return regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
514
563
|
while (1) {
|
|
515
|
-
switch (
|
|
564
|
+
switch (_context15.prev = _context15.next) {
|
|
516
565
|
case 0:
|
|
517
566
|
canvas = within(context.canvasElement);
|
|
518
|
-
|
|
567
|
+
_context15.next = 3;
|
|
519
568
|
return StandardEmailFilled.play(context);
|
|
520
569
|
|
|
521
570
|
case 3:
|
|
522
|
-
|
|
571
|
+
_context15.next = 5;
|
|
523
572
|
return userEvent.type(canvas.getByTestId('password1'), 'asdfasdf');
|
|
524
573
|
|
|
525
574
|
case 5:
|
|
526
|
-
|
|
575
|
+
_context15.next = 7;
|
|
527
576
|
return userEvent.click(canvas.getByTestId('submit'));
|
|
528
577
|
|
|
529
578
|
case 7:
|
|
530
579
|
case "end":
|
|
531
|
-
return
|
|
580
|
+
return _context15.stop();
|
|
532
581
|
}
|
|
533
582
|
}
|
|
534
|
-
},
|
|
583
|
+
}, _callee15);
|
|
535
584
|
}));
|
|
536
585
|
|
|
537
|
-
function play(
|
|
586
|
+
function play(_x11) {
|
|
538
587
|
return _play6.apply(this, arguments);
|
|
539
588
|
}
|
|
540
589
|
|
|
@@ -543,37 +592,37 @@ export var VerificationPasssword1 = Object.assign({}, Verification, {
|
|
|
543
592
|
});
|
|
544
593
|
export var VerificationPasswordMismatch = Object.assign({}, Verification, {
|
|
545
594
|
play: function () {
|
|
546
|
-
var _play7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
595
|
+
var _play7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16(context) {
|
|
547
596
|
var canvas;
|
|
548
|
-
return regeneratorRuntime.wrap(function
|
|
597
|
+
return regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
549
598
|
while (1) {
|
|
550
|
-
switch (
|
|
599
|
+
switch (_context16.prev = _context16.next) {
|
|
551
600
|
case 0:
|
|
552
601
|
canvas = within(context.canvasElement);
|
|
553
|
-
|
|
602
|
+
_context16.next = 3;
|
|
554
603
|
return StandardEmailFilled.play(context);
|
|
555
604
|
|
|
556
605
|
case 3:
|
|
557
|
-
|
|
606
|
+
_context16.next = 5;
|
|
558
607
|
return userEvent.type(canvas.getByTestId('password1'), 'asdfasdf');
|
|
559
608
|
|
|
560
609
|
case 5:
|
|
561
|
-
|
|
610
|
+
_context16.next = 7;
|
|
562
611
|
return userEvent.type(canvas.getByTestId('password2'), 'asdf1234');
|
|
563
612
|
|
|
564
613
|
case 7:
|
|
565
|
-
|
|
614
|
+
_context16.next = 9;
|
|
566
615
|
return userEvent.click(canvas.getByTestId('submit'));
|
|
567
616
|
|
|
568
617
|
case 9:
|
|
569
618
|
case "end":
|
|
570
|
-
return
|
|
619
|
+
return _context16.stop();
|
|
571
620
|
}
|
|
572
621
|
}
|
|
573
|
-
},
|
|
622
|
+
}, _callee16);
|
|
574
623
|
}));
|
|
575
624
|
|
|
576
|
-
function play(
|
|
625
|
+
function play(_x12) {
|
|
577
626
|
return _play7.apply(this, arguments);
|
|
578
627
|
}
|
|
579
628
|
|
|
@@ -582,59 +631,59 @@ export var VerificationPasswordMismatch = Object.assign({}, Verification, {
|
|
|
582
631
|
});
|
|
583
632
|
export var VerificationSuccess = Object.assign({}, Verification, {
|
|
584
633
|
play: function () {
|
|
585
|
-
var _play8 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
634
|
+
var _play8 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17(context) {
|
|
586
635
|
var canvas;
|
|
587
|
-
return regeneratorRuntime.wrap(function
|
|
636
|
+
return regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
588
637
|
while (1) {
|
|
589
|
-
switch (
|
|
638
|
+
switch (_context17.prev = _context17.next) {
|
|
590
639
|
case 0:
|
|
591
640
|
canvas = within(context.canvasElement);
|
|
592
|
-
|
|
641
|
+
_context17.next = 3;
|
|
593
642
|
return StandardEmailFilled.play(context);
|
|
594
643
|
|
|
595
644
|
case 3:
|
|
596
|
-
|
|
645
|
+
_context17.next = 5;
|
|
597
646
|
return new Promise(function (resolve) {
|
|
598
647
|
return setTimeout(resolve, 1000);
|
|
599
648
|
});
|
|
600
649
|
|
|
601
650
|
case 5:
|
|
602
|
-
|
|
651
|
+
_context17.next = 7;
|
|
603
652
|
return userEvent.type(canvas.getByTestId('password1'), 'helloyou', {
|
|
604
653
|
delay: 50
|
|
605
654
|
});
|
|
606
655
|
|
|
607
656
|
case 7:
|
|
608
|
-
|
|
657
|
+
_context17.next = 9;
|
|
609
658
|
return new Promise(function (resolve) {
|
|
610
659
|
return setTimeout(resolve, 1000);
|
|
611
660
|
});
|
|
612
661
|
|
|
613
662
|
case 9:
|
|
614
|
-
|
|
663
|
+
_context17.next = 11;
|
|
615
664
|
return userEvent.type(canvas.getByTestId('password2'), 'helloyou', {
|
|
616
665
|
delay: 50
|
|
617
666
|
});
|
|
618
667
|
|
|
619
668
|
case 11:
|
|
620
|
-
|
|
669
|
+
_context17.next = 13;
|
|
621
670
|
return new Promise(function (resolve) {
|
|
622
671
|
return setTimeout(resolve, 1000);
|
|
623
672
|
});
|
|
624
673
|
|
|
625
674
|
case 13:
|
|
626
|
-
|
|
675
|
+
_context17.next = 15;
|
|
627
676
|
return userEvent.click(canvas.getByTestId('submit'));
|
|
628
677
|
|
|
629
678
|
case 15:
|
|
630
679
|
case "end":
|
|
631
|
-
return
|
|
680
|
+
return _context17.stop();
|
|
632
681
|
}
|
|
633
682
|
}
|
|
634
|
-
},
|
|
683
|
+
}, _callee17);
|
|
635
684
|
}));
|
|
636
685
|
|
|
637
|
-
function play(
|
|
686
|
+
function play(_x13) {
|
|
638
687
|
return _play8.apply(this, arguments);
|
|
639
688
|
}
|
|
640
689
|
|