mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 17:42:57 +00:00
@@ -268,7 +268,7 @@ export const sampleIndexResponse: SCIndexResponse = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
backend: {
|
backend: {
|
||||||
SCVersion: '1.0.0',
|
SCVersion: '2.0.0',
|
||||||
externalRequestTimeout: 5000,
|
externalRequestTimeout: 5000,
|
||||||
hiddenTypes: [
|
hiddenTypes: [
|
||||||
SCThingType.DateSeries,
|
SCThingType.DateSeries,
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ describe('ConfigProvider', () => {
|
|||||||
expect(await configProvider.getValue('name')).toEqual(sampleIndexResponse.app.name);
|
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.has.and.returnValue(Promise.resolve(true));
|
||||||
storageProviderSpy.get.and.returnValue(Promise.resolve(sampleIndexResponse));
|
storageProviderSpy.get.and.returnValue(Promise.resolve(sampleIndexResponse));
|
||||||
spyOn(configProvider.client, 'handshake').and.throwError('');
|
spyOn(configProvider.client, 'handshake').and.throwError('');
|
||||||
@@ -122,7 +122,7 @@ describe('ConfigProvider', () => {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
error = 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 () => {
|
it('should throw error on saved app configuration not available', async () => {
|
||||||
@@ -230,7 +230,7 @@ const sampleIndexResponse: SCIndexResponse = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
backend: {
|
backend: {
|
||||||
SCVersion: '1.0.0',
|
SCVersion: '2.0.0',
|
||||||
externalRequestTimeout: 5000,
|
externalRequestTimeout: 5000,
|
||||||
hiddenTypes: [
|
hiddenTypes: [
|
||||||
SCThingType.DateSeries,
|
SCThingType.DateSeries,
|
||||||
|
|||||||
@@ -38,11 +38,9 @@ export class DataProvider {
|
|||||||
*/
|
*/
|
||||||
private _storagePrefix = 'stapps.data';
|
private _storagePrefix = 'stapps.data';
|
||||||
/**
|
/**
|
||||||
* TODO
|
* Version of the app (used for the header in communication with the backend)
|
||||||
*
|
|
||||||
* @TODO: get backendUrl and appVersion and storagePrefix from config (module)
|
|
||||||
*/
|
*/
|
||||||
appVersion = '1.0.6';
|
appVersion = environment.backend_version;
|
||||||
/**
|
/**
|
||||||
* TODO
|
* TODO
|
||||||
*/
|
*/
|
||||||
@@ -58,7 +56,7 @@ export class DataProvider {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO
|
* TODO
|
||||||
*
|
*
|
||||||
* @param stAppsWebHttpClient TODO
|
* @param stAppsWebHttpClient TODO
|
||||||
* @param storageProvider TODO
|
* @param storageProvider TODO
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
export const environment = {
|
export const environment = {
|
||||||
backend_url: 'http://localhost:3000',
|
backend_url: 'https://mobile.server.uni-frankfurt.de',
|
||||||
backend_version: '1.0.0',
|
backend_version: '2.0.0',
|
||||||
use_fake_backend: false,
|
use_fake_backend: false,
|
||||||
production: true,
|
production: true,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
|
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
|
||||||
// The list of which env maps to which file can be found in `.angular-cli.json`.
|
// The list of which env maps to which file can be found in `.angular-cli.json`.
|
||||||
export const environment = {
|
export const environment = {
|
||||||
backend_url: 'http://localhost:3000',
|
backend_url: 'https://mobile.server.uni-frankfurt.de',
|
||||||
backend_version: '1.0.0',
|
backend_version: '2.0.0',
|
||||||
use_fake_backend: false,
|
use_fake_backend: false,
|
||||||
production: false,
|
production: false,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
export const environment = {
|
export const environment = {
|
||||||
backend_url: 'http://localhost:3000',
|
backend_url: 'https://mobile.server.uni-frankfurt.de',
|
||||||
backend_version: '1.0.0',
|
backend_version: '2.0.0',
|
||||||
use_fake_backend: true,
|
use_fake_backend: true,
|
||||||
production: false,
|
production: false,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user