mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52:55 +00:00
@@ -81,7 +81,7 @@ describe('ConfigProvider', () => {
|
||||
expect(await configProvider.getValue('name')).toEqual(sampleIndexResponse.app.name);
|
||||
});
|
||||
|
||||
it('should init from storage with remote fails', async () => {
|
||||
it('should init from storage when remote fails', async () => {
|
||||
storageProviderSpy.has.and.returnValue(Promise.resolve(true));
|
||||
storageProviderSpy.get.and.returnValue(Promise.resolve(sampleIndexResponse));
|
||||
spyOn(configProvider.client, 'handshake').and.throwError('');
|
||||
@@ -122,7 +122,7 @@ describe('ConfigProvider', () => {
|
||||
} catch (err) {
|
||||
error = err;
|
||||
}
|
||||
expect(error).toEqual(new WrongConfigVersionInStorage('1.0.0', '0.1.0'));
|
||||
expect(error).toEqual(new WrongConfigVersionInStorage('2.0.0', '0.1.0'));
|
||||
});
|
||||
|
||||
it('should throw error on saved app configuration not available', async () => {
|
||||
@@ -230,7 +230,7 @@ const sampleIndexResponse: SCIndexResponse = {
|
||||
],
|
||||
},
|
||||
backend: {
|
||||
SCVersion: '1.0.0',
|
||||
SCVersion: '2.0.0',
|
||||
externalRequestTimeout: 5000,
|
||||
hiddenTypes: [
|
||||
SCThingType.DateSeries,
|
||||
|
||||
@@ -38,11 +38,9 @@ export class DataProvider {
|
||||
*/
|
||||
private _storagePrefix = 'stapps.data';
|
||||
/**
|
||||
* TODO
|
||||
*
|
||||
* @TODO: get backendUrl and appVersion and storagePrefix from config (module)
|
||||
* Version of the app (used for the header in communication with the backend)
|
||||
*/
|
||||
appVersion = '1.0.6';
|
||||
appVersion = environment.backend_version;
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@@ -58,7 +56,7 @@ export class DataProvider {
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*
|
||||
*
|
||||
* @param stAppsWebHttpClient TODO
|
||||
* @param storageProvider TODO
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user