e2e path for supplier summary and descriptor
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
687d9618cb
commit
a4c57d7618
|
@ -901,5 +901,16 @@ export default {
|
|||
newEntryTravel: 'vn-entry-create vn-autocomplete[ng-model="$ctrl.entry.travelFk"]',
|
||||
newEntryCompany: 'vn-entry-create vn-autocomplete[ng-model="$ctrl.entry.companyFk"]',
|
||||
saveNewEntry: 'vn-entry-create button[type="submit"]'
|
||||
},
|
||||
supplierSummary: {
|
||||
header: 'vn-supplier-summary > vn-card > h5',
|
||||
basicDataId: 'vn-supplier-summary vn-label-value[label="Id"]',
|
||||
fiscalAddressTaxNumber: 'vn-supplier-summary vn-label-value[label="Tax number"]',
|
||||
billingDataPayMethod: 'vn-supplier-summary vn-label-value[label="Pay method"]'
|
||||
},
|
||||
supplierDescriptor: {
|
||||
alias: 'vn-supplier-descriptor vn-label-value[label="Alias"]',
|
||||
clientButton: 'vn-supplier-descriptor vn-icon[icon="person"]',
|
||||
entriesButton: 'vn-supplier-descriptor vn-icon[icon="icon-entry"]',
|
||||
}
|
||||
};
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Supplier descriptor path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('administrative', 'supplier');
|
||||
await page.accessToSearchResult('1');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
// summary
|
||||
it('should reach the second entry summary section', async() => {
|
||||
await page.waitForState('supplier.card.summary');
|
||||
});
|
||||
|
||||
it(`should confirm there's data on the summary header`, async() => {
|
||||
const result = await page.waitToGetProperty(selectors.supplierSummary.header, 'innerText');
|
||||
|
||||
expect(result).toContain('Plants SL - 1');
|
||||
});
|
||||
|
||||
it(`should confirm there's data on the summary basic data`, async() => {
|
||||
const result = await page.waitToGetProperty(selectors.supplierSummary.basicDataId, 'innerText');
|
||||
|
||||
expect(result).toContain('Id 1');
|
||||
});
|
||||
|
||||
it(`should confirm there's data on the summary fiscal address`, async() => {
|
||||
const result = await page.waitToGetProperty(selectors.supplierSummary.fiscalAddressTaxNumber, 'innerText');
|
||||
|
||||
expect(result).toContain('Tax number 06089160W');
|
||||
});
|
||||
|
||||
it(`should confirm there's data on the summary fiscal pay method`, async() => {
|
||||
const result = await page.waitToGetProperty(selectors.supplierSummary.billingDataPayMethod, 'innerText');
|
||||
|
||||
expect(result).toContain('Pay method PayMethod one');
|
||||
});
|
||||
|
||||
// descriptor
|
||||
it(`should confirm there's data on the descriptor`, async() => {
|
||||
const result = await page.waitToGetProperty(selectors.supplierDescriptor.alias, 'innerText');
|
||||
|
||||
expect(result).toContain('Plants nick');
|
||||
});
|
||||
|
||||
it(`should navigate to the supplier's client summary using the icon client button`, async() => {
|
||||
await page.waitToClick(selectors.supplierDescriptor.clientButton);
|
||||
await page.waitForState('client.card.summary');
|
||||
});
|
||||
|
||||
it(`should navigate back to the supplier`, async() => {
|
||||
await page.waitToClick(selectors.globalItems.homeButton);
|
||||
await page.waitForState('home');
|
||||
await page.selectModule('supplier');
|
||||
await page.accessToSearchResult('1');
|
||||
await page.waitForState('supplier.card.summary');
|
||||
});
|
||||
|
||||
it(`should navigate to the supplier's entries`, async() => {
|
||||
await page.waitToClick(selectors.supplierDescriptor.entriesButton);
|
||||
await page.waitForState('entry.index');
|
||||
});
|
||||
|
||||
it(`should navigate back to suppliers but a different one this time`, async() => {
|
||||
await page.waitToClick(selectors.globalItems.homeButton);
|
||||
await page.waitForState('home');
|
||||
await page.selectModule('supplier');
|
||||
await page.accessToSearchResult('2');
|
||||
await page.waitForState('supplier.card.summary');
|
||||
});
|
||||
|
||||
it(`should check the client button isn't present since this supplier should not be a client`, async() => {
|
||||
await page.waitForSelector(selectors.supplierDescriptor.clientButton, {hidden: true});
|
||||
});
|
||||
});
|
|
@ -162,6 +162,9 @@ function e2eSingleRun() {
|
|||
`${__dirname}/e2e/paths/08*/*[sS]pec.js`,
|
||||
`${__dirname}/e2e/paths/09*/*[sS]pec.js`,
|
||||
`${__dirname}/e2e/paths/10*/*[sS]pec.js`,
|
||||
`${__dirname}/e2e/paths/11*/*[sS]pec.js`,
|
||||
`${__dirname}/e2e/paths/12*/*[sS]pec.js`,
|
||||
`${__dirname}/e2e/paths/13*/*[sS]pec.js`,
|
||||
`${__dirname}/e2e/paths/**/*[sS]pec.js`
|
||||
];
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<vn-label-value label="Social name"
|
||||
value="{{$ctrl.summary.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="NIF / CIF"
|
||||
<vn-label-value label="Tax number"
|
||||
value="{{$ctrl.summary.nif}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Street" ellipsize="false"
|
||||
|
|
Loading…
Reference in New Issue