@vardot/varbase-e2e 2.0.0
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/AGENTS.md +148 -0
- package/CLAUDE.md +544 -0
- package/README.md +22 -0
- package/bin/generate-reports.js +363 -0
- package/bin/init-varbase-e2e.js +330 -0
- package/bin/postinstall.js +26 -0
- package/cucumber.js +125 -0
- package/docs/00-quick-start.md +102 -0
- package/docs/01-getting-started.md +102 -0
- package/docs/02-bbr-smart-waits.md +77 -0
- package/docs/03-selector-registry.md +95 -0
- package/docs/04-step-reference.md +801 -0
- package/docs/05-web-first-assertions.md +91 -0
- package/docs/06-network-and-dialogs.md +83 -0
- package/docs/07-auth-state.md +75 -0
- package/docs/08-clock-mocking.md +59 -0
- package/docs/09-api-testing.md +114 -0
- package/docs/10-accessibility.md +167 -0
- package/docs/11-debugging.md +129 -0
- package/docs/12-ai-agent-guide.md +338 -0
- package/docs/13-faq.md +236 -0
- package/docs/14-recipes-cookbook.md +255 -0
- package/docs/15-tag-conventions.md +76 -0
- package/docs/16-ci-cd.md +90 -0
- package/docs/README.md +125 -0
- package/docs/advanced-screenshots/then-i-save-fullscreen-screenshot.md +36 -0
- package/docs/advanced-screenshots/then-i-save-width-x-height-screenshot.md +34 -0
- package/docs/advanced-screenshots/when-i-save-screenshot-name-filename.md +45 -0
- package/docs/advanced-screenshots.md +52 -0
- package/docs/advanced-selectors.md +18 -0
- package/docs/api-step-definitions.md +45 -0
- package/docs/global-settings.md +267 -0
- package/docs/install-varbase-e2e/ddev-varbase-e2e.md +52 -0
- package/docs/install-varbase-e2e.md +34 -0
- package/docs/overview.md +40 -0
- package/docs/step-definitions/given-i-am-anonymous-user.md +67 -0
- package/docs/step-definitions/given-i-am-homepage.md +68 -0
- package/docs/step-definitions/given-i-am-specific-page.md +72 -0
- package/docs/step-definitions/then-i-should-be.md +56 -0
- package/docs/step-definitions/then-i-should-see.md +62 -0
- package/docs/step-definitions/then-item-checkbox.md +54 -0
- package/docs/step-definitions/then-item-link-should-contain-url.md +84 -0
- package/docs/step-definitions/then-item-should-contain.md +67 -0
- package/docs/step-definitions/then-radio-button-value-should-be-selected.md +68 -0
- package/docs/step-definitions/then-response-status-code-should-be-number.md +69 -0
- package/docs/step-definitions/then-value-radio-button-selected.md +62 -0
- package/docs/step-definitions/when-i-attach-file-file-name-element.md +71 -0
- package/docs/step-definitions/when-i-check-checkbox.md +60 -0
- package/docs/step-definitions/when-i-click-link.md +51 -0
- package/docs/step-definitions/when-i-click-operation-text-row.md +71 -0
- package/docs/step-definitions/when-i-fill.md +59 -0
- package/docs/step-definitions/when-i-go-homepage.md +60 -0
- package/docs/step-definitions/when-i-go-specific-page.md +67 -0
- package/docs/step-definitions/when-i-move-backward-one-page.md +49 -0
- package/docs/step-definitions/when-i-move-forward-one-page.md +58 -0
- package/docs/step-definitions/when-i-press-button.md +58 -0
- package/docs/step-definitions/when-i-reload-page.md +51 -0
- package/docs/step-definitions/when-i-scroll.md +73 -0
- package/docs/step-definitions/when-i-select-option-select-list.md +53 -0
- package/docs/step-definitions/when-i-select-radio-button-value.md +62 -0
- package/docs/step-definitions/when-i-uncheck-checkbox.md +57 -0
- package/docs/step-definitions/when-i-wait-ajax-finish.md +64 -0
- package/docs/step-definitions/when-i-wait.md +62 -0
- package/docs/step-definitions.md +82 -0
- package/docs/steps/README.md +137 -0
- package/docs/steps/a11y.md +731 -0
- package/docs/steps/action.md +181 -0
- package/docs/steps/api.md +679 -0
- package/docs/steps/assertion.md +328 -0
- package/docs/steps/auth.md +108 -0
- package/docs/steps/clock.md +171 -0
- package/docs/steps/cookie.md +293 -0
- package/docs/steps/debug.md +52 -0
- package/docs/steps/dialog.md +226 -0
- package/docs/steps/drupal-canvas.md +414 -0
- package/docs/steps/drupal-ckeditor.md +118 -0
- package/docs/steps/drupal-core.md +688 -0
- package/docs/steps/drupal-layout-builder.md +437 -0
- package/docs/steps/drupal-media.md +107 -0
- package/docs/steps/drupal-moderation.md +81 -0
- package/docs/steps/drupal-paragraphs.md +36 -0
- package/docs/steps/element.md +455 -0
- package/docs/steps/field.md +648 -0
- package/docs/steps/file-download.md +235 -0
- package/docs/steps/form.md +344 -0
- package/docs/steps/iframe.md +248 -0
- package/docs/steps/input.md +220 -0
- package/docs/steps/javascript.md +111 -0
- package/docs/steps/keyboard.md +107 -0
- package/docs/steps/link.md +217 -0
- package/docs/steps/metatag.md +99 -0
- package/docs/steps/modal.md +232 -0
- package/docs/steps/navigation.md +275 -0
- package/docs/steps/network.md +284 -0
- package/docs/steps/path.md +203 -0
- package/docs/steps/response.md +102 -0
- package/docs/steps/responsive.md +139 -0
- package/docs/steps/rest.md +140 -0
- package/docs/steps/screenshot.md +211 -0
- package/docs/steps/scroll.md +266 -0
- package/docs/steps/selectors.md +848 -0
- package/docs/steps/storage.md +254 -0
- package/docs/steps/table.md +216 -0
- package/docs/steps/varbase.md +391 -0
- package/docs/steps/video.md +111 -0
- package/docs/steps/wait.md +553 -0
- package/docs/steps/web-first.md +289 -0
- package/docs/steps/xml.md +505 -0
- package/docs/steps/yaml.md +951 -0
- package/examples/a11y.html +31 -0
- package/examples/about-us.html +11 -0
- package/examples/account.html +32 -0
- package/examples/ajax-wait-examples.html +147 -0
- package/examples/contact-us.html +10 -0
- package/examples/cookies.html +10 -0
- package/examples/date.html +12 -0
- package/examples/dynamic-examples.html +498 -0
- package/examples/element.html +11 -0
- package/examples/example-api.json +28 -0
- package/examples/existing-page.html +11 -0
- package/examples/field.html +24 -0
- package/examples/index.html +37 -0
- package/examples/keyboard.html +11 -0
- package/examples/links.html +9 -0
- package/examples/modal.html +14 -0
- package/examples/path.html +3 -0
- package/examples/table.html +13 -0
- package/examples/test--modal-dialogs.html +252 -0
- package/examples/test--then--i-should--not--see-text-in-element.html +48 -0
- package/examples/test--then--i-should--see-text-in-element.html +48 -0
- package/examples/test--then--i-should--see-text-matching-pattern.html +31 -0
- package/examples/test--then--i-should-see-text-in-table-row.html +232 -0
- package/examples/test--then--the-checkbox-checked.html +68 -0
- package/examples/test--then--the-element-should_not-contain-cssproperty.html +47 -0
- package/examples/test--then--the-link-should-contain.html +21 -0
- package/examples/test--when--i-additionally-select.html +27 -0
- package/examples/test--when--i-attach-file-to-feild.html +50 -0
- package/examples/test--when--i-check-uncheck-checkbox.html +47 -0
- package/examples/test--when--i-click-link.html +18 -0
- package/examples/test--when--i-click-text-in-table-row.html +178 -0
- package/examples/test--when--i-fill-in.html +48 -0
- package/examples/test--when--i-press-button.html +31 -0
- package/examples/test--when--i-reload-page.html +27 -0
- package/examples/test--when--i-scroll-functionality.html +177 -0
- package/examples/test--when--i-scroll-left-right-functionality.html +149 -0
- package/examples/test--when--i-select-option-from-dropdownlist.html +35 -0
- package/examples/test--when--i-select-radio-button.html +95 -0
- package/examples/test--when-i-wait-max-of-time.html +39 -0
- package/examples/test--when-i-wait-page-until-is-loaded.html +47 -0
- package/examples/test--when-i-wait-specific-time.html +39 -0
- package/examples/test-acceptable-url-path.html +11 -0
- package/examples/video-demo.html +43 -0
- package/package.json +56 -0
- package/playwright.config.ts +39 -0
- package/tests/assets/test-document.pdf +14 -0
- package/tests/assets/vardot.png +0 -0
- package/tests/features/a11y.feature +39 -0
- package/tests/features/ajax-wait-examples.feature +24 -0
- package/tests/features/api-step-definitions-individual.feature +185 -0
- package/tests/features/complete-api-testing-examples.feature +205 -0
- package/tests/features/cookie.feature +13 -0
- package/tests/features/date.feature +11 -0
- package/tests/features/dynamic-content-examples.feature +156 -0
- package/tests/features/element.feature +16 -0
- package/tests/features/field.feature +25 -0
- package/tests/features/keyboard.feature +10 -0
- package/tests/features/link.feature +11 -0
- package/tests/features/modal-advanced-example.feature +54 -0
- package/tests/features/modal-basic-example.feature +42 -0
- package/tests/features/modal-error-handling-example.feature +37 -0
- package/tests/features/modal.feature +11 -0
- package/tests/features/path.feature +16 -0
- package/tests/features/response.feature +8 -0
- package/tests/features/responsive.feature +10 -0
- package/tests/features/table.feature +18 -0
- package/tests/features/test--given--i-am-an-anonymous-user.feature +10 -0
- package/tests/features/test--given--i-am-on-homepage.feature +16 -0
- package/tests/features/test--then--i-save-screenshot.feature +33 -0
- package/tests/features/test--then--i-see-locator.feature +320 -0
- package/tests/features/test--then--i-should--not--see-text-in-element.feature +13 -0
- package/tests/features/test--then--i-should--see-text-in-element-by-attr.feature +10 -0
- package/tests/features/test--then--i-should--see-text-in-element.feature +10 -0
- package/tests/features/test--then--i-should--see-text-matching-pattern-in-element.feature +13 -0
- package/tests/features/test--then--i-should--see-text-matching-pattern.feature +18 -0
- package/tests/features/test--then--i-should-be-on-page.feature +10 -0
- package/tests/features/test--then--i-should-be-on-the-homepage.feature +10 -0
- package/tests/features/test--then--i-should-not-see-an-element-by-attr.feature +8 -0
- package/tests/features/test--then--i-should-not-see-an-element.feature +8 -0
- package/tests/features/test--then--i-should-see-an-element-by-attr.feature +8 -0
- package/tests/features/test--then--i-should-see-an-element.feature +8 -0
- package/tests/features/test--then--i-should-see-n-elements.feature +24 -0
- package/tests/features/test--then--i-should-see-text-in-table-row.feature +96 -0
- package/tests/features/test--then--print-current-url-and-response.feature +21 -0
- package/tests/features/test--then--the-checkbox-is-checked.feature +18 -0
- package/tests/features/test--then--the-checkbox-should-be-checked.feature +16 -0
- package/tests/features/test--then--the-element-should-contain-cssproperty.feature +9 -0
- package/tests/features/test--then--the-element-should-not-contain-cssproperty.feature +10 -0
- package/tests/features/test--then--the-field-should-contain-value.feature +11 -0
- package/tests/features/test--then--the-response-should-contain.feature +11 -0
- package/tests/features/test--then--the-response-status-code-should-be.feature +31 -0
- package/tests/features/test--then--the-url-should-match.feature +7 -0
- package/tests/features/test--then-the-link-should-contain-by-attribute.feature +18 -0
- package/tests/features/test--then-the-link-should-contain.feature +7 -0
- package/tests/features/test--when--i-additionally-select.feature +30 -0
- package/tests/features/test--when--i-attach-file-to-feild.feature +9 -0
- package/tests/features/test--when--i-check-checkbox.feature +21 -0
- package/tests/features/test--when--i-click-link-by-attribute.feature +21 -0
- package/tests/features/test--when--i-click-link.feature +9 -0
- package/tests/features/test--when--i-click-text-in-table-row.feature +37 -0
- package/tests/features/test--when--i-fill-in-by-attr.feature +31 -0
- package/tests/features/test--when--i-fill-in-table-by-attr.feature +19 -0
- package/tests/features/test--when--i-fill-in.feature +32 -0
- package/tests/features/test--when--i-follow.feature +22 -0
- package/tests/features/test--when--i-go-to-homepage.feature +9 -0
- package/tests/features/test--when--i-move-forward-backward-one-page.feature +14 -0
- package/tests/features/test--when--i-press-button-by-attribute.feature +18 -0
- package/tests/features/test--when--i-press-button.feature +13 -0
- package/tests/features/test--when--i-reload-page.feature +11 -0
- package/tests/features/test--when--i-scroll-left-right.feature +48 -0
- package/tests/features/test--when--i-scroll.feature +48 -0
- package/tests/features/test--when--i-select-option-from-dropdownlist.feature +21 -0
- package/tests/features/test--when--i-select-radio-button.feature +37 -0
- package/tests/features/test--when--i-wait-page-is-loaded.feature +8 -0
- package/tests/features/test--when--i-wait-time.feature +21 -0
- package/tests/features/video.feature +18 -0
- package/tests/features/wait.feature +7 -0
- package/tests/features/yaml.feature +102 -0
- package/tests/selectors/_canonical-keys.json +113 -0
- package/tests/selectors/back-end-selectors.json +19 -0
- package/tests/selectors/cms-contentful-admin.json +35 -0
- package/tests/selectors/cms-craft-admin.json +39 -0
- package/tests/selectors/cms-drupal-cms-gin.json +56 -0
- package/tests/selectors/cms-drupal-core-claro.json +50 -0
- package/tests/selectors/cms-generic-admin.json +34 -0
- package/tests/selectors/cms-ghost-admin.json +34 -0
- package/tests/selectors/cms-joomla-admin.json +41 -0
- package/tests/selectors/cms-magento2-admin.json +32 -0
- package/tests/selectors/cms-prestashop-admin.json +38 -0
- package/tests/selectors/cms-shopify-admin.json +25 -0
- package/tests/selectors/cms-strapi-admin.json +42 -0
- package/tests/selectors/cms-typo3-admin.json +41 -0
- package/tests/selectors/cms-woocommerce-front.json +50 -0
- package/tests/selectors/cms-wordpress-admin.json +31 -0
- package/tests/selectors/framework-ant-design.json +80 -0
- package/tests/selectors/framework-bootstrap.json +86 -0
- package/tests/selectors/framework-bulma.json +74 -0
- package/tests/selectors/framework-chakra.json +58 -0
- package/tests/selectors/framework-foundation.json +51 -0
- package/tests/selectors/framework-material-ui.json +72 -0
- package/tests/selectors/framework-shadcn.json +51 -0
- package/tests/selectors/framework-tailwind.json +40 -0
- package/tests/selectors/framework-vuetify.json +61 -0
- package/tests/selectors/front-end-selectors.json +16 -0
- package/tests/selectors/homepage-selectors.json +13 -0
- package/tests/step-definitions/a11y.steps.js +800 -0
- package/tests/step-definitions/action.steps.js +167 -0
- package/tests/step-definitions/api.steps.js +732 -0
- package/tests/step-definitions/assertion.steps.js +352 -0
- package/tests/step-definitions/auth.steps.js +126 -0
- package/tests/step-definitions/clock.steps.js +128 -0
- package/tests/step-definitions/cookie.steps.js +216 -0
- package/tests/step-definitions/debug.steps.js +39 -0
- package/tests/step-definitions/dialog.steps.js +193 -0
- package/tests/step-definitions/drupal-canvas.steps.js +764 -0
- package/tests/step-definitions/drupal-ckeditor.steps.js +108 -0
- package/tests/step-definitions/drupal-core.steps.js +665 -0
- package/tests/step-definitions/drupal-helpers.js +371 -0
- package/tests/step-definitions/drupal-layout-builder.steps.js +466 -0
- package/tests/step-definitions/drupal-media.steps.js +99 -0
- package/tests/step-definitions/drupal-moderation.steps.js +71 -0
- package/tests/step-definitions/drupal-paragraphs.steps.js +50 -0
- package/tests/step-definitions/element.steps.js +356 -0
- package/tests/step-definitions/field.steps.js +653 -0
- package/tests/step-definitions/file-download.steps.js +211 -0
- package/tests/step-definitions/form.steps.js +333 -0
- package/tests/step-definitions/iframe.steps.js +228 -0
- package/tests/step-definitions/input.steps.js +202 -0
- package/tests/step-definitions/javascript.steps.js +232 -0
- package/tests/step-definitions/keyboard.steps.js +112 -0
- package/tests/step-definitions/link.steps.js +142 -0
- package/tests/step-definitions/metatag.steps.js +91 -0
- package/tests/step-definitions/modal.steps.js +244 -0
- package/tests/step-definitions/navigation.steps.js +218 -0
- package/tests/step-definitions/network.steps.js +280 -0
- package/tests/step-definitions/path.steps.js +141 -0
- package/tests/step-definitions/response.steps.js +98 -0
- package/tests/step-definitions/responsive.steps.js +125 -0
- package/tests/step-definitions/rest.steps.js +111 -0
- package/tests/step-definitions/screenshot.steps.js +423 -0
- package/tests/step-definitions/scroll.steps.js +189 -0
- package/tests/step-definitions/selectors.steps.js +1003 -0
- package/tests/step-definitions/storage.steps.js +194 -0
- package/tests/step-definitions/table.steps.js +181 -0
- package/tests/step-definitions/varbase-e2e.js +897 -0
- package/tests/step-definitions/varbase.steps.js +458 -0
- package/tests/step-definitions/video.steps.js +178 -0
- package/tests/step-definitions/wait.steps.js +400 -0
- package/tests/step-definitions/web-first.steps.js +298 -0
- package/tests/step-definitions/xml.steps.js +411 -0
- package/tests/step-definitions/yaml.steps.js +913 -0
- package/tsconfig.json +26 -0
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Dynamic Content Examples - Varbase E2E Testing</title>
|
|
7
|
+
<style>
|
|
8
|
+
body {
|
|
9
|
+
font-family: Arial, sans-serif;
|
|
10
|
+
max-width: 1200px;
|
|
11
|
+
margin: 0 auto;
|
|
12
|
+
padding: 20px;
|
|
13
|
+
background: #f5f5f5;
|
|
14
|
+
}
|
|
15
|
+
.example-section {
|
|
16
|
+
background: white;
|
|
17
|
+
padding: 20px;
|
|
18
|
+
margin: 20px 0;
|
|
19
|
+
border-radius: 8px;
|
|
20
|
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
21
|
+
}
|
|
22
|
+
button {
|
|
23
|
+
background: #007bff;
|
|
24
|
+
color: white;
|
|
25
|
+
border: none;
|
|
26
|
+
padding: 10px 20px;
|
|
27
|
+
border-radius: 4px;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
margin: 5px;
|
|
30
|
+
}
|
|
31
|
+
button:hover {
|
|
32
|
+
background: #0056b3;
|
|
33
|
+
}
|
|
34
|
+
input, select {
|
|
35
|
+
padding: 8px;
|
|
36
|
+
margin: 5px;
|
|
37
|
+
border: 1px solid #ddd;
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
}
|
|
40
|
+
table {
|
|
41
|
+
width: 100%;
|
|
42
|
+
border-collapse: collapse;
|
|
43
|
+
margin: 10px 0;
|
|
44
|
+
}
|
|
45
|
+
th, td {
|
|
46
|
+
border: 1px solid #ddd;
|
|
47
|
+
padding: 10px;
|
|
48
|
+
text-align: left;
|
|
49
|
+
}
|
|
50
|
+
th {
|
|
51
|
+
background: #f8f9fa;
|
|
52
|
+
}
|
|
53
|
+
.hidden {
|
|
54
|
+
display: none;
|
|
55
|
+
}
|
|
56
|
+
.modal {
|
|
57
|
+
position: fixed;
|
|
58
|
+
top: 50%;
|
|
59
|
+
left: 50%;
|
|
60
|
+
transform: translate(-50%, -50%);
|
|
61
|
+
background: white;
|
|
62
|
+
padding: 30px;
|
|
63
|
+
border-radius: 8px;
|
|
64
|
+
box-shadow: 0 4px 20px rgba(0,0,0,0.3);
|
|
65
|
+
z-index: 1000;
|
|
66
|
+
}
|
|
67
|
+
.overlay {
|
|
68
|
+
position: fixed;
|
|
69
|
+
top: 0;
|
|
70
|
+
left: 0;
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
|
+
background: rgba(0,0,0,0.5);
|
|
74
|
+
z-index: 999;
|
|
75
|
+
}
|
|
76
|
+
.success-message {
|
|
77
|
+
color: green;
|
|
78
|
+
padding: 10px;
|
|
79
|
+
margin: 10px 0;
|
|
80
|
+
background: #d4edda;
|
|
81
|
+
border-radius: 4px;
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
84
|
+
</head>
|
|
85
|
+
<body>
|
|
86
|
+
<h1>Dynamic Content Testing Examples</h1>
|
|
87
|
+
<p>This page demonstrates various dynamic content scenarios for automated testing.</p>
|
|
88
|
+
|
|
89
|
+
<!-- Example 1: Dynamically loaded button -->
|
|
90
|
+
<div class="example-section">
|
|
91
|
+
<h2>Example 1: Dynamically Loaded Button</h2>
|
|
92
|
+
<div id="dynamic-button-container"></div>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<!-- Example 2: Dynamic form fields -->
|
|
96
|
+
<div class="example-section">
|
|
97
|
+
<h2>Example 2: Dynamic Registration Form</h2>
|
|
98
|
+
<button onclick="showRegistrationForm()">Show Registration Form</button>
|
|
99
|
+
<div id="registration-form-container"></div>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<!-- Example 3: Dynamic dropdown options -->
|
|
103
|
+
<div class="example-section">
|
|
104
|
+
<h2>Example 3: Dynamic Dropdown</h2>
|
|
105
|
+
<button onclick="loadCountries()">Load Countries</button>
|
|
106
|
+
<div id="country-dropdown-container"></div>
|
|
107
|
+
<div id="country-selection"></div>
|
|
108
|
+
</div>
|
|
109
|
+
|
|
110
|
+
<!-- Example 4: Dynamic table rows -->
|
|
111
|
+
<div class="example-section">
|
|
112
|
+
<h2>Example 4: Dynamic Table</h2>
|
|
113
|
+
<button onclick="loadUsersTable()">Load Users Table</button>
|
|
114
|
+
<div id="users-table-container"></div>
|
|
115
|
+
<div id="edit-message"></div>
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
<!-- Example 5: Dynamic checkboxes -->
|
|
119
|
+
<div class="example-section">
|
|
120
|
+
<h2>Example 5: Dynamic Checkboxes</h2>
|
|
121
|
+
<button onclick="showPreferences()">Show Preferences</button>
|
|
122
|
+
<div id="preferences-container"></div>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<!-- Example 6: Dynamic file upload -->
|
|
126
|
+
<div class="example-section">
|
|
127
|
+
<h2>Example 6: Dynamic File Upload</h2>
|
|
128
|
+
<button onclick="enableFileUpload()">Enable File Upload</button>
|
|
129
|
+
<div id="file-upload-container"></div>
|
|
130
|
+
<div id="file-message"></div>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<!-- Example 7: Dynamic scrollable content -->
|
|
134
|
+
<div class="example-section">
|
|
135
|
+
<h2>Example 7: Dynamic Scrollable Content</h2>
|
|
136
|
+
<button onclick="loadMoreContent()">Load More Content</button>
|
|
137
|
+
<div id="content-container" style="height: 300px; overflow-y: scroll; border: 1px solid #ddd; padding: 10px;"></div>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
<!-- Example 8: Temporary elements -->
|
|
141
|
+
<div class="example-section">
|
|
142
|
+
<h2>Example 8: Temporary Element</h2>
|
|
143
|
+
<button onclick="showTemporaryButton()">Show Temporary Button</button>
|
|
144
|
+
<button onclick="removeButton()">Remove Button</button>
|
|
145
|
+
<div id="temp-button-container"></div>
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
<!-- Example 9: SPA Navigation -->
|
|
149
|
+
<div class="example-section">
|
|
150
|
+
<h2>Example 9: SPA Navigation</h2>
|
|
151
|
+
<button data-page="products" onclick="navigateTo('products')">Products</button>
|
|
152
|
+
<button data-page="cart" onclick="navigateTo('cart')">Cart</button>
|
|
153
|
+
<div id="spa-content"></div>
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
<!-- Example 10: Batch form filling -->
|
|
157
|
+
<div class="example-section">
|
|
158
|
+
<h2>Example 10: Dynamic Contact Form</h2>
|
|
159
|
+
<button onclick="showContactForm()">Show Contact Form</button>
|
|
160
|
+
<div id="contact-form-container"></div>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
<!-- Example 11: AJAX Search -->
|
|
164
|
+
<div class="example-section">
|
|
165
|
+
<h2>Example 11: AJAX Search</h2>
|
|
166
|
+
<input type="text" id="search-input" placeholder="Enter search term">
|
|
167
|
+
<button onclick="performSearch()">Search</button>
|
|
168
|
+
<div id="search-results-container"></div>
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
<!-- Example 13: Infinite Scroll -->
|
|
172
|
+
<div class="example-section">
|
|
173
|
+
<h2>Example 13: Infinite Scroll</h2>
|
|
174
|
+
<div id="infinite-scroll-container" style="height: 400px; overflow-y: scroll; border: 1px solid #ddd; padding: 10px;">
|
|
175
|
+
<div id="items-list"></div>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
|
|
179
|
+
<!-- Example 14: React-like component -->
|
|
180
|
+
<div class="example-section">
|
|
181
|
+
<h2>Example 14: Component Rendering</h2>
|
|
182
|
+
<button onclick="initializeApp()">Initialize App</button>
|
|
183
|
+
<div id="react-app-container"></div>
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
<!-- Example 15: Conditional rendering -->
|
|
187
|
+
<div class="example-section">
|
|
188
|
+
<h2>Example 15: Conditional Form Fields</h2>
|
|
189
|
+
<label>Account Type:</label>
|
|
190
|
+
<select id="account-type" onchange="handleAccountTypeChange(this.value)">
|
|
191
|
+
<option value="">Select...</option>
|
|
192
|
+
<option value="personal">Personal</option>
|
|
193
|
+
<option value="Business">Business</option>
|
|
194
|
+
</select>
|
|
195
|
+
<div id="conditional-fields-container"></div>
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
<script>
|
|
199
|
+
// Example 1: Load button after 1 second
|
|
200
|
+
setTimeout(() => {
|
|
201
|
+
document.getElementById('dynamic-button-container').innerHTML = `
|
|
202
|
+
<p>Dynamic Content Loaded</p>
|
|
203
|
+
<button value="Submit Form" onclick="submitForm()">Submit Form</button>
|
|
204
|
+
`;
|
|
205
|
+
}, 1000);
|
|
206
|
+
|
|
207
|
+
function submitForm() {
|
|
208
|
+
alert('Form submitted successfully');
|
|
209
|
+
document.getElementById('dynamic-button-container').innerHTML += '<div class="success-message">Form submitted successfully</div>';
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Example 2: Show registration form
|
|
213
|
+
function showRegistrationForm() {
|
|
214
|
+
setTimeout(() => {
|
|
215
|
+
document.getElementById('registration-form-container').innerHTML = `
|
|
216
|
+
<form id="registration-form">
|
|
217
|
+
<input type="email" id="email" placeholder="Email" required><br>
|
|
218
|
+
<input type="text" id="fullname" placeholder="Full Name" required><br>
|
|
219
|
+
<input type="password" id="password" placeholder="Password" required><br>
|
|
220
|
+
<button type="button" value="Register" onclick="register()">Register</button>
|
|
221
|
+
</form>
|
|
222
|
+
`;
|
|
223
|
+
}, 500);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
function register() {
|
|
227
|
+
document.getElementById('registration-form-container').innerHTML += '<div class="success-message">Registration successful</div>';
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Example 3: Load countries dropdown
|
|
231
|
+
function loadCountries() {
|
|
232
|
+
setTimeout(() => {
|
|
233
|
+
document.getElementById('country-dropdown-container').innerHTML = `
|
|
234
|
+
<select name="country" id="country" onchange="selectCountry(this.value)">
|
|
235
|
+
<option value="">Select Country</option>
|
|
236
|
+
<option value="United States">United States</option>
|
|
237
|
+
<option value="Canada">Canada</option>
|
|
238
|
+
<option value="United Kingdom">United Kingdom</option>
|
|
239
|
+
</select>
|
|
240
|
+
`;
|
|
241
|
+
}, 1000);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
function selectCountry(country) {
|
|
245
|
+
document.getElementById('country-selection').innerHTML = `<p>You selected: ${country}</p>`;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Example 4: Load users table
|
|
249
|
+
function loadUsersTable() {
|
|
250
|
+
setTimeout(() => {
|
|
251
|
+
document.getElementById('users-table-container').innerHTML = `
|
|
252
|
+
<table>
|
|
253
|
+
<tr>
|
|
254
|
+
<th>Name</th>
|
|
255
|
+
<th>Email</th>
|
|
256
|
+
<th>Actions</th>
|
|
257
|
+
</tr>
|
|
258
|
+
<tr>
|
|
259
|
+
<td>John Smith</td>
|
|
260
|
+
<td>john@example.com</td>
|
|
261
|
+
<td><button onclick="editUser('john@example.com')">Edit</button></td>
|
|
262
|
+
</tr>
|
|
263
|
+
<tr>
|
|
264
|
+
<td>Jane Doe</td>
|
|
265
|
+
<td>jane@example.com</td>
|
|
266
|
+
<td><button onclick="editUser('jane@example.com')">Edit</button></td>
|
|
267
|
+
</tr>
|
|
268
|
+
</table>
|
|
269
|
+
`;
|
|
270
|
+
}, 1000);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
function editUser(email) {
|
|
274
|
+
document.getElementById('edit-message').innerHTML = `<p>Editing user: ${email}</p>`;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// Example 5: Show preferences
|
|
278
|
+
function showPreferences() {
|
|
279
|
+
setTimeout(() => {
|
|
280
|
+
document.getElementById('preferences-container').innerHTML = `
|
|
281
|
+
<label><input type="checkbox" id="newsletter"> Newsletter</label><br>
|
|
282
|
+
<label><input type="checkbox" id="notifications"> Notifications</label>
|
|
283
|
+
`;
|
|
284
|
+
}, 500);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// Example 6: Enable file upload
|
|
288
|
+
function enableFileUpload() {
|
|
289
|
+
setTimeout(() => {
|
|
290
|
+
document.getElementById('file-upload-container').innerHTML = `
|
|
291
|
+
<input type="file" id="file-upload" onchange="handleFileSelect(this)">
|
|
292
|
+
`;
|
|
293
|
+
}, 500);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
function handleFileSelect(input) {
|
|
297
|
+
if (input.files.length > 0) {
|
|
298
|
+
document.getElementById('file-message').innerHTML = `<p>File selected: ${input.files[0].name}</p>`;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// Example 7: Load more content
|
|
303
|
+
function loadMoreContent() {
|
|
304
|
+
setTimeout(() => {
|
|
305
|
+
let content = '<div style="padding: 20px;">';
|
|
306
|
+
for (let i = 1; i <= 20; i++) {
|
|
307
|
+
content += `<p>Dynamic content item ${i}</p>`;
|
|
308
|
+
}
|
|
309
|
+
content += '<p><strong>End of dynamic content</strong></p></div>';
|
|
310
|
+
document.getElementById('content-container').innerHTML = content;
|
|
311
|
+
}, 1000);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// Example 8: Temporary button
|
|
315
|
+
function showTemporaryButton() {
|
|
316
|
+
setTimeout(() => {
|
|
317
|
+
document.getElementById('temp-button-container').innerHTML = `
|
|
318
|
+
<button id="temp-action">Temporary Action</button>
|
|
319
|
+
`;
|
|
320
|
+
}, 500);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
function removeButton() {
|
|
324
|
+
setTimeout(() => {
|
|
325
|
+
document.getElementById('temp-button-container').innerHTML = '';
|
|
326
|
+
}, 500);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// Example 9: SPA Navigation
|
|
330
|
+
function navigateTo(page) {
|
|
331
|
+
setTimeout(() => {
|
|
332
|
+
if (page === 'products') {
|
|
333
|
+
document.getElementById('spa-content').innerHTML = `
|
|
334
|
+
<h3>Product Catalog</h3>
|
|
335
|
+
<table>
|
|
336
|
+
<tr>
|
|
337
|
+
<th>Product</th>
|
|
338
|
+
<th>Price</th>
|
|
339
|
+
<th>Actions</th>
|
|
340
|
+
</tr>
|
|
341
|
+
<tr>
|
|
342
|
+
<td>Laptop Pro 15</td>
|
|
343
|
+
<td>$1,299</td>
|
|
344
|
+
<td><button onclick="addToCart('Laptop Pro 15')">Add to Cart</button></td>
|
|
345
|
+
</tr>
|
|
346
|
+
</table>
|
|
347
|
+
`;
|
|
348
|
+
}
|
|
349
|
+
}, 500);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
function addToCart(product) {
|
|
353
|
+
alert('Item added to cart');
|
|
354
|
+
document.getElementById('spa-content').innerHTML += '<div class="success-message">Item added to cart</div>';
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// Example 10: Contact form
|
|
358
|
+
function showContactForm() {
|
|
359
|
+
setTimeout(() => {
|
|
360
|
+
document.getElementById('contact-form-container').innerHTML = `
|
|
361
|
+
<form>
|
|
362
|
+
<input type="text" id="contact-name" placeholder="Name"><br>
|
|
363
|
+
<input type="email" id="contact-email" placeholder="Email"><br>
|
|
364
|
+
<input type="tel" id="contact-phone" placeholder="Phone"><br>
|
|
365
|
+
<textarea id="contact-message" placeholder="Message"></textarea><br>
|
|
366
|
+
<button type="button" value="Send Message" onclick="sendMessage()">Send Message</button>
|
|
367
|
+
</form>
|
|
368
|
+
`;
|
|
369
|
+
}, 1000);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
function sendMessage() {
|
|
373
|
+
document.getElementById('contact-form-container').innerHTML += '<div class="success-message">Message sent successfully</div>';
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// Example 11: AJAX Search
|
|
377
|
+
function performSearch() {
|
|
378
|
+
const query = document.getElementById('search-input').value;
|
|
379
|
+
document.getElementById('search-results-container').innerHTML = '<p>Loading...</p>';
|
|
380
|
+
|
|
381
|
+
setTimeout(() => {
|
|
382
|
+
document.getElementById('search-results-container').innerHTML = `
|
|
383
|
+
<h3>Search Results</h3>
|
|
384
|
+
<table>
|
|
385
|
+
<tr>
|
|
386
|
+
<th>Product</th>
|
|
387
|
+
<th>Actions</th>
|
|
388
|
+
</tr>
|
|
389
|
+
<tr>
|
|
390
|
+
<td>Laptop Pro 15</td>
|
|
391
|
+
<td><button onclick="viewDetails('Laptop Pro 15')">View Details</button></td>
|
|
392
|
+
</tr>
|
|
393
|
+
</table>
|
|
394
|
+
`;
|
|
395
|
+
}, 1000);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
function viewDetails(product) {
|
|
399
|
+
document.getElementById('search-results-container').innerHTML = `
|
|
400
|
+
<h3>Product Details</h3>
|
|
401
|
+
<p>Showing details for ${product}</p>
|
|
402
|
+
`;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// Example 12: Modal
|
|
406
|
+
function openSettings() {
|
|
407
|
+
setTimeout(() => {
|
|
408
|
+
const modalHTML = `
|
|
409
|
+
<div class="overlay" onclick="closeModal()"></div>
|
|
410
|
+
<div class="modal" id="settings-modal">
|
|
411
|
+
<h3>Settings Modal</h3>
|
|
412
|
+
<label>Theme:</label>
|
|
413
|
+
<select id="theme-select">
|
|
414
|
+
<option value="Light">Light</option>
|
|
415
|
+
<option value="Dark">Dark</option>
|
|
416
|
+
</select><br><br>
|
|
417
|
+
<button value="Save Settings" onclick="saveSettings()">Save Settings</button>
|
|
418
|
+
<button onclick="closeModal()">Cancel</button>
|
|
419
|
+
</div>
|
|
420
|
+
`;
|
|
421
|
+
document.body.insertAdjacentHTML('beforeend', modalHTML);
|
|
422
|
+
}, 500);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
function saveSettings() {
|
|
426
|
+
alert('Settings saved');
|
|
427
|
+
closeModal();
|
|
428
|
+
document.querySelector('.example-section:nth-child(12)').innerHTML += '<div class="success-message">Settings saved</div>';
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
function closeModal() {
|
|
432
|
+
document.querySelector('.overlay')?.remove();
|
|
433
|
+
document.querySelector('.modal')?.remove();
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
// Example 13: Infinite scroll
|
|
437
|
+
let itemCount = 0;
|
|
438
|
+
function loadInitialItems() {
|
|
439
|
+
for (let i = 1; i <= 20; i++) {
|
|
440
|
+
itemCount++;
|
|
441
|
+
document.getElementById('items-list').innerHTML += `<p>Item ${itemCount}</p>`;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
loadInitialItems();
|
|
445
|
+
|
|
446
|
+
document.getElementById('infinite-scroll-container').addEventListener('scroll', function() {
|
|
447
|
+
if (this.scrollTop + this.clientHeight >= this.scrollHeight - 10) {
|
|
448
|
+
document.getElementById('items-list').innerHTML += '<p><em>Loading more items...</em></p>';
|
|
449
|
+
setTimeout(() => {
|
|
450
|
+
document.querySelectorAll('#items-list em').forEach(el => el.remove());
|
|
451
|
+
for (let i = 1; i <= 20; i++) {
|
|
452
|
+
itemCount++;
|
|
453
|
+
document.getElementById('items-list').innerHTML += `<p>Item ${itemCount}</p>`;
|
|
454
|
+
}
|
|
455
|
+
}, 3000);
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
|
|
459
|
+
// Example 14: React-like component
|
|
460
|
+
let count = 0;
|
|
461
|
+
function initializeApp() {
|
|
462
|
+
setTimeout(() => {
|
|
463
|
+
document.getElementById('react-app-container').innerHTML = `
|
|
464
|
+
<p>React App Loaded</p>
|
|
465
|
+
<p>Count: <span id="counter">0</span></p>
|
|
466
|
+
<button id="increment-btn" onclick="incrementCounter()">Increment</button>
|
|
467
|
+
`;
|
|
468
|
+
}, 1000);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
function incrementCounter() {
|
|
472
|
+
count++;
|
|
473
|
+
setTimeout(() => {
|
|
474
|
+
document.getElementById('counter').textContent = count;
|
|
475
|
+
}, 100);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// Example 15: Conditional rendering
|
|
479
|
+
function handleAccountTypeChange(type) {
|
|
480
|
+
setTimeout(() => {
|
|
481
|
+
if (type === 'Business') {
|
|
482
|
+
document.getElementById('conditional-fields-container').innerHTML = `
|
|
483
|
+
<input type="text" name="company-name" class="company-name" placeholder="Company Name"><br>
|
|
484
|
+
<input type="text" name="tax-id" class="tax-id" placeholder="Tax ID"><br>
|
|
485
|
+
<button value="Continue" onclick="createBusinessAccount()">Continue</button>
|
|
486
|
+
`;
|
|
487
|
+
} else {
|
|
488
|
+
document.getElementById('conditional-fields-container').innerHTML = '';
|
|
489
|
+
}
|
|
490
|
+
}, 500);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
function createBusinessAccount() {
|
|
494
|
+
document.getElementById('conditional-fields-container').innerHTML += '<div class="success-message">Business account created</div>';
|
|
495
|
+
}
|
|
496
|
+
</script>
|
|
497
|
+
</body>
|
|
498
|
+
</html>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html><head><title>Element Demo</title></head>
|
|
3
|
+
<body>
|
|
4
|
+
<h1 id="title" data-test="hero">Welcome</h1>
|
|
5
|
+
<p class="lead" data-role="intro">First paragraph</p>
|
|
6
|
+
<p class="lead" data-role="outro">Second paragraph</p>
|
|
7
|
+
<div id="hidden" style="display:none">hidden text</div>
|
|
8
|
+
<div id="centered" style="margin:0 auto;width:200px">center</div>
|
|
9
|
+
<button id="btn" onclick="document.getElementById('msg').textContent='clicked'">Click Me</button>
|
|
10
|
+
<span id="msg"></span>
|
|
11
|
+
</body></html>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [{
|
|
3
|
+
"type": "articles",
|
|
4
|
+
"id": "1",
|
|
5
|
+
"attributes": {
|
|
6
|
+
"title": "JSON:API paints my bikeshed!",
|
|
7
|
+
"body": "The shortest article. Ever.",
|
|
8
|
+
"created": "2015-05-22T14:56:29.000Z",
|
|
9
|
+
"updated": "2015-05-22T14:56:28.000Z"
|
|
10
|
+
},
|
|
11
|
+
"relationships": {
|
|
12
|
+
"author": {
|
|
13
|
+
"data": {"id": "42", "type": "people"}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}],
|
|
17
|
+
"included": [
|
|
18
|
+
{
|
|
19
|
+
"type": "people",
|
|
20
|
+
"id": "42",
|
|
21
|
+
"attributes": {
|
|
22
|
+
"name": "John",
|
|
23
|
+
"age": 80,
|
|
24
|
+
"gender": "male"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html><head><title>Field Demo</title></head>
|
|
3
|
+
<body>
|
|
4
|
+
<form id="f">
|
|
5
|
+
<label for="username">Username</label>
|
|
6
|
+
<input id="username" name="username" type="text" required />
|
|
7
|
+
|
|
8
|
+
<label for="bio">Bio</label>
|
|
9
|
+
<textarea id="bio" name="bio"></textarea>
|
|
10
|
+
|
|
11
|
+
<label for="role">Role</label>
|
|
12
|
+
<select id="role" name="role">
|
|
13
|
+
<option value="">--</option>
|
|
14
|
+
<option value="admin">Admin</option>
|
|
15
|
+
<option value="user">User</option>
|
|
16
|
+
</select>
|
|
17
|
+
|
|
18
|
+
<label><input type="checkbox" id="agree" name="agree" /> Agree</label>
|
|
19
|
+
<label><input type="radio" name="color" value="red" id="r-red"/> Red</label>
|
|
20
|
+
<label><input type="radio" name="color" value="blue" id="r-blue"/> Blue</label>
|
|
21
|
+
|
|
22
|
+
<input type="color" id="fav" name="fav" value="#000000" />
|
|
23
|
+
</form>
|
|
24
|
+
</body></html>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>Varbase E2E Examples</title>
|
|
6
|
+
<style>
|
|
7
|
+
a:link{font-size: 30px; text-decoration: none;}
|
|
8
|
+
a:active {color: blue;}
|
|
9
|
+
a:visited {color: blue;}
|
|
10
|
+
</style>
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<h1>Step Definitions Examples:</h1>
|
|
14
|
+
<h3>Welcome to the homepage of the Varbase E2E Examples</h3>
|
|
15
|
+
<ul>
|
|
16
|
+
<li><a href="/">Given I go to homepage</a></li>
|
|
17
|
+
<li><a href="about-us.html">About Us</a></li>
|
|
18
|
+
<li><a href="test--when--i-press-button.html">When I press "Button"</a></li>
|
|
19
|
+
<li><a href="test--when--i-reload-page.html">When I go reload page</a></li>
|
|
20
|
+
<li><a href="test--when--i-click-link.html">When I click "link"</a></li>
|
|
21
|
+
<li><a href="test--when--i-fill-in.html">When I fill in input text with value</a></li>
|
|
22
|
+
<li><a href="test--when--i-select-option-from-dropdownlist.html">When I select option from select box</a></li>
|
|
23
|
+
<li><a href="test--then--i-should--not--see-text-in-element.html">Then I sould (not) see test in element</a></li>
|
|
24
|
+
<li><a href="test--then--the-element-should_not-contain-cssproperty.html">Then the element should (not) contain css property</a></li>
|
|
25
|
+
<li><a href="test--then--the-checkbox-checked.html">Then the checkbox (is/should be) (not) checked</a></li>
|
|
26
|
+
<li><a href="test--when-i-wait-specific-time.html">When I Wait a specific Time</a></li>
|
|
27
|
+
<li><a href="test--when-i-wait-max-of-time.html">When I Wait a Maximum of Time</a></li>
|
|
28
|
+
<li><a href="test--modal-dialogs.html">Modal Dialog Interactions</a></li>
|
|
29
|
+
</ul>
|
|
30
|
+
<h3>Diffy visual-regression examples</h3>
|
|
31
|
+
<ul>
|
|
32
|
+
<li><a href="diffy/index.html">Diffy — examples index</a></li>
|
|
33
|
+
<li><a href="diffy/baseline.html">Diffy — Baseline page</a></li>
|
|
34
|
+
<li><a href="diffy/changed.html">Diffy — Changed page (visible regressions)</a></li>
|
|
35
|
+
</ul>
|
|
36
|
+
</body>
|
|
37
|
+
</html>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html><head><title>Keyboard</title></head>
|
|
3
|
+
<body>
|
|
4
|
+
<input id="inp" />
|
|
5
|
+
<span id="last"></span>
|
|
6
|
+
<script>
|
|
7
|
+
document.getElementById('inp').addEventListener('keydown', (e) => {
|
|
8
|
+
document.getElementById('last').textContent = e.key;
|
|
9
|
+
});
|
|
10
|
+
</script>
|
|
11
|
+
</body></html>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html><head><title>Modal Demo</title>
|
|
3
|
+
<style>
|
|
4
|
+
.modal { display: none; position: fixed; top: 20%; left: 30%; padding: 20px; background: #fff; border: 1px solid #ccc; }
|
|
5
|
+
.modal.show { display: block; }
|
|
6
|
+
</style>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<button id="open" onclick="document.getElementById('m').classList.add('show')">Open</button>
|
|
10
|
+
<div id="m" class="modal" role="dialog" aria-label="Welcome dialog">
|
|
11
|
+
<p>Welcome modal text</p>
|
|
12
|
+
<button id="close-btn" class="close" aria-label="Close" onclick="document.getElementById('m').classList.remove('show')">X</button>
|
|
13
|
+
</div>
|
|
14
|
+
</body></html>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html><head><title>Tables</title></head>
|
|
3
|
+
<body>
|
|
4
|
+
<table id="users">
|
|
5
|
+
<thead><tr><th>Name</th><th>Role</th><th>Status</th></tr></thead>
|
|
6
|
+
<tbody>
|
|
7
|
+
<tr><td>Alice</td><td>Admin</td><td>Active</td></tr>
|
|
8
|
+
<tr><td>Bob</td><td>User</td><td>Active</td></tr>
|
|
9
|
+
<tr><td>Carol</td><td>User</td><td>Pending</td></tr>
|
|
10
|
+
</tbody>
|
|
11
|
+
</table>
|
|
12
|
+
<table id="empty"><thead><tr><th>X</th></tr></thead><tbody></tbody></table>
|
|
13
|
+
</body></html>
|