[AAE-11270] replaced error message with shorter version (#8487)

* [AAE-11270] replaced error message with shorter version

* [AAE-11270] updated failing e2e test
This commit is contained in:
tomasz hanaj
2023-05-08 15:39:56 +02:00
committed by GitHub
parent d8c398fc79
commit 2b8f81dfe4
3 changed files with 8 additions and 8 deletions

View File

@@ -26,7 +26,7 @@ test.describe('Groups component stories tests', () => {
Meat Chicken cancel
`;
await processServicesCloud.navigateTo({moduleNames:['group-cloud'], componentName: 'group-cloud', story: 'valid-preselected-groups' });
await processServicesCloud.navigateTo({ moduleNames: ['group-cloud'], componentName: 'group-cloud', story: 'valid-preselected-groups' });
await expect(groupComponent.groupNaming).toContainText(expectedUsersName);
});
@@ -37,7 +37,7 @@ test.describe('Groups component stories tests', () => {
Meat Chicken
`;
await processServicesCloud.navigateTo({moduleNames:['group-cloud'], componentName: 'group-cloud', story: 'mandatory-preselected-groups' });
await processServicesCloud.navigateTo({ moduleNames: ['group-cloud'], componentName: 'group-cloud', story: 'mandatory-preselected-groups' });
await expect.soft(groupComponent.groupNaming).toContainText(expectedUsersName);
await groupComponent.getUserLocator('Meat Chicken').hover();
@@ -45,10 +45,10 @@ test.describe('Groups component stories tests', () => {
});
test('Invalid Preselected Groups', async ({ processServicesCloud, groupComponent }) => {
const expectedWarningMessage = 'No group found with the name Invalid Group';
const expectedWarningMessage = 'Group not found';
const expectedWarningIcon = 'error_outline';
await processServicesCloud.navigateTo({moduleNames:['group-cloud'], componentName: 'group-cloud', story: 'invalid-preselected-groups' });
await processServicesCloud.navigateTo({ moduleNames: ['group-cloud'], componentName: 'group-cloud', story: 'invalid-preselected-groups' });
await expect(groupComponent.error.content).toContainText(expectedWarningIcon + expectedWarningMessage);
});

View File

@@ -49,7 +49,7 @@
<mat-option *ngIf="searchGroupsControl.hasError('searchTypingError') && !searchLoading" disabled
class="adf-cloud-group-option-not-active"
data-automation-id="adf-cloud-group-no-results">
<span> {{ 'ADF_CLOUD_GROUPS.ERROR.NOT_FOUND' | translate : { groupName: searchedValue } }}</span>
<span> {{ 'ADF_CLOUD_GROUPS.ERROR.NOT_FOUND' | translate }}</span>
</mat-option>
</ng-template>
</mat-autocomplete>
@@ -62,7 +62,7 @@
<div class="adf-error-container">
<mat-error *ngIf="hasPreselectError() && !isValidationLoading()" [@transitionMessages]="subscriptAnimationState" class="adf-error">
<mat-icon class="adf-error-icon">error_outline</mat-icon>
<div class="adf-error-text">{{ 'ADF_CLOUD_GROUPS.ERROR.NOT_FOUND' | translate : { groupName : validateGroupsMessage } }}</div>
<div class="adf-error-text">{{ 'ADF_CLOUD_GROUPS.ERROR.NOT_FOUND' | translate }}</div>
</mat-error>
<mat-error *ngIf="searchGroupsControl.hasError('pattern')" [@transitionMessages]="subscriptAnimationState" class="adf-error">
<mat-icon class="adf-error-icon">error_outline</mat-icon>
@@ -84,7 +84,7 @@
<mat-error *ngIf="searchGroupsControl.hasError('searchTypingError') && !this.isFocused"
data-automation-id="invalid-groups-typing-error" [@transitionMessages]="subscriptAnimationState" class="adf-error">
<mat-icon class="adf-error-icon">error_outline</mat-icon>
<div class="adf-error-text">{{ 'ADF_CLOUD_GROUPS.ERROR.NOT_FOUND' | translate : { groupName : searchedValue } }}</div>
<div class="adf-error-text">{{ 'ADF_CLOUD_GROUPS.ERROR.NOT_FOUND' | translate }}</div>
</mat-error>
</div>
</form>

View File

@@ -292,7 +292,7 @@
"SEARCH-GROUP": "Groups",
"MANDATORY": "Mandatory",
"ERROR": {
"NOT_FOUND": "No group found with the name {{groupName}}"
"NOT_FOUND": "Group not found"
}
},
"ADF_CLOUD_USERS": {