Browse Source

fix ci error

pull/2742/head
陈帅 8 years ago
parent
commit
2a4e518ae0
  1. 2
      src/components/Login/map.js
  2. 3
      src/e2e/login.e2e.js

2
src/components/Login/map.js

@ -6,6 +6,7 @@ export default {
UserName: {
props: {
size: 'large',
id: 'userName',
prefix: <Icon type="user" className={styles.prefixIcon} />,
placeholder: 'admin',
},
@ -21,6 +22,7 @@ export default {
size: 'large',
prefix: <Icon type="lock" className={styles.prefixIcon} />,
type: 'password',
id: 'password',
placeholder: '888888',
},
rules: [

3
src/e2e/login.e2e.js

@ -7,6 +7,7 @@ describe('Login', () => {
let page;
beforeAll(async () => {
jest.setTimeout(1000000);
browser = await puppeteer.launch({ args: ['--no-sandbox'] });
});
@ -33,7 +34,7 @@ describe('Login', () => {
timeout: 2000,
});
await page.type('#userName', 'admin');
await page.type('#password', '888888');
await page.type('#password', 'ant.design');
await page.click('button[type="submit"]');
await page.waitForSelector('.ant-layout-sider h1'); // should display error
const text = await page.evaluate(() => document.body.innerHTML);

Loading…
Cancel
Save