From cb8b33a47669cf3413d640616c24fed6b1f50b62 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Mon, 28 Jan 2019 13:42:11 +0100 Subject: [PATCH] #1055 e2e user configuration user company check --- .../client-module/15_user_config.spec.js | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/e2e/paths/client-module/15_user_config.spec.js b/e2e/paths/client-module/15_user_config.spec.js index aa67b1686..10d2881bc 100644 --- a/e2e/paths/client-module/15_user_config.spec.js +++ b/e2e/paths/client-module/15_user_config.spec.js @@ -1,7 +1,7 @@ import selectors from '../../helpers/selectors.js'; import createNightmare from '../../helpers/nightmare'; -describe('User config', () => { +fdescribe('User config', () => { const nightmare = createNightmare(); describe('as salesPerson', () => { @@ -41,9 +41,32 @@ describe('User config', () => { .waitForLogin('employee'); }); + it('should open the user config form to check the settings', async() => { + let userLocalWarehouse = await nightmare + .waitToClick(selectors.globalItems.userMenuButton) + .getProperty(`${selectors.globalItems.userLocalWarehouse} input`, 'value'); + + let userLocalBank = await nightmare + .getProperty(`${selectors.globalItems.userLocalBank} input`, 'value'); + + let userLocalCompany = await nightmare + .getProperty(`${selectors.globalItems.userLocalCompany} input`, 'value'); + + let userWarehouse = await nightmare + .waitToGetProperty(`${selectors.globalItems.userWarehouse} input`, 'value'); + + let userCompany = await nightmare + .waitToGetProperty(`${selectors.globalItems.userCompany} input`, 'value'); + + expect(userLocalWarehouse).toEqual(''); + expect(userLocalBank).toEqual(''); + expect(userLocalCompany).toEqual(''); + expect(userWarehouse).toEqual('Warehouse Two'); + expect(userCompany).toEqual('CCs'); + }); + it('should now edit the user config data', async() => { let result = await nightmare - .waitToClick(selectors.globalItems.userMenuButton) .autocompleteSearch(selectors.globalItems.userLocalWarehouse, 'Warehouse Four') .autocompleteSearch(selectors.globalItems.userLocalBank, 'Pay on receipt') .autocompleteSearch(selectors.globalItems.userLocalCompany, 'VNL')