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