code cleanup (#3210)

* code cleanup

* rollback changes

* remove dead code

* remove debug app config

* cleanup unused locales

* no-unused-vars rule

* test fixes and cleanup

* remove unnecessary translate modules
This commit is contained in:
Denys Vuika
2023-05-22 08:23:35 +01:00
committed by GitHub
parent 19e31adbb9
commit fd495f6e95
87 changed files with 197 additions and 841 deletions

View File

@@ -33,8 +33,6 @@ import { of } from 'rxjs';
describe('ActionsService', () => {
let actionsService: ActionsService;
let apiCallSpy;
const params = [{}, {}, {}, {}, {}, ['application/json'], ['application/json']];
beforeEach(() => {
TestBed.configureTestingModule({
@@ -67,10 +65,11 @@ describe('ActionsService', () => {
});
it('loadParameterConstraints should send GET request and return formatted observable', async () => {
const params = [{}, {}, {}, {}, {}, ['application/json'], ['application/json']];
const constraintName = dummyConstraints[0].name;
const formattedConstraints = dummyConstraints[0].constraints;
apiCallSpy = spyOn<any>(actionsService, 'publicApiCall')
const apiCallSpy = spyOn<any>(actionsService, 'publicApiCall')
.withArgs(`/action-parameter-constraints/${constraintName}`, 'GET', params)
.and.returnValue(of(rawConstraints));
@@ -81,7 +80,7 @@ describe('ActionsService', () => {
});
it('loadActionParameterConstraints should load the data into the observable', async () => {
spyOn<any>(actionsService, 'getParameterConstraints').and.returnValue(of(dummyConstraints[0].constraints));
spyOn(actionsService, 'getParameterConstraints').and.returnValue(of(dummyConstraints[0].constraints));
const constraintsPromise = actionsService.parameterConstraints$.pipe(take(2)).toPromise();

View File

@@ -48,7 +48,7 @@ describe('FolderRulesService', () => {
const nodeId = owningFolderIdMock;
const ruleSetId = 'rule-set-id';
const mockedRule = ruleMock('rule-mock');
const { id, ...mockedRuleWithoutId } = mockedRule;
const { ...mockedRuleWithoutId } = mockedRule;
const mockedRuleEntry = { entry: mockedRule };
const ruleId = mockedRule.id;
const mockedRuleSettingsEntry = { entry: ruleSettingsMock };