2999-ticket_dms_import_from_existing + buyer to ticket.isEditable #678
|
@ -0,0 +1,4 @@
|
|||
DELETE FROM `salix`.`ACL` WHERE id = 189;
|
||||
DELETE FROM `salix`.`ACL` WHERE id = 188;
|
||||
UPDATE `salix`.`ACL` tdms SET tdms.accessType = '*'
|
||||
WHERE tdms.id = 165;
|
|
@ -1 +0,0 @@
|
|||
Delete me
|
|
@ -646,6 +646,12 @@ export default {
|
|||
saveServiceButton: 'button[type=submit]',
|
||||
saveServiceTypeButton: '.vn-dialog.shown tpl-buttons > button'
|
||||
},
|
||||
ticketDms: {
|
||||
import: 'vn-ticket-dms-index vn-button[icon="file_copy"]',
|
||||
document: 'vn-autocomplete[ng-model="$ctrl.dmsId"]',
|
||||
saveImport: 'button[response="accept"]',
|
||||
anyDocument: 'vn-ticket-dms-index > vn-data-viewer vn-tbody vn-tr'
|
||||
},
|
||||
createStateView: {
|
||||
state: 'vn-autocomplete[ng-model="$ctrl.stateFk"]',
|
||||
worker: 'vn-autocomplete[ng-model="$ctrl.workerFk"]',
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Ticket DMS path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('employee', 'ticket');
|
||||
await page.accessToSearchResult('1');
|
||||
await page.accessToSection('ticket.card.dms.index');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should import a document', async() => {
|
||||
await page.waitToClick(selectors.ticketDms.import);
|
||||
await page.autocompleteSearch(selectors.ticketDms.document, '1');
|
||||
await page.waitToClick(selectors.ticketDms.saveImport);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it(`should check there's a listed document now`, async() => {
|
||||
const result = await page.countElement(selectors.ticketDms.anyDocument);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
||||
it('should attempt to import an existing document on this ticket', async() => {
|
||||
await page.waitToClick(selectors.ticketDms.import);
|
||||
await page.autocompleteSearch(selectors.ticketDms.document, '1');
|
||||
await page.waitToClick(selectors.ticketDms.saveImport);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('This document already exists on this ticket');
|
||||
});
|
||||
|
||||
it(`should check there's still one document`, async() => {
|
||||
const result = await page.countElement(selectors.ticketDms.anyDocument);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
});
|
|
@ -98,5 +98,6 @@
|
|||
"Client assignment has changed": "I did change the salesperson ~*\"<{{previousWorkerName}}>\"*~ by *\"<{{currentWorkerName}}>\"* from the client [{{clientName}} ({{clientId}})]({{{url}}})",
|
||||
"None": "None",
|
||||
"error densidad = 0": "error densidad = 0",
|
||||
"nickname": "nickname"
|
||||
"nickname": "nickname",
|
||||
"This document already exists on this ticket": "This document already exists on this ticket"
|
||||
}
|
Loading…
Reference in New Issue