Merge branch '1969_e2e_diferentes_resoluciones' of verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
d616b8a535
|
@ -525,6 +525,7 @@ export default {
|
|||
|
||||
},
|
||||
ticketLog: {
|
||||
firstTD: 'vn-ticket-log vn-table vn-td:nth-child(1)',
|
||||
logButton: 'vn-left-menu a[ui-sref="ticket.card.log"]',
|
||||
changedBy: 'vn-ticket-log > vn-log vn-tr:nth-child(1) > vn-td:nth-child(2) > span',
|
||||
actionTaken: 'vn-ticket-log > vn-log vn-td:nth-child(1) > div > div:nth-child(3) > span.value',
|
||||
|
|
|
@ -35,7 +35,7 @@ describe('Client balance path', () => {
|
|||
await page.clearInput(selectors.globalItems.userConfigThirdAutocomplete);
|
||||
let result = await page.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('Data saved!');
|
||||
expect(result).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it('should click the new payment button', async() => {
|
||||
|
@ -63,7 +63,6 @@ describe('Client balance path', () => {
|
|||
let firstBalanceLine = await page
|
||||
.waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText');
|
||||
|
||||
|
||||
expect(company).toEqual('VNL');
|
||||
expect(firstBalanceLine).toContain('0.00');
|
||||
});
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Ticket log path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
const ticketId = '5';
|
||||
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should navigate to the target ticket notes section', async() => {
|
||||
await page.loginAndModule('employee', 'ticket');
|
||||
await page.accessToSearchResult(ticketId);
|
||||
await page.accessToSection('ticket.card.observation');
|
||||
let url = await page.expectURL('/observation');
|
||||
|
||||
expect(url).toBe(true);
|
||||
});
|
||||
|
||||
it('should create a new note for the test', async() => {
|
||||
await page.waitToClick(selectors.ticketNotes.addNoteButton);
|
||||
await page.autocompleteSearch(selectors.ticketNotes.firstNoteType, 'observation one');
|
||||
await page.write(selectors.ticketNotes.firstDescription, 'description');
|
||||
await page.waitToClick(selectors.ticketNotes.submitNotesButton);
|
||||
const result = await page.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('Data saved!');
|
||||
});
|
||||
|
||||
it('should navigate to the log section', async() => {
|
||||
await page.accessToSection('ticket.card.log');
|
||||
let url = await page.expectURL('/log');
|
||||
|
||||
expect(url).toBe(true);
|
||||
});
|
||||
|
||||
it('should set the viewport width to 1920 to see the table full width', async() => {
|
||||
await page.setViewport({
|
||||
width: 1920,
|
||||
height: 0,
|
||||
});
|
||||
|
||||
const result = await page.waitToGetProperty(selectors.ticketLog.firstTD, 'innerText');
|
||||
|
||||
expect(result.length).not.toBeGreaterThan('20');
|
||||
});
|
||||
|
||||
it('should set the viewport width to 800 to see the table shrink and move data to the 1st column', async() => {
|
||||
await page.setViewport({
|
||||
width: 800,
|
||||
height: 0,
|
||||
});
|
||||
|
||||
const result = await page.waitToGetProperty(selectors.ticketLog.firstTD, 'innerText');
|
||||
|
||||
expect(result.length).toBeGreaterThan('20');
|
||||
});
|
||||
});
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
import ngModule from '../module';
|
||||
import Component from 'core/lib/component';
|
||||
|
||||
class Controller extends Component {
|
||||
constructor($element, $) {
|
||||
super($element, $);
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$element', '$scope'];
|
||||
|
||||
ngModule.component('vnEntryBuy', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller,
|
||||
bindings: {
|
||||
entry: '<'
|
||||
}
|
||||
});
|
|
@ -0,0 +1 @@
|
|||
Buy: Lineas de entrada
|
|
@ -7,3 +7,4 @@ import './descriptor';
|
|||
import './card';
|
||||
import './summary';
|
||||
import './log';
|
||||
import './buy';
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
{"state": "entry.index", "icon": "icon-entry"}
|
||||
],
|
||||
"card": [
|
||||
{"state": "entry.card.buy", "icon": "icon-lines"},
|
||||
{"state": "entry.card.log", "icon": "history"}
|
||||
]
|
||||
},
|
||||
|
@ -42,6 +43,14 @@
|
|||
"state": "entry.card.log",
|
||||
"component": "vn-entry-log",
|
||||
"description": "Log"
|
||||
}, {
|
||||
"url" : "/buy",
|
||||
"state": "entry.card.buy",
|
||||
"component": "vn-entry-buy",
|
||||
"description": "Buy",
|
||||
"params": {
|
||||
"entry": "$ctrl.entry"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue