diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index c4402b2ee..bc18f8885 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -323,7 +323,6 @@ export default { idCheckbox: '.vn-popover.shown vn-horizontal:nth-child(1) > vn-check', stemsCheckbox: '.vn-popover.shown vn-horizontal:nth-child(2) > vn-check', sizeCheckbox: '.vn-popover.shown vn-horizontal:nth-child(3) > vn-check', - nicheCheckbox: '.vn-popover.shown vn-horizontal:nth-child(4) > vn-check', typeCheckbox: '.vn-popover.shown vn-horizontal:nth-child(5) > vn-check', categoryCheckbox: '.vn-popover.shown vn-horizontal:nth-child(6) > vn-check', intrastadCheckbox: '.vn-popover.shown vn-horizontal:nth-child(7) > vn-check', @@ -420,17 +419,6 @@ export default { submitBarcodesButton: 'vn-item-barcode button[type=submit]', firstCodeRemoveButton: 'vn-item-barcode vn-horizontal:nth-child(1) vn-icon[icon="delete"]' }, - itemNiches: { - addNicheButton: 'vn-item-niche vn-icon[icon="add_circle"]', - firstWarehouse: 'vn-item-niche vn-autocomplete[ng-model="niche.warehouseFk"]', - firstCode: 'vn-item-niche vn-horizontal:nth-child(1) vn-textfield[ng-model="niche.code"]', - secondWarehouse: 'vn-item-niche vn-horizontal:nth-child(2) > vn-autocomplete[ng-model="niche.warehouseFk"]', - secondCode: 'vn-item-niche vn-horizontal:nth-child(2) vn-textfield[ng-model="niche.code"]', - secondNicheRemoveButton: 'vn-item-niche vn-horizontal:nth-child(2) > vn-none > vn-icon-button[icon="delete"]', - thirdWarehouse: 'vn-item-niche vn-horizontal:nth-child(3) > vn-autocomplete[ng-model="niche.warehouseFk"]', - thirdCode: 'vn-item-niche vn-horizontal:nth-child(3) vn-textfield[ng-model="niche.code"]', - submitNichesButton: 'vn-item-niche button[type=submit]' - }, itemBotanical: { genus: 'vn-item-botanical vn-autocomplete[ng-model="$ctrl.botanical.genusFk"]', species: 'vn-item-botanical vn-autocomplete[ng-model="$ctrl.botanical.specieFk"]', @@ -440,7 +428,6 @@ export default { basicData: 'vn-item-summary [name="basicData"]', vat: 'vn-item-summary [name="tax"]', tags: 'vn-item-summary [name="tags"]', - niche: 'vn-item-summary [name="niche"]', botanical: 'vn-item-summary [name="botanical"]', barcode: 'vn-item-summary [name="barcode"]' }, diff --git a/e2e/paths/04-item/01_summary.spec.js b/e2e/paths/04-item/01_summary.spec.js index d6f784be8..a7526accb 100644 --- a/e2e/paths/04-item/01_summary.spec.js +++ b/e2e/paths/04-item/01_summary.spec.js @@ -40,13 +40,6 @@ describe('Item summary path', () => { expect(result).toContain('Brown'); }); - it(`should check the item summary preview shows fields from niche`, async() => { - await page.waitForTextInElement(selectors.itemSummary.niche, 'A1'); - const result = await page.waitToGetProperty(selectors.itemSummary.niche, 'innerText'); - - expect(result).toContain('A1'); - }); - it(`should check the item summary preview shows fields from botanical`, async() => { await page.waitForTextInElement(selectors.itemSummary.botanical, 'Abelia'); const result = await page.waitToGetProperty(selectors.itemSummary.botanical, 'innerText'); @@ -126,12 +119,6 @@ describe('Item summary path', () => { expect(result).toContain('Silver'); }); - it(`should check the item summary shows fields from niches section`, async() => { - const result = await page.waitToGetProperty(selectors.itemSummary.niche, 'innerText'); - - expect(result).toContain('One A4'); - }); - it(`should check the item summary shows fields from botanical section`, async() => { const result = await page.waitToGetProperty(selectors.itemSummary.botanical, 'innerText'); diff --git a/e2e/paths/04-item/06_botanical.spec.js b/e2e/paths/04-item/05_botanical.spec.js similarity index 100% rename from e2e/paths/04-item/06_botanical.spec.js rename to e2e/paths/04-item/05_botanical.spec.js diff --git a/e2e/paths/04-item/05_niche.spec.js b/e2e/paths/04-item/05_niche.spec.js deleted file mode 100644 index e3d1d70be..000000000 --- a/e2e/paths/04-item/05_niche.spec.js +++ /dev/null @@ -1,66 +0,0 @@ -import selectors from '../../helpers/selectors.js'; -import getBrowser from '../../helpers/puppeteer'; - -describe('Item create niche path', () => { - let browser; - let page; - beforeAll(async() => { - browser = await getBrowser(); - page = browser.page; - await page.loginAndModule('buyer', 'item'); - await page.accessToSearchResult('Ranged weapon longbow 2m'); - await page.accessToSection('item.card.niche'); - }); - - afterAll(async() => { - await browser.close(); - }); - - it(`should click create a new niche and delete a former one`, async() => { - await page.waitForTextInField(selectors.itemNiches.firstWarehouse, 'Warehouse One'); - await page.waitToClick(selectors.itemNiches.addNicheButton); - await page.waitToClick(selectors.itemNiches.secondNicheRemoveButton); - await page.autocompleteSearch(selectors.itemNiches.thirdWarehouse, 'Warehouse Two'); - await page.write(selectors.itemNiches.thirdCode, 'A44'); - await page.waitToClick(selectors.itemNiches.submitNichesButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Data saved!'); - }); - - it(`should confirm the first niche is the expected one`, async() => { - await page.reloadSection('item.card.niche'); - await page.waitForTextInField(selectors.itemNiches.firstWarehouse, 'Warehouse One'); - let result = await page - .waitToGetProperty(selectors.itemNiches.firstWarehouse, 'value'); - - expect(result).toEqual('Warehouse One'); - - result = await page - .waitToGetProperty(selectors.itemNiches.firstCode, 'value'); - - expect(result).toEqual('A11'); - }); - - it(`should confirm the second niche is the expected one`, async() => { - let result = await page - .waitToGetProperty(selectors.itemNiches.secondWarehouse, 'value'); - - expect(result).toEqual('Warehouse Three'); - result = await page - .waitToGetProperty(selectors.itemNiches.secondCode, 'value'); - - expect(result).toEqual('A33'); - }); - - it(`should confirm the third niche is the expected one`, async() => { - let result = await page - .waitToGetProperty(selectors.itemNiches.thirdWarehouse, 'value'); - - expect(result).toEqual('Warehouse Two'); - result = await page - .waitToGetProperty(selectors.itemNiches.thirdCode, 'value'); - - expect(result).toEqual('A44'); - }); -}); diff --git a/e2e/paths/04-item/07_barcode.spec.js b/e2e/paths/04-item/06_barcode.spec.js similarity index 100% rename from e2e/paths/04-item/07_barcode.spec.js rename to e2e/paths/04-item/06_barcode.spec.js diff --git a/e2e/paths/04-item/08_create_and_clone.spec.js b/e2e/paths/04-item/07_create_and_clone.spec.js similarity index 100% rename from e2e/paths/04-item/08_create_and_clone.spec.js rename to e2e/paths/04-item/07_create_and_clone.spec.js diff --git a/e2e/paths/04-item/09_regularize.spec.js b/e2e/paths/04-item/08_regularize.spec.js similarity index 100% rename from e2e/paths/04-item/09_regularize.spec.js rename to e2e/paths/04-item/08_regularize.spec.js diff --git a/e2e/paths/04-item/10_index.spec.js b/e2e/paths/04-item/09_index.spec.js similarity index 96% rename from e2e/paths/04-item/10_index.spec.js rename to e2e/paths/04-item/09_index.spec.js index 3d7ab1632..262627e99 100644 --- a/e2e/paths/04-item/10_index.spec.js +++ b/e2e/paths/04-item/09_index.spec.js @@ -26,7 +26,6 @@ describe('Item index path', () => { await page.waitToClick(selectors.itemsIndex.idCheckbox); await page.waitToClick(selectors.itemsIndex.stemsCheckbox); await page.waitToClick(selectors.itemsIndex.sizeCheckbox); - await page.waitToClick(selectors.itemsIndex.nicheCheckbox); await page.waitToClick(selectors.itemsIndex.typeCheckbox); await page.waitToClick(selectors.itemsIndex.categoryCheckbox); await page.waitToClick(selectors.itemsIndex.intrastadCheckbox); @@ -59,7 +58,6 @@ describe('Item index path', () => { await page.waitToClick(selectors.itemsIndex.idCheckbox); await page.waitToClick(selectors.itemsIndex.stemsCheckbox); await page.waitToClick(selectors.itemsIndex.sizeCheckbox); - await page.waitToClick(selectors.itemsIndex.nicheCheckbox); await page.waitToClick(selectors.itemsIndex.typeCheckbox); await page.waitToClick(selectors.itemsIndex.categoryCheckbox); await page.waitToClick(selectors.itemsIndex.intrastadCheckbox); diff --git a/e2e/paths/04-item/11_item_log.spec.js b/e2e/paths/04-item/10_item_log.spec.js similarity index 100% rename from e2e/paths/04-item/11_item_log.spec.js rename to e2e/paths/04-item/10_item_log.spec.js diff --git a/e2e/paths/04-item/12_descriptor.spec.js b/e2e/paths/04-item/11_descriptor.spec.js similarity index 100% rename from e2e/paths/04-item/12_descriptor.spec.js rename to e2e/paths/04-item/11_descriptor.spec.js diff --git a/e2e/paths/04-item/13_request.spec.js b/e2e/paths/04-item/12_request.spec.js similarity index 100% rename from e2e/paths/04-item/13_request.spec.js rename to e2e/paths/04-item/12_request.spec.js diff --git a/e2e/paths/04-item/14_fixedPrice.spec.js b/e2e/paths/04-item/13_fixedPrice.spec.js similarity index 100% rename from e2e/paths/04-item/14_fixedPrice.spec.js rename to e2e/paths/04-item/13_fixedPrice.spec.js