- FaqBlock prop schema (default true) adds a FAQPage node (@id <page URL>#faq, one Question with its acceptedAnswer as plain text per item) to the page's one JSON-LD graph through vue-seo-layer's useSchemaNode (faqSchema, faqAnswerText) - headingLevel 0 renders the title as <p class="faq-block__title"> with the same id, still labelling the section, for sidebar and footer widgets - smoke: count= and repeatable options; expectations for the widget title, one FAQPage node and the answers in the HTML inside details
23 lines
1.6 KiB
Plaintext
23 lines
1.6 KiB
Plaintext
# SSR smoke of the playground against testing/fixtures: FaqBlock acme
|
|
# (exclusive), acme again (h3, no description), missing (fallback slot) and
|
|
# empty (no items). Run: pnpm build:playground && pnpm smoke:ssr
|
|
200 / contains=class="faq-block__title">Acme questions</h2>
|
|
200 / contains=<h3 id=
|
|
200 / contains=<div class="faq-block__description faq-html"><p>Answers about <a href="https://acme.example.test/">Acme</a>.</p></div>
|
|
200 / contains=<summary class="faq-item__question">How long does shipping take?</summary>
|
|
200 / contains=<div class="faq-item__answer faq-html"><p>Two days.</p><ul><li>Poland</li><li>Europe</li></ul></div>
|
|
200 / contains=<details class="faq-item" name=
|
|
200 / contains=<details class="faq-item"><summary
|
|
# A missing FAQ renders its fallback; a FAQ without items renders nothing.
|
|
200 / contains=<p class="playground-fallback">No FAQ</p>
|
|
200 / notcontains=>Empty</h
|
|
200 / notcontains=FaqSection
|
|
# A widget block (headingLevel 0) renders its title as a styled p that still
|
|
# labels the section (UI-SPEC L6); the page keeps one heading per content block.
|
|
200 / contains=<p id= contains=class="faq-block__title">Acme questions</p>
|
|
200 / count=<h2:1 count=<h3:1
|
|
# One JSON-LD script with one FAQPage node (two blocks with schema share its
|
|
# @id; the widget has schema off); the answers are in the HTML inside details.
|
|
200 / count=application/ld+json:1 count="@type":"FAQPage":1 contains="acceptedAnswer":{"@type":"Answer","text":"Two days. Poland Europe"}
|
|
200 / contains=<details class="faq-item" name= contains=<p>Two days.</p><ul><li>Poland</li><li>Europe</li></ul>
|