@vardot/varbase-e2e 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.playwright-mcp/console-2026-08-10T08-51-59-747Z.log +5 -0
- package/.playwright-mcp/console-2026-08-10T09-00-26-735Z.log +7 -0
- package/.playwright-mcp/console-2026-08-10T23-16-14-142Z.log +5 -0
- package/.playwright-mcp/console-2026-08-10T23-28-18-329Z.log +54 -0
- package/.playwright-mcp/console-2026-08-11T00-25-10-092Z.log +7 -0
- package/.playwright-mcp/page-2026-08-10T01-04-54-039Z.yml +410 -0
- package/.playwright-mcp/page-2026-08-10T01-05-06-967Z.png +0 -0
- package/.playwright-mcp/page-2026-08-10T01-05-52-136Z.yml +720 -0
- package/.playwright-mcp/page-2026-08-10T01-06-05-985Z.yml +410 -0
- package/.playwright-mcp/page-2026-08-10T01-06-25-942Z.yml +726 -0
- package/.playwright-mcp/page-2026-08-10T01-25-57-152Z.yml +395 -0
- package/.playwright-mcp/page-2026-08-10T01-26-48-853Z.yml +395 -0
- package/.playwright-mcp/page-2026-08-10T01-27-47-127Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-27-57-349Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-28-07-943Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-28-30-462Z.yml +369 -0
- package/.playwright-mcp/page-2026-08-10T01-29-00-369Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-29-08-988Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-29-19-888Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-29-30-189Z.yml +369 -0
- package/.playwright-mcp/page-2026-08-10T01-30-08-272Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-30-16-955Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-30-27-612Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-30-37-943Z.yml +465 -0
- package/.playwright-mcp/page-2026-08-10T01-31-15-265Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-31-24-328Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-31-36-622Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-31-45-965Z.yml +470 -0
- package/.playwright-mcp/page-2026-08-10T01-32-13-400Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-32-23-469Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-32-33-859Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-32-43-461Z.yml +513 -0
- package/.playwright-mcp/page-2026-08-10T01-33-13-160Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-33-23-937Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-33-35-367Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-33-47-266Z.yml +459 -0
- package/.playwright-mcp/page-2026-08-10T01-34-14-452Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-34-26-042Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-34-40-869Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-34-49-587Z.yml +391 -0
- package/.playwright-mcp/page-2026-08-10T01-35-16-735Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-35-24-882Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-35-36-165Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-35-45-644Z.yml +455 -0
- package/.playwright-mcp/page-2026-08-10T01-36-18-148Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-36-26-751Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-36-37-834Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-36-48-078Z.yml +370 -0
- package/.playwright-mcp/page-2026-08-10T01-37-16-309Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-37-28-723Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-37-39-325Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-37-48-278Z.yml +409 -0
- package/.playwright-mcp/page-2026-08-10T01-38-27-405Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-38-36-994Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-38-49-584Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-38-59-289Z.yml +396 -0
- package/.playwright-mcp/page-2026-08-10T01-39-24-880Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-39-35-551Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-39-47-960Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-39-56-844Z.yml +549 -0
- package/.playwright-mcp/page-2026-08-10T01-40-24-645Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-40-33-806Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-40-46-946Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-40-56-503Z.yml +443 -0
- package/.playwright-mcp/page-2026-08-10T01-41-32-064Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-41-40-666Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-41-51-325Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-41-58-790Z.yml +368 -0
- package/.playwright-mcp/page-2026-08-10T01-42-26-459Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-42-38-306Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-42-49-073Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-42-57-453Z.yml +443 -0
- package/.playwright-mcp/page-2026-08-10T01-43-32-099Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-43-42-882Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-43-54-853Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-44-04-373Z.yml +399 -0
- package/.playwright-mcp/page-2026-08-10T01-44-30-874Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-44-39-830Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-44-51-515Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-44-59-974Z.yml +503 -0
- package/.playwright-mcp/page-2026-08-10T01-45-26-748Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-45-36-685Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-45-47-715Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-45-57-895Z.yml +469 -0
- package/.playwright-mcp/page-2026-08-10T01-46-36-371Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-46-49-906Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-47-01-554Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-47-12-712Z.yml +581 -0
- package/.playwright-mcp/page-2026-08-10T01-47-39-024Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-47-49-714Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-48-00-608Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-48-09-739Z.yml +604 -0
- package/.playwright-mcp/page-2026-08-10T01-48-51-940Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-49-01-562Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-49-13-751Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-49-22-503Z.yml +400 -0
- package/.playwright-mcp/page-2026-08-10T01-49-49-311Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-50-00-769Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-50-12-083Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-50-23-765Z.yml +458 -0
- package/.playwright-mcp/page-2026-08-10T01-51-02-339Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-51-12-711Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-51-25-370Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-51-33-936Z.yml +368 -0
- package/.playwright-mcp/page-2026-08-10T01-52-09-467Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-52-21-616Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-52-32-806Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-52-42-382Z.yml +407 -0
- package/.playwright-mcp/page-2026-08-10T01-53-11-994Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-53-21-669Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-53-33-141Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-53-43-582Z.yml +443 -0
- package/.playwright-mcp/page-2026-08-10T01-54-19-884Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-54-32-359Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-54-43-530Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-54-53-891Z.yml +474 -0
- package/.playwright-mcp/page-2026-08-10T01-55-24-634Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-55-35-283Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-55-46-649Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-55-56-585Z.yml +431 -0
- package/.playwright-mcp/page-2026-08-10T01-56-31-670Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-56-40-782Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-56-52-065Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-57-03-705Z.yml +445 -0
- package/.playwright-mcp/page-2026-08-10T01-57-31-390Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-57-44-756Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-57-56-802Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-58-06-937Z.yml +468 -0
- package/.playwright-mcp/page-2026-08-10T01-58-40-595Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-58-51-715Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T01-59-04-402Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T01-59-15-638Z.yml +472 -0
- package/.playwright-mcp/page-2026-08-10T01-59-58-162Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T02-00-09-962Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T02-00-21-468Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T02-00-33-248Z.yml +451 -0
- package/.playwright-mcp/page-2026-08-10T02-01-15-418Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T02-01-27-182Z.yml +413 -0
- package/.playwright-mcp/page-2026-08-10T02-01-38-250Z.yml +425 -0
- package/.playwright-mcp/page-2026-08-10T04-20-27-979Z.yml +513 -0
- package/.playwright-mcp/page-2026-08-10T04-20-41-431Z.yml +513 -0
- package/.playwright-mcp/page-2026-08-10T04-21-46-133Z.yml +406 -0
- package/.playwright-mcp/page-2026-08-10T04-22-10-938Z.yml +406 -0
- package/.playwright-mcp/page-2026-08-10T04-23-00-626Z.yml +406 -0
- package/.playwright-mcp/page-2026-08-10T04-23-19-844Z.yml +418 -0
- package/.playwright-mcp/page-2026-08-10T04-25-00-732Z.yml +455 -0
- package/.playwright-mcp/page-2026-08-10T04-25-35-125Z.yml +412 -0
- package/.playwright-mcp/page-2026-08-10T04-25-46-640Z.yml +412 -0
- package/.playwright-mcp/page-2026-08-10T04-25-55-092Z.yml +549 -0
- package/.playwright-mcp/page-2026-08-10T04-26-26-403Z.yml +406 -0
- package/.playwright-mcp/page-2026-08-10T04-26-40-673Z.yml +406 -0
- package/.playwright-mcp/page-2026-08-10T04-26-48-427Z.yml +604 -0
- package/.playwright-mcp/page-2026-08-10T04-27-23-584Z.yml +408 -0
- package/.playwright-mcp/page-2026-08-10T04-27-34-294Z.yml +408 -0
- package/.playwright-mcp/page-2026-08-10T04-27-42-299Z.yml +443 -0
- package/.playwright-mcp/page-2026-08-10T04-28-20-032Z.yml +406 -0
- package/.playwright-mcp/page-2026-08-10T04-28-32-275Z.yml +406 -0
- package/.playwright-mcp/page-2026-08-10T04-28-41-592Z.yml +581 -0
- package/.playwright-mcp/page-2026-08-10T04-29-19-972Z.yml +414 -0
- package/.playwright-mcp/page-2026-08-10T04-29-30-961Z.yml +414 -0
- package/.playwright-mcp/page-2026-08-10T04-29-39-044Z.yml +465 -0
- package/.playwright-mcp/page-2026-08-10T04-30-13-196Z.yml +402 -0
- package/.playwright-mcp/page-2026-08-10T04-30-24-867Z.yml +402 -0
- package/.playwright-mcp/page-2026-08-10T04-30-32-372Z.yml +409 -0
- package/.playwright-mcp/page-2026-08-10T04-31-06-199Z.yml +402 -0
- package/.playwright-mcp/page-2026-08-10T04-31-17-733Z.yml +402 -0
- package/.playwright-mcp/page-2026-08-10T04-31-26-296Z.yml +445 -0
- package/.playwright-mcp/page-2026-08-10T04-32-02-456Z.yml +402 -0
- package/.playwright-mcp/page-2026-08-10T04-32-14-091Z.yml +402 -0
- package/.playwright-mcp/page-2026-08-10T04-32-23-437Z.yml +396 -0
- package/.playwright-mcp/page-2026-08-10T04-32-58-401Z.yml +403 -0
- package/.playwright-mcp/page-2026-08-10T04-33-09-818Z.yml +403 -0
- package/.playwright-mcp/page-2026-08-10T04-33-20-858Z.yml +468 -0
- package/.playwright-mcp/page-2026-08-10T04-33-53-074Z.yml +407 -0
- package/.playwright-mcp/page-2026-08-10T04-34-05-806Z.yml +407 -0
- package/.playwright-mcp/page-2026-08-10T08-52-00-165Z.yml +0 -0
- package/.playwright-mcp/page-2026-08-10T08-52-17-430Z.yml +410 -0
- package/.playwright-mcp/page-2026-08-10T23-16-15-081Z.yml +0 -0
- package/.playwright-mcp/page-2026-08-10T23-20-02-756Z.yml +414 -0
- package/.playwright-mcp/page-2026-08-10T23-55-02-223Z.yml +367 -0
- package/.playwright-mcp/page-2026-08-10T23-55-35-161Z.yml +402 -0
- package/.playwright-mcp/page-2026-08-11T00-31-06-810Z.yml +368 -0
- package/.playwright-mcp/page-2026-08-11T00-31-42-579Z.yml +400 -0
- package/.playwright-mcp/page-2026-08-11T00-37-22-611Z.yml +367 -0
- package/.playwright-mcp/page-2026-08-11T00-38-00-092Z.yml +400 -0
- package/AGENTS.md +1 -1
- package/CLAUDE.md +2 -2
- package/docs/README.md +3 -3
- package/docs/steps/README.md +2 -2
- package/docs/steps/varbase.md +6 -65
- package/package.json +1 -1
- package/tests/step-definitions/action.steps.js +12 -5
- package/tests/step-definitions/drupal-layout-builder.steps.js +36 -2
- package/tests/step-definitions/drupal-media.steps.js +23 -6
- package/tests/step-definitions/varbase.steps.js +0 -83
|
@@ -51,6 +51,28 @@ When(/^(?:I |we )*add a basic(?: "([^"]*)")? section at the end of layout$/, asy
|
|
|
51
51
|
if (!(await layoutLink.count())) throw friendly(`The "${layout}" layout option was not found in the Add section list.`);
|
|
52
52
|
await layoutLink.click();
|
|
53
53
|
await smartSettle(this.page, budget(this));
|
|
54
|
+
// On newer Bootstrap Layout Builder the layout option adds the section
|
|
55
|
+
// directly instead of opening its settings in the off-canvas. When the
|
|
56
|
+
// section settings form (container type, breakpoints, background) did not
|
|
57
|
+
// open, click the newly added (highest-delta) section's "Configure" link -
|
|
58
|
+
// a use-ajax link that opens the settings in the #drupal-off-canvas dialog,
|
|
59
|
+
// where the following section-settings steps run.
|
|
60
|
+
const hasSettingsForm = await this.page.locator('[id*="layout-container-type"]').count();
|
|
61
|
+
if (!hasSettingsForm) {
|
|
62
|
+
const links = this.page.locator('a.layout-builder__link--configure[href*="/layout_builder/configure-form/section/"]');
|
|
63
|
+
const count = await links.count();
|
|
64
|
+
let bestLink = null;
|
|
65
|
+
let bestDelta = -1;
|
|
66
|
+
for (let i = 0; i < count; i++) {
|
|
67
|
+
const href = await links.nth(i).getAttribute('href');
|
|
68
|
+
const delta = parseInt(href.split('/').pop(), 10);
|
|
69
|
+
if (delta > bestDelta) { bestDelta = delta; bestLink = links.nth(i); }
|
|
70
|
+
}
|
|
71
|
+
if (bestLink) {
|
|
72
|
+
await bestLink.click();
|
|
73
|
+
await smartSettle(this.page, budget(this));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
54
76
|
});
|
|
55
77
|
|
|
56
78
|
/**
|
|
@@ -69,8 +91,20 @@ When(/^(?:I |we )*save the section$/, async function () {
|
|
|
69
91
|
// Drupal's jQuery-bound AJAX submit handler for this button - it can leave
|
|
70
92
|
// the section silently un-added. Use a real Playwright mouse click instead,
|
|
71
93
|
// which dispatches the full native event sequence.
|
|
72
|
-
|
|
73
|
-
|
|
94
|
+
// The submit reads "Add section" on a fresh section and "Update" when the
|
|
95
|
+
// settings were opened through the section's Configure link. Match the
|
|
96
|
+
// value attribute exactly (the control is usually an <input>) or a
|
|
97
|
+
// button's exact text, preferring the off-canvas dialog - a loose /Update/
|
|
98
|
+
// match grabs invisible widget buttons ("Update widget") elsewhere.
|
|
99
|
+
const label = /^(Add section|Update)$/;
|
|
100
|
+
const pick = (scope) => this.page
|
|
101
|
+
.locator(`${scope} input[type="submit"][value="Add section"], ${scope} input[type="submit"][value="Update"]`)
|
|
102
|
+
.or(this.page.locator(`${scope} button`).filter({ hasText: label }));
|
|
103
|
+
let btn = pick('#drupal-off-canvas').first();
|
|
104
|
+
if (!(await btn.count())) {
|
|
105
|
+
btn = pick('body').first();
|
|
106
|
+
}
|
|
107
|
+
if (!(await btn.count())) throw friendly('The "Add section" / "Update" button was not found.');
|
|
74
108
|
await btn.click();
|
|
75
109
|
await smartSettle(this.page, budget(this));
|
|
76
110
|
});
|
|
@@ -55,15 +55,32 @@ When(/^(?:I |we )*open the "([^"]*)" media library$/, async function (field) {
|
|
|
55
55
|
if (!(await btn.count())) {
|
|
56
56
|
throw friendly(`No media library open button for the "${field}" field was found.`);
|
|
57
57
|
}
|
|
58
|
+
const dialog = this.page.locator('.ui-dialog .media-library-view, .media-library-widget-modal').first();
|
|
59
|
+
const open = async () => {
|
|
60
|
+
try {
|
|
61
|
+
await btn.click({ timeout: 8000 });
|
|
62
|
+
} catch (e) {
|
|
63
|
+
// A stale jQuery UI overlay (ui-widget-overlay) from a previous dialog can
|
|
64
|
+
// intercept pointer events over a correctly-resolved button. The button is
|
|
65
|
+
// right - dispatch the click in-page so Drupal's AJAX handler still fires.
|
|
66
|
+
await btn.evaluate((el) => el.click());
|
|
67
|
+
}
|
|
68
|
+
await smartSettle(this.page, budget(this));
|
|
69
|
+
};
|
|
70
|
+
await open();
|
|
71
|
+
// The dialog can be torn down by a previous dialog's late close animation
|
|
72
|
+
// (two stacked jQuery UI dialogs) - verify it is really there, and re-open
|
|
73
|
+
// once when it is not, before letting the next step run against nothing.
|
|
58
74
|
try {
|
|
59
|
-
await
|
|
75
|
+
await dialog.waitFor({ state: 'visible', timeout: 10000 });
|
|
60
76
|
} catch (e) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
77
|
+
await open();
|
|
78
|
+
try {
|
|
79
|
+
await dialog.waitFor({ state: 'visible', timeout: 10000 });
|
|
80
|
+
} catch (e2) {
|
|
81
|
+
throw friendly(`The media library dialog for "${field}" did not open.`);
|
|
82
|
+
}
|
|
65
83
|
}
|
|
66
|
-
await smartSettle(this.page, budget(this));
|
|
67
84
|
});
|
|
68
85
|
|
|
69
86
|
/**
|
|
@@ -298,89 +298,6 @@ When(/^(?:I |we )*close (?:the )?(?:accessibility |a11y )?checker$/, async funct
|
|
|
298
298
|
await smartSettle(this.page, budget(this));
|
|
299
299
|
});
|
|
300
300
|
|
|
301
|
-
/**
|
|
302
|
-
* Verify the page header is "working".
|
|
303
|
-
*
|
|
304
|
-
* On a Varbase site the Main navigation menu is rendered through the Drupal
|
|
305
|
-
* Canvas global Header region, so a working header means those primary links
|
|
306
|
-
* are present. Alter the links below to match your own site's main menu.
|
|
307
|
-
*
|
|
308
|
-
* Example: Then the page should have a working header
|
|
309
|
-
*
|
|
310
|
-
* Example #1: Then the page should have a working header
|
|
311
|
-
* Example #2: And I should have a working header
|
|
312
|
-
* Example #3: Then I should have a working header
|
|
313
|
-
* Example #4: And we should have a working header
|
|
314
|
-
* Example #5: Then the page should have a working header
|
|
315
|
-
*/
|
|
316
|
-
Then(/^(?:the page should have|(?:I |we )*should have) a working header$/, async function () {
|
|
317
|
-
// Smart-wait for the page to reach a quiet edge before reading the header.
|
|
318
|
-
await smartSettle(this.page, (this.minWaitTime && this.minWaitTime.page) || 8000);
|
|
319
|
-
|
|
320
|
-
// `banner` is the ARIA role of the site header (<header role="banner">).
|
|
321
|
-
const header = this.page.getByRole('banner').first();
|
|
322
|
-
const text = (await header.textContent().catch(() => '')) || '';
|
|
323
|
-
|
|
324
|
-
// Main navigation menu links expected in the header (one per line):
|
|
325
|
-
if (!text.includes('About Varbase')) throw friendly('Header is missing the "About Varbase" link.', 'Check the Main navigation menu in the Canvas Header region.');
|
|
326
|
-
if (!text.includes('Features')) throw friendly('Header is missing the "Features" link.', 'Check the Main navigation menu in the Canvas Header region.');
|
|
327
|
-
if (!text.includes('Blog')) throw friendly('Header is missing the "Blog" link.', 'Check the Main navigation menu in the Canvas Header region.');
|
|
328
|
-
if (!text.includes('Contact Us')) throw friendly('Header is missing the "Contact Us" link.', 'Check the Main navigation menu in the Canvas Header region.');
|
|
329
|
-
});
|
|
330
|
-
|
|
331
|
-
/**
|
|
332
|
-
* Verify the page footer is "working".
|
|
333
|
-
*
|
|
334
|
-
* On a Varbase site the Secondary, Footer and Social media menus are rendered
|
|
335
|
-
* through the Drupal Canvas global Footer region. A working footer means the
|
|
336
|
-
* footer link text is present, the social profiles are linked, and the credits
|
|
337
|
-
* and logos show. Alter the lines below to match your own site.
|
|
338
|
-
*
|
|
339
|
-
* Example: Then the page should have a working footer
|
|
340
|
-
*
|
|
341
|
-
* Example #1: Then the page should have a working footer
|
|
342
|
-
* Example #2: And I should have a working footer
|
|
343
|
-
* Example #3: Then I should have a working footer
|
|
344
|
-
* Example #4: And we should have a working footer
|
|
345
|
-
* Example #5: Then the page should have a working footer
|
|
346
|
-
*/
|
|
347
|
-
Then(/^(?:the page should have|(?:I |we )*should have) a working footer$/, async function () {
|
|
348
|
-
// Smart-wait for the page to reach a quiet edge before reading the footer.
|
|
349
|
-
await smartSettle(this.page, (this.minWaitTime && this.minWaitTime.page) || 8000);
|
|
350
|
-
|
|
351
|
-
// `contentinfo` is the ARIA role of the site footer (<footer role="contentinfo">).
|
|
352
|
-
// Scope to the role so card/section <footer> elements elsewhere are ignored.
|
|
353
|
-
const footer = this.page.getByRole('contentinfo').first();
|
|
354
|
-
const text = (await footer.textContent().catch(() => '')) || '';
|
|
355
|
-
|
|
356
|
-
// Secondary menu (Footer sitemap / Quicklinks) link text (one per line):
|
|
357
|
-
if (!text.includes('Quicklinks')) throw friendly('Footer is missing the "Quicklinks" heading.', 'Check the Secondary menu in the Canvas Footer region.');
|
|
358
|
-
if (!text.includes('Features')) throw friendly('Footer is missing the "Features" link.', 'Check the Secondary menu in the Canvas Footer region.');
|
|
359
|
-
if (!text.includes('About Varbase')) throw friendly('Footer is missing the "About Varbase" link.', 'Check the Secondary menu in the Canvas Footer region.');
|
|
360
|
-
|
|
361
|
-
// Footer menu (Support) link text (one per line):
|
|
362
|
-
if (!text.includes('Support')) throw friendly('Footer is missing the "Support" heading.', 'Check the Footer menu in the Canvas Footer region.');
|
|
363
|
-
if (!text.includes('Documentation')) throw friendly('Footer is missing the "Documentation" link.', 'Check the Footer menu in the Canvas Footer region.');
|
|
364
|
-
if (!text.includes('Get Professional Support')) throw friendly('Footer is missing the "Get Professional Support" link.', 'Check the Footer menu in the Canvas Footer region.');
|
|
365
|
-
if (!text.includes('Community Support')) throw friendly('Footer is missing the "Community Support" link.', 'Check the Footer menu in the Canvas Footer region.');
|
|
366
|
-
|
|
367
|
-
// Footer credit and legal text (one per line):
|
|
368
|
-
if (!text.includes('Enjoy the free software, or')) throw friendly('Footer is missing the "Enjoy the free software, or get a quote ..." credit.');
|
|
369
|
-
if (!text.includes('get a quote')) throw friendly('Footer is missing the "get a quote" link text.');
|
|
370
|
-
if (!text.includes('Terms and Conditions')) throw friendly('Footer is missing the "Terms and Conditions" link.');
|
|
371
|
-
if (!text.includes('Powered by')) throw friendly('Footer is missing the "Powered by" credit.');
|
|
372
|
-
|
|
373
|
-
// Social media menu profiles - full links (one per line):
|
|
374
|
-
if ((await footer.locator('a[href="https://www.linkedin.com/company/vardot"]').count()) === 0) throw friendly('Footer is missing the LinkedIn link (https://www.linkedin.com/company/vardot).', 'Check the Social media menu in the Canvas Footer region.');
|
|
375
|
-
if ((await footer.locator('a[href="https://www.facebook.com/vardotters/"]').count()) === 0) throw friendly('Footer is missing the Facebook link (https://www.facebook.com/vardotters/).', 'Check the Social media menu in the Canvas Footer region.');
|
|
376
|
-
if ((await footer.locator('a[href="https://www.instagram.com/vardotters/"]').count()) === 0) throw friendly('Footer is missing the Instagram link (https://www.instagram.com/vardotters/).', 'Check the Social media menu in the Canvas Footer region.');
|
|
377
|
-
if ((await footer.locator('a[href="https://x.com/Vardot"]').count()) === 0) throw friendly('Footer is missing the X link (https://x.com/Vardot).', 'Check the Social media menu in the Canvas Footer region.');
|
|
378
|
-
|
|
379
|
-
// Footer logos (one per line):
|
|
380
|
-
if ((await footer.locator('img[alt="Varbase logo"]').count()) === 0) throw friendly('Footer is missing the Varbase logo.');
|
|
381
|
-
if ((await footer.locator('img[alt="Vardot"]').count()) === 0) throw friendly('Footer is missing the Vardot logo next to "Powered by".');
|
|
382
|
-
});
|
|
383
|
-
|
|
384
301
|
/**
|
|
385
302
|
* Press a responsive-preview device button (Drupal core Responsive preview).
|
|
386
303
|
*
|