#860 E2E client/client/src/web-payment/index.js
This commit is contained in:
parent
250bb359e1
commit
ccf5c95b56
|
@ -163,6 +163,10 @@ export default {
|
|||
firstRiskLineBalance: 'vn-client-risk-index vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(8)'
|
||||
|
||||
},
|
||||
webPayment: {
|
||||
confirmFirstPaymentButton: 'vn-client-web-payment vn-tr:nth-child(1) vn-icon-button[icon="done_all"]',
|
||||
firstPaymentConfirmed: 'vn-client-web-payment vn-tr:nth-child(1) vn-icon[icon="check"]'
|
||||
},
|
||||
itemsIndex: {
|
||||
goBackToModuleIndexButton: `vn-ticket-descriptor a[href="#!/ticket/index"]`,
|
||||
createItemButton: `${components.vnFloatButton}`,
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import createNightmare from '../../helpers/nightmare';
|
||||
|
||||
// #860 E2E client/client/src/web-payment/index.js missing fixtures for another client
|
||||
xdescribe('Client web Payment', () => {
|
||||
const nightmare = createNightmare();
|
||||
|
||||
describe('as employee', () => {
|
||||
beforeAll(() => {
|
||||
nightmare
|
||||
.loginAndModule('employee', 'client')
|
||||
.accessToSearchResult('Bruce Wayne')
|
||||
.accessToSection('client.card.webPayment');
|
||||
});
|
||||
|
||||
it('should not be able to confirm payments', async() => {
|
||||
let exists = await nightmare
|
||||
.exists(selectors.webPayment.confirmFirstPaymentButton);
|
||||
|
||||
expect(exists).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('as administrative', () => {
|
||||
beforeAll(() => {
|
||||
nightmare
|
||||
.loginAndModule('administrative', 'client')
|
||||
.accessToSearchResult('Bruce Wayne')
|
||||
.accessToSection('client.card.webPayment');
|
||||
});
|
||||
|
||||
it('should be able to confirm payments', async() => {
|
||||
let exists = await nightmare
|
||||
.waitToClick(selectors.webPayment.confirmFirstPaymentButton)
|
||||
.exists(selectors.webPayment.firstPaymentConfirmed);
|
||||
|
||||
expect(exists).toBeTruthy();
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue