3795-client_administraive #938
No reviewers
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#938
Loading…
Reference in New Issue
No description provided.
Delete Branch "3795-client_administraive"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -126,7 +126,7 @@ describe('Client lock verified data path', () => {
it('should confirm verified data button is enabled for salesAssistant', async() => {
button doens't seem to be enabled.
@ -130,3 +129,4 @@
expect(isDisabled).toBeTruthy();
});
it('should now edit the social name', async() => {
doesn't seem to be changing data
@ -127,3 +127,3 @@
const isDisabled = await page.isDisabled(selectors.clientFiscalData.verifiedDataCheckbox);
expect(isDisabled).toBeFalsy();
expect(isDisabled).toBeTruthy();
when evaluating booleans use boolean matchers ie: toBeTrue or toEqual(true)
any defined variable would pass as truthy, therefore may be a false negative.
@ -130,3 +130,3 @@
if (!isSalesAssistant && client.isTaxDataChecked)
if (!isAdministrative && client.isTaxDataChecked)
throw new UserError(`You can't make changes on a client with verified data`);
the error shown here doesn't mention the lack of privileges, we believe the following error would be better:
throw new UserError(
Not enough privileges to edit a client with verified data);
don't forget to add translation to it please.
@ -211,0 +229,4 @@
const sageTransactionType = hasChanges && (changes.sageTransactionTypeFk || orgData.sageTransactionTypeFk);
const sageTransactionTypeChanged = hasChanges && orgData.sageTransactionTypeFk != sageTransactionType;
if (isTaxDataCheckedChanged && !isAdministrative)
To avoid code repetition you can extract conditions to constants and then use a single "if"