mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 16:42:56 +00:00
@@ -268,7 +268,7 @@ export const sampleIndexResponse: SCIndexResponse = {
|
||||
],
|
||||
},
|
||||
backend: {
|
||||
SCVersion: '1.0.0',
|
||||
SCVersion: '2.0.0',
|
||||
externalRequestTimeout: 5000,
|
||||
hiddenTypes: [
|
||||
SCThingType.DateSeries,
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
export const environment = {
|
||||
backend_url: 'http://localhost:3000',
|
||||
backend_version: '1.0.0',
|
||||
backend_url: 'https://mobile.server.uni-frankfurt.de',
|
||||
backend_version: '2.0.0',
|
||||
use_fake_backend: false,
|
||||
production: true,
|
||||
};
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
// `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`.
|
||||
export const environment = {
|
||||
backend_url: 'http://localhost:3000',
|
||||
backend_version: '1.0.0',
|
||||
backend_url: 'https://mobile.server.uni-frankfurt.de',
|
||||
backend_version: '2.0.0',
|
||||
use_fake_backend: false,
|
||||
production: false,
|
||||
};
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
export const environment = {
|
||||
backend_url: 'http://localhost:3000',
|
||||
backend_version: '1.0.0',
|
||||
backend_url: 'https://mobile.server.uni-frankfurt.de',
|
||||
backend_version: '2.0.0',
|
||||
use_fake_backend: true,
|
||||
production: false,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user