| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- // Utilidad para simular requests durante desarrollo
- export const mockRequest = (
- success: Boolean,
- payload: string,
- timeout: number | null
- ): Promise<string> => {
- return new Promise((resolve, reject) => {
- setTimeout(() => {
- if (success) {
- resolve(payload);
- } else {
- reject(payload);
- }
- }, timeout || 1000);
- });
- };
- export const mockPayloads = {
- seasonsSummariesTable: `
- [
- {
- "station": {
- "name": "excepteur",
- "code": "6dd49d1c-68ee-4e68-b993-0ca6489c478c"
- },
- "from": "2016-12-22T02:14:38 +03:00",
- "to": "2015-12-02T10:22:04 +03:00",
- "lt10": 30.48,
- "gt30": 13.65,
- "gt33": 21.98,
- "grados_acumulados": 18.67,
- "amplitud_termica": 19.95,
- "precip_acumulada": 11.53,
- "dias_para_igualar_temporada": -8
- },
- {
- "station": {
- "name": "excepteur",
- "code": "6dd49d1c-68ee-4e68-b993-0ca6489c478c"
- },
- "from": "2014-08-02T04:29:26 +03:00",
- "to": "2014-06-18T08:59:25 +03:00",
- "lt10": 30.8,
- "gt30": 15.51,
- "gt33": 27.18,
- "grados_acumulados": 15.31,
- "amplitud_termica": 13.78,
- "precip_acumulada": 15.58,
- "dias_para_igualar_temporada": -2
- },
- {
- "station": {
- "name": "excepteur",
- "code": "6dd49d1c-68ee-4e68-b993-0ca6489c478c"
- },
- "from": "2017-04-30T08:01:55 +03:00",
- "to": "2021-05-03T05:35:16 +03:00",
- "lt10": 19.58,
- "gt30": 29.96,
- "gt33": 17.12,
- "grados_acumulados": 13.11,
- "amplitud_termica": 31.6,
- "precip_acumulada": 23.31,
- "dias_para_igualar_temporada": -10
- },
- {
- "station": {
- "name": "excepteur",
- "code": "6dd49d1c-68ee-4e68-b993-0ca6489c478c"
- },
- "from": "2016-07-28T06:30:57 +03:00",
- "to": "2015-04-29T02:19:31 +03:00",
- "lt10": 34.5,
- "gt30": 24.31,
- "gt33": 38.21,
- "grados_acumulados": 18.47,
- "amplitud_termica": 10.49,
- "precip_acumulada": 24.36,
- "dias_para_igualar_temporada": 7
- },
- {
- "station": {
- "name": "excepteur",
- "code": "6dd49d1c-68ee-4e68-b993-0ca6489c478c"
- },
- "from": "2019-08-21T08:41:01 +03:00",
- "to": "2014-07-05T03:50:04 +03:00",
- "lt10": 12.94,
- "gt30": 16.74,
- "gt33": 21.02,
- "grados_acumulados": 37.22,
- "amplitud_termica": 31.71,
- "precip_acumulada": 10.77,
- "dias_para_igualar_temporada": -4
- }
- ]
- `,
- general: `
- [
- {
- "station": {
- "name": "consequat",
- "code": "b7d147cb-a5f0-4a55-b6d9-8934b7085f13"
- },
- "from": "2015-02-15T02:03:07 +03:00",
- "to": "2018-05-19T10:42:45 +03:00",
- "lt10": 23.81,
- "gt30": 30.49,
- "gt33": 25.3,
- "grados_acumulados": 20.88,
- "amplitud_termica": 36,
- "precip_acumulada": 21.64
- },
- {
- "station": {
- "name": "dolor",
- "code": "b3414719-92ad-4977-985b-e9e6f5d09312"
- },
- "from": "2014-03-22T06:51:34 +03:00",
- "to": "2018-01-27T07:58:57 +03:00",
- "lt10": 37.58,
- "gt30": 12.2,
- "gt33": 32.12,
- "grados_acumulados": 31.02,
- "amplitud_termica": 39.29,
- "precip_acumulada": 12.01
- },
- {
- "station": {
- "name": "dolore",
- "code": "889d2e8b-45fd-4342-88ae-1de44b58409c"
- },
- "from": "2020-09-27T02:05:22 +03:00",
- "to": "2021-09-16T10:24:50 +03:00",
- "lt10": 32.2,
- "gt30": 30.93,
- "gt33": 32.54,
- "grados_acumulados": 26.78,
- "amplitud_termica": 24.5,
- "precip_acumulada": 21.59
- },
- {
- "station": {
- "name": "eu",
- "code": "62fada45-6f04-40b4-95a1-99959b82145c"
- },
- "from": "2019-02-08T12:46:41 +03:00",
- "to": "2021-06-01T07:29:53 +03:00",
- "lt10": 14.25,
- "gt30": 10.34,
- "gt33": 30.31,
- "grados_acumulados": 29,
- "amplitud_termica": 25.09,
- "precip_acumulada": 33.63
- },
- {
- "station": {
- "name": "officia",
- "code": "6cca9007-ea5b-496b-9e7b-a520416a6564"
- },
- "from": "2018-06-26T08:18:13 +03:00",
- "to": "2020-03-27T09:04:18 +03:00",
- "lt10": 38.79,
- "gt30": 34.99,
- "gt33": 36.03,
- "grados_acumulados": 18.87,
- "amplitud_termica": 26.55,
- "precip_acumulada": 30.38
- }
- ]
- `,
- };
|