mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACS-10035] Ensure ADW handles no PUT for preferences API method in ACS below 25.x v. [PoC] (#4750)
* [ACS-10035]: adds evaluator and helper functions * [ACS-10035]: disables navbar savedSearch for non-supported versions * [ACS-10035]: extends app extension service to allow manual rule evaluation; clean up * [ACS-10035]: introduces pipe as an alternative option for compatibility check * [ACS-10035]: disables save search feature if is not supported * [ACS-10035]: adds test for new method * [ACS-10035]: sonarQube issue * [10035]: adds unit tests for evaluators and helper fns * [ACS-10035]: fixes failed test * [ACS-10035]: fixes naming * [ACS-10035]: fixes race condition issue on direct page refresh * [ACS-10035]: fixes import * [ACS-10035]: sonarQube issues * [ACS-10035]: fixes sonarQube with fake versions * [ACS-10035]: fixes tests * [ACS-10035]: improves pipe logic stream * [ACS-10035]: fixes sonarQube; adjusts tests * [ACS-10035]: adds documentation * [ACS-10035]: exposes isFeatureSupportedInCurrentAcs from aca-content lib * [ACS-10035]: minor fixes * [ACS-10035]: typo fix
This commit is contained in:
@@ -1697,4 +1697,10 @@ describe('AppExtensionService', () => {
|
||||
|
||||
service.bulkActionExecuted();
|
||||
});
|
||||
|
||||
it('should call evaluateRule on isFeatureSupported', () => {
|
||||
const evaluateRuleSpy = spyOn(extensions, 'evaluateRule').and.returnValue(true);
|
||||
service.isFeatureSupported('someFeature');
|
||||
expect(evaluateRuleSpy).toHaveBeenCalledWith('someFeature', service);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -592,4 +592,8 @@ export class AppExtensionService implements RuleContext {
|
||||
bulkActionExecuted(): void {
|
||||
this.bulkActionExecuted$.next();
|
||||
}
|
||||
|
||||
isFeatureSupported(feature: string): boolean {
|
||||
return this.extensions.evaluateRule(feature, this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user