Merge branch '1940-e2e-client-phone' of verdnatura/salix into dev
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
commit
6619b5ac72
|
@ -93,7 +93,7 @@ export default {
|
|||
newBankEntityBIC: '.vn-dialog.shown vn-textfield[ng-model="$ctrl.newBankEntity.bic"]',
|
||||
newBankEntityCode: '.vn-dialog.shown vn-textfield[ng-model="$ctrl.newBankEntity.id"]',
|
||||
acceptBankEntityButton: '.vn-dialog.shown button[response="accept"]',
|
||||
saveButton: `button[type=submit]`,
|
||||
saveButton: 'vn-client-billing-data button[type=submit]',
|
||||
watcher: 'vn-client-billing-data vn-watcher'
|
||||
},
|
||||
clientAddresses: {
|
||||
|
@ -185,6 +185,13 @@ export default {
|
|||
firstDocWorkerDescriptor: '.vn-popover.shown vn-worker-descriptor',
|
||||
acceptDeleteButton: '.vn-confirm.shown button[response="accept"]'
|
||||
},
|
||||
clientContacts: {
|
||||
addContactButton: 'vn-client-contact vn-icon[icon="add_circle"]',
|
||||
name: 'vn-client-contact vn-textfield[ng-model="contact.name"]',
|
||||
phone: 'vn-client-contact vn-textfield[ng-model="contact.phone"]',
|
||||
deleteFirstPhone: 'vn-client-contact vn-icon[icon="delete"]',
|
||||
saveButton: 'button[type=submit]'
|
||||
},
|
||||
itemsIndex: {
|
||||
searchIcon: 'vn-searchbar vn-icon[icon="search"]',
|
||||
createItemButton: `vn-float-button`,
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
import selectors from '../../helpers/selectors';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Client contacts', () => {
|
||||
let browser;
|
||||
let page;
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('employee', 'client');
|
||||
await page.accessToSearchResult('Clark Kent');
|
||||
await page.accessToSection('client.card.contact');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should add a contact', async() => {
|
||||
await page.waitToClick(selectors.clientContacts.addContactButton);
|
||||
await page.clearInput(selectors.clientContacts.name);
|
||||
await page.write(selectors.clientContacts.name, 'Ansible');
|
||||
await page.write(selectors.clientContacts.phone, 'FTL comms');
|
||||
await page.waitToClick(selectors.clientContacts.saveButton);
|
||||
let result = await page.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('Data saved!');
|
||||
});
|
||||
|
||||
it('should delete de contact', async() => {
|
||||
await page.waitToClick(selectors.clientContacts.deleteFirstPhone);
|
||||
await page.waitToClick(selectors.clientContacts.saveButton);
|
||||
let result = await page.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('Data saved!');
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue