Skip to content

Commit

Permalink
Set form using html in template test (#2974)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmccar authored Dec 11, 2023
1 parent cb14f4e commit 62cf6e5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
8 changes: 6 additions & 2 deletions __snapshots__/layout/_template.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,9 @@ exports[`base page template matches the full configuration snapshot 1`] = `


<script>document.body.className = ((document.body.className) ? document.body.className + ' ons-js-enabled' : 'ons-js-enabled');</script>
Some bodyStart content

<form class="form-class" method="POST" autocomplete="off" novalidate="">


<div class="ons-page">
<div class="ons-page__content">
Expand Down Expand Up @@ -1648,7 +1650,9 @@ exports[`base page template matches the full configuration snapshot 1`] = `

</div>

Some bodyEnd content

</form>


<script>
(function() {
Expand Down
20 changes: 9 additions & 11 deletions src/layout/_template.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const FULL_EXAMPLE = `
"lang": "en-US",
"url": "/some-url-us"
}
]
},
"social": {
Expand Down Expand Up @@ -292,26 +291,25 @@ const FULL_EXAMPLE = `
"OGLLink": true
}
} %}
{% set form = {
"classes": "form-class",
"method": "POST",
"attributes": {
"autocomplete": "off",
"novalidate": "null"
}
} %}
{% block bodyStart %}
<form class="form-class" method="POST" autocomplete="off" novalidate>
{% endblock %}
{% block main %}
<h1>Page Title</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
<p>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
{% endblock %}
{% block bodyEnd %}
</form>
{% endblock %}
{% block head %}Some head content{% endblock %}
{% block bodyStart %}Some bodyStart content{% endblock %}
{% block preHeader %}Some preHeader content{% endblock %}
{% block preFooter %}Some preFooter content{% endblock %}
{% block bodyEnd %}Some bodyEnd content{% endblock %}
{% block scripts %}<script src="random-script.js"></script>{% endblock %}
`;

Expand Down

0 comments on commit 62cf6e5

Please sign in to comment.