greuge e2e path tests and nightamre config update
This commit is contained in:
parent
23a7a1a707
commit
0a4a2f1d1d
|
@ -1,8 +1,8 @@
|
|||
/* eslint no-console: 0 */
|
||||
import Nightmare from 'nightmare';
|
||||
|
||||
export default function createNightmare(width = 1100, height = 600) {
|
||||
const nightmare = new Nightmare({show: true, typeInterval: 10}).viewport(width, height);
|
||||
export default function createNightmare(width = 1280, height = 720) {
|
||||
const nightmare = new Nightmare({show: true, typeInterval: 10, x: 0, y: 0}).viewport(width, height);
|
||||
|
||||
nightmare.on('page', function(type, message, error) {
|
||||
fail(error);
|
||||
|
@ -13,7 +13,7 @@ export default function createNightmare(width = 1100, height = 600) {
|
|||
fail(message);
|
||||
}
|
||||
if (type === 'log') {
|
||||
// console.log(message);
|
||||
console.log(message);
|
||||
}
|
||||
});
|
||||
return nightmare;
|
||||
|
|
|
@ -87,16 +87,19 @@ describe('Add greuge path', () => {
|
|||
it(`should click on the add greuge button`, done => {
|
||||
nightmare
|
||||
.waitToClick(selectors.greuge.addGreugeFloatButton)
|
||||
.waitForURL('/greuge/create')
|
||||
.wait(500)
|
||||
.waitForURL('greuge/create')
|
||||
.wait(500)
|
||||
.url()
|
||||
.wait(500)
|
||||
.then(url => {
|
||||
expect(url).toContain('/greuge/create');
|
||||
expect(url).toContain('greuge/create');
|
||||
done();
|
||||
})
|
||||
.catch(catchErrors(done));
|
||||
});
|
||||
|
||||
it(`should add a new greuge`, done => {
|
||||
// it(`should add a new greuge`, done => {
|
||||
// nightmare
|
||||
// .type(selectors.credit.creditInput, 999)
|
||||
// .click(selectors.credit.saveButton)
|
||||
|
@ -107,7 +110,7 @@ describe('Add greuge path', () => {
|
|||
// done();
|
||||
// })
|
||||
// .catch(catchErrors(done));
|
||||
});
|
||||
// });
|
||||
|
||||
// it('should confirm the credit was updated', done => {
|
||||
// nightmare
|
||||
|
|
Loading…
Reference in New Issue