refs #5640 oldBranch #1638

Merged
carlossa merged 13 commits from 5640-mayusFiscalDate into dev 2023-08-03 09:52:17 +00:00
4 changed files with 13 additions and 5 deletions
Showing only changes of commit 549235429c - Show all commits

View File

@ -61,7 +61,7 @@ describe('Client Edit fiscalData path', () => {
await page.clearInput(selectors.clientFiscalData.fiscalId); await page.clearInput(selectors.clientFiscalData.fiscalId);
await page.write(selectors.clientFiscalData.fiscalId, 'INVALID!'); await page.write(selectors.clientFiscalData.fiscalId, 'INVALID!');
await page.clearInput(selectors.clientFiscalData.address); await page.clearInput(selectors.clientFiscalData.address);
await page.write(selectors.clientFiscalData.address, 'Somewhere edited'); await page.write(selectors.clientFiscalData.address, 'SOMEWHERE EDITED');
await page.autocompleteSearch(selectors.clientFiscalData.country, 'España'); await page.autocompleteSearch(selectors.clientFiscalData.country, 'España');
await page.autocompleteSearch(selectors.clientFiscalData.province, 'Province one'); await page.autocompleteSearch(selectors.clientFiscalData.province, 'Province one');
await page.clearInput(selectors.clientFiscalData.city); await page.clearInput(selectors.clientFiscalData.city);
@ -190,7 +190,7 @@ describe('Client Edit fiscalData path', () => {
const verifiedData = await page.checkboxState(selectors.clientFiscalData.verifiedDataCheckbox); const verifiedData = await page.checkboxState(selectors.clientFiscalData.verifiedDataCheckbox);
expect(fiscalId).toEqual('94980061C'); expect(fiscalId).toEqual('94980061C');
expect(address).toEqual('Somewhere edited'); expect(address).toEqual('SOMEWHERE EDITED');
expect(postcode).toContain('46000'); expect(postcode).toContain('46000');
expect(sageTax).toEqual('Operaciones no sujetas'); expect(sageTax).toEqual('Operaciones no sujetas');
expect(sageTransaction).toEqual('Regularización de inversiones'); expect(sageTransaction).toEqual('Regularización de inversiones');

View File

@ -39,7 +39,7 @@ describe('Client lock verified data path', () => {
await page.reloadSection('client.card.fiscalData'); await page.reloadSection('client.card.fiscalData');
const result = await page.waitToGetProperty(selectors.clientFiscalData.socialName, 'value'); const result = await page.waitToGetProperty(selectors.clientFiscalData.socialName, 'value');
expect(result).toEqual('Captain America Civil War'); expect(result).toEqual('CAPTAIN AMERICA CIVIL WAR');
}); });
}); });
@ -88,7 +88,7 @@ describe('Client lock verified data path', () => {
await page.reloadSection('client.card.fiscalData'); await page.reloadSection('client.card.fiscalData');
const result = await page.waitToGetProperty(selectors.clientFiscalData.socialName, 'value'); const result = await page.waitToGetProperty(selectors.clientFiscalData.socialName, 'value');
expect(result).toEqual('Ant man and the Wasp'); expect(result).toEqual('ANT MAN AND THE WASP');
}); });
}); });
@ -142,7 +142,7 @@ describe('Client lock verified data path', () => {
await page.reloadSection('client.card.fiscalData'); await page.reloadSection('client.card.fiscalData');
const result = await page.waitToGetProperty(selectors.clientFiscalData.socialName, 'value'); const result = await page.waitToGetProperty(selectors.clientFiscalData.socialName, 'value');
expect(result).toEqual('new social name edition'); expect(result).toEqual('NEW SOCIAL NAME EDITION');
}); });
}); });

View File

@ -33,6 +33,7 @@
ng-model="$ctrl.client.socialName" ng-model="$ctrl.client.socialName"
info="Only letters, numbers and spaces can be used" info="Only letters, numbers and spaces can be used"
required="true" required="true"
ng-keyup="$ctrl.mayus($event)"
rule> rule>
</vn-textfield> </vn-textfield>
<vn-textfield <vn-textfield
@ -46,6 +47,7 @@
vn-two vn-two
label="Street" label="Street"
ng-model="$ctrl.client.street" ng-model="$ctrl.client.street"
ng-keyup="$ctrl.mayus($event)"
rule> rule>
</vn-textfield> </vn-textfield>
</vn-horizontal> </vn-horizontal>

View File

@ -177,6 +177,12 @@ export default class Controller extends Section {
this.client.provinceFk = response.provinceFk; this.client.provinceFk = response.provinceFk;
this.client.countryFk = response.countryFk; this.client.countryFk = response.countryFk;
} }
mayus(event) {
let input = event.target;
let inputValue = input.value;
input.value = inputValue.toUpperCase();
}
Outdated
Review
toUpper(event) {
    const input = event.target;
    input.value = input.value.toUpperCase();
}
``` toUpper(event) { const input = event.target; input.value = input.value.toUpperCase(); } ```
} }
ngModule.vnComponent('vnClientFiscalData', { ngModule.vnComponent('vnClientFiscalData', {