Commit 5746bb64 authored by Wei Zhu's avatar Wei Zhu Committed by 陈帅

introduce vcr

parent 0745731b
......@@ -14,7 +14,7 @@ jobs:
- checkout
- run: npm install
- run:
command : npm run test:all
command : npx vcr
no_output_timeout : 30m
workflows:
version: 2
......
......@@ -53,6 +53,10 @@ if (process.env.APP_TYPE === 'site') {
]);
}
if (process.env.NODE_ENV === 'development') {
plugins.push('umi-plugin-vcr');
}
export default {
// add for transfer to umi
plugins,
......
{
"pagePath": "/user/login",
"viewport": {
"width": 1440,
"height": 747
},
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36",
"language": "zh-CN",
"events": [
{
"selector": ".ant-form-item-control-wrapper > .ant-form-item-control > .ant-form-item-children > .ant-input-affix-wrapper > #userName",
"value": "",
"tagName": "INPUT",
"action": "click",
"keyCode": null,
"href": null,
"coordinates": null
},
{
"selector": ".ant-form-item-control-wrapper > .ant-form-item-control > .ant-form-item-children > .ant-input-affix-wrapper > #userName",
"value": "",
"tagName": "INPUT",
"action": "keydown",
"keyCode": 65,
"href": null,
"coordinates": null
},
{
"selector": ".ant-form-item-control-wrapper > .ant-form-item-control > .ant-form-item-children > .ant-input-affix-wrapper > #userName",
"value": "a",
"tagName": "INPUT",
"action": "keydown",
"keyCode": 68,
"href": null,
"coordinates": null
},
{
"selector": ".ant-form-item-control-wrapper > .ant-form-item-control > .ant-form-item-children > .ant-input-affix-wrapper > #userName",
"value": "ad",
"tagName": "INPUT",
"action": "keydown",
"keyCode": 77,
"href": null,
"coordinates": null
},
{
"selector": ".ant-form-item-control-wrapper > .ant-form-item-control > .ant-form-item-children > .ant-input-affix-wrapper > #userName",
"value": "adm",
"tagName": "INPUT",
"action": "keydown",
"keyCode": 73,
"href": null,
"coordinates": null
},
{
"selector": ".ant-form-item-control-wrapper > .ant-form-item-control > .ant-form-item-children > .ant-input-affix-wrapper > #userName",
"value": "admi",
"tagName": "INPUT",
"action": "keydown",
"keyCode": 78,
"href": null,
"coordinates": null
},
{
"selector": ".ant-form-item-control-wrapper > .ant-form-item-control > .ant-form-item-children > .ant-input-affix-wrapper > #userName",
"value": "admin",
"tagName": "INPUT",
"action": "keydown",
"keyCode": 9,
"href": null,
"coordinates": null
},
{
"selector": ".ant-form-item-control-wrapper > .ant-form-item-control > .ant-form-item-children > .ant-input-affix-wrapper > #userName",
"value": "admin",
"tagName": "INPUT",
"action": "change",
"keyCode": null,
"href": null,
"coordinates": null
},
{
"selector": ".ant-form-item-control-wrapper > .ant-form-item-control > .ant-form-item-children > .ant-input-affix-wrapper > #password",
"value": "",
"tagName": "INPUT",
"action": "keydown",
"keyCode": 56,
"href": null,
"coordinates": null
},
{
"selector": ".ant-form-item-control-wrapper > .ant-form-item-control > .ant-form-item-children > .ant-input-affix-wrapper > #password",
"value": "8",
"tagName": "INPUT",
"action": "keydown",
"keyCode": 56,
"href": null,
"coordinates": null
},
{
"selector": ".ant-form-item-control-wrapper > .ant-form-item-control > .ant-form-item-children > .ant-input-affix-wrapper > #password",
"value": "88",
"tagName": "INPUT",
"action": "keydown",
"keyCode": 56,
"href": null,
"coordinates": null
},
{
"selector": ".ant-form-item-control-wrapper > .ant-form-item-control > .ant-form-item-children > .ant-input-affix-wrapper > #password",
"value": "888",
"tagName": "INPUT",
"action": "keydown",
"keyCode": 56,
"href": null,
"coordinates": null
},
{
"selector": ".ant-form-item-control-wrapper > .ant-form-item-control > .ant-form-item-children > .ant-input-affix-wrapper > #password",
"value": "8888",
"tagName": "INPUT",
"action": "keydown",
"keyCode": 56,
"href": null,
"coordinates": null
},
{
"selector": ".ant-form-item-control-wrapper > .ant-form-item-control > .ant-form-item-children > .ant-input-affix-wrapper > #password",
"value": "88888",
"tagName": "INPUT",
"action": "keydown",
"keyCode": 56,
"href": null,
"coordinates": null
},
{
"selector": ".ant-form-item-control-wrapper > .ant-form-item-control > .ant-form-item-children > .ant-input-affix-wrapper > #password",
"value": "888888",
"tagName": "INPUT",
"action": "change",
"keyCode": null,
"href": null,
"coordinates": null
},
{
"selector": ".ant-row > .ant-form-item-control-wrapper > .ant-form-item-control > .ant-form-item-children > .ant-btn",
"value": "",
"tagName": "BUTTON",
"action": "click",
"keyCode": null,
"href": null,
"coordinates": null
},
{
"selector": ".ant-tabs > .ant-tabs-content > .ant-tabs-tabpane > .ant-alert > .ant-alert-message",
"tagName": "SPAN",
"action": "click",
"keyCode": null,
"href": null,
"coordinates": null
},
{
"selector": ".ant-tabs > .ant-tabs-content > .ant-tabs-tabpane > .ant-alert > .ant-alert-message",
"action": "snapshot",
"snapshot": "<span class=\"ant-alert-message\">账户或密码错误(admin/ant.design)</span>"
}
],
"HTTPInteractions": []
}
\ No newline at end of file
This diff is collapsed.
module.exports = {
apiMatch: ['http://localhost:8000/api/*'],
server: {
command: 'PORT=8001 BROWSER=none MOCK=none npm start',
port: 8001,
launchTimeout: 40000,
debug: true,
},
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment