測試帳號與資料的管理
不建議存入資料庫
方法一
content: {
get: () => {
return {
email: '[email protected]',
correctPassword: 'demo',
worryPassword: '1111',
errorMessage: 'The email and password you entered are not valid.',
alertDanger: '.Alert--danger'
};
}
},
LoginPage.email.setValue(LoginPage.content.email);
LoginPage.password.setValue(LoginPage.content.worryPassword);
方法二
var config = require('./test-data.json');
{
"email": "[email protected]",
"correctPassword": "demo",
"worryPassword": "1111",
"errorMessage": "The email and password you entered are not valid.",
"alertDanger": "alertDanger"
}