fix: načtení TechTower při staré nabídce
CI / Generate TypeScript types (push) Successful in 12s
CI / Server unit tests (push) Successful in 29s
CI / Build server (push) Successful in 32s
CI / Build client (push) Successful in 43s
CI / Playwright E2E tests (push) Successful in 1m55s
CI / Build and push Docker image (push) Successful in 1m7s
CI / Notify (push) Successful in 2s
CI / Generate TypeScript types (push) Successful in 12s
CI / Server unit tests (push) Successful in 29s
CI / Build server (push) Successful in 32s
CI / Build client (push) Successful in 43s
CI / Playwright E2E tests (push) Successful in 1m55s
CI / Build and push Docker image (push) Successful in 1m7s
CI / Notify (push) Successful in 2s
This commit is contained in:
4 files changed
+387
-12
No files matched your search
@@ -0,0 +1,4 @@
|
||||
[
|
||||
"Správné načtení jídelního lístku TechTower i v případě, že podnik na svém webu ještě nepřepsal nabídku z minulého týdne",
|
||||
"Mnoho nových vzhledů (v Nastavení)"
|
||||
]
|
||||
+31
-11
@@ -381,6 +381,11 @@ export const getMenuTechTower = async (firstDayOfWeek: Date, mock: boolean = fal
|
||||
// podle <br> na jednotlivé řádky. Řádek s názvem dne přepne aktuální den, ostatní řádky
|
||||
// jsou položky. Zvládne tak i den a první položku ve stejném <p>.
|
||||
if (fifthTry) {
|
||||
// Za týdnem z hlavičky může následovat menu "Následující týden", které se ukládá zvlášť.
|
||||
// Zaměstnanci často zapomenou stránku včas přepsat, takže v hlavičce ještě visí minulý
|
||||
// týden a aktuální menu je právě pod "Následující týden" (viz finalizeTechTower).
|
||||
const nextWeek: Food[][] = [];
|
||||
let target = result;
|
||||
let parsing = false;
|
||||
let currentDayIndex = 0;
|
||||
let container = $(font).parent().parent();
|
||||
@@ -395,27 +400,34 @@ export const getMenuTechTower = async (firstDayOfWeek: Date, mock: boolean = fal
|
||||
.filter(line => line.length > 0);
|
||||
for (const text of lines) {
|
||||
const lower = text.toLocaleLowerCase();
|
||||
// Za aktuálním týdnem může následovat menu na další týden - to již nezpracováváme
|
||||
if (parsing && lower.startsWith('následující týden')) {
|
||||
if (target === nextWeek) {
|
||||
return false;
|
||||
}
|
||||
target = nextWeek;
|
||||
parsing = false;
|
||||
continue;
|
||||
}
|
||||
if (DAYS_IN_WEEK.includes(lower)) {
|
||||
if (result[DAYS_IN_WEEK.indexOf(lower)]) {
|
||||
if (target[DAYS_IN_WEEK.indexOf(lower)]) {
|
||||
// Opakující se den = začátek dalšího týdne
|
||||
if (target === nextWeek) {
|
||||
return false;
|
||||
}
|
||||
target = nextWeek;
|
||||
}
|
||||
currentDayIndex = DAYS_IN_WEEK.indexOf(lower);
|
||||
parsing = true;
|
||||
result[currentDayIndex] ??= [];
|
||||
target[currentDayIndex] ??= [];
|
||||
continue;
|
||||
}
|
||||
if (!parsing) {
|
||||
continue;
|
||||
}
|
||||
result[currentDayIndex].push(buildFoodItem(text));
|
||||
target[currentDayIndex].push(buildFoodItem(text));
|
||||
}
|
||||
});
|
||||
return finalizeTechTower(result, $(font).text().trim(), firstDayOfWeek);
|
||||
return finalizeTechTower(result, $(font).text().trim(), firstDayOfWeek, nextWeek);
|
||||
}
|
||||
|
||||
// Čtvrtý pokus (detekce): thirdTry našel <font>, ale nový formát má každý den v jednom <p>
|
||||
@@ -483,22 +495,30 @@ export const getMenuTechTower = async (firstDayOfWeek: Date, mock: boolean = fal
|
||||
* Datum v hlavičce nemusí být přesně pondělí (např. je-li pondělí svátek, začíná hlavička
|
||||
* úterým), proto stačí, aby první nalezené datum padlo do libovolného dne požadovaného týdne.
|
||||
* Toleruje i mezery za tečkami (formát "7. 7.-10. 7.").
|
||||
*
|
||||
* Pokud hlavička odpovídá předchozímu týdnu a stránka obsahuje i menu "Následující týden",
|
||||
* vrátí se to, protože jde o menu požadovaného týdne, jen stránka ještě nebyla přepsána.
|
||||
*/
|
||||
const finalizeTechTower = (result: Food[][], headerText: string, firstDayOfWeek: Date): Food[][] => {
|
||||
const finalizeTechTower = (result: Food[][], headerText: string, firstDayOfWeek: Date, nextWeek: Food[][] = []): Food[][] => {
|
||||
const dateMatch = headerText.match(/(\d{1,2})\.\s*(\d{1,2})\./);
|
||||
if (dateMatch) {
|
||||
const foundDay = parseInt(dateMatch[1]);
|
||||
const foundMonth = parseInt(dateMatch[2]) - 1; // JS months are 0-based
|
||||
let matchesWeek = false;
|
||||
// Vrátí true, pokud datum z hlavičky padne do týdne začínajícího posunem offsetDays od firstDayOfWeek
|
||||
const matchesWeek = (offsetDays: number): boolean => {
|
||||
for (let d = 0; d < 7; d++) {
|
||||
const day = new Date(firstDayOfWeek);
|
||||
day.setDate(firstDayOfWeek.getDate() + d);
|
||||
day.setDate(firstDayOfWeek.getDate() + offsetDays + d);
|
||||
if (day.getDate() === foundDay && day.getMonth() === foundMonth) {
|
||||
matchesWeek = true;
|
||||
break;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (!matchesWeek) {
|
||||
return false;
|
||||
};
|
||||
if (!matchesWeek(0)) {
|
||||
if (nextWeek.some(day => day?.length) && matchesWeek(-7)) {
|
||||
return nextWeek;
|
||||
}
|
||||
throw new StaleWeekError(result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,305 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js" prefix="og: https://ogp.me/ns#" lang="cs">
|
||||
<head><link rel="preconnect" href="https://duyn491kcolsw.cloudfront.net" crossorigin><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><meta charset="utf-8"><link rel="shortcut icon" href="https://duyn491kcolsw.cloudfront.net/files/1x/1xh/1xh0pi.ico?ph=59d3cce388"><link rel="apple-touch-icon" href="https://duyn491kcolsw.cloudfront.net/files/1x/1xh/1xh0pi.ico?ph=59d3cce388"><link rel="icon" href="https://duyn491kcolsw.cloudfront.net/files/1x/1xh/1xh0pi.ico?ph=59d3cce388">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Restaurace :: Equifarm</title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="msapplication-tap-highlight" content="no">
|
||||
|
||||
<link href="https://duyn491kcolsw.cloudfront.net/files/0r/0rk/0rklmm.css?ph=59d3cce388" media="print" rel="stylesheet">
|
||||
<link href="https://duyn491kcolsw.cloudfront.net/files/20/206/206el7.css?ph=59d3cce388" media="screen and (min-width:100000em)" rel="stylesheet" data-type="cq" disabled>
|
||||
<link rel="stylesheet" href="https://duyn491kcolsw.cloudfront.net/files/1g/1g8/1g89gk.css?ph=59d3cce388"><link rel="stylesheet" href="https://duyn491kcolsw.cloudfront.net/files/2z/2z4/2z4ox6.css?ph=59d3cce388" media="screen and (min-width:37.5em)"><link rel="stylesheet" href="https://duyn491kcolsw.cloudfront.net/files/0i/0i3/0i3ci6.css?ph=59d3cce388" data-wnd_color_scheme_file=""><link rel="stylesheet" href="https://duyn491kcolsw.cloudfront.net/files/34/34q/34qmjb.css?ph=59d3cce388" data-wnd_color_scheme_desktop_file="" media="screen and (min-width:37.5em)" disabled=""><link rel="stylesheet" href="https://duyn491kcolsw.cloudfront.net/files/1j/1jo/1jorv9.css?ph=59d3cce388" data-wnd_additive_color_file=""><link rel="stylesheet" href="https://duyn491kcolsw.cloudfront.net/files/48/48g/48gira.css?ph=59d3cce388" data-wnd_typography_file=""><link rel="stylesheet" href="https://duyn491kcolsw.cloudfront.net/files/2b/2b9/2b9a9p.css?ph=59d3cce388" data-wnd_typography_desktop_file="" media="screen and (min-width:37.5em)" disabled=""><script>(()=>{let e=!1;const t=()=>{if(!e&&window.innerWidth>=600){for(let e=0,t=document.querySelectorAll('head > link[href*="css"][media="screen and (min-width:37.5em)"]');e<t.length;e++)t[e].removeAttribute("disabled");e=!0}};t(),window.addEventListener("resize",t),"container"in document.documentElement.style||fetch(document.querySelector('head > link[data-type="cq"]').getAttribute("href")).then((e=>{e.text().then((e=>{const t=document.createElement("style");document.head.appendChild(t),t.appendChild(document.createTextNode(e)),import("https://duyn491kcolsw.cloudfront.net/client/js.polyfill/container-query-polyfill.modern.js").then((()=>{let e=setInterval((function(){document.body&&(document.body.classList.add("cq-polyfill-loaded"),clearInterval(e))}),100)}))}))}))})()</script>
|
||||
<link rel="preload stylesheet" href="https://duyn491kcolsw.cloudfront.net/files/01/01e/01efhl.css?ph=59d3cce388" as="style"><meta name="description" content="Otevírací dobapo – pá 10.00 - 14.00obědy 10.00 - 13:45"><meta name="keywords" content=""><meta name="generator" content="Webnode 2"><meta name="apple-mobile-web-app-capable" content="no"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="format-detection" content="telephone=no">
|
||||
|
||||
<meta property="og:url" content="https://www.equifarm.cz/restaurace-techtower/"><meta property="og:title" content="Restaurace :: Equifarm"><meta property="og:type" content="article"><meta property="og:description" content="Otevírací dobapo – pá 10.00 - 14.00obědy 10.00 - 13:45"><meta property="og:site_name" content="Equifarm"><meta property="og:article:published_time" content="2026-10-20 00:00:00"><meta name="robots" content="index,follow"><link rel="canonical" href="https://www.equifarm.cz/restaurace-techtower/"><script>window.checkAndChangeSvgColor=function(c){try{var a=document.getElementById(c);if(a){c=[["border","borderColor"],["outline","outlineColor"],["color","color"]];for(var h,b,d,f=[],e=0,m=c.length;e<m;e++)if(h=window.getComputedStyle(a)[c[e][1]].replace(/\s/g,"").match(/^rgb[a]?\(([0-9]{1,3}),([0-9]{1,3}),([0-9]{1,3})/i)){b="";for(var g=1;3>=g;g++)b+=("0"+parseInt(h[g],10).toString(16)).slice(-2);"0"===b.charAt(0)&&(d=parseInt(b.substr(0,2),16),d=Math.max(16,d),b=d.toString(16)+b.slice(-4));f.push(c[e][0]+"="+b)}if(f.length){var k=a.getAttribute("data-src"),l=k+(0>k.indexOf("?")?"?":"&")+f.join("&");a.src!=l&&(a.src=l,a.outerHTML=a.outerHTML)}}}catch(n){}};</script></head>
|
||||
<body class="l wt-page ac-i l-default l-d-none b-btn-sq b-btn-s-l b-btn-dn b-btn-bw-1 img-d-n img-t-o img-h-z line-solid b-e-ds lbox-d c-s-s wnd-fe"><noscript>
|
||||
<iframe
|
||||
src="https://www.googletagmanager.com/ns.html?id=GTM-542MMSL"
|
||||
height="0"
|
||||
width="0"
|
||||
style="display:none;visibility:hidden"
|
||||
>
|
||||
</iframe>
|
||||
</noscript>
|
||||
|
||||
<div class="wnd-page l-page cs-gray ac-none t-t-fs-l t-t-fw-l t-t-sp-n t-t-d-n t-s-fs-m t-s-fw-l t-s-sp-n t-s-d-n t-p-fs-s t-p-fw-m t-p-sp-n t-h-fs-m t-h-fw-l t-h-sp-n t-bq-fs-s t-bq-fw-l t-bq-sp-n t-bq-d-q t-btn-fw-l t-nav-fw-l t-pd-fw-s t-nav-tt-u">
|
||||
<div class="l-w t cf t-30">
|
||||
<div class="l-bg cf">
|
||||
<div class="s-bg-l">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<header class="l-h cf">
|
||||
<div class="sw cf">
|
||||
<div class="sw-c cf"><section data-space="true" class="s s-hn s-hn-default wnd-mt-classic wnd-na-c logo-classic sc-ml wnd-background-pattern wnd-w-wider wnd-nh-m hm-hidden wnd-nav-border menu-default-underline">
|
||||
<div class="s-w">
|
||||
<div class="s-o">
|
||||
|
||||
<div class="s-bg">
|
||||
<div class="s-bg-l wnd-background-pattern bgpos-center-center bgatt-scroll" style="background-image:url('https://duyn491kcolsw.cloudfront.net/files/17/17i/17ib2g.png?ph=59d3cce388')">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="h-w h-f wnd-fixed">
|
||||
|
||||
<div class="n-l">
|
||||
<div class="s-c menu-nav">
|
||||
<div class="logo-block">
|
||||
<div class="b b-l logo logo-default logo-nb proxima-nova logo-32 wnd-logo-with-text wnd-iar-1-1 b-ls-l" id="wnd_LogoBlock_193721444" data-wnd_mvc_type="wnd.fe.LogoBlock">
|
||||
<div class="b-l-c logo-content">
|
||||
<a class="b-l-link logo-link" href="/">
|
||||
|
||||
<div class="b-l-image logo-image">
|
||||
<div class="b-l-image-w logo-image-cell">
|
||||
<picture><source type="image/webp" srcset="https://59d3cce388.clvaw-cdnwnd.com/bd8e4bd40b5bb1412d0aee3843c4e306/200000384-5e4ab5e4ae/450/EQF_Logo%20%28orig.%29.webp?ph=59d3cce388 366w, https://59d3cce388.clvaw-cdnwnd.com/bd8e4bd40b5bb1412d0aee3843c4e306/200000384-5e4ab5e4ae/700/EQF_Logo%20%28orig.%29.webp?ph=59d3cce388 366w, https://59d3cce388.clvaw-cdnwnd.com/bd8e4bd40b5bb1412d0aee3843c4e306/200000384-5e4ab5e4ae/EQF_Logo%20%28orig.%29.webp?ph=59d3cce388 366w" sizes="(min-width: 600px) 450px, (min-width: 360px) calc(100vw * 0.8), 100vw" ><img src="https://59d3cce388.clvaw-cdnwnd.com/bd8e4bd40b5bb1412d0aee3843c4e306/200000003-2ad852ad86/EQF_Logo%20%28orig.%29.png?ph=59d3cce388" alt="" width="366" height="356" class="wnd-logo-img" ></picture>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="b-l-br logo-br"></div>
|
||||
|
||||
<div class="b-l-text logo-text-wrapper">
|
||||
<div class="b-l-text-w logo-text">
|
||||
<span class="b-l-text-c logo-text-cell">Equifarm, s.r.o.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="menu-slider">
|
||||
<div id="menu-block">
|
||||
<nav id="menu"><div class="menu-font menu-wrapper">
|
||||
<a href="#" class="menu-close" rel="nofollow" title="Close Menu"></a>
|
||||
<ul role="menubar" aria-label="Menu" class="level-1">
|
||||
<li role="none" class="wnd-homepage">
|
||||
<a class="menu-item" role="menuitem" href="/"><span class="menu-item-text">Úvod</span></a>
|
||||
|
||||
</li><li role="none" class="wnd-with-submenu">
|
||||
<a class="menu-item" role="menuitem" href="/firemni-stravovani/"><span class="menu-item-text">Firemní stravování</span></a>
|
||||
<ul role="menubar" aria-label="Menu" class="level-2">
|
||||
<li role="none">
|
||||
<a class="menu-item" role="menuitem" href="/specialiste-na-japonskou-kuchyni/"><span class="menu-item-text">Specialisté na japonskou kuchyni</span></a>
|
||||
|
||||
</li><li role="none">
|
||||
<a class="menu-item" role="menuitem" href="/vlastni-cukrarska-vyroba/"><span class="menu-item-text">Vlastní cukrářská výroba</span></a>
|
||||
|
||||
</li><li role="none">
|
||||
<a class="menu-item" role="menuitem" href="/reference/"><span class="menu-item-text">Reference</span></a>
|
||||
|
||||
</li><li role="none">
|
||||
<a class="menu-item" role="menuitem" href="/kontakty2/"><span class="menu-item-text">Kontakty </span></a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</li><li role="none">
|
||||
<a class="menu-item" role="menuitem" href="/catering-a-eventy/"><span class="menu-item-text">Catering</span></a>
|
||||
|
||||
</li><li role="none" class="wnd-with-submenu">
|
||||
<a class="menu-item" role="menuitem" href="/rekreacni-areal2/"><span class="menu-item-text">Rekreační areál</span></a>
|
||||
<ul role="menubar" aria-label="Menu" class="level-2">
|
||||
<li role="none">
|
||||
<a class="menu-item" role="menuitem" href="/areal/"><span class="menu-item-text">Areál</span></a>
|
||||
|
||||
</li><li role="none">
|
||||
<a class="menu-item" role="menuitem" href="/kontakty/"><span class="menu-item-text">Kontakty</span></a>
|
||||
|
||||
</li><li role="none">
|
||||
<a class="menu-item" role="menuitem" href="/cenik/"><span class="menu-item-text">Ceník</span></a>
|
||||
|
||||
</li><li role="none">
|
||||
<a class="menu-item" role="menuitem" href="/kalendar/"><span class="menu-item-text">Kalendář</span></a>
|
||||
|
||||
</li><li role="none">
|
||||
<a class="menu-item" role="menuitem" href="/fotogalerie/"><span class="menu-item-text">Fotogalerie</span></a>
|
||||
|
||||
</li><li role="none">
|
||||
<a class="menu-item" role="menuitem" href="/vylety-do-okoli/"><span class="menu-item-text">Výlety do okolí</span></a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</li><li role="none" class="wnd-active-path wnd-with-submenu">
|
||||
<a class="menu-item" role="menuitem" href="/techtower/"><span class="menu-item-text">TechTower</span></a>
|
||||
<ul role="menubar" aria-label="Menu" class="level-2">
|
||||
<li role="none">
|
||||
<a class="menu-item" role="menuitem" href="/kavarna-techtower/"><span class="menu-item-text">SeedUp Space</span></a>
|
||||
|
||||
</li><li role="none" class="wnd-active wnd-active-path">
|
||||
<a class="menu-item" role="menuitem" href="/restaurace-techtower/"><span class="menu-item-text">Restaurace </span></a>
|
||||
|
||||
</li><li role="none">
|
||||
<a class="menu-item" role="menuitem" href="/coffee-breaks/"><span class="menu-item-text">Coffee breaks</span></a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</li><li role="none">
|
||||
<a class="menu-item" role="menuitem" href="/kontakt/"><span class="menu-item-text">Kontakt</span></a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<span class="more-text">Více</span>
|
||||
</div></nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cart-and-mobile">
|
||||
|
||||
|
||||
|
||||
<div id="menu-mobile">
|
||||
<a href="#" id="menu-submit"><span></span>Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section></div>
|
||||
</div>
|
||||
</header>
|
||||
<main class="l-m cf">
|
||||
<div class="sw cf">
|
||||
<div class="sw-c cf"><section class="s s-hm s-hm-hidden wnd-h-hidden cf sc-w hn-default"><div></div></section><section class="s s-basic cf sc-w wnd-w-default wnd-s-normal wnd-h-auto">
|
||||
<div class="s-w cf">
|
||||
<div class="s-o s-fs cf">
|
||||
<div class="s-bg cf">
|
||||
<div class="s-bg-l">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="s-c s-fs cf">
|
||||
<div class="ez cf wnd-no-cols">
|
||||
<div class="ez-c"><div class="b b-text cf">
|
||||
<div class="b-c b-text-c b-s b-s-t60 b-s-b60 b-cs cf"><h1 class="wnd-align-center"><strong><font class="wsw-31">Restaurace </font></strong></h1>
|
||||
</div>
|
||||
</div><div class="b b-text cf">
|
||||
<div class="b-c b-text-c b-s b-s-t60 b-s-b60 b-cs cf"></div>
|
||||
</div><div class="b b-s b-hr-line line-auto">
|
||||
<hr class="line-style line-color">
|
||||
</div><div class="b b-text cf">
|
||||
<div class="b-c b-text-c b-s b-s-t60 b-s-b60 b-cs cf"><h3 class="wnd-align-center"><font class="wsw-02"><p class=""><strong>Otevírací doba</strong><br></p><p class="">po – pá 10.00 - 14.00</p></font><p class=""><font class="wsw-41">obědy 10.00 - 13:45</font></p></h3></div>
|
||||
</div><div class="b b-text cf">
|
||||
<div class="b-c b-text-c b-s b-s-t60 b-s-b60 b-cs cf"><p class="wnd-align-center"><strong><font class="wsw-41 wnd-font-size-110">Jídelní lístek 19. 10.– 23. 10.</font></strong></p><p class="wnd-align-center"><strong>Pondělí</strong></p><p class="wnd-align-center">Krémová česnečka s krutony 1,7 — 45 Kč</p><p class="wnd-align-center">Uzené kuřecí stehno, máslové brambory s petrželí 7 — 140 Kč</p><p class="wnd-align-center">Špagety s česnekem, olivami, sušenými rajčaty a parmezánem 1,7</p><p class="wnd-align-center">Kuřecí kousky v sýrové omáčce, jasmínová rýže 1,7</p><p class="wnd-align-center">Vepřová panenka s pepřovou omáčkou, hranolky, bylinková majonéza 1,3,7</p><p class="wnd-align-center"><strong>Úterý</strong></p><p class="wnd-align-center">Fazolová s uzeninou 1 — 45 Kč</p><p class="wnd-align-center">Hovězí guláš s čerstvým křenem, houskový knedlík 1,3,7 — 140 Kč</p><p class="wnd-align-center">Grilovaný hermelín s brusinkami, polníčkový salát a cherry rajčata 7</p><p class="wnd-align-center">Přírodní kuřecí kapsa se šunkou a sýrem, jasmínová rýže 1,7</p><p class="wnd-align-center">Šašlik z vepřové krkovice, pečené grenaille se slaninou a cibulí, česneková majonéza 1,3,7</p><p class="wnd-align-center"><strong>Středa</strong></p><p class="wnd-align-center">Kuřecí vývar se zeleninou, masem a těstovinami 1,3,7,9 — 45 Kč</p><p class="wnd-align-center">Smažený květák s bramborem a tatarskou omáčkou 1,3,7 — 140 Kč</p><p class="wnd-align-center">Dýňové curry s kokosovým mlékem a cizrnou, jasmínová rýže 1,7</p><p class="wnd-align-center">Tagliatelle Pomodoro, masové kuličky s bazalkou 1,7</p><p class="wnd-align-center">Kachní roláda, chlupaté knedlíky se špekem, silná omáčka 1,3,7</p><p class="wnd-align-center"><strong>Čtvrtek</strong></p><p class="wnd-align-center">Kulajda s vejcem 1,7 — 45 Kč</p><p class="wnd-align-center">Výpečky, špenát, houskový knedlík 1,3,7 — 140 Kč</p><p class="wnd-align-center">Maková buchta se švestkami, vanilková omáčka 1,3,7</p><p class="wnd-align-center">Pečené kuřecí stehno na cibulce, kari rýže 1</p><p class="wnd-align-center">Duroc krkovice sous-vide s omáčkou velouté, špecle, grilovaná cuketa 1,7</p><p class="wnd-align-center"><strong>Pátek</strong></p><p class="wnd-align-center">Hovězí vývar se zeleninou, masem a játrovou rýží 1,3,7,9 — 45 Kč</p><p class="wnd-align-center">Kuřecí rizoto se zeleninou, sypané sýrem 1,7 — 140 Kč</p><p class="wnd-align-center">Smažené čínské nudle se zeleninou a vejcem 1,3,6,11</p><p class="wnd-align-center">Americký hot dog s pikantní klobásou, čedarová omáčka, restovaná slanina s cibulí 1,7</p><p class="wnd-align-center">Hovězí líčka na červeném víně, máslová bramborová kaše 1,7,9</p><p class="wnd-align-center"><br></p><p class="wnd-align-center"><font class="wnd-font-size-110 wsw-41"><strong>Následující týden</strong></font></p><p class="wnd-align-center"><strong>Pondělí</strong></p><p class="wnd-align-center">Zeleninová s bulgurem 1,9 — 45 Kč</p><p class="wnd-align-center">Smažený rybí filet, brambory, citron 1,3,4,7 — 140 Kč</p><p class="wnd-align-center">Gnocchi s vlašskými ořechy a gorgonzolou 1,7</p><p class="wnd-align-center">Grilovaný kuřecí supreme, pečená kořenová zelenina s červenou řepou 1</p><p class="wnd-align-center">Steak z vepřové pečeně Duroc, hořčicovo-medová omáčka, hranolky 1,7</p><p class="wnd-align-center"><strong>Úterý</strong></p><p class="wnd-align-center">Česnečka se slaninou, krutony a sýrem 1,7 — 45 Kč</p><p class="wnd-align-center">Kuřecí paličky na paprice, těstoviny 1,7 — 140 Kč</p><p class="wnd-align-center">Grilovaný oštiepok, salát s černými fazolemi 7</p><p class="wnd-align-center">Trhaný hovězí krk, kedlubnové ragú, bramborový knedlík s cibulkou 1,3,7</p><p class="wnd-align-center">Losos na japonský způsob, jasmínová rýže, barevný sezam, nakládaný zázvor 1,4,6,11</p><p class="wnd-align-center"><strong>Středa</strong></p><p class="wnd-align-center">SVÁTEK</p><p class="wnd-align-center"><strong>Čtvrtek</strong></p><p class="wnd-align-center">Batátový krém s chilli 1,7 — 45 Kč</p><p class="wnd-align-center">Halušky s uzeným masem a restovanou cibulkou 1 — 140 Kč</p><p class="wnd-align-center">Hruškový štrúdl s rozinkovou omáčkou, sypaný perníkem 1,3,7</p><p class="wnd-align-center">Husí játra na slanině s čerstvou majoránkou, jasmínová rýže 1,7</p><p class="wnd-align-center">Bylinkový karbanátek, bramborová kaše 1,3,7</p><p class="wnd-align-center"><strong>Pátek</strong></p><p class="wnd-align-center">Hovězí vývar se zeleninou a masem, vaječné kapání 1,3,7,9 — 45 Kč</p><p class="wnd-align-center">Krůtí guláš s houskovým knedlíkem 1,3,7 — 140 Kč</p><p class="wnd-align-center">Lasagne seLine truncated
|
||||
</div><div class="b b-text cf">
|
||||
<div class="b-c b-text-c b-s b-s-t60 b-s-b60 b-cs cf"><p id="wnd_TextBlock_76217_inner_1" data-wnd_is_separable="1" data-wnd_separable_index="1" data-wnd_separable_id="wnd_TextBlock_76217"></p></div>
|
||||
</div><div class="b b-text cf">
|
||||
<div class="b-c b-text-c b-s b-s-t60 b-s-b60 b-cs cf"><p class="wnd-align-center"><a href="https://www.equifarm.cz" target="_blank">www.equifarm.cz</a></p><p class="wnd-align-center"><font class="wsw-31">techtower@equifarm.cz</font></p><p class="wnd-align-center">+420 608 180 311</p></div>
|
||||
</div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section></div>
|
||||
</div>
|
||||
</main>
|
||||
<footer class="l-f cf">
|
||||
<div class="sw cf">
|
||||
<div class="sw-c cf"><section data-wn-border-element="s-f-border" class="s s-f s-f-basic s-f-simple sc-w wnd-w-default wnd-s-higher">
|
||||
<div class="s-w">
|
||||
<div class="s-o">
|
||||
<div class="s-bg">
|
||||
<div class="s-bg-l">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="s-c s-f-l-w s-f-border">
|
||||
<div class="s-f-l b-s b-s-t0 b-s-b0">
|
||||
<div class="s-f-l-c s-f-l-c-first">
|
||||
<div class="s-f-cr"><span class="it b link">
|
||||
<span class="it-c">© 2022 Equifarm, s.r.o. Všechna práva vyhrazena.</span>
|
||||
</span></div>
|
||||
<div class="s-f-sf">
|
||||
<span class="sf b">
|
||||
<span class="sf-content sf-c link">Vytvořeno službou <a href="https://www.webnode.cz?utm_source=text&utm_medium=footer&utm_campaign=free3&utm_content=wnd2" rel="nofollow noopener" target="_blank">Webnode</a></span>
|
||||
</span>
|
||||
<span class="sf-cbr link">
|
||||
<a href="#" rel="nofollow">Cookies</a>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="s-f-l-c s-f-l-c-last">
|
||||
<div class="s-f-lang lang-select cf">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="s-f-l-c s-f-l-c-currency">
|
||||
<div class="s-f-ccy ccy-select cf">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section></div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<section class="cb cb-dark" id="cookiebar" style="display:none;" id="cookiebar" style="display:none;">
|
||||
<div class="cb-bar cb-scrollable">
|
||||
<div class="cb-bar-c">
|
||||
<div class="cb-bar-text">Používáme cookies, abychom zajistili správné fungování a bezpečnost našich stránek. Tím vám můžeme zajistit tu nejlepší zkušenost při jejich návštěvě.</div>
|
||||
<div class="cb-bar-buttons">
|
||||
<button class="cb-button cb-close-basic" data-action="accept-necessary">
|
||||
<span class="cb-button-content">Přijmout nezbytné</span>
|
||||
</button>
|
||||
<button class="cb-button cb-close-basic" data-action="accept-all">
|
||||
<span class="cb-button-content">Přijmout vše</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="cb-close cb-close-basic" data-action="accept-necessary"></div>
|
||||
</div>
|
||||
|
||||
<div class="cb-popup cb-light close">
|
||||
<div class="cb-popup-c">
|
||||
<div class="cb-popup-head">
|
||||
<h3 class="cb-popup-title">Pokročilá nastavení</h3>
|
||||
<p class="cb-popup-text">Zde můžete upravit své preference ohledně cookies. Následující kategorie můžete povolit či zakázat a svůj výběr uložit.</p>
|
||||
</div>
|
||||
<div class="cb-popup-options cb-scrollable">
|
||||
<div class="cb-option">
|
||||
<input class="cb-option-input" type="checkbox" id="necessary" name="necessary" readonly="readonly" disabled="disabled" checked="checked">
|
||||
<div class="cb-option-checkbox"></div>
|
||||
<label class="cb-option-label" for="necessary">Nezbytné krátkodobé cookies</label>
|
||||
<div class="cb-option-text"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cb-popup-footer">
|
||||
<button class="cb-button cb-save-popup" data-action="advanced-save">
|
||||
<span class="cb-button-content">Uložit</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="cb-close cb-close-popup" data-action="close"></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script src="https://duyn491kcolsw.cloudfront.net/files/31/31y/31yjg6.js?ph=59d3cce388" crossorigin="anonymous" type="module"></script><script>document.querySelector(".wnd-fe")&&[...document.querySelectorAll(".c")].forEach((e=>{const t=e.querySelector(".b-text:only-child");t&&""===t.querySelector(".b-text-c").innerText&&e.classList.add("column-empty")}))</script>
|
||||
|
||||
|
||||
<script src="https://duyn491kcolsw.cloudfront.net/client.fe/js.compiled/lang.cz.a8a735326dbd7e14.js?ph=59d3cce388" crossorigin="anonymous"></script><script src="https://duyn491kcolsw.cloudfront.net/client.fe/js.compiled/compiled.multi.0f523a8eb54f2400.js?ph=59d3cce388" crossorigin="anonymous"></script><script>var wnd = wnd || {};wnd.$data = {"image_content_items":{"wnd_ThumbnailBlock_1":{"id":"wnd_ThumbnailBlock_1","type":"wnd.pc.ThumbnailBlock"},"wnd_HeaderSection_header_main_412360230":{"id":"wnd_HeaderSection_header_main_412360230","type":"wnd.pc.HeaderSection"},"wnd_ImageBlock_793396992":{"id":"wnd_ImageBlock_793396992","type":"wnd.pc.ImageBlock"},"wnd_Section_default_762442558":{"id":"wnd_Section_default_762442558","type":"wnd.pc.Section"},"wnd_LogoBlock_193721444":{"id":"wnd_LogoBlock_193721444","type":"wnd.pc.LogoBlock"},"wnd_FooterSection_footer_306617015":{"id":"wnd_FooterSection_footer_306617015","type":"wnd.pc.FooterSection"}},"svg_content_items":{"wnd_ImageBlock_793396992":{"id":"wnd_ImageBlock_793396992","type":"wnd.pc.ImageBlock"},"wnd_LogoBlock_193721444":{"id":"wnd_LogoBlock_193721444","type":"wnd.pc.LogoBlock"}},"content_items":[],"eshopSettings":{"ESHOP_SETTINGS_DISPLAY_PRICE_WITHOUT_VAT":false,"ESHOP_SETTINGS_DISPLAY_ADDITIONAL_VAT":false,"ESHOP_SETTINGS_DISPLAY_SHIPPING_COST":false},"project_info":{"isMultilanguage":false,"isMulticurrency":false,"eshop_tax_enabled":"1","country_code":"","contact_state":null,"eshop_tax_type":"VAT","eshop_discounts":false,"graphQLURL":"https:\/\/equifarm.cz\/servers\/graphql\/","iubendaSettings":{"cookieBarCode":"","cookiePolicyCode":"","privacyPolicyCode":"","termsAndConditionsCode":""}}};</script><script>wnd.$system = {"fileSystemType":"aws_s3","localFilesPath":"https:\/\/www.equifarm.cz\/_files\/","awsS3FilesPath":"https:\/\/59d3cce388.clvaw-cdnwnd.com\/bd8e4bd40b5bb1412d0aee3843c4e306\/","staticFiles":"https:\/\/duyn491kcolsw.cloudfront.net\/files","isCms":false,"staticCDNServers":["https:\/\/duyn491kcolsw.cloudfront.net\/"],"fileUploadAllowExtension":["jpg","jpeg","jfif","png","gif","bmp","ico","svg","webp","tiff","pdf","doc","docx","ppt","pptx","pps","ppsx","odt","xls","xlsx","txt","rtf","mp3","wma","wav","ogg","amr","flac","m4a","3gp","avi","wmv","mov","mpg","mkv","mp4","mpeg","m4v","swf","gpx","stl","csv","xml","txt","dxf","dwg","iges","igs","step","stp"],"maxUserFormFileLimit":4194304,"frontendLanguage":"cz","backendLanguage":"cz","frontendLanguageId":"1","page":{"id":200005129,"identifier":"restaurace-techtower","template":{"id":200000048,"styles":{"typography":"t-30_new","scheme":"cs-gray","additiveColor":"ac-none","acHeadings":false,"acSubheadings":false,"acIcons":true,"acOthers":false,"acMenu":false,"imageStyle":"img-d-n","imageHover":"img-h-z","imageTitle":"img-t-o","buttonStyle":"b-btn-sq","buttonSize":"b-btn-s-l","buttonDecoration":"b-btn-dn","buttonBorders":"b-btn-bw-1","lineStyle":"line-solid","eshopGridItemStyle":"b-e-ds","formStyle":"default","menuType":"","menuStyle":"menu-default-underline","lightboxStyle":"lbox-d","columnSpaces":"c-s-s","sectionWidth":"wnd-w-default","sectionSpace":"wnd-s-normal","layoutType":"l-default","layoutDecoration":"l-d-none","background":{"default":null},"backgroundSettings":{"default":""},"typoTitleSizes":"t-t-fs-l","typoTitleWeights":"t-t-fw-l","typoTitleSpacings":"t-t-sp-n","typoTitleDecorations":"t-t-d-n","typoHeadingSizes":"t-h-fs-m","typoHeadingWeights":"t-h-fw-l","typoHeadingSpacings":"t-h-sp-n","typoSubtitleSizes":"t-s-fs-m","typoSubtitleWeights":"t-s-fw-l","typoSubtitleSpacings":"t-s-sp-n","typoSubtitleDecorations":"t-s-d-n","typoParagraphSizes":"t-p-fs-s","typoParagraphWeights":"t-p-fw-m","typoParagraphSpacings":"t-p-sp-n","typoBlockquoteSizes":"t-bq-fs-s","typoBlockquoteWeights":"t-bq-fw-l","typoBlockquoteSpacings":"t-bq-sp-n","typoBlockquoteDecorations":"t-bq-d-q","buttonWeight":"t-btn-fw-l","menuWeight":"t-nav-fw-l","productWeight":"t-pd-fw-s","menuTextTransform":"t-nav-tt-u"}},"layout":"default","name":"Restaurace ","html_title":"","language":"cz","langId":1,"isHomepage":false,"meta_description":"","meta_keywords":"","header_code":"","footer_code":"","styles":{"pageBased":{"navline":{"style":{"sectionWidth":"wnd-w-wider","sectionHeight":"wnd-nh-m","sectionPosition":"wnd-na-c"}}}},"countFormsEntries":[]},"listingsPrefix":"\/l\/","productPrefix":"\/p\/","cartPrefix":"\/cart\/","checkoutPrefix":"\/checkout\/","searchPrefix":"\/search\/","isCheckout":false,"isEshop":false,"hasBlog":false,"isProductDetail":false,"isListingDetail":false,"listing_page":[],"hasEshopAnalytics":false,"gTagId":null,"gAdsId":null,"format":{"be":{"DATE_TIME":{"mask":"%d.%m.%Y %H:%M","regexp":"^(((0?[1-9]|[1,2][0-9]|3[0,1])\\.(0?[1-9]|1[0-2])\\.[0-9]{1,4})(( [0-1][0-9]| 2[0-3]):[0-5][0-9])?|(([0-9]{4}(0[1-9]|1[0-2])(0[1-9]|[1,2][0-9]|3[0,1])(0[0-9]|1[0-9]|2[0-3])[0-5][0-9][0-5][0-9])))?$"},"DATE":{"mask":"%d.%m.%Y","regexp":"^((0?[1-9]|[1,2][0-9]|3[0,1])\\.(0?[1-9]|1[0-2])\\.[0-9]{1,4})$"},"CURRENCY":{"mask":{"point":",","tLine truncated
|
||||
events: {"error":{"name":"Error"},"publish":{"name":"Publish page"},"open_premium_popup":{"name":"Open premium popup"},"publish_from_premium_popup":{"name":"Publish from premium content popup"},"upgrade_your_plan":{"name":"Upgrade your plan"},"ml_lock_page":{"name":"Lock access to page"},"ml_unlock_page":{"name":"Unlock access to page"},"ml_start_add_page_member_area":{"name":"Start - add page Member Area"},"ml_end_add_page_member_area":{"name":"End - add page Member Area"},"ml_show_activation_popup":{"name":"Show activation popup"},"ml_activation":{"name":"Member Login Activation"},"ml_deactivation":{"name":"Member Login Deactivation"},"ml_enable_require_approval":{"name":"Enable approve registration manually"},"ml_disable_require_approval":{"name":"Disable approve registration manually"},"ml_fe_member_registration":{"name":"Member Registration on FE"},"ml_fe_member_login":{"name":"Login Member"},"ml_fe_member_recovery":{"name":"Sent recovery email"},"ml_fe_member_change_password":{"name":"Change Password"},"undoredo_click_undo":{"name":"Undo\/Redo - click Undo"},"undoredo_click_redo":{"name":"Undo\/Redo - click Redo"},"add_anchor":{"name":"Anchor adding completed"},"add_page":{"name":"Page adding completed"},"change_page_order":{"name":"Change of page order"},"delete_page":{"name":"Page deleted"},"background_options_change":{"name":"Background setting completed"},"add_content":{"name":"Content adding completed"},"delete_content":{"name":"Content deleting completed"},"change_text":{"name":"Editing of text completed"},"add_image":{"name":"Image adding completed"},"add_photo":{"name":"Adding photo to galery completed"},"change_logo":{"name":"Logo changing completed"},"open_pages":{"name":"Open Pages"},"show_page_cms":{"name":"Show Page - CMS"},"new_section":{"name":"New section completed"},"delete_section":{"name":"Section deleting completed"},"add_video":{"name":"Video adding completed"},"add_maps":{"name":"Maps adding completed"},"add_button":{"name":"Button adding completed"},"add_file":{"name":"File adding completed"},"add_hr":{"name":"Horizontal line adding completed"},"delete_cell":{"name":"Cell deleting completed"},"delete_microtemplate":{"name":"Microtemplate deleting completed"},"add_blog_page":{"name":"Blog page adding completed"},"new_blog_post":{"name":"New blog post created"},"new_blog_recent_posts":{"name":"Blog recent posts list created"},"e_show_products_popup":{"name":"Show products popup"},"e_show_add_product":{"name":"Show add product popup"},"e_show_edit_product":{"name":"Show edit product popup"},"e_show_collections_popup":{"name":"Show collections manager popup"},"e_show_eshop_settings":{"name":"Show eshop settings popup"},"e_add_product":{"name":"Add product"},"e_edit_product":{"name":"Edit product"},"e_remove_product":{"name":"Remove product"},"e_bulk_show":{"name":"Bulk show products"},"e_bulk_hide":{"name":"Bulk hide products"},"e_bulk_remove":{"name":"Bulk remove products"},"e_move_product":{"name":"Order products"},"e_add_collection":{"name":"Add collection"},"e_rename_collection":{"name":"Rename collection"},"e_remove_collection":{"name":"Remove collection"},"e_add_product_to_collection":{"name":"Assign product to collection"},"e_remove_product_from_collection":{"name":"Unassign product from collection"},"e_move_collection":{"name":"Order collections"},"e_add_products_page":{"name":"Add products page"},"e_add_procucts_section":{"name":"Add products list section"},"e_add_products_content":{"name":"Add products list content block"},"e_change_products_zone_style":{"name":"Change style in products list"},"e_change_products_zone_collection":{"name":"Change collection in products list"},"e_show_products_zone_collection_filter":{"name":"Show collection filter in products list"},"e_hide_products_zone_collection_filter":{"name":"Hide collection filter in products list"},"e_show_product_detail_page":{"name":"Show product detail page"},"e_add_to_cart":{"name":"Add product to cart"},"e_remove_from_cart":{"name":"Remove product from cart"},"e_checkout_step":{"name":"From cart to checkout"},"e_finish_checkout":{"name":"Finish order"},"welcome_window_play_video":{"name":"Welcome window - play video"},"e_import_file":{"name":"Eshop - products import - file info"},"e_import_upload_time":{"name":"Eshop - products import - upload file duration"},"e_import_result":{"name":"Eshop - products import result"},"e_import_error":{"name":"Eshop - products import - errors"},"e_promo_blogpost":{"name":"Eshop promo - blogpost"},"e_promo_activate":{"name":"Eshop promo - activate"},"e_settings_activate":{"name":"Online store - activate"},"e_promo_hide":{"name":"Eshop promo - close"},"e_activation_popup_step":{"name":"Eshop activation popup - step"},"e_activation_popup_activate":{"name":"Eshop activation popup - activate"},"e_activation_popup_hide":{"name":"Eshop activation popup - close"},"e_deactivation":{"name":"Eshop deactivation"},"e_reactivation":{"name":"Eshop reactivation"},"e_variant_create_first":Line truncated
|
||||
data: {"user":{"u":0,"p":44019905,"lc":"CZ","t":"1"},"action":{"identifier":"","name":"","category":"project","platform":"WND2"},"browser":{"url":"https:\/\/www.equifarm.cz\/restaurace-techtower\/","ua":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/605.1.15 (KHTML, like Gecko) Version\/26.6.2 Safari\/605.1.15","referer_url":"","resolution":"","ip":"212.79.110.105"}},
|
||||
urlPrefix: "https://events.webnode.com/projects/-/events/",
|
||||
collection: "PROD",
|
||||
}</script></body>
|
||||
</html>
|
||||
@@ -161,8 +161,54 @@ describe('TechTower parser – nový formát 10/2026', () => {
|
||||
}
|
||||
});
|
||||
|
||||
test('pro následující týden vrátí menu z části "Následující týden"', async () => {
|
||||
const menu = await getMenuTechTower(new Date('2026-10-12'));
|
||||
expect(menu.flat().some(f => f.name.startsWith('Hrášková'))).toBe(true);
|
||||
expect(menu.flat().some(f => f.name === 'Mexická fazolačka s kukuřicí a masem')).toBe(false);
|
||||
});
|
||||
|
||||
test('hodí StaleWeekError pro jiný týden', async () => {
|
||||
await expect(getMenuTechTower(new Date('2026-10-12'))).rejects.toBeInstanceOf(StaleWeekError);
|
||||
await expect(getMenuTechTower(new Date('2026-10-19'))).rejects.toBeInstanceOf(StaleWeekError);
|
||||
await expect(getMenuTechTower(new Date('2026-09-28'))).rejects.toBeInstanceOf(StaleWeekError);
|
||||
});
|
||||
});
|
||||
|
||||
describe('TechTower parser – neaktualizovaná hlavička (aktuální týden pod "Následující týden")', () => {
|
||||
// Pondělí 26.10.2026, hlavička stránky je stále "Jídelní lístek 19. 10.– 23. 10."
|
||||
const MONDAY_2026_10_26 = new Date('2026-10-26');
|
||||
|
||||
beforeEach(() => {
|
||||
mockedAxios.get = jest.fn().mockResolvedValue({ data: loadFixture('techtower-2026-10-stale.html') });
|
||||
});
|
||||
|
||||
test('vrátí menu aktuálního týdne bez StaleWeekError', async () => {
|
||||
const menu = await getMenuTechTower(MONDAY_2026_10_26);
|
||||
expect(menu).toHaveLength(5);
|
||||
expect(menu[0][0].name).toBe('Zeleninová s bulgurem');
|
||||
expect(menu[0][0].isSoup).toBe(true);
|
||||
expect(menu[4][1].name).toBe('Krůtí guláš s houskovým knedlíkem');
|
||||
expect(menu.flat().some(f => f.name.startsWith('Krémová česnečka'))).toBe(false);
|
||||
});
|
||||
|
||||
test('svátek je naparsován jako samostatná položka', async () => {
|
||||
const menu = await getMenuTechTower(MONDAY_2026_10_26);
|
||||
expect(menu[2]).toHaveLength(1);
|
||||
expect(menu[2][0].name).toBe('SVÁTEK');
|
||||
});
|
||||
|
||||
test('pro týden z hlavičky vrátí menu z hlavičky', async () => {
|
||||
const menu = await getMenuTechTower(new Date('2026-10-19'));
|
||||
expect(menu[0][0].name).toBe('Krémová česnečka s krutony');
|
||||
});
|
||||
|
||||
test('pro vzdálenější týden hodí StaleWeekError s daty z hlavičky', async () => {
|
||||
expect.assertions(2);
|
||||
try {
|
||||
await getMenuTechTower(new Date('2026-11-02'));
|
||||
} catch (e) {
|
||||
expect(e).toBeInstanceOf(StaleWeekError);
|
||||
expect((e as StaleWeekError).food[0][0].name).toBe('Krémová česnečka s krutony');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user