Merge pull request '2696 - Geo autocompletion fix' (#497) from 2696-geo_autocomplete into dev
gitea/salix/pipeline/head This commit looks good
Details
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:
commit
ac5d5ddf41
|
@ -1,7 +1,7 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
import selectors from '../../helpers/selectors.js';
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
describe('claim Summary path', () => {
|
describe('Claim summary path', () => {
|
||||||
let browser;
|
let browser;
|
||||||
let page;
|
let page;
|
||||||
const claimId = '4';
|
const claimId = '4';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
import selectors from '../../helpers/selectors.js';
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
describe('claim Descriptor path', () => {
|
describe('Claim descriptor path', () => {
|
||||||
let browser;
|
let browser;
|
||||||
let page;
|
let page;
|
||||||
const claimId = '1';
|
const claimId = '1';
|
||||||
|
|
|
@ -23,10 +23,13 @@ describe('Supplier fiscal data path', () => {
|
||||||
await page.clearInput(selectors.supplierFiscalData.country);
|
await page.clearInput(selectors.supplierFiscalData.country);
|
||||||
await page.clearInput(selectors.supplierFiscalData.postCode);
|
await page.clearInput(selectors.supplierFiscalData.postCode);
|
||||||
await page.write(selectors.supplierFiscalData.city, 'Valencia');
|
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.clearInput(selectors.supplierFiscalData.socialName);
|
||||||
await page.write(selectors.supplierFiscalData.socialName, 'Farmer King SL');
|
await page.write(selectors.supplierFiscalData.socialName, 'Farmer King SL');
|
||||||
await page.clearInput(selectors.supplierFiscalData.taxNumber);
|
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.clearInput(selectors.supplierFiscalData.account);
|
||||||
await page.write(selectors.supplierFiscalData.account, 'edited account number');
|
await page.write(selectors.supplierFiscalData.account, 'edited account number');
|
||||||
await page.autocompleteSearch(selectors.supplierFiscalData.sageWihholding, 'retencion estimacion objetiva');
|
await page.autocompleteSearch(selectors.supplierFiscalData.sageWihholding, 'retencion estimacion objetiva');
|
||||||
|
|
|
@ -84,5 +84,6 @@
|
||||||
"companyFk": "Company",
|
"companyFk": "Company",
|
||||||
"You need to fill sage information before you check verified data": "You need to fill sage information before you check verified data",
|
"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 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"
|
||||||
}
|
}
|
|
@ -42,9 +42,10 @@ export default class Controller extends Section {
|
||||||
|
|
||||||
// Town auto complete
|
// Town auto complete
|
||||||
set town(selection) {
|
set town(selection) {
|
||||||
|
const oldValue = this._town;
|
||||||
this._town = selection;
|
this._town = selection;
|
||||||
|
|
||||||
if (!selection) return;
|
if (!selection || !oldValue) return;
|
||||||
|
|
||||||
const province = selection.province;
|
const province = selection.province;
|
||||||
const postcodes = selection.postcodes;
|
const postcodes = selection.postcodes;
|
||||||
|
@ -62,9 +63,10 @@ export default class Controller extends Section {
|
||||||
|
|
||||||
// Postcode auto complete
|
// Postcode auto complete
|
||||||
set postcode(selection) {
|
set postcode(selection) {
|
||||||
|
const oldValue = this._postcode;
|
||||||
this._postcode = selection;
|
this._postcode = selection;
|
||||||
|
|
||||||
if (!selection) return;
|
if (!selection || !oldValue) return;
|
||||||
|
|
||||||
const town = selection.town;
|
const town = selection.town;
|
||||||
const province = town.province;
|
const province = town.province;
|
||||||
|
|
|
@ -106,9 +106,10 @@ export default class Controller extends Section {
|
||||||
|
|
||||||
// Province auto complete
|
// Province auto complete
|
||||||
set province(selection) {
|
set province(selection) {
|
||||||
|
const oldValue = this._province;
|
||||||
this._province = selection;
|
this._province = selection;
|
||||||
|
|
||||||
if (!selection) return;
|
if (!selection || !oldValue) return;
|
||||||
|
|
||||||
const country = selection.country;
|
const country = selection.country;
|
||||||
|
|
||||||
|
@ -122,9 +123,10 @@ export default class Controller extends Section {
|
||||||
|
|
||||||
// Town auto complete
|
// Town auto complete
|
||||||
set town(selection) {
|
set town(selection) {
|
||||||
|
const oldValue = this._town;
|
||||||
this._town = selection;
|
this._town = selection;
|
||||||
|
|
||||||
if (!selection) return;
|
if (!selection || !oldValue) return;
|
||||||
|
|
||||||
const province = selection.province;
|
const province = selection.province;
|
||||||
const country = province.country;
|
const country = province.country;
|
||||||
|
|
|
@ -8,9 +8,10 @@ export default class Controller extends Section {
|
||||||
|
|
||||||
// Province auto complete
|
// Province auto complete
|
||||||
set province(selection) {
|
set province(selection) {
|
||||||
|
const oldValue = this._province;
|
||||||
this._province = selection;
|
this._province = selection;
|
||||||
|
|
||||||
if (!selection) return;
|
if (!selection || !oldValue) return;
|
||||||
|
|
||||||
const country = selection.country;
|
const country = selection.country;
|
||||||
|
|
||||||
|
@ -24,9 +25,10 @@ export default class Controller extends Section {
|
||||||
|
|
||||||
// Town auto complete
|
// Town auto complete
|
||||||
set town(selection) {
|
set town(selection) {
|
||||||
|
const oldValue = this._town;
|
||||||
this._town = selection;
|
this._town = selection;
|
||||||
|
|
||||||
if (!selection) return;
|
if (!selection || !oldValue) return;
|
||||||
|
|
||||||
const province = selection.province;
|
const province = selection.province;
|
||||||
const country = province.country;
|
const country = province.country;
|
||||||
|
|
Loading…
Reference in New Issue