Skip to content

Commit 316442f

Browse files
fix: update nightwatch test
1 parent bfce338 commit 316442f

File tree

2 files changed

+7
-33
lines changed

2 files changed

+7
-33
lines changed

apps/bolt-site/templates/template-index.twig

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -89,34 +89,20 @@
8989
9090
</script>
9191
92-
93-
<script>
94-
// commenting out till IE 11 is polyfilled w/ this
95-
{# var urlParams = new URLSearchParams(window.location.search);
96-
97-
var allAssets = {{ allAssets|json_encode() }};
98-
99-
if (urlParams.has('lang')){
100-
101-
var langSelected = urlParams.get('lang');
102-
103-
var globalJS = allAssets[langSelected]['bolt-global.js'];
104-
var globalCSS = allAssets[langSelected]['bolt-global.css'];
105-
106-
loadCSS(globalCSS);
107-
} #}
108-
</script>
109-
11092
</head>
11193
<body class="storefront-docs c-bolt-site {% if currentUrl == 'index.html' %} t-bolt-dark {% endif %} storefront-docs--{{ urlChunks | length >= 2 ? urlChunks|first : 'parent' }}">
11294
95+
{% set homeTitle %}
96+
<span id="js-bolt-test-bds-home-title">Bolt Design System</span>
97+
{% endset %}
98+
11399
{% embed "@bolt-components-sticky/sticky.twig" %}
114100
{% block sticky_content %}
115101
{% include "@bolt-components-navbar/navbar.twig" with {
116102
theme: "xdark",
117103
title: {
118-
tag: "h2",
119-
text: "Bolt Design System",
104+
tag: "h1",
105+
text: homeTitle
120106
},
121107
links: [
122108
{
@@ -141,18 +127,6 @@
141127
142128
{{ content }}
143129
144-
{# Shows Twig Vars in Browser Console #}
145-
{% if not bolt.data.config.prod %}
146-
{# <script type="application/json">{{ _context|json_encode()|raw }}</script>
147-
<script>
148-
(function () {
149-
var me = document.currentScript;
150-
var jsonScriptTag = me.previousElementSibling.innerHTML;
151-
var data = JSON.parse(jsonScriptTag);
152-
console.log('Twig vars for this page: ', data);
153-
})();
154-
</script>#}
155-
{% endif %}
156130
<script src="{{ assets["bolt-global.js"] | default("/build/bolt-global.js") }}" async></script>
157131
</body>
158132
</html>

tests/e2e/pattern-lab-compiling.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ module.exports = {
7676
browser
7777
.url(`${testingUrl}`)
7878
.waitForElementVisible('body.c-bolt-site', 1000)
79-
.assert.containsText('h1.c-bolt-headline', 'Bolt Design System')
79+
.assert.containsText('h1#js-bolt-test-bds-home-title', 'Bolt Design System')
8080
.end()
8181
},
8282

0 commit comments

Comments
 (0)