Merge pull request '2696 - Geo autocompletion fix' (#497) from 2696-geo_autocomplete into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #497
Reviewed-by: Carlos Jimenez Ruiz <carlosjr@verdnatura.es>
This commit is contained in:
Carlos Jimenez Ruiz 2020-12-31 12:20:09 +00:00
commit ac5d5ddf41
7 changed files with 20 additions and 10 deletions

View File

@ -1,7 +1,7 @@
import selectors from '../../helpers/selectors.js';
import getBrowser from '../../helpers/puppeteer';
describe('claim Summary path', () => {
describe('Claim summary path', () => {
let browser;
let page;
const claimId = '4';

View File

@ -1,7 +1,7 @@
import selectors from '../../helpers/selectors.js';
import getBrowser from '../../helpers/puppeteer';
describe('claim Descriptor path', () => {
describe('Claim descriptor path', () => {
let browser;
let page;
const claimId = '1';

View File

@ -23,10 +23,13 @@ describe('Supplier fiscal data path', () => {
await page.clearInput(selectors.supplierFiscalData.country);
await page.clearInput(selectors.supplierFiscalData.postCode);
await page.write(selectors.supplierFiscalData.city, 'Valencia');
await page.waitForTimeout(1000); // must repeat this action twice or fails. also #2699 may be a cool solution to this.
await page.clearInput(selectors.supplierFiscalData.city);
await page.write(selectors.supplierFiscalData.city, 'Valencia');
await page.clearInput(selectors.supplierFiscalData.socialName);
await page.write(selectors.supplierFiscalData.socialName, 'Farmer King SL');
await page.clearInput(selectors.supplierFiscalData.taxNumber);
await page.write(selectors.supplierFiscalData.taxNumber, 'invalid tax number');
await page.write(selectors.supplierFiscalData.taxNumber, 'Wrong tax number');
await page.clearInput(selectors.supplierFiscalData.account);
await page.write(selectors.supplierFiscalData.account, 'edited account number');
await page.autocompleteSearch(selectors.supplierFiscalData.sageWihholding, 'retencion estimacion objetiva');

View File

@ -84,5 +84,6 @@
"companyFk": "Company",
"You need to fill sage information before you check verified data": "You need to fill sage information before you check verified data",
"The social name cannot be empty": "The social name cannot be empty",
"The nif cannot be empty": "The nif cannot be empty"
"The nif cannot be empty": "The nif cannot be empty",
"A travel with this data already exists": "A travel with this data already exists"
}

View File

@ -42,9 +42,10 @@ export default class Controller extends Section {
// Town auto complete
set town(selection) {
const oldValue = this._town;
this._town = selection;
if (!selection) return;
if (!selection || !oldValue) return;
const province = selection.province;
const postcodes = selection.postcodes;
@ -62,9 +63,10 @@ export default class Controller extends Section {
// Postcode auto complete
set postcode(selection) {
const oldValue = this._postcode;
this._postcode = selection;
if (!selection) return;
if (!selection || !oldValue) return;
const town = selection.town;
const province = town.province;

View File

@ -106,9 +106,10 @@ export default class Controller extends Section {
// Province auto complete
set province(selection) {
const oldValue = this._province;
this._province = selection;
if (!selection) return;
if (!selection || !oldValue) return;
const country = selection.country;
@ -122,9 +123,10 @@ export default class Controller extends Section {
// Town auto complete
set town(selection) {
const oldValue = this._town;
this._town = selection;
if (!selection) return;
if (!selection || !oldValue) return;
const province = selection.province;
const country = province.country;

View File

@ -8,9 +8,10 @@ export default class Controller extends Section {
// Province auto complete
set province(selection) {
const oldValue = this._province;
this._province = selection;
if (!selection) return;
if (!selection || !oldValue) return;
const country = selection.country;
@ -24,9 +25,10 @@ export default class Controller extends Section {
// Town auto complete
set town(selection) {
const oldValue = this._town;
this._town = selection;
if (!selection) return;
if (!selection || !oldValue) return;
const province = selection.province;
const country = province.country;