feat: dashboard ui tests

This commit is contained in:
Thea Schöbl
2022-09-27 22:13:54 +00:00
committed by Rainer Killinger
parent eb108c7414
commit 9f8ab5c7a1
17 changed files with 1629 additions and 477 deletions

View File

@@ -20,7 +20,7 @@
}
],
"origin": {
"indexed": "2022-06-03T10:10:13.841Z",
"indexed": "2059-06-03T10:10:13.841Z",
"name": "Goethe-Uni QIS / LSF",
"type": "remote"
},
@@ -48,12 +48,12 @@
"type": "academic event",
"academicTerms": [
{
"acronym": "WiSe 2021/22",
"acronym": "WiSe 2058/59",
"alternateNames": [
"Winter 2021/22"
"Winter 2058/59"
],
"endDate": "2022-03-31T21:59:59.999Z",
"eventsEndDate": "2022-02-18T22:59:59.999Z",
"endDate": "2059-03-31T21:59:59.999Z",
"eventsEndDate": "2059-02-18T22:59:59.999Z",
"eventsStartDate": "2021-10-17T22:00:00.000Z",
"name": "Wintersemester 2021/22",
"startDate": "2021-09-30T22:00:00.000Z",
@@ -106,7 +106,7 @@
}
],
"origin": {
"indexed": "2022-06-03T10:08:49.850Z",
"indexed": "2059-06-03T10:08:49.850Z",
"name": "Goethe-Uni QIS / LSF",
"type": "remote"
},
@@ -135,15 +135,15 @@
"type": "academic event",
"academicTerms": [
{
"acronym": "SoSe 2022",
"acronym": "SoSe 2059",
"alternateNames": [
"Sommer 2022"
"Sommer 2059"
],
"endDate": "2022-09-30T21:59:59.999Z",
"eventsEndDate": "2022-07-15T21:59:59.999Z",
"eventsStartDate": "2022-04-10T22:00:00.000Z",
"name": "Sommersemester 2022",
"startDate": "2022-03-31T22:00:00.000Z",
"endDate": "2059-09-30T21:59:59.999Z",
"eventsEndDate": "2059-07-15T21:59:59.999Z",
"eventsStartDate": "2059-04-10T22:00:00.000Z",
"name": "Sommersemester 2059",
"startDate": "2059-03-31T22:00:00.000Z",
"type": "semester",
"uid": "4b2766cb-e16d-5698-b5b3-e650613d497a"
}
@@ -164,11 +164,11 @@
"buckets": [
{
"count": 1,
"key": "WiSe 2021/22"
"key": "WiSe 2058/59"
},
{
"count": 1,
"key": "SoSe 2022"
"key": "SoSe 2059"
}
],
"field": "academicTerms.acronym",

View File

@@ -0,0 +1,400 @@
{
"data": [
{
"geo": {
"point": {
"coordinates": [
8.666987121105194,
50.12725203226799
],
"type": "Point"
}
},
"uid": "86464b64-da1e-5578-a5c4-eec23457f596",
"alternateNames": [
"Alfredo Anbau Casino"
],
"address": {
"addressCountry": "Deutschland",
"addressLocality": "Frankfurt am Main",
"addressRegion": "Hessen",
"postalCode": "60323",
"streetAddress": "Kaffeebar Alfredo/Cocktailbar Theodor-W.-Adorno-Platz 2"
},
"origin": {
"indexed": "2022-07-07T08:15:04.173Z",
"name": "Studentenwerk Frankfurt am Main",
"type": "remote"
},
"name": "Alfredo Anbau Casino",
"openingHours": "Mo-Fr 08:30-22:00; Sa-Su off; 2022 Feb 21 - 2022 Apr 08 Mo-Fr 10:00-21:00; 2022 Feb 21 - 2022 Apr 08 Sa-Su off",
"categories": [
"cafe"
],
"type": "room"
},
{
"geo": {
"point": {
"coordinates": [
8.6441518,
50.131335
],
"type": "Point"
}
},
"uid": "c77576af-1633-5465-ba12-6089d1d8919d",
"alternateNames": [
"Cafe Hochform"
],
"address": {
"addressCountry": "Deutschland",
"addressLocality": "Frankfurt am Main",
"addressRegion": "Hessen",
"postalCode": "60487",
"streetAddress": "Institut für Sportwissenschaften Ginnheimer Landstrasse 39"
},
"origin": {
"indexed": "2022-07-07T08:15:04.173Z",
"name": "Studentenwerk Frankfurt am Main",
"type": "remote"
},
"name": "Cafe Hochform",
"openingHours": "Mo-Fr 09:00-16:00; Sa-Su off; 2022 Feb 21 - 2022 Apr 08 Mo-Fr 09:00-15:30; 2022 Feb 21 - 2022 Apr 08 Sa-Su off",
"categories": [
"restaurant"
],
"type": "room"
},
{
"geo": {
"point": {
"coordinates": [
8.651551008224486,
50.11935877057829
],
"type": "Point"
}
},
"uid": "7a3270e5-6af1-58cd-b2d9-6bce2bf8fffb",
"alternateNames": [
"Cafeteria Bockenheim"
],
"address": {
"addressCountry": "Deutschland",
"addressLocality": "Frankfurt am Main",
"addressRegion": "Hessen",
"postalCode": "60325",
"streetAddress": "Sozialzentrum Bockenheimer Landstrasse 133"
},
"origin": {
"indexed": "2022-07-07T08:15:04.168Z",
"name": "Studentenwerk Frankfurt am Main",
"type": "remote"
},
"name": "Cafeteria Bockenheim",
"openingHours": "Mo-Fr 08:00-16:00; Sa-Su off",
"categories": [
"restaurant"
],
"type": "room"
},
{
"geo": {
"point": {
"coordinates": [
8.6266007,
50.172658
],
"type": "Point"
}
},
"uid": "9d7596b1-102b-5003-91d8-aa0b411cc0e8",
"alternateNames": [
"Cafeteria Darwins"
],
"address": {
"addressCountry": "Deutschland",
"addressLocality": "Frankfurt am Main",
"addressRegion": "Hessen",
"postalCode": "60438",
"streetAddress": "Biologicum Max-von-Laue-Str. 13"
},
"origin": {
"indexed": "2022-07-07T08:15:04.174Z",
"name": "Studentenwerk Frankfurt am Main",
"type": "remote"
},
"name": "Cafeteria Darwins",
"openingHours": "Mo-Fr 08:30-17:00; Sa-Su off; 2021 Oct 15 - 2022 Apr 08 Mo-Su off",
"categories": [
"restaurant"
],
"type": "room"
},
{
"geo": {
"point": {
"coordinates": [
8.6285375,
50.1743717
],
"type": "Point"
}
},
"uid": "2da7eb88-768f-5881-9e84-8dc0d767c8b7",
"alternateNames": [
"Cafeteria LEVEL"
],
"address": {
"addressCountry": "Deutschland",
"addressLocality": "Frankfurt am Main",
"addressRegion": "Hessen",
"postalCode": "60438",
"streetAddress": "Otto-Stern-Zentrum Ruth-Moufang-Straße 2"
},
"origin": {
"indexed": "2022-07-07T08:15:04.174Z",
"name": "Studentenwerk Frankfurt am Main",
"type": "remote"
},
"name": "Cafeteria LEVEL",
"openingHours": "Mo-Fr 09:00-16:00; Sa-Su off; 2021 Dec 20 - 2022 Jan 07 Mo-Su off",
"categories": [
"restaurant"
],
"type": "room"
},
{
"geo": {
"point": {
"coordinates": [
8.666908666491508,
50.12685997940193
],
"type": "Point"
}
},
"uid": "01d3e4fb-779a-5ee5-8067-d77a44a33e1a",
"alternateNames": [
"Casino Cafeteria"
],
"address": {
"addressCountry": "Deutschland",
"addressLocality": "Frankfurt am Main",
"addressRegion": "Hessen",
"postalCode": "60323",
"streetAddress": "Cafeteria Casino Theodor-W.-Adorno-Platz 2"
},
"origin": {
"indexed": "2022-07-07T08:15:04.174Z",
"name": "Studentenwerk Frankfurt am Main",
"type": "remote"
},
"name": "Casino Cafeteria",
"openingHours": "Mo-Th 11:00-17:00; Fr 11:00-14:30; Sa-Su off; 2020 May 18 - 2022 Oct 14 Mo-Su off",
"categories": [
"restaurant"
],
"type": "room"
},
{
"geo": {
"point": {
"coordinates": [
8.668776154518127,
50.12844708588227
],
"type": "Point"
}
},
"uid": "74e6a230-56fe-5c0e-b529-1c126df98595",
"alternateNames": [
"DASEIN"
],
"address": {
"addressCountry": "Deutschland",
"addressLocality": "Frankfurt am Main",
"addressRegion": "Hessen",
"postalCode": "60323",
"streetAddress": "PEG Theodor-W.-Adorno-Platz 6"
},
"origin": {
"indexed": "2022-07-07T08:15:04.174Z",
"name": "Studentenwerk Frankfurt am Main",
"type": "remote"
},
"name": "DASEIN",
"openingHours": "Mo-Fr 07:30-17:00; Sa-Su off; 2022 Feb 21 - 2022 Apr 08 Mo-Fr 08:00-16:00; 2022 Feb 21 - 2022 Apr 08 Sa-Su off",
"categories": [
"restaurant"
],
"type": "room"
},
{
"geo": {
"point": {
"coordinates": [
8.666871786117554,
50.127181531770134
],
"type": "Point"
}
},
"uid": "41f2bac9-ea46-5643-a354-49b1d5539a09",
"alternateNames": [
"Mensa Anbau Casino"
],
"address": {
"addressCountry": "Deutschland",
"addressLocality": "Frankfurt am Main",
"addressRegion": "Hessen",
"postalCode": "60323",
"streetAddress": "Anbau Casino Theodor-W.-Adorno-Platz 2"
},
"origin": {
"indexed": "2022-07-07T08:15:04.173Z",
"name": "Studentenwerk Frankfurt am Main",
"type": "remote"
},
"name": "Mensa Anbau Casino",
"openingHours": "Mo-Fr 11:00-15:30; Sa-Su off",
"categories": [
"restaurant"
],
"type": "room"
},
{
"geo": {
"point": {
"coordinates": [
8.667021989822388,
50.12683762541366
],
"type": "Point"
}
},
"uid": "254b10c1-8a79-53ad-98dc-3e0e30d92a88",
"alternateNames": [
"Mensa Casino"
],
"address": {
"addressCountry": "Deutschland",
"addressLocality": "Frankfurt am Main",
"addressRegion": "Hessen",
"postalCode": "60323",
"streetAddress": "Casinogebäude Theodor-W.-Adorno-Platz 2a"
},
"origin": {
"indexed": "2022-07-07T08:15:04.173Z",
"name": "Studentenwerk Frankfurt am Main",
"type": "remote"
},
"name": "Mensa Casino",
"openingHours": "Mo-Fr 12:00-15:00; Sa-Su off; 2022 Mar 24 - 2022 Apr 14 Mo-Su off",
"categories": [
"restaurant"
],
"type": "room"
},
{
"geo": {
"point": {
"coordinates": [
8.6300707,
50.17189
],
"type": "Point"
}
},
"uid": "a307c74a-40c1-57bb-a065-15bb9c505b9d",
"alternateNames": [
"Mensa Pi x Gaumen"
],
"address": {
"addressCountry": "Deutschland",
"addressLocality": "Frankfurt am Main",
"addressRegion": "Hessen",
"postalCode": "60438",
"streetAddress": "Max-von-Laue-Str. 9"
},
"origin": {
"indexed": "2022-07-07T08:15:04.174Z",
"name": "Studentenwerk Frankfurt am Main",
"type": "remote"
},
"name": "Mensa Pi x Gaumen",
"openingHours": "Mo-Fr 11:00-15:00; Sa-Su off",
"categories": [
"restaurant"
],
"type": "room"
},
{
"geo": {
"point": {
"coordinates": [
8.666126132011412,
50.1266751288006
],
"type": "Point"
}
},
"uid": "be3f4727-5ed2-5470-aa45-6bf7eb7e30d4",
"alternateNames": [
"Sommergarten Westend"
],
"address": {
"addressCountry": "Deutschland",
"addressLocality": "Frankfurt am Main",
"addressRegion": "Hessen",
"postalCode": "60323",
"streetAddress": "Sommergarten Theodor-W.-Adorno-Platz 2a"
},
"origin": {
"indexed": "2022-07-07T08:15:04.173Z",
"name": "Studentenwerk Frankfurt am Main",
"type": "remote"
},
"name": "Sommergarten Westend",
"openingHours": "Mo-Fr 15:30-22:00; Sa-Su off; 2021 Sep 27 - 2022 Apr 14 Mo-Su off",
"categories": [
"restaurant"
],
"type": "room"
}
],
"facets": [
{
"buckets": [
{
"count": 11,
"key": "room"
}
],
"field": "type"
},
{
"buckets": [
{
"count": 10,
"key": "restaurant"
},
{
"count": 1,
"key": "cafe"
}
],
"field": "categories",
"onlyOnType": "room"
}
],
"pagination": {
"count": 11,
"offset": 0,
"total": 11
},
"stats": {
"time": 4
}
}

View File

@@ -7,13 +7,13 @@
"LSF": "779352"
},
"origin": {
"indexed": "2022-06-03T10:10:13.842Z",
"indexed": "2059-06-03T10:10:13.842Z",
"name": "Goethe-Uni QIS / LSF",
"type": "remote"
},
"name": "Übung",
"dates": [
"2022-01-19T14:00:00+01:00"
"2059-01-19T14:00:00+01:00"
],
"event": {
"categories": [

View File

@@ -9,24 +9,24 @@
"LSF": "797371"
},
"origin": {
"indexed": "2022-06-03T10:08:50.850Z",
"indexed": "2059-06-03T10:08:50.850Z",
"name": "Goethe-Uni QIS / LSF",
"type": "remote"
},
"name": "Seminar",
"dates": [
"2022-04-14T12:00:00+02:00",
"2022-04-21T12:00:00+02:00",
"2022-04-28T12:00:00+02:00",
"2022-05-05T12:00:00+02:00",
"2022-05-12T12:00:00+02:00",
"2022-05-19T12:00:00+02:00",
"2022-06-02T12:00:00+02:00",
"2022-06-09T12:00:00+02:00",
"2022-06-23T12:00:00+02:00",
"2022-06-30T12:00:00+02:00",
"2022-07-07T12:00:00+02:00",
"2022-07-14T12:00:00+02:00"
"2059-04-14T12:00:00+02:00",
"2059-04-21T12:00:00+02:00",
"2059-04-28T12:00:00+02:00",
"2059-05-05T12:00:00+02:00",
"2059-05-12T12:00:00+02:00",
"2059-05-19T12:00:00+02:00",
"2059-06-02T12:00:00+02:00",
"2059-06-09T12:00:00+02:00",
"2059-06-23T12:00:00+02:00",
"2059-06-30T12:00:00+02:00",
"2059-07-07T12:00:00+02:00",
"2059-07-14T12:00:00+02:00"
],
"event": {
"categories": [
@@ -101,24 +101,24 @@
"LSF": "770743"
},
"origin": {
"indexed": "2022-06-03T10:08:50.848Z",
"indexed": "2059-06-03T10:08:50.848Z",
"name": "Goethe-Uni QIS / LSF",
"type": "remote"
},
"name": "Seminar",
"dates": [
"2022-04-14T12:00:00+02:00",
"2022-04-21T12:00:00+02:00",
"2022-04-28T12:00:00+02:00",
"2022-05-05T12:00:00+02:00",
"2022-05-12T12:00:00+02:00",
"2022-05-19T12:00:00+02:00",
"2022-06-02T12:00:00+02:00",
"2022-06-09T12:00:00+02:00",
"2022-06-23T12:00:00+02:00",
"2022-06-30T12:00:00+02:00",
"2022-07-07T12:00:00+02:00",
"2022-07-14T12:00:00+02:00"
"2059-04-14T12:00:00+02:00",
"2059-04-21T12:00:00+02:00",
"2059-04-28T12:00:00+02:00",
"2059-05-05T12:00:00+02:00",
"2059-05-12T12:00:00+02:00",
"2059-05-19T12:00:00+02:00",
"2059-06-02T12:00:00+02:00",
"2059-06-09T12:00:00+02:00",
"2059-06-23T12:00:00+02:00",
"2059-06-30T12:00:00+02:00",
"2059-07-07T12:00:00+02:00",
"2059-07-14T12:00:00+02:00"
],
"event": {
"categories": [
@@ -251,13 +251,13 @@
"LSF": "779352"
},
"origin": {
"indexed": "2022-06-03T10:10:13.842Z",
"indexed": "2059-06-03T10:10:13.842Z",
"name": "Goethe-Uni QIS / LSF",
"type": "remote"
},
"name": "Übung",
"dates": [
"2022-01-19T14:00:00+01:00"
"2059-01-19T14:00:00+01:00"
],
"event": {
"categories": [

View File

@@ -0,0 +1,418 @@
{
"2022-06-08T18:56:17.052Z": {
"data": [
{
"offers": [
{
"availability": "in stock",
"availabilityRange": {
"gte": "2022-06-08T06:30:00.000Z",
"lte": "2022-06-08T20:00:00.000Z"
},
"inPlace": {
"address": {
"addressCountry": "Deutschland",
"addressLocality": "Frankfurt am Main",
"addressRegion": "Hessen",
"postalCode": "60323",
"streetAddress": "Kaffeebar Alfredo/Cocktailbar Theodor-W.-Adorno-Platz 2"
},
"alternateNames": [
"Alfredo Anbau Casino"
],
"categories": [
"cafe"
],
"geo": {
"point": {
"coordinates": [
8.666987121105194,
50.12725203226799
],
"type": "Point"
}
},
"name": "Alfredo Anbau Casino",
"openingHours": "Mo-Fr 08:30-22:00; Sa-Su off; 2022 Feb 21 - 2022 Apr 08 Mo-Fr 10:00-21:00; 2022 Feb 21 - 2022 Apr 08 Sa-Su off",
"type": "room",
"uid": "86464b64-da1e-5578-a5c4-eec23457f596"
},
"prices": {
"default": 4.4,
"employee": 1.1,
"guest": 2.2,
"student": 3.3
},
"provider": {
"name": "Studentenwerk Frankfurt am Main",
"type": "organization",
"uid": "b7b50ecd-2c33-5a62-adb0-2a7c6c0ab04c"
}
}
],
"uid": "d8a0b68b-4bfc-5780-9d33-a29b2ac0fae2",
"nutrition": {
"calories": 863,
"carbohydrateContent": 103.5,
"fatContent": 39,
"proteinContent": 33.1,
"saltContent": 4.1,
"saturatedFatContent": 3.1,
"sugarContent": 11.8
},
"additives": [
"preserved (2)",
"with antioxidants (3)",
"gluten (A)",
"milk (G)",
"celery (I)",
"sulphur dioxide / sulphite (L)"
],
"translations": {
"de": {
"additives": [
"konserviert (2)",
"mit Antioxidationsmittel (3)",
"Glutenhaltige Getreide (A)",
"Milch u. Milcherzeugnisse (G)",
"Sellerie u. Sellerieerzeugnisse (I)",
"Schwefeldioxid / Sulfit (L)"
],
"description": "Pizza Antipasti (2,3,A,G,I,L,A1)",
"name": "Pizza Antipasti"
}
},
"origin": {
"indexed": "2022-06-08T18:45:04.736Z",
"name": "Studentenwerk Frankfurt am Main",
"type": "remote"
},
"name": "Antipasti pizza",
"description": "Antipasti pizza (2,3,A,G,I,L,A1)",
"categories": [
"main dish"
],
"type": "dish"
},
{
"type": "dish",
"name": "Pizza mit Geflügelsalami und Champignons",
"categories": [
"main dish"
],
"characteristics": [],
"additives": [
"konserviert",
"Antioxidationsmittel",
"Farbstoff",
"Weizen",
"Milch(Laktose; Milcheiweiß)",
"Nitritpökelsalz",
"Hefe"
],
"offers": [
{
"availability": "in stock",
"availabilityRange": {
"gte": "2017-01-30T00:00:00.000Z",
"lte": "2017-01-30T23:59:59.999Z"
},
"prices": {
"default": 4.85,
"student": 2.85,
"employee": 3.85,
"guest": 4.85
},
"provider": {
"name": "Studentenwerk",
"type": "organization",
"uid": "3b9b3df6-3a7a-58cc-922f-c7335c002634"
},
"inPlace": {
"geo": {
"point": {
"type": "Point",
"coordinates": [
13.32612,
52.50978
]
}
},
"type": "building",
"categories": [
"restaurant"
],
"openingHours": "Mo-Fr 11:00-14:30",
"name": "TU-Mensa",
"alternateNames": [
"MensaHardenberg"
],
"uid": "72fbc8a3-ebd1-58f9-9526-ad65cba2e402",
"address": {
"addressCountry": "Germany",
"addressLocality": "Berlin",
"addressRegion": "Berlin",
"postalCode": "10623",
"streetAddress": "Hardenbergstraße 34"
}
}
}
],
"uid": "c9f32915-8ed5-5960-b850-3f7375a89922",
"origin": {
"indexed": "2018-09-11T12:30:00Z",
"name": "Dummy",
"type": "remote"
}
},
{
"type": "dish",
"name": "Sahne-Bärlauchsauce",
"description": "Nudelauswahl",
"categories": [
"main dish"
],
"offers": [
{
"prices": {
"default": 3.45,
"student": 2.45,
"employee": 3.45
},
"provider": {
"name": "Studentenwerk",
"type": "organization",
"uid": "3b9b3df6-3a7a-58cc-922f-c7335c002634"
},
"availability": "in stock",
"availabilityRange": {
"gte": "2017-01-30T00:00:00.000Z",
"lte": "2017-01-30T23:59:59.999Z"
},
"inPlace": {
"geo": {
"point": {
"type": "Point",
"coordinates": [
13.32612,
52.50978
]
}
},
"type": "building",
"categories": [
"restaurant"
],
"openingHours": "Mo-Fr 11:00-14:30",
"name": "TU-Mensa",
"alternateNames": [
"MensaHardenberg"
],
"uid": "072db1e5-e479-5040-88e0-4a98d731e443",
"address": {
"addressCountry": "Germany",
"addressLocality": "Berlin",
"addressRegion": "Berlin",
"postalCode": "10623",
"streetAddress": "Hardenbergstraße 34"
}
}
}
],
"characteristics": [
{
"name": "bad"
},
{
"name": "vegetarian",
"image": "https://backend/res/img/characteristic_small_vegetarian.png"
}
],
"additives": [
"Weizen",
"Milch(Laktose; Milcheiweiß)"
],
"uid": "3222631f-82b3-5faf-a8e8-9c10719cc95b",
"origin": {
"indexed": "2018-09-11T12:30:00Z",
"name": "Dummy",
"type": "remote"
}
},
{
"additives": [
"1 = mit Farbstoff",
"2 = konserviert",
"3 = mit Antioxidationsmittel",
"9 = mit Süßungsmittel",
"A = Glutenhaltige Getreide",
"G = Milch u. Milcherzeugnisse"
],
"offers": [
{
"availability": "in stock",
"availabilityRange": {
"gte": "2017-03-27T00:00:00.000Z",
"lte": "2017-03-27T23:59:59.000Z"
},
"inPlace": {
"type": "room",
"name": "Cafeteria LEVEL",
"categories": [
"cafe"
],
"uid": "e5492c9c-064e-547c-8633-c8fc8955cfcf",
"alternateNames": [
"Cafeteria LEVEL"
],
"openingHours": "Mo-Fr 08:30-17:00",
"geo": {
"point": {
"type": "Point",
"coordinates": [
8.6285375,
50.1743717
]
}
}
},
"prices": {
"default": 6.5,
"student": 4.9,
"employee": 6.5
},
"provider": {
"name": "Studentenwerk",
"type": "organization",
"uid": "3b9b3df6-3a7a-58cc-922f-c7335c002634"
}
}
],
"categories": [
"main dish"
],
"characteristics": [
{
"name": "Rind",
"image": "https://backend/res/img/characteristic_small_rind.png"
}
],
"description": "Salsa Burger (1,2,3,9,A,G)",
"name": "Salsa Burger",
"dishAddOns": [
{
"characteristics": [
{
"name": "Vegan",
"image": "https://backend/res/img/characteristic_small_vegan.png"
}
],
"description": "Pommes frites",
"type": "dish",
"uid": "db0caac1-062c-5333-9fcb-cfaf0ff7d799",
"nutrition": {
"calories": 106,
"fatContent": 5.4,
"saturatedFatContent": 1.8,
"carbohydrateContent": 6.8,
"sugarContent": 6.1,
"proteinContent": 6.9,
"saltContent": 3.7
},
"additives": [
"3 = mit Antioxidationsmittel",
"5 = geschwefelt"
],
"name": "Pommes frites",
"categories": [
"side dish"
]
},
{
"characteristics": [
{
"name": "Vegan",
"image": "https://backend/res/img/characteristic_small_vegan.png"
}
],
"description": "Glasierte Karotten",
"type": "dish",
"uid": "f702fd43-1551-53b2-b35a-b5916e1cf9a1",
"nutrition": {
"calories": 106,
"fatContent": 5.4,
"saturatedFatContent": 1.8,
"carbohydrateContent": 6.8,
"sugarContent": 6.1,
"proteinContent": 6.9,
"saltContent": 3.7
},
"additives": [
"F = Soja u. Sojaerzeugnisse"
],
"name": "Glasierte Karotten",
"categories": [
"side dish",
"salad"
]
}
],
"type": "dish",
"uid": "1c99689c-c6ec-551f-8ad8-f13c5fa812c2",
"nutrition": {
"calories": 600,
"fatContent": 30.5,
"saturatedFatContent": 9.9,
"carbohydrateContent": 42.2,
"sugarContent": 5.7,
"proteinContent": 38.6,
"saltContent": 3.5
},
"origin": {
"indexed": "2018-09-11T12:30:00Z",
"name": "Dummy",
"type": "remote"
}
}
],
"facets": [
{
"buckets": [
{
"count": 10,
"key": "dish"
}
],
"field": "type"
},
{
"buckets": [
{
"count": 10,
"key": "main dish"
}
],
"field": "categories",
"onlyOnType": "dish"
},
{
"buckets": [
{
"count": 10,
"key": "cafe"
}
],
"field": "offers.inPlace.categories",
"onlyOnType": "dish"
}
],
"pagination": {
"count": 1,
"offset": 0,
"total": 1
},
"stats": {
"time": 8
}
}
}

View File

@@ -11,6 +11,7 @@
"url": "https://aktuelles.uni-frankfurt.de/feed"
},
"name": "DE for Students and Employees",
"image": "https://robohash.org/de_for_students_and_employees?size=264x183&set=set4&bgset=bg1",
"audiences": [
"students",
"employees"
@@ -33,6 +34,7 @@
"url": "https://aktuelles.uni-frankfurt.de/feed"
},
"name": "DE for Students",
"image": "https://robohash.org/de_for_students?size=264x183&set=set4&bgset=bg1",
"audiences": [
"students"
],
@@ -54,6 +56,7 @@
"url": "https://aktuelles.uni-frankfurt.de/feed"
},
"name": "DE for Employees",
"image": "https://robohash.org/de_for_employees?size=264x183&set=set4&bgset=bg1",
"audiences": [
"employees"
],
@@ -75,6 +78,7 @@
"url": "https://aktuelles.uni-frankfurt.de/feed"
},
"name": "EN for Students and Employees",
"image": "https://robohash.org/en_for_students_and_employees?size=264x183&set=set4&bgset=bg1",
"audiences": [
"students",
"employees"
@@ -97,6 +101,7 @@
"url": "https://aktuelles.uni-frankfurt.de/feed"
},
"name": "EN for Students",
"image": "https://robohash.org/en_for_students?size=264x183&set=set4&bgset=bg1",
"audiences": [
"students"
],
@@ -118,6 +123,7 @@
"url": "https://aktuelles.uni-frankfurt.de/feed"
},
"name": "EN for Employees",
"image": "https://robohash.org/en_for_employees?size=264x183&set=set4&bgset=bg1",
"audiences": [
"employees"
],

View File

@@ -11,6 +11,7 @@
"url": "https://aktuelles.uni-frankfurt.de/feed"
},
"name": "DE for Students and Employees",
"image": "https://robohash.org/de_for_students_and_employees?size=264x183&set=set4&bgset=bg1",
"audiences": [
"students",
"employees"

View File

@@ -0,0 +1,191 @@
/*
* Copyright (C) 2022 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
import {ScheduleProvider} from '../../src/app/modules/calendar/schedule.provider';
describe('dashboard', async function () {
describe('schedule section', function () {
it('should lead to the schedule', function () {
cy.visit('/dashboard');
cy.get('.schedule').contains('a', 'Stundenplan').click();
cy.url().should('include', '/schedule/recurring');
cy.visit('/dashboard');
cy.get('.schedule').contains('a', 'Kein Eintrag gefunden').click();
cy.url().should('include', '/schedule/recurring');
});
it('should display the next unit', function () {
let angular: any;
cy.intercept('POST', 'https://mobile.server.uni-frankfurt.de/search', {
fixture: 'search/types/date-series/date-series-1.json',
}).as('search');
cy.visit('/dashboard');
cy.get('.schedule-item-button').should('exist');
cy.window()
.then(win => (angular = (win as any).ng))
.then(() =>
cy.get('app-dashboard').then($dashboard => {
const appComponent = angular.getComponent($dashboard[0]);
const scheduleProvider =
appComponent.scheduleProvider as ScheduleProvider;
scheduleProvider.restore(['abc']);
}),
);
cy.wait('@search');
cy.get('.schedule-item-button').should('contain', 'UNIcert (Test)');
});
});
describe('mensa section', function () {
it('should have info when nothing is added', function () {
cy.visit('/dashboard');
cy.get('stapps-mensa-section').within(() => {
cy.get('.card').should('have.length', 1);
cy.get('.card > ion-label > a').should(
'have.text',
'Übersicht der Mensen',
);
});
});
it('should add a mensa', function () {
cy.visit('/dashboard');
cy.get('stapps-mensa-section').find('.card > ion-label > a').click();
cy.intercept('POST', 'https://mobile.server.uni-frankfurt.de/search', {
fixture: 'search/types/canteen/canteen-search-result.json',
});
cy.get('stapps-favorite-button').first().click();
cy.intercept(
'POST',
'https://mobile.server.uni-frankfurt.de/search/multi',
{
fixture: 'search/types/dish/dish-2.json',
},
);
cy.get('ion-back-button').click();
cy.get('stapps-mensa-section')
.find('.card')
.should('have.length.greaterThan', 1);
});
});
describe('news section', function () {
beforeEach(function () {
cy.intercept('POST', 'https://mobile.server.uni-frankfurt.de/search', {
fixture: 'search/types/message/message-1.json',
}).as('search');
});
it('should have desktop navigation buttons', function () {
cy.visit('/dashboard');
cy.get('stapps-news-section').within(function () {
cy.get('.swiper-button-prev').should('exist');
cy.get('.swiper-button-next').should('exist');
});
});
it('should have working desktop navigation', function () {
cy.visit('/dashboard');
cy.get('stapps-news-section').within(function () {
cy.get('.swiper-slide-active').should(
'have.text',
'DE for Students and Employees',
);
cy.get('.swiper-button-next').click({scrollBehavior: false});
cy.get('.swiper-slide-active').should('have.text', 'DE for Students');
});
});
it('should have a link to the news page', function () {
cy.visit('/dashboard');
cy.wait('@search');
cy.intercept('POST', 'https://mobile.server.uni-frankfurt.de/search', {
fixture: 'search/types/message/single-message.json',
}).as('search');
cy.get('stapps-news-section').contains('a', 'Mehr Nachrichten').click();
cy.url().should('include', '/news');
});
});
describe('navigation section', function () {
it('should have editable dashboard sections', function () {
cy.visit('/dashboard');
const section = 'Vorlesungsv.';
cy.get('stapps-navigation-section').within(() => {
cy.get('.card').should('contain.text', section);
cy.get('ion-icon[name=edit_square]').click();
});
cy.get('stapps-dashboard-edit-modal').within(() => {
cy.contains('ion-item', section).find('ion-toggle').click();
cy.contains('ion-button', 'Bestätigen').click();
});
cy.get('stapps-navigation-section').within(() => {
cy.get('.card').should('not.contain.text', section);
cy.get('ion-icon[name=edit_square]').click({scrollBehavior: false});
});
cy.get('stapps-dashboard-edit-modal').within(() => {
cy.contains('ion-item', section).find('ion-toggle').click();
cy.contains('ion-button', 'Bestätigen').click();
});
cy.get('stapps-navigation-section')
.find('.card')
.should('contain.text', section);
});
});
describe('search section', function () {
it('should lead to the search when hitting enter', function () {
cy.visit('/dashboard');
cy.get('stapps-search-section')
.find('.searchbar')
.type('test', {scrollBehavior: false})
.type('{enter}', {scrollBehavior: false});
cy.url().should('eq', Cypress.config().baseUrl + '/search/test');
cy.get('ion-searchbar').should('have.value', 'test');
cy.get('stapps-data-list-item').should('have.length.greaterThan', 0);
});
it('should go to search when clicking the icon', function () {
cy.visit('/dashboard');
cy.get('stapps-search-section').find('ion-icon[name=search]').click();
cy.url().should('eq', Cypress.config().baseUrl + '/search/');
cy.get('ion-searchbar').should('not.have.value');
cy.get('stapps-data-list-item').should('have.length', 0);
});
});
});

View File

@@ -31,12 +31,18 @@ describe('favorites', function () {
text = it;
});
cy.get('stapps-favorite-button').click();
cy.get('stapps-favorite-button > ion-button > ion-icon')
.invoke('attr', 'ng-reflect-fill')
.should('eq', 'true');
});
cy.visit('/favorites');
cy.get('stapps-data-list-item').within(() => {
cy.get('.title').should('contain', text);
cy.get('stapps-favorite-button').click();
});
cy.get('stapps-data-list').contains('Keine Ergebnisse');
cy.get('cdk-virtual-scroll-viewport').should('be.not.visible');
cy.get('stapps-data-list')
.contains('Keine Ergebnisse')
.should('be.visible');
});
});

View File

@@ -39,7 +39,7 @@ describe('ical', function () {
'have.attr',
'disabled',
);
cy.contains('ion-item', /eine Stunde um 19. Jan. 2022, \d+:00/).click();
cy.contains('ion-item', /eine Stunde um 19. Jan. 2059, \d+:00/).click();
cy.get('ion-footer > ion-toolbar > ion-button').should(
'not.have.attr',
'disabled',
@@ -49,7 +49,7 @@ describe('ical', function () {
cy.get('add-event-review-modal').within(() => {
cy.get('ion-item-group').should('contain', 'UNIcert (Test)');
cy.contains('ion-item-group', /19. Jan. 2022, \d+:00/);
cy.contains('ion-item-group', /19. Jan. 2059, \d+:00/);
});
});
});

View File

@@ -57,7 +57,7 @@ describe('schedule', function () {
]) {
const slideMultiplier = 3;
it(`should have ${count} slides for ${width}px`, function () {
cy.visit('/schedule/calendar/2022-01-19');
cy.visit('/schedule/calendar/2022-01-59');
cy.viewport(width, 550);
cy.get('.schedule-wrapper > .infinite-swiper-wrapper')
.find('.swiper-slide')
@@ -69,18 +69,18 @@ describe('schedule', function () {
}
it('should navigate to a specific date', function () {
cy.visit('/schedule/calendar/2022-01-19');
cy.contains('#date-select-button0', '19.01.22').click();
cy.visit('/schedule/calendar/2059-01-19');
cy.contains('#date-select-button0', '19.01.59').click();
cy.wait(2000);
cy.get('button[data-day=1][data-month=1][data-year=2022]', {
cy.get('button[data-day=1][data-month=1][data-year=2059]', {
includeShadowDom: true,
}).click();
cy.wait(2000);
cy.contains('#date-select-button0', '01.01.22').click();
cy.contains('#date-select-button0', '01.01.59').click();
});
it('should add events', function () {
cy.visit('/schedule/calendar/2022-01-19');
cy.visit('/schedule/calendar/2059-01-19');
cy.get('stapps-schedule-card').should('not.exist');
cy.get('ion-fab-button').click();
@@ -98,7 +98,7 @@ describe('schedule', function () {
});
cy.get('ion-app > ion-modal').within(() => {
cy.contains('ion-item', /eine Stunde um 19. Jan. 2022, \d+:00/).click();
cy.contains('ion-item', /eine Stunde um 19. Jan. 2059, \d+:00/).click();
cy.wait(2000);
cy.contains('ion-button', 'Bestätigen').click();
cy.wait(2000);

View File

@@ -1,3 +1,18 @@
/*
* Copyright (C) 2022 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
@@ -15,6 +30,27 @@
// When a command from ./commands is ready to use, import with `import './commands'` syntax
// import './commands';
beforeEach(async function () {
let databases: string[];
if (window.indexedDB.databases) {
databases = (await window.indexedDB.databases()).map(it => it.name);
console.log('Trying to clear all databases');
} else {
console.log(
"Browser doesn't support database enumeration, deleting just ionic storage",
);
databases = ['_ionicstorage'];
}
for (const database of databases) {
if (database) {
console.log(`Deleting database ${database}`);
window.indexedDB.deleteDatabase(database);
console.log(`Deleted database ${database}`);
}
}
});
Cypress.on('window:before:load', window => {
// Fake that user is using its browser in german language
Object.defineProperty(window.navigator, 'language', {value: 'de-DE'});