e2e for the supplier billing data path
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
aae83336a3
commit
7afd738a90
|
@ -960,5 +960,11 @@ export default {
|
|||
province: 'vn-supplier-fiscal-data vn-autocomplete[ng-model="$ctrl.supplier.provinceFk"]',
|
||||
country: 'vn-supplier-fiscal-data vn-autocomplete[ng-model="$ctrl.supplier.countryFk"]',
|
||||
saveButton: 'vn-supplier-fiscal-data button[type="submit"]',
|
||||
},
|
||||
supplierBillingData: {
|
||||
payMethod: 'vn-supplier-billing-data vn-autocomplete[ng-model="$ctrl.supplier.payMethodFk"]',
|
||||
payDem: 'vn-supplier-billing-data vn-autocomplete[ng-model="$ctrl.supplier.payDemFk"]',
|
||||
payDay: 'vn-supplier-billing-data vn-input-number[ng-model="$ctrl.supplier.payDay"]',
|
||||
saveButton: 'vn-supplier-billing-data button[type=submit]'
|
||||
}
|
||||
};
|
||||
|
|
|
@ -8,7 +8,7 @@ describe('Supplier billing data path', () => {
|
|||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('administrative', 'supplier');
|
||||
await page.loginAndModule('developer', 'supplier');
|
||||
await page.accessToSearchResult('442');
|
||||
await page.accessToSection('supplier.card.billingData');
|
||||
});
|
||||
|
@ -17,54 +17,36 @@ describe('Supplier billing data path', () => {
|
|||
await browser.close();
|
||||
});
|
||||
|
||||
it('should ', async() => {
|
||||
// await page.clearInput(selectors.supplierBasicData.alias);
|
||||
// await page.write(selectors.supplierBasicData.alias, 'Plants Nick SL');
|
||||
// await page.waitToClick(selectors.supplierBasicData.isSerious);
|
||||
// await page.waitToClick(selectors.supplierBasicData.isActive);
|
||||
// await page.write(selectors.supplierBasicData.notes, 'Some notes');
|
||||
it('should edit the billing data', async() => {
|
||||
await page.autocompleteSearch(selectors.supplierBillingData.payMethod, 'PayMethod with IBAN');
|
||||
await page.autocompleteSearch(selectors.supplierBillingData.payDem, '10');
|
||||
await page.clearInput(selectors.supplierBillingData.payDay);
|
||||
await page.write(selectors.supplierBillingData.payDay, '19');
|
||||
await page.waitToClick(selectors.supplierBillingData.saveButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
// await page.waitToClick(selectors.supplierBasicData.saveButton);
|
||||
// const message = await page.waitForSnackbar();
|
||||
|
||||
// expect(message.text).toContain('Data saved!');
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
// it('should reload the section', async() => {
|
||||
// await page.reloadSection('supplier.card.basicData');
|
||||
// });
|
||||
it('should reload the section', async() => {
|
||||
await page.reloadSection('supplier.card.billingData');
|
||||
});
|
||||
|
||||
// it('should check the alias was edited', async() => {
|
||||
// const result = await page.waitToGetProperty(selectors.supplierBasicData.alias, 'value');
|
||||
it('should check the pay method was edited', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.supplierBillingData.payMethod, 'value');
|
||||
|
||||
// expect(result).toEqual('Plants Nick SL');
|
||||
// });
|
||||
expect(result).toEqual('PayMethod with IBAN');
|
||||
});
|
||||
|
||||
// it('should check the isSerious checkbox is now unchecked', async() => {
|
||||
// const result = await page.checkboxState(selectors.supplierBasicData.isSerious);
|
||||
it('should check the payDem was edited', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.supplierBillingData.payDem, 'value');
|
||||
|
||||
// expect(result).toBe('unchecked');
|
||||
// });
|
||||
expect(result).toEqual('10');
|
||||
});
|
||||
|
||||
// it('should check the isActive checkbox is now unchecked', async() => {
|
||||
// const result = await page.checkboxState(selectors.supplierBasicData.isActive);
|
||||
it('should check the pay day was edited', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.supplierBillingData.payDay, 'value');
|
||||
|
||||
// expect(result).toBe('unchecked');
|
||||
// });
|
||||
|
||||
// it('should check the notes were edited', async() => {
|
||||
// const result = await page.waitToGetProperty(selectors.supplierBasicData.notes, 'value');
|
||||
|
||||
// expect(result).toEqual('Some notes');
|
||||
// });
|
||||
|
||||
// it('should navigate to the log section', async() => {
|
||||
// await page.accessToSection('supplier.card.log');
|
||||
// });
|
||||
|
||||
// it('should check the changes have been recorded', async() => {
|
||||
// const result = await page.waitToGetProperty('#newInstance:nth-child(3)', 'innerText');
|
||||
|
||||
// expect(result).toEqual('note: Some notes');
|
||||
// });
|
||||
expect(result).toEqual('19');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue