Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-CORE-085

The site requirements viewer has a social card for each page

When a maintainer builds the Pages site, the build SHALL write one social picture for the index of the viewer and one for each feature category, give each page of the viewer the Open Graph and Twitter tags that point to the picture of its category (the index's own picture on the index), with its own share title and a description without inline-code backticks or link syntax, and give the requirements.html page the tags of the index.

Part of StRS-MDOKFSTUDIO-CORE-008, outside the paths drawn on its map.

Scenarios 7

The situations the tests check; open one to read it.

nominalTags of each page
Givena page of the viewer: the index, a category, a use case or a behaviour
Whenthe page is written
Thenit carries exactly one og:title and one twitter:title equal to its own share title, an absolute og:url, an og:image equal to its twitter:image at 1200 x 630 and the summary_large_image card, and every share title is distinct
nominalOne picture per category
Givena category, one of its use cases and one of its behaviours
Whenthe pages are written
Thenthe three point to requirements/og/area-{areaId}.png, the index points to requirements/og/areas-card.png and no page points to a picture of a level
nominalTexts of a category, a use case and a behaviour
Givena category, a use case and a behaviour
Whentheir share texts are written
Thenthe category says it is a feature category of Markdown OKF-Schema Studio, the use case has the share title Use case, its full ID, a colon and its title, and its whole user need, and the behaviour has the share title Behaviour, its full ID, a colon and its title, and its rule without backticks or link syntax
boundaryA long rule
Givena behaviour whose rule is longer than 200 characters
Whenits description is written
Thenit is cut at a word, ends with an ellipsis and is at most 200 characters
boundaryNo description loses a word
Givenevery description and user need of the shipped requirements
Whentheir share text is written
Theneach word of the text, apart from link targets, is in the share text, in the same order
nominalThe requirements.html page
Giventhe requirements.html page that redirects to requirements/
Whenit is written
Thenit keeps the meta refresh and the canonical link and carries the same social tags as the index page
refusalNo browser
Givena machine without Chromium
Whenthe pictures are drawn
Thenthe pages are already written and the build stops with a message that says Chromium does not start; the unit tests of the pictures are skipped

Implemented in 4

Tested by 3