From 828b2aa557f308501f2d1d07031d08b04b5bf0eb Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 25 Nov 2024 12:30:08 +0100 Subject: [PATCH 01/11] feat: refs #6943 sh script to create branch and copy e2e tests --- create_branch_and_copy_e2e.sh | 42 +++++++++++++++++ create_branch_and_copy_e2e_echo.sh | 43 ++++++++++++++++++ cypress.config.js | 6 ++- import_e2e.zip | Bin 0 -> 1648 bytes package.json | 3 +- .../client/01_create_client.spec.js | 14 ++++++ .../client/02_edit_basic_data.spec.js | 21 +++++++++ .../client/03_edit_fiscal_data.spec.js | 22 +++++++++ .../client/04_edit_billing_data.spec.js | 7 +++ .../integration/client/05_add_address.spec.js | 14 ++++++ .../client/06_add_address_notes.spec.js | 5 ++ .../client/07_edit_web_access.spec.js | 2 + .../integration/client/09_add_credit.spec.js | 4 ++ .../integration/client/10_add_greuge.spec.js | 4 ++ .../integration/client/11_mandate.spec.js | 2 + .../client/12_lock_of_verified_data.spec.js | 22 +++++++++ .../cypress/integration/client/13_log.spec.js | 3 ++ .../integration/client/14_balance.spec.js | 9 ++++ .../integration/client/15_user_config.spec.js | 12 +++++ .../integration/client/16_web_payment.spec.js | 5 ++ .../cypress/integration/client/17_dms.spec.js | 4 ++ .../integration/client/18_contacts.spec.js | 3 ++ .../integration/client/19_summary.spec.js | 11 +++++ .../client/20_credit_insurance.spec.js | 14 ++++++ .../integration/client/21_defaulter.spec.js | 7 +++ .../integration/client/22_unpaid.spec.js | 4 ++ .../client/23_send_compensation.spec.js | 2 + test/cypress/support/commands.js | 5 ++ 28 files changed, 288 insertions(+), 2 deletions(-) create mode 100644 create_branch_and_copy_e2e.sh create mode 100644 create_branch_and_copy_e2e_echo.sh create mode 100644 import_e2e.zip create mode 100644 test/cypress/integration/client/01_create_client.spec.js create mode 100644 test/cypress/integration/client/02_edit_basic_data.spec.js create mode 100644 test/cypress/integration/client/03_edit_fiscal_data.spec.js create mode 100644 test/cypress/integration/client/04_edit_billing_data.spec.js create mode 100644 test/cypress/integration/client/05_add_address.spec.js create mode 100644 test/cypress/integration/client/06_add_address_notes.spec.js create mode 100644 test/cypress/integration/client/07_edit_web_access.spec.js create mode 100644 test/cypress/integration/client/09_add_credit.spec.js create mode 100644 test/cypress/integration/client/10_add_greuge.spec.js create mode 100644 test/cypress/integration/client/11_mandate.spec.js create mode 100644 test/cypress/integration/client/12_lock_of_verified_data.spec.js create mode 100644 test/cypress/integration/client/13_log.spec.js create mode 100644 test/cypress/integration/client/14_balance.spec.js create mode 100644 test/cypress/integration/client/15_user_config.spec.js create mode 100644 test/cypress/integration/client/16_web_payment.spec.js create mode 100644 test/cypress/integration/client/17_dms.spec.js create mode 100644 test/cypress/integration/client/18_contacts.spec.js create mode 100644 test/cypress/integration/client/19_summary.spec.js create mode 100644 test/cypress/integration/client/20_credit_insurance.spec.js create mode 100644 test/cypress/integration/client/21_defaulter.spec.js create mode 100644 test/cypress/integration/client/22_unpaid.spec.js create mode 100644 test/cypress/integration/client/23_send_compensation.spec.js diff --git a/create_branch_and_copy_e2e.sh b/create_branch_and_copy_e2e.sh new file mode 100644 index 000000000..6c280ddd1 --- /dev/null +++ b/create_branch_and_copy_e2e.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# Verificar si se pasaron los parámetros correctos +if [ "$#" -ne 3 ]; then + echo "Uso: $0 " + exit 1 +fi + +# Asignar parámetros a variables +ID_TAREA=$1 +MODULO=$2 +E2E_PATH=$3 + +# Nombre de la rama +BRANCH_NAME="${ID_TAREA}_${MODULO}_missing_e2e" + +# Paso 1: Crear la rama local a partir de dev +git checkout dev +git pull origin dev +git checkout -b "${BRANCH_NAME}" + +# Paso 2: Copiar archivos al directorio destino +SOURCE_DIR="../salix/e2e/paths/${E2E_PATH}" +DEST_DIR="../test-processing/tests" + +mkdir -p "${DEST_DIR}" +cp -r "${SOURCE_DIR}"/* "${DEST_DIR}" + +# Paso 3: Ejecutar el comando node +cd ../test-processing +PROCESS_SCRIPT="../test-processing/index.js" +node "${PROCESS_SCRIPT}" +cd ../salix-front + +# Paso 4: Copiar archivos procesados al destino Cypress +PROCESSED_DIR="../test-processing/processedTests" +CYPRESS_DEST="./test/cypress/integration/${MODULO}" +mkdir -p "${CYPRESS_DEST}" +cp -r "${PROCESSED_DIR}"/* "${CYPRESS_DEST}" + +# Confirmación final +echo "Flujo completado exitosamente. Revisa los resultados." diff --git a/create_branch_and_copy_e2e_echo.sh b/create_branch_and_copy_e2e_echo.sh new file mode 100644 index 000000000..d89ea56c6 --- /dev/null +++ b/create_branch_and_copy_e2e_echo.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# Verificar si se pasaron los parámetros correctos +if [ "$#" -ne 3 ]; then + echo "Uso: $0 " + exit 1 +fi + +# Asignar parámetros a variables +ID_TAREA=$1 +MODULO=$2 +E2E_PATH=$3 + +# Nombre de la rama +BRANCH_NAME="${ID_TAREA}_${MODULO}_missing_e2e" + +# Paso 1: Crear la rama local a partir de dev +echo "git checkout dev" +echo "git pull origin dev" +echo "git checkout -b ${BRANCH_NAME}" + +# Paso 2: Copiar archivos al directorio destino +SOURCE_DIR="../salix/e2e/paths/${E2E_PATH}" +DEST_DIR="../test-processing/tests" + +echo "mkdir -p ${DEST_DIR}" +echo "cp -r ${SOURCE_DIR}/* ${DEST_DIR}" + +# Paso 3: Ejecutar el comando node +echo "cd ../test-processing" +PROCESS_SCRIPT="../test-processing/index.js" +echo "node ${PROCESS_SCRIPT}" +echo "cd ../salix-front" + +# Paso 4: Copiar archivos procesados al destino Cypress +PROCESSED_DIR="../test-processing/processedTests" +CYPRESS_DEST="./test/cypress/integration/${MODULO}" + +echo "mkdir -p ${CYPRESS_DEST}" +echo "cp -r ${PROCESSED_DIR}/* ${CYPRESS_DEST}" + +# Confirmación final +echo "Flujo completado (pendiente de ejecución real). Valida los comandos antes de proceder." diff --git a/cypress.config.js b/cypress.config.js index f8e771093..401c6c82d 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -1,4 +1,7 @@ const { defineConfig } = require('cypress'); +// https://docs.cypress.io/app/tooling/reporters +// https://docs.cypress.io/app/references/configuration +// https://www.npmjs.com/package/cypress-mochawesome-reporter module.exports = defineConfig({ e2e: { @@ -9,13 +12,14 @@ module.exports = defineConfig({ supportFile: 'test/cypress/support/index.js', videosFolder: 'test/cypress/videos', video: false, - specPattern: 'test/cypress/integration/**/*.spec.js', + specPattern: 'test/cypress/integration/vnComponent/vnLocation.spec.js', experimentalRunAllSpecs: true, watchForFileChanges: true, reporter: 'cypress-mochawesome-reporter', reporterOptions: { charts: true, reportPageTitle: 'Cypress Inline Reporter', + reportFilename: '[status]_[datetime]-report', embeddedScreenshots: true, reportDir: 'test/cypress/reports', inlineAssets: true, diff --git a/import_e2e.zip b/import_e2e.zip new file mode 100644 index 0000000000000000000000000000000000000000..9359ce9ae0bace73e5d36bbeb6e9f66c053dd941 GIT binary patch literal 1648 zcmWIWW@Zs#-~hr!Jr$7*P*BUlz@WsSz>r*&nplz=pH!5Xmz)uwn3octoL^8GpK6pE zpPHPJuUDKA8p6xKZW!jA4#TAt+zgCB?FA|%hF#67HvFt%VL84*UPu&{d{JAzo+(#-aJmx z^D|=E4hr5`Bv>41z#P`#x?)DEoA!iTmu}kp)4V8YC4NgnXU?|98HfEj7B3dC;(EwZ zSIfBFMU){nLdUelJZ!$x7tV7m=VgsgoO`(DN{yr;X^#v&TyDb&S*ZJXeXQUa)G=od-&pqXTJy9zhceQKYP6SrK`QwN2Tk#=18*i zDM(6$ZF-Pxw!=^F)9ZtwxA+(PuHJNZvG3wdXT1~G26WGP;iPYr7Iyffrix2`l%mnn zgh?G8=Q$sH7sRmpUgmzaI3lTVefT+hKK^;(+M15i8wFlHUA=tDIi5vl8DEy2zo^U? z%gL0uETU^`xhs?SSBIVpOETvMSk36k+oW=~eR`z*o3iB7ODZ~6F1;b0_c-HnlbzK3vIi85}ByuGb`QB&VS@!ywj|9JfQz_#AW!5;57 zL|pV@@Vd2PlIA+c%)Ye}?bi(w4bHiFTFrbiS!K73|9uv*uE);b&uxo{o1!r<{oTUX zR$Fc7TITM)?Oa#)wluiy@qx(-@`Tb@L z6_PdOd#@c5qpYr>L_Ni;pTK@IFpJ(h!{J>_ zOVb?Yi+D3%oNN4CpuT}yhx`26C({c8XBI8x5#6NTJ?r<=)GhOGENBllJI-KSu;W5Y zQO=pfv$~&VPU?&0?|!Lpp6&0CDR+C?%H!St?l`_FF06Q=LeD^we0v{O?-37dbr-(C1pz-E?AxHS_Z46NL8WwrYqR6crSl z?=G$5wKI+TR%3+M$Aqwd8v@o(VM;D+{FNJ=?#7tczoG2>GFu~4(@EOflR94uG&Tv% z{-P@tR4lhOaq`93d1*&KSiN_@oA+qPAz!CIo*vg#KW;nQdZhhkO4W-mzy!QjaMR7= z&+j=FR4ItRxYD>*c0pvI^YON=>4#&d?5V$c_0jyf&Sm;XyUxijS(F`I7%O#Q*%Y5C zAFj>o{Tw*USM8|E+4aXS*9$Gud%CRJe}bdB#eNyCDZORFPU(K)H{?6)_VJeJpFO=i z=X;~muhrX9ZZM@D{;&2ezm=Nj3{0({G#TK{$RxsyD1ebuGN=HCfo+W-7Ujh;x_!uQ j0p$-E*w%Ov=tA7~5s_O0yjj^m#xVimZ6ICG3gQ6(I#R6y literal 0 HcmV?d00001 diff --git a/package.json b/package.json index 04b75a0b0..550a08abf 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "lint": "eslint --ext .js,.vue ./", "format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore", "test:e2e": "cypress open", + "test:e2e:run": "cypress run", "test:e2e:ci": "npm run resetDatabase && cd ../salix-front && cypress run", "test": "echo \"See package.json => scripts for available tests.\" && exit 0", "test:unit": "vitest", @@ -64,4 +65,4 @@ "vite": "^5.1.4", "vitest": "^0.31.1" } -} \ No newline at end of file +} diff --git a/test/cypress/integration/client/01_create_client.spec.js b/test/cypress/integration/client/01_create_client.spec.js new file mode 100644 index 000000000..5f13bed69 --- /dev/null +++ b/test/cypress/integration/client/01_create_client.spec.js @@ -0,0 +1,14 @@ +describe('Client create path', () => { + it(`should search for the user Carol Danvers to confirm it isn't created yet`, async() => { + it('should now access to the create client view by clicking the create-client floating button', async() => { + it('should receive an error when clicking the create button having name and Business name fields empty', + it(`should create a new province`, async() => { + it(`should create a new city`, async() => { + it(`should create a new post code`, async() => { + it(`should attempt to create a new user with all it's data but wrong email`, async() => { + it(`should attempt to create a new user with all it's data but wrong business type`, async() => { + it(`should attempt to create a new user with all it's data but wrong postal code`, async() => { + it(`should check for autocompleted city, province and country`, async() => { + it(`should create a new user with all correct data`, async() => { + it('should click on the Clients button of the top bar menu', async() => { + it(`should search for the user Carol Danvers to confirm it exists`, async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/02_edit_basic_data.spec.js b/test/cypress/integration/client/02_edit_basic_data.spec.js new file mode 100644 index 000000000..4dd9fc129 --- /dev/null +++ b/test/cypress/integration/client/02_edit_basic_data.spec.js @@ -0,0 +1,21 @@ +describe('Client Edit basicData path', () => { + describe('as employee', () => { + it('should not be able to change the salesPerson', async() => { + it('should edit the client basic data but leave salesPerson untainted', async() => { + it('should confirm the name have been edited', async() => { + it('should confirm the contact name have been edited', async() => { + it('should confirm the business type have been edited', async() => { + it('should confirm the email have been edited', async() => { + it('should confirm the channel have been selected', async() => { + it('should confirm the previous client have been selected', async() => { + describe('as salesAssistant', () => { + it('should navigate to a client basic data', async() => { + it('should be able to change the salesPerson', async() => { + it('should edit the client basic data including salesPerson', async() => { + it('should now confirm the name have been edited', async() => { + it('should now confirm the contact name have been edited', async() => { + it('should now confirm the email have been edited', async() => { + it('should now confirm the phone have been edited', async() => { + it('should now confirm the mobile have been edited', async() => { + it('should confirm the sales person have been selected', async() => { + it('should now confirm the channel have been selected', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/03_edit_fiscal_data.spec.js b/test/cypress/integration/client/03_edit_fiscal_data.spec.js new file mode 100644 index 000000000..0f447fb4d --- /dev/null +++ b/test/cypress/integration/client/03_edit_fiscal_data.spec.js @@ -0,0 +1,22 @@ +describe('Client Edit fiscalData path', () => { + describe('as employee', () => { + it(`should click on the 1st edit icon to check EQtax isnt checked`, async() => { + it(`should go back to addresses then select the second one and confirm the EQtax isnt checked`, async() => { + it(`should click on the fiscal data button`, async() => { + it('should not be able to edit the verified data checkbox', async() => { + describe('as administrative', () => { + it(`should edit the fiscal data but fail as the fiscal id ain't valid`, async() => { + it(`should edit the fiscal this time with a valid fiscal id`, async() => { + it('should propagate the Equalization tax', async() => { + it('should receive an error if the fiscal id contains A or B at the beginning', async() => { + it('should edit the fiscal data correctly as VIES isnt checked and fiscal id is valid for EQtax', async() => { + it(`should click on the addresses button to access to the client's addresses`, async() => { + it(`should click on the 1st edit icon to confirm EQtax is checked`, async() => { + it(`should go back to addresses then select the second one and confirm the EQtax is checked`, async() => { + it('should navigate back to fiscal data and uncheck EQtax then check VIES', async() => { + it('should propagate the Equalization tax changes', async() => { + it('should confirm its name have been edited', async() => { + it('should confirm the fiscal data have been edited', async() => { + it(`should click on the addresses button to access to the client's addresses`, async() => { + it(`should click on the 1st edit icon to access the address details and uncheck EQtax checkbox`, async() => { + it('should navigate back to fiscal data to confirm invoice by address is now checked', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/04_edit_billing_data.spec.js b/test/cypress/integration/client/04_edit_billing_data.spec.js new file mode 100644 index 000000000..17d8adc56 --- /dev/null +++ b/test/cypress/integration/client/04_edit_billing_data.spec.js @@ -0,0 +1,7 @@ +describe('Client Edit billing data path', () => { + it(`should attempt to edit the billing data without an IBAN but fail`, async() => { + it(`should edit the billing data and save the form`, async() => { + it(`should create a new BIC code`, async() => { + it(`should confirm the IBAN pay method was sucessfully saved`, async() => { + it(`should clear the BIC code field, update the IBAN to see how he BIC code autocompletes`, async() => { + it('should confirm the billing data have been edited', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/05_add_address.spec.js b/test/cypress/integration/client/05_add_address.spec.js new file mode 100644 index 000000000..866b4c481 --- /dev/null +++ b/test/cypress/integration/client/05_add_address.spec.js @@ -0,0 +1,14 @@ +describe('Client Add address path', () => { + it(`should click on the add new address button to access to the new address form`, async() => { + it('should receive an error after clicking save button as consignee, street and town fields are empty', async() => { + it('should confirm that the city and province are propertly filled', async() => { + it(`should throw after clicking save button as consignee, incoterms and customsAgent are empty`, async() => { + it(`should receive an error after clicking save button as customsAgent is empty`, async() => { + it(`should create a new custom agent and then save the address`, async() => { + it(`should navigate back to the addresses index`, async() => { + it(`should confirm the new address exists and it's the default one`, async() => { + it('should click on the make default icon of the second address', async() => { + it(`should confirm the default address is the expected one`, async() => { + it(`should click on the edit icon of the default address`, async() => { + it(`should click on the active checkbox and receive an error to save it because it is the default address`, async() => { + it(`should go back to the addreses section by clicking the cancel button`, async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/06_add_address_notes.spec.js b/test/cypress/integration/client/06_add_address_notes.spec.js new file mode 100644 index 000000000..16817bfc9 --- /dev/null +++ b/test/cypress/integration/client/06_add_address_notes.spec.js @@ -0,0 +1,5 @@ +describe('Client add address notes path', () => { + it(`should click on the edit icon of the default address`, async() => { + it('should not save a description without observation type', async() => { + it('should not save an observation type without description', async() => { + it('should create two new observations', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/07_edit_web_access.spec.js b/test/cypress/integration/client/07_edit_web_access.spec.js new file mode 100644 index 000000000..1c3c82628 --- /dev/null +++ b/test/cypress/integration/client/07_edit_web_access.spec.js @@ -0,0 +1,2 @@ +describe('Client web access path', () => { + it('should modify and save web access attributes', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/09_add_credit.spec.js b/test/cypress/integration/client/09_add_credit.spec.js new file mode 100644 index 000000000..b202e6109 --- /dev/null +++ b/test/cypress/integration/client/09_add_credit.spec.js @@ -0,0 +1,4 @@ +describe('Client Add credit path', () => { + it(`should click on the add credit button`, async() => { + it(`should edit the credit`, async() => { + it('should confirm the credit was updated', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/10_add_greuge.spec.js b/test/cypress/integration/client/10_add_greuge.spec.js new file mode 100644 index 000000000..ec3eff96d --- /dev/null +++ b/test/cypress/integration/client/10_add_greuge.spec.js @@ -0,0 +1,4 @@ +describe('Client Add greuge path', () => { + it(`should click on the add greuge button`, async() => { + it(`should receive an error if all fields are empty but date and type on submit`, async() => { + it(`should create a new greuge with all its data and confirm the greuge was added to the list`, async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/11_mandate.spec.js b/test/cypress/integration/client/11_mandate.spec.js new file mode 100644 index 000000000..cc216dc5d --- /dev/null +++ b/test/cypress/integration/client/11_mandate.spec.js @@ -0,0 +1,2 @@ +describe('Client mandate path', () => { + it('should confirm the client has a mandate of the CORE type', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/12_lock_of_verified_data.spec.js b/test/cypress/integration/client/12_lock_of_verified_data.spec.js new file mode 100644 index 000000000..b63d21116 --- /dev/null +++ b/test/cypress/integration/client/12_lock_of_verified_data.spec.js @@ -0,0 +1,22 @@ +describe('Client lock verified data path', () => { + describe('as salesPerson', () => { + it('should confirm verified data button is disabled for salesPerson', async() => { + it('should edit the social name', async() => { + it('should confirm the social name have been edited', async() => { + describe('as administrative', () => { + it('should confirm verified data button is enabled for administrative', async() => { + it('should check the Verified data checkbox', async() => { + it('should confirm Verified data checkbox is checked', async() => { + it('should again edit the social name', async() => { + it('should again confirm the social name have been edited', async() => { + describe('as salesPerson second run', () => { + it('should confirm verified data button is disabled once again for salesPerson', async() => { + it('should not be able to save change throwing a verified data error', async() => { + describe('as salesAssistant', () => { + it('should log in as salesAssistant then get to the client fiscal data', async() => { + it('should confirm verified data button is enabled for salesAssistant', async() => { + it('should now edit the social name', async() => { + it('should now confirm the social name have been edited once and for all', async() => { + describe('as salesPerson third run', () => { + it('should confirm verified data button is enabled once again', async() => { + it('should confirm the form is enabled for salesPerson', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/13_log.spec.js b/test/cypress/integration/client/13_log.spec.js new file mode 100644 index 000000000..a0c971fa5 --- /dev/null +++ b/test/cypress/integration/client/13_log.spec.js @@ -0,0 +1,3 @@ +describe('Client log path', () => { + it('should update the clients name', async() => { + it('should navigate to the log section', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/14_balance.spec.js b/test/cypress/integration/client/14_balance.spec.js new file mode 100644 index 000000000..44e631122 --- /dev/null +++ b/test/cypress/integration/client/14_balance.spec.js @@ -0,0 +1,9 @@ +describe('Client balance path', () => { + it('should now edit the local user config data', async() => { + it('should create a new payment that clears the debt', async() => { + it('should edit the 1st line reference and check data', async() => { + it('should create a new payment, check the cash comparison works correctly and balance value is -100', async() => { + it('should create a new payment and check the cash exceeded the maximum', async() => { + it('should create a new payment that sets the balance back to negative value and check it', async() => { + it('should now click on the Clients button of the top bar menu', async() => { + it('should now search for the user Petter Parker not check the payment button is not present', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/15_user_config.spec.js b/test/cypress/integration/client/15_user_config.spec.js new file mode 100644 index 000000000..ac6e10951 --- /dev/null +++ b/test/cypress/integration/client/15_user_config.spec.js @@ -0,0 +1,12 @@ +describe('User config', () => { + describe('as salesPerson', () => { + it('should login', async() => { + it('should now open the user config form to check the settings', async() => { + describe('as employee', () => { + it('should log in', async() => { + it('should open the user config form to check the settings', async() => { + it('should now edit the user config data', async() => { + describe('as salesPerson 2nd run', () => { + it('should log in once more', async() => { + it('should again open the user config form to check the local settings', async() => { + it('should now clear the local settings', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/16_web_payment.spec.js b/test/cypress/integration/client/16_web_payment.spec.js new file mode 100644 index 000000000..586012c63 --- /dev/null +++ b/test/cypress/integration/client/16_web_payment.spec.js @@ -0,0 +1,5 @@ +describe('Client web Payment', () => { + describe('as employee', () => { + it('should not be able to confirm payments', async() => { + describe('as administrative', () => { + it('should be able to confirm payments', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/17_dms.spec.js b/test/cypress/integration/client/17_dms.spec.js new file mode 100644 index 000000000..382162a50 --- /dev/null +++ b/test/cypress/integration/client/17_dms.spec.js @@ -0,0 +1,4 @@ +describe('Client DMS', () => { + describe('as salesPerson', () => { + it('should delete de first file', async() => { + it(`should click on the first document line worker name making the descriptor visible`, async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/18_contacts.spec.js b/test/cypress/integration/client/18_contacts.spec.js new file mode 100644 index 000000000..a2194e318 --- /dev/null +++ b/test/cypress/integration/client/18_contacts.spec.js @@ -0,0 +1,3 @@ +describe('Client contacts', () => { + it('should add a contact', async() => { + it('should delete de contact', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/19_summary.spec.js b/test/cypress/integration/client/19_summary.spec.js new file mode 100644 index 000000000..960765b8d --- /dev/null +++ b/test/cypress/integration/client/19_summary.spec.js @@ -0,0 +1,11 @@ +describe('Client summary path', () => { + it('should reach the first route summary section', async() => { + it('should display details from the client on the header', async() => { + it('should display some basic data', async() => { + it('should display fiscal address details', async() => { + it('should display some fiscal data', async() => { + it('should display pay method details', async() => { + it('should display default address details', async() => { + it('should display web access details', async() => { + it('should display business data', async() => { + it('should display financial information', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/20_credit_insurance.spec.js b/test/cypress/integration/client/20_credit_insurance.spec.js new file mode 100644 index 000000000..5c0ecb240 --- /dev/null +++ b/test/cypress/integration/client/20_credit_insurance.spec.js @@ -0,0 +1,14 @@ +describe('Client credit insurance path', () => { + it('should open the create a new credit contract form', async() => { + it('should create a new credit contract', async() => { + it(`should verify the addNewContract button is not present since there's an active contract`, async() => { + it(`should click the view credits button`, async() => { + it('should click the add new credit button which opens the new credit form', async() => { + it('should fill the form but provide no grade to the new credit hence fail', async() => { + it('should provide a correct grade and succesfully save a new credit', async() => { + it('should be redirected to the credit index', async() => { + it('should check the amount of credits is the expected', async() => { + it('should navigate to the credit insurance section', async() => { + it('should bring the current contract to an end', async() => { + it(`should verify the addNewContract button is now present since there's no active contract`, async() => { + it(`should verify the endCurrentContract button is not present since there's no active contract`, async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/21_defaulter.spec.js b/test/cypress/integration/client/21_defaulter.spec.js new file mode 100644 index 000000000..33bfac42c --- /dev/null +++ b/test/cypress/integration/client/21_defaulter.spec.js @@ -0,0 +1,7 @@ +describe('Client defaulter path', () => { + it('should count the amount of clients in the turns section', async() => { + it('should check contain expected client', async() => { + it('should first observation not changed', async() => { + it('should not add empty observation', async() => { + it('should checked all defaulters', async() => { + it('should add observation for all clients', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/22_unpaid.spec.js b/test/cypress/integration/client/22_unpaid.spec.js new file mode 100644 index 000000000..704509373 --- /dev/null +++ b/test/cypress/integration/client/22_unpaid.spec.js @@ -0,0 +1,4 @@ +describe('Client unpaid path', () => { + it('should set cliet unpaid', async() => { + it('should save unpaid', async() => { + it('should confirm the unpaid have been saved', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/23_send_compensation.spec.js b/test/cypress/integration/client/23_send_compensation.spec.js new file mode 100644 index 000000000..2131b7456 --- /dev/null +++ b/test/cypress/integration/client/23_send_compensation.spec.js @@ -0,0 +1,2 @@ +describe('Client Send balance compensation', () => { + it(`should click on send compensation button`, async() => { \ No newline at end of file diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index 728342304..53f9d1d73 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -91,6 +91,11 @@ Cypress.Commands.add('selectOption', (selector, option) => { cy.get(selector).click(); cy.get('.q-menu .q-item').contains(option).click(); }); +Cypress.Commands.add('countSelectOptions', (selector, option) => { + cy.waitForElement(selector); + cy.get(selector).click(); + cy.get('.q-menu .q-item').should('have.length', option); +}); Cypress.Commands.add('fillInForm', (obj, form = '.q-form > .q-card') => { cy.waitForElement('.q-form > .q-card'); -- 2.40.1 From 4263bb3ec09c0fd131581306974a89ed193301c8 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 25 Nov 2024 22:47:07 +0100 Subject: [PATCH 02/11] test: refs #6943 rename client by customer --- .../credit-management/customerCreditContracts.spec.js} | 0 .../credit-management/customerCreditOpinion.spec.js} | 0 .../clientAddress.spec.js => customer/customerAddress.spec.js} | 0 .../clientBalance.spec.js => customer/customerBalance.spec.js} | 0 .../customerBasicData.spec.js} | 0 .../customerBillingData.spec.js} | 0 .../clientCredits.spec.js => customer/customerCredits.spec.js} | 0 .../customerFiscalData.spec.js} | 0 .../clientGreuges.spec.js => customer/customerGreuges.spec.js} | 0 .../{client/clientList.spec.js => customer/customerList.spec.js} | 0 .../clientNotes.spec.js => customer/customerNotes.spec.js} | 0 .../customerRecoveries.spec.js} | 0 .../customerWebAccess.spec.js} | 0 .../others/customerConsumption.spec.js} | 0 .../others/customerContacts.spec.js} | 0 .../others/customerMandates.spec.js} | 0 .../others/customerSamples.spec.js} | 0 .../others/customerUnpaid.spec.js} | 0 .../others/customerWebPayments.spec.js} | 0 19 files changed, 0 insertions(+), 0 deletions(-) rename test/cypress/integration/{client/credit-management/clientCreditContracts.spec.js => customer/credit-management/customerCreditContracts.spec.js} (100%) rename test/cypress/integration/{client/credit-management/clientCreditOpinion.spec.js => customer/credit-management/customerCreditOpinion.spec.js} (100%) rename test/cypress/integration/{client/clientAddress.spec.js => customer/customerAddress.spec.js} (100%) rename test/cypress/integration/{client/clientBalance.spec.js => customer/customerBalance.spec.js} (100%) rename test/cypress/integration/{client/clientBasicData.spec.js => customer/customerBasicData.spec.js} (100%) rename test/cypress/integration/{client/clientBillingData.spec.js => customer/customerBillingData.spec.js} (100%) rename test/cypress/integration/{client/clientCredits.spec.js => customer/customerCredits.spec.js} (100%) rename test/cypress/integration/{client/clientFiscalData.spec.js => customer/customerFiscalData.spec.js} (100%) rename test/cypress/integration/{client/clientGreuges.spec.js => customer/customerGreuges.spec.js} (100%) rename test/cypress/integration/{client/clientList.spec.js => customer/customerList.spec.js} (100%) rename test/cypress/integration/{client/clientNotes.spec.js => customer/customerNotes.spec.js} (100%) rename test/cypress/integration/{client/clientRecoveries.spec.js => customer/customerRecoveries.spec.js} (100%) rename test/cypress/integration/{client/clientWebAccess.spec.js => customer/customerWebAccess.spec.js} (100%) rename test/cypress/integration/{client/others/clientConsumption.spec.js => customer/others/customerConsumption.spec.js} (100%) rename test/cypress/integration/{client/others/clientContacts.spec.js => customer/others/customerContacts.spec.js} (100%) rename test/cypress/integration/{client/others/clientMandates.spec.js => customer/others/customerMandates.spec.js} (100%) rename test/cypress/integration/{client/others/clientSamples.spec.js => customer/others/customerSamples.spec.js} (100%) rename test/cypress/integration/{client/others/clientUnpaid.spec.js => customer/others/customerUnpaid.spec.js} (100%) rename test/cypress/integration/{client/others/clientWebPayments.spec.js => customer/others/customerWebPayments.spec.js} (100%) diff --git a/test/cypress/integration/client/credit-management/clientCreditContracts.spec.js b/test/cypress/integration/customer/credit-management/customerCreditContracts.spec.js similarity index 100% rename from test/cypress/integration/client/credit-management/clientCreditContracts.spec.js rename to test/cypress/integration/customer/credit-management/customerCreditContracts.spec.js diff --git a/test/cypress/integration/client/credit-management/clientCreditOpinion.spec.js b/test/cypress/integration/customer/credit-management/customerCreditOpinion.spec.js similarity index 100% rename from test/cypress/integration/client/credit-management/clientCreditOpinion.spec.js rename to test/cypress/integration/customer/credit-management/customerCreditOpinion.spec.js diff --git a/test/cypress/integration/client/clientAddress.spec.js b/test/cypress/integration/customer/customerAddress.spec.js similarity index 100% rename from test/cypress/integration/client/clientAddress.spec.js rename to test/cypress/integration/customer/customerAddress.spec.js diff --git a/test/cypress/integration/client/clientBalance.spec.js b/test/cypress/integration/customer/customerBalance.spec.js similarity index 100% rename from test/cypress/integration/client/clientBalance.spec.js rename to test/cypress/integration/customer/customerBalance.spec.js diff --git a/test/cypress/integration/client/clientBasicData.spec.js b/test/cypress/integration/customer/customerBasicData.spec.js similarity index 100% rename from test/cypress/integration/client/clientBasicData.spec.js rename to test/cypress/integration/customer/customerBasicData.spec.js diff --git a/test/cypress/integration/client/clientBillingData.spec.js b/test/cypress/integration/customer/customerBillingData.spec.js similarity index 100% rename from test/cypress/integration/client/clientBillingData.spec.js rename to test/cypress/integration/customer/customerBillingData.spec.js diff --git a/test/cypress/integration/client/clientCredits.spec.js b/test/cypress/integration/customer/customerCredits.spec.js similarity index 100% rename from test/cypress/integration/client/clientCredits.spec.js rename to test/cypress/integration/customer/customerCredits.spec.js diff --git a/test/cypress/integration/client/clientFiscalData.spec.js b/test/cypress/integration/customer/customerFiscalData.spec.js similarity index 100% rename from test/cypress/integration/client/clientFiscalData.spec.js rename to test/cypress/integration/customer/customerFiscalData.spec.js diff --git a/test/cypress/integration/client/clientGreuges.spec.js b/test/cypress/integration/customer/customerGreuges.spec.js similarity index 100% rename from test/cypress/integration/client/clientGreuges.spec.js rename to test/cypress/integration/customer/customerGreuges.spec.js diff --git a/test/cypress/integration/client/clientList.spec.js b/test/cypress/integration/customer/customerList.spec.js similarity index 100% rename from test/cypress/integration/client/clientList.spec.js rename to test/cypress/integration/customer/customerList.spec.js diff --git a/test/cypress/integration/client/clientNotes.spec.js b/test/cypress/integration/customer/customerNotes.spec.js similarity index 100% rename from test/cypress/integration/client/clientNotes.spec.js rename to test/cypress/integration/customer/customerNotes.spec.js diff --git a/test/cypress/integration/client/clientRecoveries.spec.js b/test/cypress/integration/customer/customerRecoveries.spec.js similarity index 100% rename from test/cypress/integration/client/clientRecoveries.spec.js rename to test/cypress/integration/customer/customerRecoveries.spec.js diff --git a/test/cypress/integration/client/clientWebAccess.spec.js b/test/cypress/integration/customer/customerWebAccess.spec.js similarity index 100% rename from test/cypress/integration/client/clientWebAccess.spec.js rename to test/cypress/integration/customer/customerWebAccess.spec.js diff --git a/test/cypress/integration/client/others/clientConsumption.spec.js b/test/cypress/integration/customer/others/customerConsumption.spec.js similarity index 100% rename from test/cypress/integration/client/others/clientConsumption.spec.js rename to test/cypress/integration/customer/others/customerConsumption.spec.js diff --git a/test/cypress/integration/client/others/clientContacts.spec.js b/test/cypress/integration/customer/others/customerContacts.spec.js similarity index 100% rename from test/cypress/integration/client/others/clientContacts.spec.js rename to test/cypress/integration/customer/others/customerContacts.spec.js diff --git a/test/cypress/integration/client/others/clientMandates.spec.js b/test/cypress/integration/customer/others/customerMandates.spec.js similarity index 100% rename from test/cypress/integration/client/others/clientMandates.spec.js rename to test/cypress/integration/customer/others/customerMandates.spec.js diff --git a/test/cypress/integration/client/others/clientSamples.spec.js b/test/cypress/integration/customer/others/customerSamples.spec.js similarity index 100% rename from test/cypress/integration/client/others/clientSamples.spec.js rename to test/cypress/integration/customer/others/customerSamples.spec.js diff --git a/test/cypress/integration/client/others/clientUnpaid.spec.js b/test/cypress/integration/customer/others/customerUnpaid.spec.js similarity index 100% rename from test/cypress/integration/client/others/clientUnpaid.spec.js rename to test/cypress/integration/customer/others/customerUnpaid.spec.js diff --git a/test/cypress/integration/client/others/clientWebPayments.spec.js b/test/cypress/integration/customer/others/customerWebPayments.spec.js similarity index 100% rename from test/cypress/integration/client/others/clientWebPayments.spec.js rename to test/cypress/integration/customer/others/customerWebPayments.spec.js -- 2.40.1 From e04c7d843e23f74cc970ce01b13fe53141513b3b Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 25 Nov 2024 22:51:28 +0100 Subject: [PATCH 03/11] test: refs #6943 more e2e customer tests --- .../integration/customer/customerSms.spec.js | 12 ++++++++++ .../customer/customerWebAccess.spec.js | 23 +++++++++++++++---- .../customer/others/customerUnpaid.spec.js | 14 +++++++---- 3 files changed, 41 insertions(+), 8 deletions(-) create mode 100644 test/cypress/integration/customer/customerSms.spec.js diff --git a/test/cypress/integration/customer/customerSms.spec.js b/test/cypress/integration/customer/customerSms.spec.js new file mode 100644 index 000000000..731522a5c --- /dev/null +++ b/test/cypress/integration/customer/customerSms.spec.js @@ -0,0 +1,12 @@ +/// +describe('Client notes', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1101/sms'); + }); + it('Should load layout', () => { + cy.get('.q-page').should('be.visible'); + cy.get('.q-page > :nth-child(2) > :nth-child(1)').should('be.visible'); + }); +}); diff --git a/test/cypress/integration/customer/customerWebAccess.spec.js b/test/cypress/integration/customer/customerWebAccess.spec.js index 47f9efa4c..6803336a3 100644 --- a/test/cypress/integration/customer/customerWebAccess.spec.js +++ b/test/cypress/integration/customer/customerWebAccess.spec.js @@ -3,11 +3,26 @@ describe('Client web-access', () => { beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); - cy.visit('#/customer/1110/web-access', { - timeout: 5000, - }); }); - it('Should load layout', () => { + it('Should test buttons ', () => { + cy.visit('#/customer/1101/web-access'); + cy.get('.q-page').should('be.visible'); + cy.get('#formModel').should('be.visible'); cy.get('.q-card').should('be.visible'); + cy.get('.q-btn-group > :nth-child(1)').should('not.be.disabled'); + cy.get('.q-checkbox__inner').click(); + cy.get('.q-btn-group > .q-btn--standard.q-btn--actionable').should( + 'not.be.disabled' + ); + cy.get('.q-btn-group > .q-btn--flat').should('not.be.disabled'); + cy.get('.q-btn-group > :nth-child(1)').click(); + cy.get('.q-dialog__inner > .q-card > :nth-child(1)') + .should('be.visible') + .find('.text-h6') + .should('have.text', 'Change password'); + }); + it('Should disabled buttons', () => { + cy.visit('#/customer/1110/web-access'); + cy.get('.q-btn-group > :nth-child(1)').should('be.disabled'); }); }); diff --git a/test/cypress/integration/customer/others/customerUnpaid.spec.js b/test/cypress/integration/customer/others/customerUnpaid.spec.js index 9972ba0e9..ab6bc18bf 100644 --- a/test/cypress/integration/customer/others/customerUnpaid.spec.js +++ b/test/cypress/integration/customer/others/customerUnpaid.spec.js @@ -3,11 +3,17 @@ describe('Client unpaid', () => { beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); - cy.visit('#/customer/1110/others/unpaid', { - timeout: 5000, - }); }); - it('Should load layout', () => { + it('Should add unpaid', () => { + cy.visit('#/customer/1102/others/unpaid'); cy.get('.q-card').should('be.visible'); + cy.get('.q-checkbox__inner').click(); + cy.dataCy('customerUnpaidAmount').find('input').type('100'); + cy.dataCy('customerUnpaidDate').find('input').type('01/01/2001'); + cy.get('.q-btn-group > .q-btn--standard').click(); + cy.reload(); + cy.get('.q-checkbox__inner') + .should('be.visible') + .and('not.have.class', 'q-checkbox__inner--active'); }); }); -- 2.40.1 From 93cd111dc59094fd8a02e85bf2dc247474ce4373 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 25 Nov 2024 22:52:54 +0100 Subject: [PATCH 04/11] feat: refs #6943 #6943 improve CustomerUnpaid --- src/pages/Customer/Card/CustomerUnpaid.vue | 202 ++++++--------------- 1 file changed, 59 insertions(+), 143 deletions(-) diff --git a/src/pages/Customer/Card/CustomerUnpaid.vue b/src/pages/Customer/Card/CustomerUnpaid.vue index ef3ff3b94..1387329cc 100644 --- a/src/pages/Customer/Card/CustomerUnpaid.vue +++ b/src/pages/Customer/Card/CustomerUnpaid.vue @@ -1,164 +1,80 @@ -- 2.40.1 From dde4c1bd2cf303c030878305a322d7998d30a013 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 25 Nov 2024 22:53:44 +0100 Subject: [PATCH 05/11] perf: refs #6943 remove comments --- src/pages/Ticket/Card/TicketComponents.vue | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/pages/Ticket/Card/TicketComponents.vue b/src/pages/Ticket/Card/TicketComponents.vue index f45bde2d1..b88dd89e8 100644 --- a/src/pages/Ticket/Card/TicketComponents.vue +++ b/src/pages/Ticket/Card/TicketComponents.vue @@ -321,10 +321,6 @@ onUnmounted(() => (stateStore.rightDrawer = false));
{{ toCurrency(saleComponent.value * row.quantity, 'EUR', 3) }} -
-- 2.40.1 From c5e8b640b49cda7709cf9dd6f00ea97e370cf938 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Sat, 30 Nov 2024 01:52:28 +0100 Subject: [PATCH 06/11] test: refs #6943 #6943 improve importing salix_e2e --- .../client/01_create_client.spec.js | 36 +++++---- .../client/02_edit_basic_data.spec.js | 55 +++++++++----- .../client/03_edit_fiscal_data.spec.js | 57 +++++++++----- .../client/04_edit_billing_data.spec.js | 22 ++++-- .../integration/client/05_add_address.spec.js | 36 +++++---- .../client/06_add_address_notes.spec.js | 18 +++-- .../client/07_edit_web_access.spec.js | 12 ++- .../integration/client/09_add_credit.spec.js | 16 +++- .../integration/client/10_add_greuge.spec.js | 16 +++- .../integration/client/11_mandate.spec.js | 12 ++- .../client/12_lock_of_verified_data.spec.js | 75 ++++++++++++++----- .../cypress/integration/client/13_log.spec.js | 14 +++- .../integration/client/14_balance.spec.js | 26 ++++--- .../integration/client/15_user_config.spec.js | 41 ++++++++-- .../integration/client/16_web_payment.spec.js | 23 +++++- .../cypress/integration/client/17_dms.spec.js | 15 +++- .../integration/client/18_contacts.spec.js | 14 +++- .../integration/client/19_summary.spec.js | 30 +++++--- .../client/20_credit_insurance.spec.js | 36 +++++---- .../integration/client/21_defaulter.spec.js | 22 ++++-- .../integration/client/22_unpaid.spec.js | 16 +++- .../client/23_send_compensation.spec.js | 12 ++- 22 files changed, 429 insertions(+), 175 deletions(-) diff --git a/test/cypress/integration/client/01_create_client.spec.js b/test/cypress/integration/client/01_create_client.spec.js index 5f13bed69..36e39fcb5 100644 --- a/test/cypress/integration/client/01_create_client.spec.js +++ b/test/cypress/integration/client/01_create_client.spec.js @@ -1,14 +1,22 @@ -describe('Client create path', () => { - it(`should search for the user Carol Danvers to confirm it isn't created yet`, async() => { - it('should now access to the create client view by clicking the create-client floating button', async() => { - it('should receive an error when clicking the create button having name and Business name fields empty', - it(`should create a new province`, async() => { - it(`should create a new city`, async() => { - it(`should create a new post code`, async() => { - it(`should attempt to create a new user with all it's data but wrong email`, async() => { - it(`should attempt to create a new user with all it's data but wrong business type`, async() => { - it(`should attempt to create a new user with all it's data but wrong postal code`, async() => { - it(`should check for autocompleted city, province and country`, async() => { - it(`should create a new user with all correct data`, async() => { - it('should click on the Clients button of the top bar menu', async() => { - it(`should search for the user Carol Danvers to confirm it exists`, async() => { \ No newline at end of file +describe.skip('Client create path', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/list', { + timeout: 5000, + }); + }); + it(`should search for the user Carol Danvers to confirm it isn't created yet`, async () => {}); + it('should now access to the create client view by clicking the create-client floating button', async () => {}); + it('should receive an error when clicking the create button having name and Business name fields empty', async () => {}); + it(`should create a new province`, async () => {}); + it(`should create a new city`, async () => {}); + it(`should create a new post code`, async () => {}); + it(`should attempt to create a new user with all it's data but wrong email`, async () => {}); + it(`should attempt to create a new user with all it's data but wrong business type`, async () => {}); + it(`should attempt to create a new user with all it's data but wrong postal code`, async () => {}); + it(`should check for autocompleted city, province and country`, async () => {}); + it(`should create a new user with all correct data`, async () => {}); + it('should click on the Clients button of the top bar menu', async () => {}); + it(`should search for the user Carol Danvers to confirm it exists`, async () => {}); +}); diff --git a/test/cypress/integration/client/02_edit_basic_data.spec.js b/test/cypress/integration/client/02_edit_basic_data.spec.js index 4dd9fc129..fa160bfe0 100644 --- a/test/cypress/integration/client/02_edit_basic_data.spec.js +++ b/test/cypress/integration/client/02_edit_basic_data.spec.js @@ -1,21 +1,38 @@ -describe('Client Edit basicData path', () => { +describe.skip('Client Edit basicData path', () => { describe('as employee', () => { - it('should not be able to change the salesPerson', async() => { - it('should edit the client basic data but leave salesPerson untainted', async() => { - it('should confirm the name have been edited', async() => { - it('should confirm the contact name have been edited', async() => { - it('should confirm the business type have been edited', async() => { - it('should confirm the email have been edited', async() => { - it('should confirm the channel have been selected', async() => { - it('should confirm the previous client have been selected', async() => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/basic-data', { + timeout: 5000, + }); + }); + it('should not be able to change the salesPerson', async () => {}); + it('should edit the client basic data but leave salesPerson untainted', async () => {}); + it('should confirm the name have been edited', async () => {}); + it('should confirm the contact name have been edited', async () => {}); + it('should confirm the business type have been edited', async () => {}); + it('should confirm the email have been edited', async () => {}); + it('should confirm the channel have been selected', async () => {}); + it('should confirm the previous client have been selected', async () => {}); + }); describe('as salesAssistant', () => { - it('should navigate to a client basic data', async() => { - it('should be able to change the salesPerson', async() => { - it('should edit the client basic data including salesPerson', async() => { - it('should now confirm the name have been edited', async() => { - it('should now confirm the contact name have been edited', async() => { - it('should now confirm the email have been edited', async() => { - it('should now confirm the phone have been edited', async() => { - it('should now confirm the mobile have been edited', async() => { - it('should confirm the sales person have been selected', async() => { - it('should now confirm the channel have been selected', async() => { \ No newline at end of file + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/basic-data', { + timeout: 5000, + }); + }); + it('should navigate to a client basic data', async () => {}); + it('should be able to change the salesPerson', async () => {}); + it('should edit the client basic data including salesPerson', async () => {}); + it('should now confirm the name have been edited', async () => {}); + it('should now confirm the contact name have been edited', async () => {}); + it('should now confirm the email have been edited', async () => {}); + it('should now confirm the phone have been edited', async () => {}); + it('should now confirm the mobile have been edited', async () => {}); + it('should confirm the sales person have been selected', async () => {}); + it('should now confirm the channel have been selected', async () => {}); + }); +}); diff --git a/test/cypress/integration/client/03_edit_fiscal_data.spec.js b/test/cypress/integration/client/03_edit_fiscal_data.spec.js index 0f447fb4d..8bef4fdcd 100644 --- a/test/cypress/integration/client/03_edit_fiscal_data.spec.js +++ b/test/cypress/integration/client/03_edit_fiscal_data.spec.js @@ -1,22 +1,39 @@ -describe('Client Edit fiscalData path', () => { +describe.skip('Client Edit fiscalData path', () => { describe('as employee', () => { - it(`should click on the 1st edit icon to check EQtax isnt checked`, async() => { - it(`should go back to addresses then select the second one and confirm the EQtax isnt checked`, async() => { - it(`should click on the fiscal data button`, async() => { - it('should not be able to edit the verified data checkbox', async() => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/fiscal-data', { + timeout: 5000, + }); + }); + it(`should click on the 1st edit icon to check EQtax isnt checked`, async () => {}); + it(`should go back to addresses then select the second one and confirm the EQtax isnt checked`, async () => {}); + it(`should click on the fiscal data button`, async () => {}); + it('should not be able to edit the verified data checkbox', async () => {}); + }); describe('as administrative', () => { - it(`should edit the fiscal data but fail as the fiscal id ain't valid`, async() => { - it(`should edit the fiscal this time with a valid fiscal id`, async() => { - it('should propagate the Equalization tax', async() => { - it('should receive an error if the fiscal id contains A or B at the beginning', async() => { - it('should edit the fiscal data correctly as VIES isnt checked and fiscal id is valid for EQtax', async() => { - it(`should click on the addresses button to access to the client's addresses`, async() => { - it(`should click on the 1st edit icon to confirm EQtax is checked`, async() => { - it(`should go back to addresses then select the second one and confirm the EQtax is checked`, async() => { - it('should navigate back to fiscal data and uncheck EQtax then check VIES', async() => { - it('should propagate the Equalization tax changes', async() => { - it('should confirm its name have been edited', async() => { - it('should confirm the fiscal data have been edited', async() => { - it(`should click on the addresses button to access to the client's addresses`, async() => { - it(`should click on the 1st edit icon to access the address details and uncheck EQtax checkbox`, async() => { - it('should navigate back to fiscal data to confirm invoice by address is now checked', async() => { \ No newline at end of file + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/fiscal-data', { + timeout: 5000, + }); + }); + it(`should edit the fiscal data but fail as the fiscal id ain't valid`, async () => {}); + it(`should edit the fiscal this time with a valid fiscal id`, async () => {}); + it('should propagate the Equalization tax', async () => {}); + it('should receive an error if the fiscal id contains A or B at the beginning', async () => {}); + it('should edit the fiscal data correctly as VIES isnt checked and fiscal id is valid for EQtax', async () => {}); + it(`should click on the addresses button to access to the client's addresses`, async () => {}); + it(`should click on the 1st edit icon to confirm EQtax is checked`, async () => {}); + it(`should go back to addresses then select the second one and confirm the EQtax is checked`, async () => {}); + it('should navigate back to fiscal data and uncheck EQtax then check VIES', async () => {}); + it('should propagate the Equalization tax changes', async () => {}); + it('should confirm its name have been edited', async () => {}); + it('should confirm the fiscal data have been edited', async () => {}); + it(`should click on the addresses button to access to the client's addresses`, async () => {}); + it(`should click on the 1st edit icon to access the address details and uncheck EQtax checkbox`, async () => {}); + it('should navigate back to fiscal data to confirm invoice by address is now checked', async () => {}); + }); +}); diff --git a/test/cypress/integration/client/04_edit_billing_data.spec.js b/test/cypress/integration/client/04_edit_billing_data.spec.js index 17d8adc56..57883f5a1 100644 --- a/test/cypress/integration/client/04_edit_billing_data.spec.js +++ b/test/cypress/integration/client/04_edit_billing_data.spec.js @@ -1,7 +1,15 @@ -describe('Client Edit billing data path', () => { - it(`should attempt to edit the billing data without an IBAN but fail`, async() => { - it(`should edit the billing data and save the form`, async() => { - it(`should create a new BIC code`, async() => { - it(`should confirm the IBAN pay method was sucessfully saved`, async() => { - it(`should clear the BIC code field, update the IBAN to see how he BIC code autocompletes`, async() => { - it('should confirm the billing data have been edited', async() => { \ No newline at end of file +describe.skip('Client ient Edit billing data path', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/billing-data', { + timeout: 5000, + }); + }); + it(`should attempt to edit the billing data without an IBAN but fail`, async () => {}); + it(`should edit the billing data and save the form`, async () => {}); + it(`should create a new BIC code`, async () => {}); + it(`should confirm the IBAN pay method was sucessfully saved`, async () => {}); + it(`should clear the BIC code field, update the IBAN to see how he BIC code autocompletes`, async () => {}); + it('should confirm the billing data have been edited', async () => {}); +}); diff --git a/test/cypress/integration/client/05_add_address.spec.js b/test/cypress/integration/client/05_add_address.spec.js index 866b4c481..a9f83db93 100644 --- a/test/cypress/integration/client/05_add_address.spec.js +++ b/test/cypress/integration/client/05_add_address.spec.js @@ -1,14 +1,22 @@ -describe('Client Add address path', () => { - it(`should click on the add new address button to access to the new address form`, async() => { - it('should receive an error after clicking save button as consignee, street and town fields are empty', async() => { - it('should confirm that the city and province are propertly filled', async() => { - it(`should throw after clicking save button as consignee, incoterms and customsAgent are empty`, async() => { - it(`should receive an error after clicking save button as customsAgent is empty`, async() => { - it(`should create a new custom agent and then save the address`, async() => { - it(`should navigate back to the addresses index`, async() => { - it(`should confirm the new address exists and it's the default one`, async() => { - it('should click on the make default icon of the second address', async() => { - it(`should confirm the default address is the expected one`, async() => { - it(`should click on the edit icon of the default address`, async() => { - it(`should click on the active checkbox and receive an error to save it because it is the default address`, async() => { - it(`should go back to the addreses section by clicking the cancel button`, async() => { \ No newline at end of file +describe.skip('Client ient Add address path', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/adresses', { + timeout: 5000, + }); + }); + it(`should click on the add new address button to access to the new address form`, async () => {}); + it('should receive an error after clicking save button as consignee, street and town fields are empty', async () => {}); + it('should confirm that the city and province are propertly filled', async () => {}); + it(`should throw after clicking save button as consignee, incoterms and customsAgent are empty`, async () => {}); + it(`should receive an error after clicking save button as customsAgent is empty`, async () => {}); + it(`should create a new custom agent and then save the address`, async () => {}); + it(`should navigate back to the addresses index`, async () => {}); + it(`should confirm the new address exists and it's the default one`, async () => {}); + it('should click on the make default icon of the second address', async () => {}); + it(`should confirm the default address is the expected one`, async () => {}); + it(`should click on the edit icon of the default address`, async () => {}); + it(`should click on the active checkbox and receive an error to save it because it is the default address`, async () => {}); + it(`should go back to the addreses section by clicking the cancel button`, async () => {}); +}); diff --git a/test/cypress/integration/client/06_add_address_notes.spec.js b/test/cypress/integration/client/06_add_address_notes.spec.js index 16817bfc9..d1d98e40e 100644 --- a/test/cypress/integration/client/06_add_address_notes.spec.js +++ b/test/cypress/integration/client/06_add_address_notes.spec.js @@ -1,5 +1,13 @@ -describe('Client add address notes path', () => { - it(`should click on the edit icon of the default address`, async() => { - it('should not save a description without observation type', async() => { - it('should not save an observation type without description', async() => { - it('should create two new observations', async() => { \ No newline at end of file +describe.skip('Client ient add address notes path', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it(`should click on the edit icon of the default address`, async () => {}); + it('should not save a description without observation type', async () => {}); + it('should not save an observation type without description', async () => {}); + it('should create two new observations', async () => {}); +}); diff --git a/test/cypress/integration/client/07_edit_web_access.spec.js b/test/cypress/integration/client/07_edit_web_access.spec.js index 1c3c82628..ba2f945f5 100644 --- a/test/cypress/integration/client/07_edit_web_access.spec.js +++ b/test/cypress/integration/client/07_edit_web_access.spec.js @@ -1,2 +1,10 @@ -describe('Client web access path', () => { - it('should modify and save web access attributes', async() => { \ No newline at end of file +describe.skip('Client ient web access path', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/web-access', { + timeout: 5000, + }); + }); + it('should modify and save web access attributes', async () => {}); +}); diff --git a/test/cypress/integration/client/09_add_credit.spec.js b/test/cypress/integration/client/09_add_credit.spec.js index b202e6109..39c4ca6d2 100644 --- a/test/cypress/integration/client/09_add_credit.spec.js +++ b/test/cypress/integration/client/09_add_credit.spec.js @@ -1,4 +1,12 @@ -describe('Client Add credit path', () => { - it(`should click on the add credit button`, async() => { - it(`should edit the credit`, async() => { - it('should confirm the credit was updated', async() => { \ No newline at end of file +describe.skip('Client ient Add credit path', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it(`should click on the add credit button`, async () => {}); + it(`should edit the credit`, async () => {}); + it('should confirm the credit was updated', async () => {}); +}); diff --git a/test/cypress/integration/client/10_add_greuge.spec.js b/test/cypress/integration/client/10_add_greuge.spec.js index ec3eff96d..da3cf8a7b 100644 --- a/test/cypress/integration/client/10_add_greuge.spec.js +++ b/test/cypress/integration/client/10_add_greuge.spec.js @@ -1,4 +1,12 @@ -describe('Client Add greuge path', () => { - it(`should click on the add greuge button`, async() => { - it(`should receive an error if all fields are empty but date and type on submit`, async() => { - it(`should create a new greuge with all its data and confirm the greuge was added to the list`, async() => { \ No newline at end of file +describe.skip('Client ient Add greuge path', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it(`should click on the add greuge button`, async () => {}); + it(`should receive an error if all fields are empty but date and type on submit`, async () => {}); + it(`should create a new greuge with all its data and confirm the greuge was added to the list`, async () => {}); +}); diff --git a/test/cypress/integration/client/11_mandate.spec.js b/test/cypress/integration/client/11_mandate.spec.js index cc216dc5d..3231e8388 100644 --- a/test/cypress/integration/client/11_mandate.spec.js +++ b/test/cypress/integration/client/11_mandate.spec.js @@ -1,2 +1,10 @@ -describe('Client mandate path', () => { - it('should confirm the client has a mandate of the CORE type', async() => { \ No newline at end of file +describe.skip('Client ient mandate path', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should confirm the client has a mandate of the CORE type', async () => {}); +}); diff --git a/test/cypress/integration/client/12_lock_of_verified_data.spec.js b/test/cypress/integration/client/12_lock_of_verified_data.spec.js index b63d21116..9f8bd3636 100644 --- a/test/cypress/integration/client/12_lock_of_verified_data.spec.js +++ b/test/cypress/integration/client/12_lock_of_verified_data.spec.js @@ -1,22 +1,63 @@ -describe('Client lock verified data path', () => { +describe.skip('Client ient lock verified data path', () => { describe('as salesPerson', () => { - it('should confirm verified data button is disabled for salesPerson', async() => { - it('should edit the social name', async() => { - it('should confirm the social name have been edited', async() => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should confirm verified data button is disabled for salesPerson', async () => {}); + it('should edit the social name', async () => {}); + it('should confirm the social name have been edited', async () => {}); + }); describe('as administrative', () => { - it('should confirm verified data button is enabled for administrative', async() => { - it('should check the Verified data checkbox', async() => { - it('should confirm Verified data checkbox is checked', async() => { - it('should again edit the social name', async() => { - it('should again confirm the social name have been edited', async() => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should confirm verified data button is enabled for administrative', async () => {}); + it('should check the Verified data checkbox', async () => {}); + it('should confirm Verified data checkbox is checked', async () => {}); + it('should again edit the social name', async () => {}); + it('should again confirm the social name have been edited', async () => {}); + }); describe('as salesPerson second run', () => { - it('should confirm verified data button is disabled once again for salesPerson', async() => { - it('should not be able to save change throwing a verified data error', async() => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should confirm verified data button is disabled once again for salesPerson', async () => {}); + it('should not be able to save change throwing a verified data error', async () => {}); + }); describe('as salesAssistant', () => { - it('should log in as salesAssistant then get to the client fiscal data', async() => { - it('should confirm verified data button is enabled for salesAssistant', async() => { - it('should now edit the social name', async() => { - it('should now confirm the social name have been edited once and for all', async() => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should log in as salesAssistant then get to the client fiscal data', async () => {}); + it('should confirm verified data button is enabled for salesAssistant', async () => {}); + it('should now edit the social name', async () => {}); + it('should now confirm the social name have been edited once and for all', async () => {}); + }); describe('as salesPerson third run', () => { - it('should confirm verified data button is enabled once again', async() => { - it('should confirm the form is enabled for salesPerson', async() => { \ No newline at end of file + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should confirm verified data button is enabled once again', async () => {}); + it('should confirm the form is enabled for salesPerson', async () => {}); + }); +}); diff --git a/test/cypress/integration/client/13_log.spec.js b/test/cypress/integration/client/13_log.spec.js index a0c971fa5..d1f616e14 100644 --- a/test/cypress/integration/client/13_log.spec.js +++ b/test/cypress/integration/client/13_log.spec.js @@ -1,3 +1,11 @@ -describe('Client log path', () => { - it('should update the clients name', async() => { - it('should navigate to the log section', async() => { \ No newline at end of file +describe.skip('Client ient log path', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should update the clients name', async () => {}); + it('should navigate to the log section', async () => {}); +}); diff --git a/test/cypress/integration/client/14_balance.spec.js b/test/cypress/integration/client/14_balance.spec.js index 44e631122..695cf355b 100644 --- a/test/cypress/integration/client/14_balance.spec.js +++ b/test/cypress/integration/client/14_balance.spec.js @@ -1,9 +1,17 @@ -describe('Client balance path', () => { - it('should now edit the local user config data', async() => { - it('should create a new payment that clears the debt', async() => { - it('should edit the 1st line reference and check data', async() => { - it('should create a new payment, check the cash comparison works correctly and balance value is -100', async() => { - it('should create a new payment and check the cash exceeded the maximum', async() => { - it('should create a new payment that sets the balance back to negative value and check it', async() => { - it('should now click on the Clients button of the top bar menu', async() => { - it('should now search for the user Petter Parker not check the payment button is not present', async() => { \ No newline at end of file +describe.skip('Client balance path', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should now edit the local user config data', async () => {}); + it('should create a new payment that clears the debt', async () => {}); + it('should edit the 1st line reference and check data', async () => {}); + it('should create a new payment, check the cash comparison works correctly and balance value is -100', async () => {}); + it('should create a new payment and check the cash exceeded the maximum', async () => {}); + it('should create a new payment that sets the balance back to negative value and check it', async () => {}); + it('should now click on the Clients button of the top bar menu', async () => {}); + it('should now search for the user Petter Parker not check the payment button is not present', async () => {}); +}); diff --git a/test/cypress/integration/client/15_user_config.spec.js b/test/cypress/integration/client/15_user_config.spec.js index ac6e10951..2b4598d1d 100644 --- a/test/cypress/integration/client/15_user_config.spec.js +++ b/test/cypress/integration/client/15_user_config.spec.js @@ -1,12 +1,37 @@ describe('User config', () => { describe('as salesPerson', () => { - it('should login', async() => { - it('should now open the user config form to check the settings', async() => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should login', async () => {}); + it('should now open the user config form to check the settings', async () => {}); + }); describe('as employee', () => { - it('should log in', async() => { - it('should open the user config form to check the settings', async() => { - it('should now edit the user config data', async() => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should log in', async () => {}); + it('should open the user config form to check the settings', async () => {}); + it('should now edit the user config data', async () => {}); + }); describe('as salesPerson 2nd run', () => { - it('should log in once more', async() => { - it('should again open the user config form to check the local settings', async() => { - it('should now clear the local settings', async() => { \ No newline at end of file + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should log in once more', async () => {}); + it('should again open the user config form to check the local settings', async () => {}); + it('should now clear the local settings', async () => {}); + }); +}); diff --git a/test/cypress/integration/client/16_web_payment.spec.js b/test/cypress/integration/client/16_web_payment.spec.js index 586012c63..5bd186299 100644 --- a/test/cypress/integration/client/16_web_payment.spec.js +++ b/test/cypress/integration/client/16_web_payment.spec.js @@ -1,5 +1,22 @@ -describe('Client web Payment', () => { +describe.skip('Client ient web Payment', () => { describe('as employee', () => { - it('should not be able to confirm payments', async() => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should not be able to confirm payments', async () => {}); + }); describe('as administrative', () => { - it('should be able to confirm payments', async() => { \ No newline at end of file + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should be able to confirm payments', async () => {}); + }); +}); diff --git a/test/cypress/integration/client/17_dms.spec.js b/test/cypress/integration/client/17_dms.spec.js index 382162a50..8e5a25b2b 100644 --- a/test/cypress/integration/client/17_dms.spec.js +++ b/test/cypress/integration/client/17_dms.spec.js @@ -1,4 +1,13 @@ -describe('Client DMS', () => { +describe.skip('Client DMS', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); describe('as salesPerson', () => { - it('should delete de first file', async() => { - it(`should click on the first document line worker name making the descriptor visible`, async() => { \ No newline at end of file + it('should delete de first file', async () => {}); + it(`should click on the first document line worker name making the descriptor visible`, async () => {}); + }); +}); diff --git a/test/cypress/integration/client/18_contacts.spec.js b/test/cypress/integration/client/18_contacts.spec.js index a2194e318..bffbb0f50 100644 --- a/test/cypress/integration/client/18_contacts.spec.js +++ b/test/cypress/integration/client/18_contacts.spec.js @@ -1,3 +1,11 @@ -describe('Client contacts', () => { - it('should add a contact', async() => { - it('should delete de contact', async() => { \ No newline at end of file +describe.skip('Client ient contacts', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should add a contact', async () => {}); + it('should delete de contact', async () => {}); +}); diff --git a/test/cypress/integration/client/19_summary.spec.js b/test/cypress/integration/client/19_summary.spec.js index 960765b8d..99b6f247e 100644 --- a/test/cypress/integration/client/19_summary.spec.js +++ b/test/cypress/integration/client/19_summary.spec.js @@ -1,11 +1,19 @@ -describe('Client summary path', () => { - it('should reach the first route summary section', async() => { - it('should display details from the client on the header', async() => { - it('should display some basic data', async() => { - it('should display fiscal address details', async() => { - it('should display some fiscal data', async() => { - it('should display pay method details', async() => { - it('should display default address details', async() => { - it('should display web access details', async() => { - it('should display business data', async() => { - it('should display financial information', async() => { \ No newline at end of file +describe.skip('Client ient summary path', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should reach the first route summary section', async () => {}); + it('should display details from the client on the header', async () => {}); + it('should display some basic data', async () => {}); + it('should display fiscal address details', async () => {}); + it('should display some fiscal data', async () => {}); + it('should display pay method details', async () => {}); + it('should display default address details', async () => {}); + it('should display web access details', async () => {}); + it('should display business data', async () => {}); + it('should display financial information', async () => {}); +}); diff --git a/test/cypress/integration/client/20_credit_insurance.spec.js b/test/cypress/integration/client/20_credit_insurance.spec.js index 5c0ecb240..e3853f0de 100644 --- a/test/cypress/integration/client/20_credit_insurance.spec.js +++ b/test/cypress/integration/client/20_credit_insurance.spec.js @@ -1,14 +1,22 @@ -describe('Client credit insurance path', () => { - it('should open the create a new credit contract form', async() => { - it('should create a new credit contract', async() => { - it(`should verify the addNewContract button is not present since there's an active contract`, async() => { - it(`should click the view credits button`, async() => { - it('should click the add new credit button which opens the new credit form', async() => { - it('should fill the form but provide no grade to the new credit hence fail', async() => { - it('should provide a correct grade and succesfully save a new credit', async() => { - it('should be redirected to the credit index', async() => { - it('should check the amount of credits is the expected', async() => { - it('should navigate to the credit insurance section', async() => { - it('should bring the current contract to an end', async() => { - it(`should verify the addNewContract button is now present since there's no active contract`, async() => { - it(`should verify the endCurrentContract button is not present since there's no active contract`, async() => { \ No newline at end of file +describe.skip('Client credit insurance path', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should open the create a new credit contract form', async () => {}); + it('should create a new credit contract', async () => {}); + it(`should verify the addNewContract button is not present since there's an active contract`, async () => {}); + it(`should click the view credits button`, async () => {}); + it('should click the add new credit button which opens the new credit form', async () => {}); + it('should fill the form but provide no grade to the new credit hence fail', async () => {}); + it('should provide a correct grade and succesfully save a new credit', async () => {}); + it('should be redirected to the credit index', async () => {}); + it('should check the amount of credits is the expected', async () => {}); + it('should navigate to the credit insurance section', async () => {}); + it('should bring the current contract to an end', async () => {}); + it(`should verify the addNewContract button is now present since there's no active contract`, async () => {}); + it(`should verify the endCurrentContract button is not present since there's no active contract`, async () => {}); +}); diff --git a/test/cypress/integration/client/21_defaulter.spec.js b/test/cypress/integration/client/21_defaulter.spec.js index 33bfac42c..42cad2a92 100644 --- a/test/cypress/integration/client/21_defaulter.spec.js +++ b/test/cypress/integration/client/21_defaulter.spec.js @@ -1,7 +1,15 @@ -describe('Client defaulter path', () => { - it('should count the amount of clients in the turns section', async() => { - it('should check contain expected client', async() => { - it('should first observation not changed', async() => { - it('should not add empty observation', async() => { - it('should checked all defaulters', async() => { - it('should add observation for all clients', async() => { \ No newline at end of file +describe.skip('Client defaulter path', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it('should count the amount of clients in the turns section', async () => {}); + it('should check contain expected client', async () => {}); + it('should first observation not changed', async () => {}); + it('should not add empty observation', async () => {}); + it('should checked all defaulters', async () => {}); + it('should add observation for all clients', async () => {}); +}); diff --git a/test/cypress/integration/client/22_unpaid.spec.js b/test/cypress/integration/client/22_unpaid.spec.js index 704509373..f5e09d6d9 100644 --- a/test/cypress/integration/client/22_unpaid.spec.js +++ b/test/cypress/integration/client/22_unpaid.spec.js @@ -1,4 +1,12 @@ -describe('Client unpaid path', () => { - it('should set cliet unpaid', async() => { - it('should save unpaid', async() => { - it('should confirm the unpaid have been saved', async() => { \ No newline at end of file +describe.skip('Client unpaid path', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/unpaid', { + timeout: 5000, + }); + }); + it('should set cliet unpaid', async () => {}); + it('should save unpaid', async () => {}); + it('should confirm the unpaid have been saved', async () => {}); +}); diff --git a/test/cypress/integration/client/23_send_compensation.spec.js b/test/cypress/integration/client/23_send_compensation.spec.js index 2131b7456..8d1cff1b3 100644 --- a/test/cypress/integration/client/23_send_compensation.spec.js +++ b/test/cypress/integration/client/23_send_compensation.spec.js @@ -1,2 +1,10 @@ -describe('Client Send balance compensation', () => { - it(`should click on send compensation button`, async() => { \ No newline at end of file +describe.skip('Client Send balance compensation', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('#/customer/1110/credits', { + timeout: 5000, + }); + }); + it(`should click on send compensation button`, async () => {}); +}); -- 2.40.1 From 82350bc9e1069e656845ebe5db5973e36901dac8 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Sat, 30 Nov 2024 01:54:12 +0100 Subject: [PATCH 07/11] test: refs #6943 #6943 improve commands --- test/cypress/support/commands.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index 5dc1c0f88..21121d9df 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -314,10 +314,6 @@ Cypress.Commands.add('openUserPanel', () => { ).click(); }); -Cypress.Commands.add('openActions', (row) => { - cy.get('tbody > tr').eq(row).find('.actions > .q-btn').click(); -}); - Cypress.Commands.add('checkNotification', (text) => { cy.get('.q-notification') .should('be.visible') @@ -344,12 +340,6 @@ Cypress.Commands.add('checkValueSelectForm', (id, search) => { ).should('have.value', search); }); -Cypress.Commands.add('checkValueForm', (id, search) => { - cy.get( - `.grid-create > :nth-child(${id}) > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > .q-field__input` - ).should('have.value', search); -}); - Cypress.Commands.add('searchByLabel', (label, value) => { cy.get(`[label="${label}"] > .q-field > .q-field__inner`).type(`${value}{enter}`); }); -- 2.40.1 From e1fdecf3c213a4acc3bcc35b686fb0cd750c7e41 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Sat, 30 Nov 2024 02:10:36 +0100 Subject: [PATCH 08/11] test: refs #7356 #7356 first import missing salix e2e tests --- .../integration/ticket/01_list_sales.spec.js | 18 ++++++ .../ticket/01_observations.spec.js | 11 ++++ .../integration/ticket/02_edit_sale.spec.js | 57 +++++++++++++++++++ .../ticket/02_expeditions_and_log.spec.js | 9 +++ .../integration/ticket/04_packages.spec.js | 14 +++++ .../ticket/05_tracking_state.spec.js | 26 +++++++++ .../ticket/06_basic_data_steps.spec.js | 21 +++++++ .../integration/ticket/08_components.spec.js | 9 +++ .../integration/ticket/09_weekly.spec.js | 22 +++++++ .../integration/ticket/10_request.spec.js | 16 ++++++ .../integration/ticket/12_descriptor.spec.js | 48 ++++++++++++++++ .../integration/ticket/13_services.spec.js | 32 +++++++++++ .../ticket/14_create_ticket.spec.js | 15 +++++ .../15_create_ticket_from_client.spec.js | 9 +++ .../integration/ticket/16_summary.spec.js | 19 +++++++ .../cypress/integration/ticket/17_log.spec.js | 10 ++++ .../ticket/18_index_payout.spec.js | 11 ++++ .../cypress/integration/ticket/19_dms.spec.js | 12 ++++ .../ticket/20_moveExpedition.spec.js | 10 ++++ .../integration/ticket/21_future.spec.js | 9 +++ .../integration/ticket/22_advance.spec.js | 9 +++ 21 files changed, 387 insertions(+) create mode 100644 test/cypress/integration/ticket/01_list_sales.spec.js create mode 100644 test/cypress/integration/ticket/01_observations.spec.js create mode 100644 test/cypress/integration/ticket/02_edit_sale.spec.js create mode 100644 test/cypress/integration/ticket/02_expeditions_and_log.spec.js create mode 100644 test/cypress/integration/ticket/04_packages.spec.js create mode 100644 test/cypress/integration/ticket/05_tracking_state.spec.js create mode 100644 test/cypress/integration/ticket/06_basic_data_steps.spec.js create mode 100644 test/cypress/integration/ticket/08_components.spec.js create mode 100644 test/cypress/integration/ticket/09_weekly.spec.js create mode 100644 test/cypress/integration/ticket/10_request.spec.js create mode 100644 test/cypress/integration/ticket/12_descriptor.spec.js create mode 100644 test/cypress/integration/ticket/13_services.spec.js create mode 100644 test/cypress/integration/ticket/14_create_ticket.spec.js create mode 100644 test/cypress/integration/ticket/15_create_ticket_from_client.spec.js create mode 100644 test/cypress/integration/ticket/16_summary.spec.js create mode 100644 test/cypress/integration/ticket/17_log.spec.js create mode 100644 test/cypress/integration/ticket/18_index_payout.spec.js create mode 100644 test/cypress/integration/ticket/19_dms.spec.js create mode 100644 test/cypress/integration/ticket/20_moveExpedition.spec.js create mode 100644 test/cypress/integration/ticket/21_future.spec.js create mode 100644 test/cypress/integration/ticket/22_advance.spec.js diff --git a/test/cypress/integration/ticket/01_list_sales.spec.js b/test/cypress/integration/ticket/01_list_sales.spec.js new file mode 100644 index 000000000..a1ba588ee --- /dev/null +++ b/test/cypress/integration/ticket/01_list_sales.spec.js @@ -0,0 +1,18 @@ +describe.skip('Ticket List sale path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should confirm the first ticket sale contains the colour tag', async () => {}); + it('should confirm the first sale contains the price', async () => {}); + it('should confirm the first sale contains the discount', async () => {}); + it('should confirm the first sale contains the total import', async () => {}); + it('should add an empty item to the sale list', async () => {}); + it('should select a valid item to be added as the second item in the sales list', async () => {}); + it('should update the description of the new sale', async () => {}); + it('should add a third empty item to the sale list', async () => {}); + it('should select the 2nd and 3th item and delete both', async () => {}); + it(`should verify there's only 1 single line remaining`, async () => {}); +}); diff --git a/test/cypress/integration/ticket/01_observations.spec.js b/test/cypress/integration/ticket/01_observations.spec.js new file mode 100644 index 000000000..c187a63a3 --- /dev/null +++ b/test/cypress/integration/ticket/01_observations.spec.js @@ -0,0 +1,11 @@ +describe.skip('Ticket Create notes path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should create a new note', async () => {}); + it('should confirm the note is the expected one', async () => {}); + it('should delete the note', async () => {}); +}); diff --git a/test/cypress/integration/ticket/02_edit_sale.spec.js b/test/cypress/integration/ticket/02_edit_sale.spec.js new file mode 100644 index 000000000..f3d2aa3a6 --- /dev/null +++ b/test/cypress/integration/ticket/02_edit_sale.spec.js @@ -0,0 +1,57 @@ +describe.skip('Ticket Edit sale path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it(`should click on the first sale claim icon to navigate over there`, async () => {}); + it('should navigate to the tickets index', async () => {}); + it(`should search for a ticket and then navigate to it's sales`, async () => {}); + it(`should set the ticket as libre`, async () => {}); + it(`should check it's state is libre now`, async () => {}); + it(`should set the ticket as OK`, async () => {}); + it(`should check it's state is OK now`, async () => {}); + it(`should check the zoomed image isn't present`, async () => {}); + it(`should click on the thumbnail image of the 1st sale and see the zoomed image`, async () => {}); + it(`should click on the zoomed image to close it`, async () => {}); + it(`should click on the first sale ID making now the item descriptor visible`, async () => {}); + it(`should click on the descriptor image of the 1st sale and see the zoomed image`, async () => {}); + it(`should now click on the zoomed image to close it`, async () => {}); + it(`should click on the summary icon of the item-descriptor to access to the item summary`, async () => {}); + it('should return to ticket sales section', async () => {}); + it('should remove 1 from the first sale quantity', async () => {}); + it('should update the price', async () => {}); + it('should confirm the price have been updated', async () => {}); + it('should confirm the total price for that item have been updated', async () => {}); + it('should update the discount', async () => {}); + it('should confirm the discount have been updated', async () => {}); + it('should confirm the total import for that item have been updated', async () => {}); + it('should recalculate price of sales', async () => {}); + it('should log in as salesAssistant and navigate to ticket sales', async () => {}); + it('should select the first sale and create a refund with warehouse', async () => {}); + it('should select the first sale and create a refund without warehouse', async () => {}); + it('should show error trying to delete a ticket with a refund', async () => {}); + it('should select the third sale and create a claim of it', async () => {}); + it('should search for a ticket then access to the sales section', async () => {}); + it('should select the third sale and delete it', async () => {}); + it(`should confirm the third sale was deleted`, async () => {}); + it('should select the second sale and transfer it to a valid ticket', async () => {}); + it('should confirm the transfered line is the correct one', async () => {}); + it('should confirm the transfered quantity is the correct one', async () => {}); + it('should go back to the original ticket sales section', async () => {}); + it(`should confirm the original ticket has still three lines`, async () => {}); + it(`should confirm the second sale quantity is now half of it's original value after the transfer`, async () => {}); + it('should go back to the receiver ticket sales section', async () => {}); + it('should transfer the sale back to the original ticket', async () => {}); + it('should confirm the original ticket received the line', async () => {}); + it(`should throw an error when attempting to create a ticket for an inactive client`, async () => {}); + it('should go now to the ticket sales section of an active, not frozen client', async () => {}); + it(`should select all sales, tranfer them to a new ticket and delete the sender ticket as it would've been left empty`, async () => {}); + it('should confirm the new ticket received the line', async () => {}); + it('should check the first sale reserved icon isnt visible', async () => {}); + it('should mark the first sale as reserved', async () => {}); + it('should unmark the first sale as reserved', async () => {}); + it('should log in as Production role and go to a target ticket summary', async () => {}); + it(`should check the ticket is deleted`, async () => {}); +}); diff --git a/test/cypress/integration/ticket/02_expeditions_and_log.spec.js b/test/cypress/integration/ticket/02_expeditions_and_log.spec.js new file mode 100644 index 000000000..9fe6c02b2 --- /dev/null +++ b/test/cypress/integration/ticket/02_expeditions_and_log.spec.js @@ -0,0 +1,9 @@ +describe.skip('Ticket expeditions and log path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it(`should delete a former expedition and confirm the remaining expedition are the expected ones`, async () => {}); +}); diff --git a/test/cypress/integration/ticket/04_packages.spec.js b/test/cypress/integration/ticket/04_packages.spec.js new file mode 100644 index 000000000..d771d29f1 --- /dev/null +++ b/test/cypress/integration/ticket/04_packages.spec.js @@ -0,0 +1,14 @@ +describe.skip('Ticket Create packages path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it(`should attempt create a new package but receive an error if package is blank`, async () => {}); + it(`should delete the first package and receive and error to save a new one with blank quantity`, async () => {}); + it(`should confirm the quantity input isn't invalid yet`, async () => {}); + it(`should create a new package with correct data`, async () => {}); + it(`should confirm the first select is the expected one`, async () => {}); + it(`should confirm quantity is just a number and the string part was ignored by the imput number`, async () => {}); +}); diff --git a/test/cypress/integration/ticket/05_tracking_state.spec.js b/test/cypress/integration/ticket/05_tracking_state.spec.js new file mode 100644 index 000000000..2ad58732d --- /dev/null +++ b/test/cypress/integration/ticket/05_tracking_state.spec.js @@ -0,0 +1,26 @@ +describe.skip('Ticket Create new tracking state path', () => { + describe('as production', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should log into the ticket 1 tracking', async () => {}); + it('should access to the create state view by clicking the create floating button', async () => {}); + it(`should create a new state`, async () => {}); + }); + describe('as salesPerson', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should now log into the ticket 1 tracking', async () => {}); + it('should now access to the create state view by clicking the create floating button', async () => {}); + it(`should attemp to create an state for which salesPerson doesn't have permissions`, async () => {}); + it(`should make sure the worker gets autocomplete uppon selecting the assigned state`, async () => {}); + it(`should succesfully create a valid state`, async () => {}); + }); +}); diff --git a/test/cypress/integration/ticket/06_basic_data_steps.spec.js b/test/cypress/integration/ticket/06_basic_data_steps.spec.js new file mode 100644 index 000000000..65e5f0562 --- /dev/null +++ b/test/cypress/integration/ticket/06_basic_data_steps.spec.js @@ -0,0 +1,21 @@ +describe.skip('Ticket Edit basic data path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it(`should confirm the zone autocomplete is disabled unless your role is productionBoss`, async () => {}); + it(`should now log as productionBoss to perform the rest of the tests`, async () => {}); + it(`should confirm the zone autocomplete is enabled for the role productionBoss`, async () => {}); + it(`should check the zone is for Gotham247`, async () => {}); + it(`should edit the ticket agency then check there are no zones for it`, async () => {}); + it(`should edit the ticket zone then check the agency is for the new zone`, async () => {}); + it(`should click next`, async () => {}); + it(`should have a price diference`, async () => {}); + it(`should select a new reason for the changes made then click on finalize`, async () => {}); + it(`should not find ticket`, async () => {}); + it(`should split ticket without negatives`, async () => {}); + it(`should new ticket have sale of old ticket`, async () => {}); + it(`should old ticket have old date and agency`, async () => {}); +}); diff --git a/test/cypress/integration/ticket/08_components.spec.js b/test/cypress/integration/ticket/08_components.spec.js new file mode 100644 index 000000000..98d409cb2 --- /dev/null +++ b/test/cypress/integration/ticket/08_components.spec.js @@ -0,0 +1,9 @@ +describe.skip('Ticket List components path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should confirm the total base is correct', async () => {}); +}); diff --git a/test/cypress/integration/ticket/09_weekly.spec.js b/test/cypress/integration/ticket/09_weekly.spec.js new file mode 100644 index 000000000..bbecdc6d5 --- /dev/null +++ b/test/cypress/integration/ticket/09_weekly.spec.js @@ -0,0 +1,22 @@ +describe.skip('Ticket descriptor path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should count the amount of tickets in the turns section', async () => {}); + it('should go back to the ticket index then search and access a ticket summary', async () => {}); + it('should add the ticket to thursday turn using the descriptor more menu', async () => {}); + it('should again click on the Tickets button of the top bar menu', async () => {}); + it('should confirm the ticket 33 was added to thursday', async () => {}); + it('should click on the Tickets button of the top bar menu once more', async () => {}); + it('should now search for the ticket 33', async () => {}); + it('should add the ticket to saturday turn using the descriptor more menu', async () => {}); + it('should click on the Tickets button of the top bar menu once again', async () => {}); + it('should confirm the ticket 33 was added on saturday', async () => {}); + it('should now search for the weekly ticket 33', async () => {}); + it('should delete the weekly ticket 33', async () => {}); + it('should confirm the sixth weekly ticket was deleted', async () => {}); + it('should update the agency then remove it afterwards', async () => {}); +}); diff --git a/test/cypress/integration/ticket/10_request.spec.js b/test/cypress/integration/ticket/10_request.spec.js new file mode 100644 index 000000000..f70e2598b --- /dev/null +++ b/test/cypress/integration/ticket/10_request.spec.js @@ -0,0 +1,16 @@ +describe.skip('Ticket purchase request path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should add a new request', async () => {}); + it('should have been redirected to the request index', async () => {}); + it(`should edit the third request quantity as it's state is still new`, async () => {}); + it('should check the new request was added', async () => {}); + it(`should check the first request can't be edited as its state is different to new`, async () => {}); + it(`should check the second request can't be edited as its state is different to new`, async () => {}); + it('should delete the added request', async () => {}); + it('should check the request was deleted', async () => {}); +}); diff --git a/test/cypress/integration/ticket/12_descriptor.spec.js b/test/cypress/integration/ticket/12_descriptor.spec.js new file mode 100644 index 000000000..a34d209b5 --- /dev/null +++ b/test/cypress/integration/ticket/12_descriptor.spec.js @@ -0,0 +1,48 @@ +describe.skip('Ticket descriptor path', () => { + describe('Delete ticket', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should search for an specific ticket', async () => {}); + it(`should update the shipped hour using the descriptor menu`, async () => {}); + it(`should confirm the ticket descriptor shows the correct shipping hour`, async () => {}); + it('should delete the ticket using the descriptor menu', async () => {}); + it('should have been relocated to the ticket index', async () => {}); + it(`should search for the deleted ticket and check the deletedTicket icon and it's date`, async () => {}); + }); + describe('Restore ticket', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should restore the ticket using the descriptor menu', async () => {}); + }); + describe('Make invoice', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should login as administrative role then search for a ticket', async () => {}); + it(`should make sure the ticket doesn't have an invoiceOutFk yet`, async () => {}); + it('should invoice the ticket using the descriptor menu', async () => {}); + it(`should make sure the ticket summary have an invoiceOutFk`, async () => {}); + it(`should regenerate the invoice using the descriptor menu`, async () => {}); + }); + describe('SMS', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should send the payment SMS using the descriptor menu', async () => {}); + it('should send the import SMS using the descriptor menu', async () => {}); + }); +}); diff --git a/test/cypress/integration/ticket/13_services.spec.js b/test/cypress/integration/ticket/13_services.spec.js new file mode 100644 index 000000000..b4c79d8c4 --- /dev/null +++ b/test/cypress/integration/ticket/13_services.spec.js @@ -0,0 +1,32 @@ +describe.skip('Ticket services path', () => { + describe('as employee', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should log in as employee, search for an invoice and get to services', async () => {}); + it('should find the add descripton button disabled for this user role', async () => {}); + it('should receive an error if you attempt to save a service without access rights', async () => {}); + }); + describe('as administrative', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should navigate to the services of a target ticket', async () => {}); + it('should click on the add button to prepare the form to create a new service', async () => {}); + it('should receive an error if you attempt to save it with empty fields', async () => {}); + it('should click on the add new service type to open the dialog', async () => {}); + it('should receive an error if service type is empty on submit', async () => {}); + it('should create a new service type then add price then create the service', async () => {}); + it('should confirm the service description was created correctly', async () => {}); + it('should confirm the service quantity was created correctly', async () => {}); + it('should confirm the service price was created correctly', async () => {}); + it('should delete the service', async () => {}); + it(`should confirm the service was removed`, async () => {}); + }); +}); diff --git a/test/cypress/integration/ticket/14_create_ticket.spec.js b/test/cypress/integration/ticket/14_create_ticket.spec.js new file mode 100644 index 000000000..3d2fa39cb --- /dev/null +++ b/test/cypress/integration/ticket/14_create_ticket.spec.js @@ -0,0 +1,15 @@ +describe.skip('Ticket create path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should open the new ticket form', async () => {}); + it('should succeed to create a ticket', async () => {}); + it('should check the url is now the summary of the ticket', async () => {}); + it('should again open the new ticket form', async () => {}); + it('should succeed to create another ticket for the same client', async () => {}); + it('should check the url is now the summary of the created ticket', async () => {}); + it('should delete the current ticket', async () => {}); +}); diff --git a/test/cypress/integration/ticket/15_create_ticket_from_client.spec.js b/test/cypress/integration/ticket/15_create_ticket_from_client.spec.js new file mode 100644 index 000000000..e96a450c7 --- /dev/null +++ b/test/cypress/integration/ticket/15_create_ticket_from_client.spec.js @@ -0,0 +1,9 @@ +describe.skip('Ticket create from client path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should create simple ticket and check if the client details are the expected ones', async () => {}); +}); diff --git a/test/cypress/integration/ticket/16_summary.spec.js b/test/cypress/integration/ticket/16_summary.spec.js new file mode 100644 index 000000000..984e4c44e --- /dev/null +++ b/test/cypress/integration/ticket/16_summary.spec.js @@ -0,0 +1,19 @@ +describe.skip('Ticket Summary path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should navigate to the target ticket summary section', async () => {}); + it(`should display details from the ticket and it's client on the top of the header`, async () => {}); + it('should display ticket details', async () => {}); + it('should display delivery details', async () => {}); + it('should display the ticket total', async () => {}); + it('should display the ticket line(s)', async () => {}); + it(`should click on the first sale ID to make the item descriptor visible`, async () => {}); + it(`should check the url for the item diary link of the descriptor is for the right item id`, async () => {}); + it('should log in as production then navigate to the summary of the same ticket', async () => {}); + it('should set the ticket state to OK using the top right button', async () => {}); + it('should confirm the ticket state was updated', async () => {}); +}); diff --git a/test/cypress/integration/ticket/17_log.spec.js b/test/cypress/integration/ticket/17_log.spec.js new file mode 100644 index 000000000..93203fc3c --- /dev/null +++ b/test/cypress/integration/ticket/17_log.spec.js @@ -0,0 +1,10 @@ +describe.skip('Ticket log path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should navigate to the target ticket notes section', async () => {}); + it('should create a new note for the test', async () => {}); +}); diff --git a/test/cypress/integration/ticket/18_index_payout.spec.js b/test/cypress/integration/ticket/18_index_payout.spec.js new file mode 100644 index 000000000..c84305a95 --- /dev/null +++ b/test/cypress/integration/ticket/18_index_payout.spec.js @@ -0,0 +1,11 @@ +describe.skip('Ticket index payout path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should check the second ticket from a client and 1 of another', async () => {}); + it('should search for tickets of the same client then open the payout form', async () => {}); + it('should fill the company and bank to perform a payout and check a new balance line was entered', async () => {}); +}); diff --git a/test/cypress/integration/ticket/19_dms.spec.js b/test/cypress/integration/ticket/19_dms.spec.js new file mode 100644 index 000000000..3984cdfd6 --- /dev/null +++ b/test/cypress/integration/ticket/19_dms.spec.js @@ -0,0 +1,12 @@ +describe.skip('Ticket DMS path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should import a document', async () => {}); + it(`should check there's a listed document now`, async () => {}); + it('should attempt to import an existing document on this ticket', async () => {}); + it(`should check there's still one document`, async () => {}); +}); diff --git a/test/cypress/integration/ticket/20_moveExpedition.spec.js b/test/cypress/integration/ticket/20_moveExpedition.spec.js new file mode 100644 index 000000000..72087c84e --- /dev/null +++ b/test/cypress/integration/ticket/20_moveExpedition.spec.js @@ -0,0 +1,10 @@ +describe.skip('Ticket expeditions', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it(`should move one expedition to new ticket withoute route`, async () => {}); + it(`should move one expedition to new ticket with route`, async () => {}); +}); diff --git a/test/cypress/integration/ticket/21_future.spec.js b/test/cypress/integration/ticket/21_future.spec.js new file mode 100644 index 000000000..937b62e7b --- /dev/null +++ b/test/cypress/integration/ticket/21_future.spec.js @@ -0,0 +1,9 @@ +describe.skip('Ticket Future path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should search with required data, check three last tickets and move to the future', async () => {}); +}); diff --git a/test/cypress/integration/ticket/22_advance.spec.js b/test/cypress/integration/ticket/22_advance.spec.js new file mode 100644 index 000000000..efffdf9bf --- /dev/null +++ b/test/cypress/integration/ticket/22_advance.spec.js @@ -0,0 +1,9 @@ +describe.skip('Ticket Advance path', () => { + beforeEach(() => { + const ticketId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/ticket/${ticketId}/boxing`); + }); + it('should search with the required data, check the first ticket and move to the present', async () => {}); +}); -- 2.40.1 From b763ed822ead8f100946ff6cd1c5706d1c5e03d9 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Sun, 1 Dec 2024 16:40:24 +0100 Subject: [PATCH 09/11] Revert "test: refs #6943 #6943 improve importing salix_e2e" This reverts commit c5e8b640b49cda7709cf9dd6f00ea97e370cf938. --- .../client/01_create_client.spec.js | 36 ++++----- .../client/02_edit_basic_data.spec.js | 55 +++++--------- .../client/03_edit_fiscal_data.spec.js | 57 +++++--------- .../client/04_edit_billing_data.spec.js | 22 ++---- .../integration/client/05_add_address.spec.js | 36 ++++----- .../client/06_add_address_notes.spec.js | 18 ++--- .../client/07_edit_web_access.spec.js | 12 +-- .../integration/client/09_add_credit.spec.js | 16 +--- .../integration/client/10_add_greuge.spec.js | 16 +--- .../integration/client/11_mandate.spec.js | 12 +-- .../client/12_lock_of_verified_data.spec.js | 75 +++++-------------- .../cypress/integration/client/13_log.spec.js | 14 +--- .../integration/client/14_balance.spec.js | 26 +++---- .../integration/client/15_user_config.spec.js | 41 ++-------- .../integration/client/16_web_payment.spec.js | 23 +----- .../cypress/integration/client/17_dms.spec.js | 15 +--- .../integration/client/18_contacts.spec.js | 14 +--- .../integration/client/19_summary.spec.js | 30 +++----- .../client/20_credit_insurance.spec.js | 36 ++++----- .../integration/client/21_defaulter.spec.js | 22 ++---- .../integration/client/22_unpaid.spec.js | 16 +--- .../client/23_send_compensation.spec.js | 12 +-- 22 files changed, 175 insertions(+), 429 deletions(-) diff --git a/test/cypress/integration/client/01_create_client.spec.js b/test/cypress/integration/client/01_create_client.spec.js index 36e39fcb5..5f13bed69 100644 --- a/test/cypress/integration/client/01_create_client.spec.js +++ b/test/cypress/integration/client/01_create_client.spec.js @@ -1,22 +1,14 @@ -describe.skip('Client create path', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/list', { - timeout: 5000, - }); - }); - it(`should search for the user Carol Danvers to confirm it isn't created yet`, async () => {}); - it('should now access to the create client view by clicking the create-client floating button', async () => {}); - it('should receive an error when clicking the create button having name and Business name fields empty', async () => {}); - it(`should create a new province`, async () => {}); - it(`should create a new city`, async () => {}); - it(`should create a new post code`, async () => {}); - it(`should attempt to create a new user with all it's data but wrong email`, async () => {}); - it(`should attempt to create a new user with all it's data but wrong business type`, async () => {}); - it(`should attempt to create a new user with all it's data but wrong postal code`, async () => {}); - it(`should check for autocompleted city, province and country`, async () => {}); - it(`should create a new user with all correct data`, async () => {}); - it('should click on the Clients button of the top bar menu', async () => {}); - it(`should search for the user Carol Danvers to confirm it exists`, async () => {}); -}); +describe('Client create path', () => { + it(`should search for the user Carol Danvers to confirm it isn't created yet`, async() => { + it('should now access to the create client view by clicking the create-client floating button', async() => { + it('should receive an error when clicking the create button having name and Business name fields empty', + it(`should create a new province`, async() => { + it(`should create a new city`, async() => { + it(`should create a new post code`, async() => { + it(`should attempt to create a new user with all it's data but wrong email`, async() => { + it(`should attempt to create a new user with all it's data but wrong business type`, async() => { + it(`should attempt to create a new user with all it's data but wrong postal code`, async() => { + it(`should check for autocompleted city, province and country`, async() => { + it(`should create a new user with all correct data`, async() => { + it('should click on the Clients button of the top bar menu', async() => { + it(`should search for the user Carol Danvers to confirm it exists`, async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/02_edit_basic_data.spec.js b/test/cypress/integration/client/02_edit_basic_data.spec.js index fa160bfe0..4dd9fc129 100644 --- a/test/cypress/integration/client/02_edit_basic_data.spec.js +++ b/test/cypress/integration/client/02_edit_basic_data.spec.js @@ -1,38 +1,21 @@ -describe.skip('Client Edit basicData path', () => { +describe('Client Edit basicData path', () => { describe('as employee', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/basic-data', { - timeout: 5000, - }); - }); - it('should not be able to change the salesPerson', async () => {}); - it('should edit the client basic data but leave salesPerson untainted', async () => {}); - it('should confirm the name have been edited', async () => {}); - it('should confirm the contact name have been edited', async () => {}); - it('should confirm the business type have been edited', async () => {}); - it('should confirm the email have been edited', async () => {}); - it('should confirm the channel have been selected', async () => {}); - it('should confirm the previous client have been selected', async () => {}); - }); + it('should not be able to change the salesPerson', async() => { + it('should edit the client basic data but leave salesPerson untainted', async() => { + it('should confirm the name have been edited', async() => { + it('should confirm the contact name have been edited', async() => { + it('should confirm the business type have been edited', async() => { + it('should confirm the email have been edited', async() => { + it('should confirm the channel have been selected', async() => { + it('should confirm the previous client have been selected', async() => { describe('as salesAssistant', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/basic-data', { - timeout: 5000, - }); - }); - it('should navigate to a client basic data', async () => {}); - it('should be able to change the salesPerson', async () => {}); - it('should edit the client basic data including salesPerson', async () => {}); - it('should now confirm the name have been edited', async () => {}); - it('should now confirm the contact name have been edited', async () => {}); - it('should now confirm the email have been edited', async () => {}); - it('should now confirm the phone have been edited', async () => {}); - it('should now confirm the mobile have been edited', async () => {}); - it('should confirm the sales person have been selected', async () => {}); - it('should now confirm the channel have been selected', async () => {}); - }); -}); + it('should navigate to a client basic data', async() => { + it('should be able to change the salesPerson', async() => { + it('should edit the client basic data including salesPerson', async() => { + it('should now confirm the name have been edited', async() => { + it('should now confirm the contact name have been edited', async() => { + it('should now confirm the email have been edited', async() => { + it('should now confirm the phone have been edited', async() => { + it('should now confirm the mobile have been edited', async() => { + it('should confirm the sales person have been selected', async() => { + it('should now confirm the channel have been selected', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/03_edit_fiscal_data.spec.js b/test/cypress/integration/client/03_edit_fiscal_data.spec.js index 8bef4fdcd..0f447fb4d 100644 --- a/test/cypress/integration/client/03_edit_fiscal_data.spec.js +++ b/test/cypress/integration/client/03_edit_fiscal_data.spec.js @@ -1,39 +1,22 @@ -describe.skip('Client Edit fiscalData path', () => { +describe('Client Edit fiscalData path', () => { describe('as employee', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/fiscal-data', { - timeout: 5000, - }); - }); - it(`should click on the 1st edit icon to check EQtax isnt checked`, async () => {}); - it(`should go back to addresses then select the second one and confirm the EQtax isnt checked`, async () => {}); - it(`should click on the fiscal data button`, async () => {}); - it('should not be able to edit the verified data checkbox', async () => {}); - }); + it(`should click on the 1st edit icon to check EQtax isnt checked`, async() => { + it(`should go back to addresses then select the second one and confirm the EQtax isnt checked`, async() => { + it(`should click on the fiscal data button`, async() => { + it('should not be able to edit the verified data checkbox', async() => { describe('as administrative', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/fiscal-data', { - timeout: 5000, - }); - }); - it(`should edit the fiscal data but fail as the fiscal id ain't valid`, async () => {}); - it(`should edit the fiscal this time with a valid fiscal id`, async () => {}); - it('should propagate the Equalization tax', async () => {}); - it('should receive an error if the fiscal id contains A or B at the beginning', async () => {}); - it('should edit the fiscal data correctly as VIES isnt checked and fiscal id is valid for EQtax', async () => {}); - it(`should click on the addresses button to access to the client's addresses`, async () => {}); - it(`should click on the 1st edit icon to confirm EQtax is checked`, async () => {}); - it(`should go back to addresses then select the second one and confirm the EQtax is checked`, async () => {}); - it('should navigate back to fiscal data and uncheck EQtax then check VIES', async () => {}); - it('should propagate the Equalization tax changes', async () => {}); - it('should confirm its name have been edited', async () => {}); - it('should confirm the fiscal data have been edited', async () => {}); - it(`should click on the addresses button to access to the client's addresses`, async () => {}); - it(`should click on the 1st edit icon to access the address details and uncheck EQtax checkbox`, async () => {}); - it('should navigate back to fiscal data to confirm invoice by address is now checked', async () => {}); - }); -}); + it(`should edit the fiscal data but fail as the fiscal id ain't valid`, async() => { + it(`should edit the fiscal this time with a valid fiscal id`, async() => { + it('should propagate the Equalization tax', async() => { + it('should receive an error if the fiscal id contains A or B at the beginning', async() => { + it('should edit the fiscal data correctly as VIES isnt checked and fiscal id is valid for EQtax', async() => { + it(`should click on the addresses button to access to the client's addresses`, async() => { + it(`should click on the 1st edit icon to confirm EQtax is checked`, async() => { + it(`should go back to addresses then select the second one and confirm the EQtax is checked`, async() => { + it('should navigate back to fiscal data and uncheck EQtax then check VIES', async() => { + it('should propagate the Equalization tax changes', async() => { + it('should confirm its name have been edited', async() => { + it('should confirm the fiscal data have been edited', async() => { + it(`should click on the addresses button to access to the client's addresses`, async() => { + it(`should click on the 1st edit icon to access the address details and uncheck EQtax checkbox`, async() => { + it('should navigate back to fiscal data to confirm invoice by address is now checked', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/04_edit_billing_data.spec.js b/test/cypress/integration/client/04_edit_billing_data.spec.js index 57883f5a1..17d8adc56 100644 --- a/test/cypress/integration/client/04_edit_billing_data.spec.js +++ b/test/cypress/integration/client/04_edit_billing_data.spec.js @@ -1,15 +1,7 @@ -describe.skip('Client ient Edit billing data path', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/billing-data', { - timeout: 5000, - }); - }); - it(`should attempt to edit the billing data without an IBAN but fail`, async () => {}); - it(`should edit the billing data and save the form`, async () => {}); - it(`should create a new BIC code`, async () => {}); - it(`should confirm the IBAN pay method was sucessfully saved`, async () => {}); - it(`should clear the BIC code field, update the IBAN to see how he BIC code autocompletes`, async () => {}); - it('should confirm the billing data have been edited', async () => {}); -}); +describe('Client Edit billing data path', () => { + it(`should attempt to edit the billing data without an IBAN but fail`, async() => { + it(`should edit the billing data and save the form`, async() => { + it(`should create a new BIC code`, async() => { + it(`should confirm the IBAN pay method was sucessfully saved`, async() => { + it(`should clear the BIC code field, update the IBAN to see how he BIC code autocompletes`, async() => { + it('should confirm the billing data have been edited', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/05_add_address.spec.js b/test/cypress/integration/client/05_add_address.spec.js index a9f83db93..866b4c481 100644 --- a/test/cypress/integration/client/05_add_address.spec.js +++ b/test/cypress/integration/client/05_add_address.spec.js @@ -1,22 +1,14 @@ -describe.skip('Client ient Add address path', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/adresses', { - timeout: 5000, - }); - }); - it(`should click on the add new address button to access to the new address form`, async () => {}); - it('should receive an error after clicking save button as consignee, street and town fields are empty', async () => {}); - it('should confirm that the city and province are propertly filled', async () => {}); - it(`should throw after clicking save button as consignee, incoterms and customsAgent are empty`, async () => {}); - it(`should receive an error after clicking save button as customsAgent is empty`, async () => {}); - it(`should create a new custom agent and then save the address`, async () => {}); - it(`should navigate back to the addresses index`, async () => {}); - it(`should confirm the new address exists and it's the default one`, async () => {}); - it('should click on the make default icon of the second address', async () => {}); - it(`should confirm the default address is the expected one`, async () => {}); - it(`should click on the edit icon of the default address`, async () => {}); - it(`should click on the active checkbox and receive an error to save it because it is the default address`, async () => {}); - it(`should go back to the addreses section by clicking the cancel button`, async () => {}); -}); +describe('Client Add address path', () => { + it(`should click on the add new address button to access to the new address form`, async() => { + it('should receive an error after clicking save button as consignee, street and town fields are empty', async() => { + it('should confirm that the city and province are propertly filled', async() => { + it(`should throw after clicking save button as consignee, incoterms and customsAgent are empty`, async() => { + it(`should receive an error after clicking save button as customsAgent is empty`, async() => { + it(`should create a new custom agent and then save the address`, async() => { + it(`should navigate back to the addresses index`, async() => { + it(`should confirm the new address exists and it's the default one`, async() => { + it('should click on the make default icon of the second address', async() => { + it(`should confirm the default address is the expected one`, async() => { + it(`should click on the edit icon of the default address`, async() => { + it(`should click on the active checkbox and receive an error to save it because it is the default address`, async() => { + it(`should go back to the addreses section by clicking the cancel button`, async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/06_add_address_notes.spec.js b/test/cypress/integration/client/06_add_address_notes.spec.js index d1d98e40e..16817bfc9 100644 --- a/test/cypress/integration/client/06_add_address_notes.spec.js +++ b/test/cypress/integration/client/06_add_address_notes.spec.js @@ -1,13 +1,5 @@ -describe.skip('Client ient add address notes path', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it(`should click on the edit icon of the default address`, async () => {}); - it('should not save a description without observation type', async () => {}); - it('should not save an observation type without description', async () => {}); - it('should create two new observations', async () => {}); -}); +describe('Client add address notes path', () => { + it(`should click on the edit icon of the default address`, async() => { + it('should not save a description without observation type', async() => { + it('should not save an observation type without description', async() => { + it('should create two new observations', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/07_edit_web_access.spec.js b/test/cypress/integration/client/07_edit_web_access.spec.js index ba2f945f5..1c3c82628 100644 --- a/test/cypress/integration/client/07_edit_web_access.spec.js +++ b/test/cypress/integration/client/07_edit_web_access.spec.js @@ -1,10 +1,2 @@ -describe.skip('Client ient web access path', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/web-access', { - timeout: 5000, - }); - }); - it('should modify and save web access attributes', async () => {}); -}); +describe('Client web access path', () => { + it('should modify and save web access attributes', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/09_add_credit.spec.js b/test/cypress/integration/client/09_add_credit.spec.js index 39c4ca6d2..b202e6109 100644 --- a/test/cypress/integration/client/09_add_credit.spec.js +++ b/test/cypress/integration/client/09_add_credit.spec.js @@ -1,12 +1,4 @@ -describe.skip('Client ient Add credit path', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it(`should click on the add credit button`, async () => {}); - it(`should edit the credit`, async () => {}); - it('should confirm the credit was updated', async () => {}); -}); +describe('Client Add credit path', () => { + it(`should click on the add credit button`, async() => { + it(`should edit the credit`, async() => { + it('should confirm the credit was updated', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/10_add_greuge.spec.js b/test/cypress/integration/client/10_add_greuge.spec.js index da3cf8a7b..ec3eff96d 100644 --- a/test/cypress/integration/client/10_add_greuge.spec.js +++ b/test/cypress/integration/client/10_add_greuge.spec.js @@ -1,12 +1,4 @@ -describe.skip('Client ient Add greuge path', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it(`should click on the add greuge button`, async () => {}); - it(`should receive an error if all fields are empty but date and type on submit`, async () => {}); - it(`should create a new greuge with all its data and confirm the greuge was added to the list`, async () => {}); -}); +describe('Client Add greuge path', () => { + it(`should click on the add greuge button`, async() => { + it(`should receive an error if all fields are empty but date and type on submit`, async() => { + it(`should create a new greuge with all its data and confirm the greuge was added to the list`, async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/11_mandate.spec.js b/test/cypress/integration/client/11_mandate.spec.js index 3231e8388..cc216dc5d 100644 --- a/test/cypress/integration/client/11_mandate.spec.js +++ b/test/cypress/integration/client/11_mandate.spec.js @@ -1,10 +1,2 @@ -describe.skip('Client ient mandate path', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should confirm the client has a mandate of the CORE type', async () => {}); -}); +describe('Client mandate path', () => { + it('should confirm the client has a mandate of the CORE type', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/12_lock_of_verified_data.spec.js b/test/cypress/integration/client/12_lock_of_verified_data.spec.js index 9f8bd3636..b63d21116 100644 --- a/test/cypress/integration/client/12_lock_of_verified_data.spec.js +++ b/test/cypress/integration/client/12_lock_of_verified_data.spec.js @@ -1,63 +1,22 @@ -describe.skip('Client ient lock verified data path', () => { +describe('Client lock verified data path', () => { describe('as salesPerson', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should confirm verified data button is disabled for salesPerson', async () => {}); - it('should edit the social name', async () => {}); - it('should confirm the social name have been edited', async () => {}); - }); + it('should confirm verified data button is disabled for salesPerson', async() => { + it('should edit the social name', async() => { + it('should confirm the social name have been edited', async() => { describe('as administrative', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should confirm verified data button is enabled for administrative', async () => {}); - it('should check the Verified data checkbox', async () => {}); - it('should confirm Verified data checkbox is checked', async () => {}); - it('should again edit the social name', async () => {}); - it('should again confirm the social name have been edited', async () => {}); - }); + it('should confirm verified data button is enabled for administrative', async() => { + it('should check the Verified data checkbox', async() => { + it('should confirm Verified data checkbox is checked', async() => { + it('should again edit the social name', async() => { + it('should again confirm the social name have been edited', async() => { describe('as salesPerson second run', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should confirm verified data button is disabled once again for salesPerson', async () => {}); - it('should not be able to save change throwing a verified data error', async () => {}); - }); + it('should confirm verified data button is disabled once again for salesPerson', async() => { + it('should not be able to save change throwing a verified data error', async() => { describe('as salesAssistant', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should log in as salesAssistant then get to the client fiscal data', async () => {}); - it('should confirm verified data button is enabled for salesAssistant', async () => {}); - it('should now edit the social name', async () => {}); - it('should now confirm the social name have been edited once and for all', async () => {}); - }); + it('should log in as salesAssistant then get to the client fiscal data', async() => { + it('should confirm verified data button is enabled for salesAssistant', async() => { + it('should now edit the social name', async() => { + it('should now confirm the social name have been edited once and for all', async() => { describe('as salesPerson third run', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should confirm verified data button is enabled once again', async () => {}); - it('should confirm the form is enabled for salesPerson', async () => {}); - }); -}); + it('should confirm verified data button is enabled once again', async() => { + it('should confirm the form is enabled for salesPerson', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/13_log.spec.js b/test/cypress/integration/client/13_log.spec.js index d1f616e14..a0c971fa5 100644 --- a/test/cypress/integration/client/13_log.spec.js +++ b/test/cypress/integration/client/13_log.spec.js @@ -1,11 +1,3 @@ -describe.skip('Client ient log path', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should update the clients name', async () => {}); - it('should navigate to the log section', async () => {}); -}); +describe('Client log path', () => { + it('should update the clients name', async() => { + it('should navigate to the log section', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/14_balance.spec.js b/test/cypress/integration/client/14_balance.spec.js index 695cf355b..44e631122 100644 --- a/test/cypress/integration/client/14_balance.spec.js +++ b/test/cypress/integration/client/14_balance.spec.js @@ -1,17 +1,9 @@ -describe.skip('Client balance path', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should now edit the local user config data', async () => {}); - it('should create a new payment that clears the debt', async () => {}); - it('should edit the 1st line reference and check data', async () => {}); - it('should create a new payment, check the cash comparison works correctly and balance value is -100', async () => {}); - it('should create a new payment and check the cash exceeded the maximum', async () => {}); - it('should create a new payment that sets the balance back to negative value and check it', async () => {}); - it('should now click on the Clients button of the top bar menu', async () => {}); - it('should now search for the user Petter Parker not check the payment button is not present', async () => {}); -}); +describe('Client balance path', () => { + it('should now edit the local user config data', async() => { + it('should create a new payment that clears the debt', async() => { + it('should edit the 1st line reference and check data', async() => { + it('should create a new payment, check the cash comparison works correctly and balance value is -100', async() => { + it('should create a new payment and check the cash exceeded the maximum', async() => { + it('should create a new payment that sets the balance back to negative value and check it', async() => { + it('should now click on the Clients button of the top bar menu', async() => { + it('should now search for the user Petter Parker not check the payment button is not present', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/15_user_config.spec.js b/test/cypress/integration/client/15_user_config.spec.js index 2b4598d1d..ac6e10951 100644 --- a/test/cypress/integration/client/15_user_config.spec.js +++ b/test/cypress/integration/client/15_user_config.spec.js @@ -1,37 +1,12 @@ describe('User config', () => { describe('as salesPerson', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should login', async () => {}); - it('should now open the user config form to check the settings', async () => {}); - }); + it('should login', async() => { + it('should now open the user config form to check the settings', async() => { describe('as employee', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should log in', async () => {}); - it('should open the user config form to check the settings', async () => {}); - it('should now edit the user config data', async () => {}); - }); + it('should log in', async() => { + it('should open the user config form to check the settings', async() => { + it('should now edit the user config data', async() => { describe('as salesPerson 2nd run', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should log in once more', async () => {}); - it('should again open the user config form to check the local settings', async () => {}); - it('should now clear the local settings', async () => {}); - }); -}); + it('should log in once more', async() => { + it('should again open the user config form to check the local settings', async() => { + it('should now clear the local settings', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/16_web_payment.spec.js b/test/cypress/integration/client/16_web_payment.spec.js index 5bd186299..586012c63 100644 --- a/test/cypress/integration/client/16_web_payment.spec.js +++ b/test/cypress/integration/client/16_web_payment.spec.js @@ -1,22 +1,5 @@ -describe.skip('Client ient web Payment', () => { +describe('Client web Payment', () => { describe('as employee', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should not be able to confirm payments', async () => {}); - }); + it('should not be able to confirm payments', async() => { describe('as administrative', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should be able to confirm payments', async () => {}); - }); -}); + it('should be able to confirm payments', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/17_dms.spec.js b/test/cypress/integration/client/17_dms.spec.js index 8e5a25b2b..382162a50 100644 --- a/test/cypress/integration/client/17_dms.spec.js +++ b/test/cypress/integration/client/17_dms.spec.js @@ -1,13 +1,4 @@ -describe.skip('Client DMS', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); +describe('Client DMS', () => { describe('as salesPerson', () => { - it('should delete de first file', async () => {}); - it(`should click on the first document line worker name making the descriptor visible`, async () => {}); - }); -}); + it('should delete de first file', async() => { + it(`should click on the first document line worker name making the descriptor visible`, async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/18_contacts.spec.js b/test/cypress/integration/client/18_contacts.spec.js index bffbb0f50..a2194e318 100644 --- a/test/cypress/integration/client/18_contacts.spec.js +++ b/test/cypress/integration/client/18_contacts.spec.js @@ -1,11 +1,3 @@ -describe.skip('Client ient contacts', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should add a contact', async () => {}); - it('should delete de contact', async () => {}); -}); +describe('Client contacts', () => { + it('should add a contact', async() => { + it('should delete de contact', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/19_summary.spec.js b/test/cypress/integration/client/19_summary.spec.js index 99b6f247e..960765b8d 100644 --- a/test/cypress/integration/client/19_summary.spec.js +++ b/test/cypress/integration/client/19_summary.spec.js @@ -1,19 +1,11 @@ -describe.skip('Client ient summary path', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should reach the first route summary section', async () => {}); - it('should display details from the client on the header', async () => {}); - it('should display some basic data', async () => {}); - it('should display fiscal address details', async () => {}); - it('should display some fiscal data', async () => {}); - it('should display pay method details', async () => {}); - it('should display default address details', async () => {}); - it('should display web access details', async () => {}); - it('should display business data', async () => {}); - it('should display financial information', async () => {}); -}); +describe('Client summary path', () => { + it('should reach the first route summary section', async() => { + it('should display details from the client on the header', async() => { + it('should display some basic data', async() => { + it('should display fiscal address details', async() => { + it('should display some fiscal data', async() => { + it('should display pay method details', async() => { + it('should display default address details', async() => { + it('should display web access details', async() => { + it('should display business data', async() => { + it('should display financial information', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/20_credit_insurance.spec.js b/test/cypress/integration/client/20_credit_insurance.spec.js index e3853f0de..5c0ecb240 100644 --- a/test/cypress/integration/client/20_credit_insurance.spec.js +++ b/test/cypress/integration/client/20_credit_insurance.spec.js @@ -1,22 +1,14 @@ -describe.skip('Client credit insurance path', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should open the create a new credit contract form', async () => {}); - it('should create a new credit contract', async () => {}); - it(`should verify the addNewContract button is not present since there's an active contract`, async () => {}); - it(`should click the view credits button`, async () => {}); - it('should click the add new credit button which opens the new credit form', async () => {}); - it('should fill the form but provide no grade to the new credit hence fail', async () => {}); - it('should provide a correct grade and succesfully save a new credit', async () => {}); - it('should be redirected to the credit index', async () => {}); - it('should check the amount of credits is the expected', async () => {}); - it('should navigate to the credit insurance section', async () => {}); - it('should bring the current contract to an end', async () => {}); - it(`should verify the addNewContract button is now present since there's no active contract`, async () => {}); - it(`should verify the endCurrentContract button is not present since there's no active contract`, async () => {}); -}); +describe('Client credit insurance path', () => { + it('should open the create a new credit contract form', async() => { + it('should create a new credit contract', async() => { + it(`should verify the addNewContract button is not present since there's an active contract`, async() => { + it(`should click the view credits button`, async() => { + it('should click the add new credit button which opens the new credit form', async() => { + it('should fill the form but provide no grade to the new credit hence fail', async() => { + it('should provide a correct grade and succesfully save a new credit', async() => { + it('should be redirected to the credit index', async() => { + it('should check the amount of credits is the expected', async() => { + it('should navigate to the credit insurance section', async() => { + it('should bring the current contract to an end', async() => { + it(`should verify the addNewContract button is now present since there's no active contract`, async() => { + it(`should verify the endCurrentContract button is not present since there's no active contract`, async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/21_defaulter.spec.js b/test/cypress/integration/client/21_defaulter.spec.js index 42cad2a92..33bfac42c 100644 --- a/test/cypress/integration/client/21_defaulter.spec.js +++ b/test/cypress/integration/client/21_defaulter.spec.js @@ -1,15 +1,7 @@ -describe.skip('Client defaulter path', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it('should count the amount of clients in the turns section', async () => {}); - it('should check contain expected client', async () => {}); - it('should first observation not changed', async () => {}); - it('should not add empty observation', async () => {}); - it('should checked all defaulters', async () => {}); - it('should add observation for all clients', async () => {}); -}); +describe('Client defaulter path', () => { + it('should count the amount of clients in the turns section', async() => { + it('should check contain expected client', async() => { + it('should first observation not changed', async() => { + it('should not add empty observation', async() => { + it('should checked all defaulters', async() => { + it('should add observation for all clients', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/22_unpaid.spec.js b/test/cypress/integration/client/22_unpaid.spec.js index f5e09d6d9..704509373 100644 --- a/test/cypress/integration/client/22_unpaid.spec.js +++ b/test/cypress/integration/client/22_unpaid.spec.js @@ -1,12 +1,4 @@ -describe.skip('Client unpaid path', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/unpaid', { - timeout: 5000, - }); - }); - it('should set cliet unpaid', async () => {}); - it('should save unpaid', async () => {}); - it('should confirm the unpaid have been saved', async () => {}); -}); +describe('Client unpaid path', () => { + it('should set cliet unpaid', async() => { + it('should save unpaid', async() => { + it('should confirm the unpaid have been saved', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/23_send_compensation.spec.js b/test/cypress/integration/client/23_send_compensation.spec.js index 8d1cff1b3..2131b7456 100644 --- a/test/cypress/integration/client/23_send_compensation.spec.js +++ b/test/cypress/integration/client/23_send_compensation.spec.js @@ -1,10 +1,2 @@ -describe.skip('Client Send balance compensation', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('#/customer/1110/credits', { - timeout: 5000, - }); - }); - it(`should click on send compensation button`, async () => {}); -}); +describe('Client Send balance compensation', () => { + it(`should click on send compensation button`, async() => { \ No newline at end of file -- 2.40.1 From 78c03a27462e230a4cc123fe19aa15e945254d0b Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Sun, 1 Dec 2024 16:42:20 +0100 Subject: [PATCH 10/11] revert: refs #7356 add files --- create_branch_and_copy_e2e.sh | 42 ----------------------------- create_branch_and_copy_e2e_echo.sh | 43 ------------------------------ package.json | 3 +-- 3 files changed, 1 insertion(+), 87 deletions(-) delete mode 100644 create_branch_and_copy_e2e.sh delete mode 100644 create_branch_and_copy_e2e_echo.sh diff --git a/create_branch_and_copy_e2e.sh b/create_branch_and_copy_e2e.sh deleted file mode 100644 index 6c280ddd1..000000000 --- a/create_branch_and_copy_e2e.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -# Verificar si se pasaron los parámetros correctos -if [ "$#" -ne 3 ]; then - echo "Uso: $0 " - exit 1 -fi - -# Asignar parámetros a variables -ID_TAREA=$1 -MODULO=$2 -E2E_PATH=$3 - -# Nombre de la rama -BRANCH_NAME="${ID_TAREA}_${MODULO}_missing_e2e" - -# Paso 1: Crear la rama local a partir de dev -git checkout dev -git pull origin dev -git checkout -b "${BRANCH_NAME}" - -# Paso 2: Copiar archivos al directorio destino -SOURCE_DIR="../salix/e2e/paths/${E2E_PATH}" -DEST_DIR="../test-processing/tests" - -mkdir -p "${DEST_DIR}" -cp -r "${SOURCE_DIR}"/* "${DEST_DIR}" - -# Paso 3: Ejecutar el comando node -cd ../test-processing -PROCESS_SCRIPT="../test-processing/index.js" -node "${PROCESS_SCRIPT}" -cd ../salix-front - -# Paso 4: Copiar archivos procesados al destino Cypress -PROCESSED_DIR="../test-processing/processedTests" -CYPRESS_DEST="./test/cypress/integration/${MODULO}" -mkdir -p "${CYPRESS_DEST}" -cp -r "${PROCESSED_DIR}"/* "${CYPRESS_DEST}" - -# Confirmación final -echo "Flujo completado exitosamente. Revisa los resultados." diff --git a/create_branch_and_copy_e2e_echo.sh b/create_branch_and_copy_e2e_echo.sh deleted file mode 100644 index d89ea56c6..000000000 --- a/create_branch_and_copy_e2e_echo.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -# Verificar si se pasaron los parámetros correctos -if [ "$#" -ne 3 ]; then - echo "Uso: $0 " - exit 1 -fi - -# Asignar parámetros a variables -ID_TAREA=$1 -MODULO=$2 -E2E_PATH=$3 - -# Nombre de la rama -BRANCH_NAME="${ID_TAREA}_${MODULO}_missing_e2e" - -# Paso 1: Crear la rama local a partir de dev -echo "git checkout dev" -echo "git pull origin dev" -echo "git checkout -b ${BRANCH_NAME}" - -# Paso 2: Copiar archivos al directorio destino -SOURCE_DIR="../salix/e2e/paths/${E2E_PATH}" -DEST_DIR="../test-processing/tests" - -echo "mkdir -p ${DEST_DIR}" -echo "cp -r ${SOURCE_DIR}/* ${DEST_DIR}" - -# Paso 3: Ejecutar el comando node -echo "cd ../test-processing" -PROCESS_SCRIPT="../test-processing/index.js" -echo "node ${PROCESS_SCRIPT}" -echo "cd ../salix-front" - -# Paso 4: Copiar archivos procesados al destino Cypress -PROCESSED_DIR="../test-processing/processedTests" -CYPRESS_DEST="./test/cypress/integration/${MODULO}" - -echo "mkdir -p ${CYPRESS_DEST}" -echo "cp -r ${PROCESSED_DIR}/* ${CYPRESS_DEST}" - -# Confirmación final -echo "Flujo completado (pendiente de ejecución real). Valida los comandos antes de proceder." diff --git a/package.json b/package.json index 550a08abf..04b75a0b0 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,6 @@ "lint": "eslint --ext .js,.vue ./", "format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore", "test:e2e": "cypress open", - "test:e2e:run": "cypress run", "test:e2e:ci": "npm run resetDatabase && cd ../salix-front && cypress run", "test": "echo \"See package.json => scripts for available tests.\" && exit 0", "test:unit": "vitest", @@ -65,4 +64,4 @@ "vite": "^5.1.4", "vitest": "^0.31.1" } -} +} \ No newline at end of file -- 2.40.1 From 59107866fcaa929833c399dc4a15638c4c6bd526 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Sun, 1 Dec 2024 16:42:57 +0100 Subject: [PATCH 11/11] revert: refs #7356 add files --- .../client/01_create_client.spec.js | 14 ------------ .../client/02_edit_basic_data.spec.js | 21 ------------------ .../client/03_edit_fiscal_data.spec.js | 22 ------------------- .../client/04_edit_billing_data.spec.js | 7 ------ .../integration/client/05_add_address.spec.js | 14 ------------ .../client/06_add_address_notes.spec.js | 5 ----- .../client/07_edit_web_access.spec.js | 2 -- .../integration/client/09_add_credit.spec.js | 4 ---- .../integration/client/10_add_greuge.spec.js | 4 ---- .../integration/client/11_mandate.spec.js | 2 -- .../client/12_lock_of_verified_data.spec.js | 22 ------------------- .../cypress/integration/client/13_log.spec.js | 3 --- .../integration/client/14_balance.spec.js | 9 -------- .../integration/client/15_user_config.spec.js | 12 ---------- .../integration/client/16_web_payment.spec.js | 5 ----- .../cypress/integration/client/17_dms.spec.js | 4 ---- .../integration/client/18_contacts.spec.js | 3 --- .../integration/client/19_summary.spec.js | 11 ---------- .../client/20_credit_insurance.spec.js | 14 ------------ .../integration/client/21_defaulter.spec.js | 7 ------ .../integration/client/22_unpaid.spec.js | 4 ---- .../client/23_send_compensation.spec.js | 2 -- 22 files changed, 191 deletions(-) delete mode 100644 test/cypress/integration/client/01_create_client.spec.js delete mode 100644 test/cypress/integration/client/02_edit_basic_data.spec.js delete mode 100644 test/cypress/integration/client/03_edit_fiscal_data.spec.js delete mode 100644 test/cypress/integration/client/04_edit_billing_data.spec.js delete mode 100644 test/cypress/integration/client/05_add_address.spec.js delete mode 100644 test/cypress/integration/client/06_add_address_notes.spec.js delete mode 100644 test/cypress/integration/client/07_edit_web_access.spec.js delete mode 100644 test/cypress/integration/client/09_add_credit.spec.js delete mode 100644 test/cypress/integration/client/10_add_greuge.spec.js delete mode 100644 test/cypress/integration/client/11_mandate.spec.js delete mode 100644 test/cypress/integration/client/12_lock_of_verified_data.spec.js delete mode 100644 test/cypress/integration/client/13_log.spec.js delete mode 100644 test/cypress/integration/client/14_balance.spec.js delete mode 100644 test/cypress/integration/client/15_user_config.spec.js delete mode 100644 test/cypress/integration/client/16_web_payment.spec.js delete mode 100644 test/cypress/integration/client/17_dms.spec.js delete mode 100644 test/cypress/integration/client/18_contacts.spec.js delete mode 100644 test/cypress/integration/client/19_summary.spec.js delete mode 100644 test/cypress/integration/client/20_credit_insurance.spec.js delete mode 100644 test/cypress/integration/client/21_defaulter.spec.js delete mode 100644 test/cypress/integration/client/22_unpaid.spec.js delete mode 100644 test/cypress/integration/client/23_send_compensation.spec.js diff --git a/test/cypress/integration/client/01_create_client.spec.js b/test/cypress/integration/client/01_create_client.spec.js deleted file mode 100644 index 5f13bed69..000000000 --- a/test/cypress/integration/client/01_create_client.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -describe('Client create path', () => { - it(`should search for the user Carol Danvers to confirm it isn't created yet`, async() => { - it('should now access to the create client view by clicking the create-client floating button', async() => { - it('should receive an error when clicking the create button having name and Business name fields empty', - it(`should create a new province`, async() => { - it(`should create a new city`, async() => { - it(`should create a new post code`, async() => { - it(`should attempt to create a new user with all it's data but wrong email`, async() => { - it(`should attempt to create a new user with all it's data but wrong business type`, async() => { - it(`should attempt to create a new user with all it's data but wrong postal code`, async() => { - it(`should check for autocompleted city, province and country`, async() => { - it(`should create a new user with all correct data`, async() => { - it('should click on the Clients button of the top bar menu', async() => { - it(`should search for the user Carol Danvers to confirm it exists`, async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/02_edit_basic_data.spec.js b/test/cypress/integration/client/02_edit_basic_data.spec.js deleted file mode 100644 index 4dd9fc129..000000000 --- a/test/cypress/integration/client/02_edit_basic_data.spec.js +++ /dev/null @@ -1,21 +0,0 @@ -describe('Client Edit basicData path', () => { - describe('as employee', () => { - it('should not be able to change the salesPerson', async() => { - it('should edit the client basic data but leave salesPerson untainted', async() => { - it('should confirm the name have been edited', async() => { - it('should confirm the contact name have been edited', async() => { - it('should confirm the business type have been edited', async() => { - it('should confirm the email have been edited', async() => { - it('should confirm the channel have been selected', async() => { - it('should confirm the previous client have been selected', async() => { - describe('as salesAssistant', () => { - it('should navigate to a client basic data', async() => { - it('should be able to change the salesPerson', async() => { - it('should edit the client basic data including salesPerson', async() => { - it('should now confirm the name have been edited', async() => { - it('should now confirm the contact name have been edited', async() => { - it('should now confirm the email have been edited', async() => { - it('should now confirm the phone have been edited', async() => { - it('should now confirm the mobile have been edited', async() => { - it('should confirm the sales person have been selected', async() => { - it('should now confirm the channel have been selected', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/03_edit_fiscal_data.spec.js b/test/cypress/integration/client/03_edit_fiscal_data.spec.js deleted file mode 100644 index 0f447fb4d..000000000 --- a/test/cypress/integration/client/03_edit_fiscal_data.spec.js +++ /dev/null @@ -1,22 +0,0 @@ -describe('Client Edit fiscalData path', () => { - describe('as employee', () => { - it(`should click on the 1st edit icon to check EQtax isnt checked`, async() => { - it(`should go back to addresses then select the second one and confirm the EQtax isnt checked`, async() => { - it(`should click on the fiscal data button`, async() => { - it('should not be able to edit the verified data checkbox', async() => { - describe('as administrative', () => { - it(`should edit the fiscal data but fail as the fiscal id ain't valid`, async() => { - it(`should edit the fiscal this time with a valid fiscal id`, async() => { - it('should propagate the Equalization tax', async() => { - it('should receive an error if the fiscal id contains A or B at the beginning', async() => { - it('should edit the fiscal data correctly as VIES isnt checked and fiscal id is valid for EQtax', async() => { - it(`should click on the addresses button to access to the client's addresses`, async() => { - it(`should click on the 1st edit icon to confirm EQtax is checked`, async() => { - it(`should go back to addresses then select the second one and confirm the EQtax is checked`, async() => { - it('should navigate back to fiscal data and uncheck EQtax then check VIES', async() => { - it('should propagate the Equalization tax changes', async() => { - it('should confirm its name have been edited', async() => { - it('should confirm the fiscal data have been edited', async() => { - it(`should click on the addresses button to access to the client's addresses`, async() => { - it(`should click on the 1st edit icon to access the address details and uncheck EQtax checkbox`, async() => { - it('should navigate back to fiscal data to confirm invoice by address is now checked', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/04_edit_billing_data.spec.js b/test/cypress/integration/client/04_edit_billing_data.spec.js deleted file mode 100644 index 17d8adc56..000000000 --- a/test/cypress/integration/client/04_edit_billing_data.spec.js +++ /dev/null @@ -1,7 +0,0 @@ -describe('Client Edit billing data path', () => { - it(`should attempt to edit the billing data without an IBAN but fail`, async() => { - it(`should edit the billing data and save the form`, async() => { - it(`should create a new BIC code`, async() => { - it(`should confirm the IBAN pay method was sucessfully saved`, async() => { - it(`should clear the BIC code field, update the IBAN to see how he BIC code autocompletes`, async() => { - it('should confirm the billing data have been edited', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/05_add_address.spec.js b/test/cypress/integration/client/05_add_address.spec.js deleted file mode 100644 index 866b4c481..000000000 --- a/test/cypress/integration/client/05_add_address.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -describe('Client Add address path', () => { - it(`should click on the add new address button to access to the new address form`, async() => { - it('should receive an error after clicking save button as consignee, street and town fields are empty', async() => { - it('should confirm that the city and province are propertly filled', async() => { - it(`should throw after clicking save button as consignee, incoterms and customsAgent are empty`, async() => { - it(`should receive an error after clicking save button as customsAgent is empty`, async() => { - it(`should create a new custom agent and then save the address`, async() => { - it(`should navigate back to the addresses index`, async() => { - it(`should confirm the new address exists and it's the default one`, async() => { - it('should click on the make default icon of the second address', async() => { - it(`should confirm the default address is the expected one`, async() => { - it(`should click on the edit icon of the default address`, async() => { - it(`should click on the active checkbox and receive an error to save it because it is the default address`, async() => { - it(`should go back to the addreses section by clicking the cancel button`, async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/06_add_address_notes.spec.js b/test/cypress/integration/client/06_add_address_notes.spec.js deleted file mode 100644 index 16817bfc9..000000000 --- a/test/cypress/integration/client/06_add_address_notes.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -describe('Client add address notes path', () => { - it(`should click on the edit icon of the default address`, async() => { - it('should not save a description without observation type', async() => { - it('should not save an observation type without description', async() => { - it('should create two new observations', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/07_edit_web_access.spec.js b/test/cypress/integration/client/07_edit_web_access.spec.js deleted file mode 100644 index 1c3c82628..000000000 --- a/test/cypress/integration/client/07_edit_web_access.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -describe('Client web access path', () => { - it('should modify and save web access attributes', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/09_add_credit.spec.js b/test/cypress/integration/client/09_add_credit.spec.js deleted file mode 100644 index b202e6109..000000000 --- a/test/cypress/integration/client/09_add_credit.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -describe('Client Add credit path', () => { - it(`should click on the add credit button`, async() => { - it(`should edit the credit`, async() => { - it('should confirm the credit was updated', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/10_add_greuge.spec.js b/test/cypress/integration/client/10_add_greuge.spec.js deleted file mode 100644 index ec3eff96d..000000000 --- a/test/cypress/integration/client/10_add_greuge.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -describe('Client Add greuge path', () => { - it(`should click on the add greuge button`, async() => { - it(`should receive an error if all fields are empty but date and type on submit`, async() => { - it(`should create a new greuge with all its data and confirm the greuge was added to the list`, async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/11_mandate.spec.js b/test/cypress/integration/client/11_mandate.spec.js deleted file mode 100644 index cc216dc5d..000000000 --- a/test/cypress/integration/client/11_mandate.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -describe('Client mandate path', () => { - it('should confirm the client has a mandate of the CORE type', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/12_lock_of_verified_data.spec.js b/test/cypress/integration/client/12_lock_of_verified_data.spec.js deleted file mode 100644 index b63d21116..000000000 --- a/test/cypress/integration/client/12_lock_of_verified_data.spec.js +++ /dev/null @@ -1,22 +0,0 @@ -describe('Client lock verified data path', () => { - describe('as salesPerson', () => { - it('should confirm verified data button is disabled for salesPerson', async() => { - it('should edit the social name', async() => { - it('should confirm the social name have been edited', async() => { - describe('as administrative', () => { - it('should confirm verified data button is enabled for administrative', async() => { - it('should check the Verified data checkbox', async() => { - it('should confirm Verified data checkbox is checked', async() => { - it('should again edit the social name', async() => { - it('should again confirm the social name have been edited', async() => { - describe('as salesPerson second run', () => { - it('should confirm verified data button is disabled once again for salesPerson', async() => { - it('should not be able to save change throwing a verified data error', async() => { - describe('as salesAssistant', () => { - it('should log in as salesAssistant then get to the client fiscal data', async() => { - it('should confirm verified data button is enabled for salesAssistant', async() => { - it('should now edit the social name', async() => { - it('should now confirm the social name have been edited once and for all', async() => { - describe('as salesPerson third run', () => { - it('should confirm verified data button is enabled once again', async() => { - it('should confirm the form is enabled for salesPerson', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/13_log.spec.js b/test/cypress/integration/client/13_log.spec.js deleted file mode 100644 index a0c971fa5..000000000 --- a/test/cypress/integration/client/13_log.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -describe('Client log path', () => { - it('should update the clients name', async() => { - it('should navigate to the log section', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/14_balance.spec.js b/test/cypress/integration/client/14_balance.spec.js deleted file mode 100644 index 44e631122..000000000 --- a/test/cypress/integration/client/14_balance.spec.js +++ /dev/null @@ -1,9 +0,0 @@ -describe('Client balance path', () => { - it('should now edit the local user config data', async() => { - it('should create a new payment that clears the debt', async() => { - it('should edit the 1st line reference and check data', async() => { - it('should create a new payment, check the cash comparison works correctly and balance value is -100', async() => { - it('should create a new payment and check the cash exceeded the maximum', async() => { - it('should create a new payment that sets the balance back to negative value and check it', async() => { - it('should now click on the Clients button of the top bar menu', async() => { - it('should now search for the user Petter Parker not check the payment button is not present', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/15_user_config.spec.js b/test/cypress/integration/client/15_user_config.spec.js deleted file mode 100644 index ac6e10951..000000000 --- a/test/cypress/integration/client/15_user_config.spec.js +++ /dev/null @@ -1,12 +0,0 @@ -describe('User config', () => { - describe('as salesPerson', () => { - it('should login', async() => { - it('should now open the user config form to check the settings', async() => { - describe('as employee', () => { - it('should log in', async() => { - it('should open the user config form to check the settings', async() => { - it('should now edit the user config data', async() => { - describe('as salesPerson 2nd run', () => { - it('should log in once more', async() => { - it('should again open the user config form to check the local settings', async() => { - it('should now clear the local settings', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/16_web_payment.spec.js b/test/cypress/integration/client/16_web_payment.spec.js deleted file mode 100644 index 586012c63..000000000 --- a/test/cypress/integration/client/16_web_payment.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -describe('Client web Payment', () => { - describe('as employee', () => { - it('should not be able to confirm payments', async() => { - describe('as administrative', () => { - it('should be able to confirm payments', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/17_dms.spec.js b/test/cypress/integration/client/17_dms.spec.js deleted file mode 100644 index 382162a50..000000000 --- a/test/cypress/integration/client/17_dms.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -describe('Client DMS', () => { - describe('as salesPerson', () => { - it('should delete de first file', async() => { - it(`should click on the first document line worker name making the descriptor visible`, async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/18_contacts.spec.js b/test/cypress/integration/client/18_contacts.spec.js deleted file mode 100644 index a2194e318..000000000 --- a/test/cypress/integration/client/18_contacts.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -describe('Client contacts', () => { - it('should add a contact', async() => { - it('should delete de contact', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/19_summary.spec.js b/test/cypress/integration/client/19_summary.spec.js deleted file mode 100644 index 960765b8d..000000000 --- a/test/cypress/integration/client/19_summary.spec.js +++ /dev/null @@ -1,11 +0,0 @@ -describe('Client summary path', () => { - it('should reach the first route summary section', async() => { - it('should display details from the client on the header', async() => { - it('should display some basic data', async() => { - it('should display fiscal address details', async() => { - it('should display some fiscal data', async() => { - it('should display pay method details', async() => { - it('should display default address details', async() => { - it('should display web access details', async() => { - it('should display business data', async() => { - it('should display financial information', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/20_credit_insurance.spec.js b/test/cypress/integration/client/20_credit_insurance.spec.js deleted file mode 100644 index 5c0ecb240..000000000 --- a/test/cypress/integration/client/20_credit_insurance.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -describe('Client credit insurance path', () => { - it('should open the create a new credit contract form', async() => { - it('should create a new credit contract', async() => { - it(`should verify the addNewContract button is not present since there's an active contract`, async() => { - it(`should click the view credits button`, async() => { - it('should click the add new credit button which opens the new credit form', async() => { - it('should fill the form but provide no grade to the new credit hence fail', async() => { - it('should provide a correct grade and succesfully save a new credit', async() => { - it('should be redirected to the credit index', async() => { - it('should check the amount of credits is the expected', async() => { - it('should navigate to the credit insurance section', async() => { - it('should bring the current contract to an end', async() => { - it(`should verify the addNewContract button is now present since there's no active contract`, async() => { - it(`should verify the endCurrentContract button is not present since there's no active contract`, async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/21_defaulter.spec.js b/test/cypress/integration/client/21_defaulter.spec.js deleted file mode 100644 index 33bfac42c..000000000 --- a/test/cypress/integration/client/21_defaulter.spec.js +++ /dev/null @@ -1,7 +0,0 @@ -describe('Client defaulter path', () => { - it('should count the amount of clients in the turns section', async() => { - it('should check contain expected client', async() => { - it('should first observation not changed', async() => { - it('should not add empty observation', async() => { - it('should checked all defaulters', async() => { - it('should add observation for all clients', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/22_unpaid.spec.js b/test/cypress/integration/client/22_unpaid.spec.js deleted file mode 100644 index 704509373..000000000 --- a/test/cypress/integration/client/22_unpaid.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -describe('Client unpaid path', () => { - it('should set cliet unpaid', async() => { - it('should save unpaid', async() => { - it('should confirm the unpaid have been saved', async() => { \ No newline at end of file diff --git a/test/cypress/integration/client/23_send_compensation.spec.js b/test/cypress/integration/client/23_send_compensation.spec.js deleted file mode 100644 index 2131b7456..000000000 --- a/test/cypress/integration/client/23_send_compensation.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -describe('Client Send balance compensation', () => { - it(`should click on send compensation button`, async() => { \ No newline at end of file -- 2.40.1