supplier billing data e2e 1st steps
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2020-12-16 16:16:56 +01:00
parent 9df29b8be3
commit aae83336a3
1 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,70 @@
import selectors from '../../helpers/selectors.js';
import getBrowser from '../../helpers/puppeteer';
describe('Supplier billing data path', () => {
let browser;
let page;
beforeAll(async() => {
browser = await getBrowser();
page = browser.page;
await page.loginAndModule('administrative', 'supplier');
await page.accessToSearchResult('442');
await page.accessToSection('supplier.card.billingData');
});
afterAll(async() => {
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');
// await page.waitToClick(selectors.supplierBasicData.saveButton);
// const message = await page.waitForSnackbar();
// expect(message.text).toContain('Data saved!');
});
// it('should reload the section', async() => {
// await page.reloadSection('supplier.card.basicData');
// });
// it('should check the alias was edited', async() => {
// const result = await page.waitToGetProperty(selectors.supplierBasicData.alias, 'value');
// expect(result).toEqual('Plants Nick SL');
// });
// it('should check the isSerious checkbox is now unchecked', async() => {
// const result = await page.checkboxState(selectors.supplierBasicData.isSerious);
// expect(result).toBe('unchecked');
// });
// it('should check the isActive checkbox is now unchecked', async() => {
// const result = await page.checkboxState(selectors.supplierBasicData.isActive);
// 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');
// });
});