Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal_cms
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal_cms
Commits
7c1b9f21
Commit
7c1b9f21
authored
3 months ago
by
Adam G-H
Browse files
Options
Downloads
Patches
Plain Diff
Fix the test
parent
3c5bd3a5
No related branches found
No related tags found
1 merge request
!339
Updates contact form to use a basic page
Pipeline
#383975
failed
3 months ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
recipes/drupal_cms_forms/config/webform.webform.contact_form.yml
+0
-2
0 additions, 2 deletions
.../drupal_cms_forms/config/webform.webform.contact_form.yml
recipes/drupal_cms_forms/tests/e2e/contact_form.cy.js
+15
-15
15 additions, 15 deletions
recipes/drupal_cms_forms/tests/e2e/contact_form.cy.js
with
15 additions
and
17 deletions
recipes/drupal_cms_forms/config/webform.webform.contact_form.yml
+
0
−
2
View file @
7c1b9f21
...
...
@@ -9,8 +9,6 @@ third_party_settings:
antibot
:
true
honeypot
:
honeypot
:
true
_core
:
default_config_hash
:
Fcw7hXWj_zgosggPLJsVnXVpfHDrnjSh7rv8a_EhoVI
weight
:
0
open
:
null
close
:
null
...
...
This diff is collapsed.
Click to expand it.
recipes/drupal_cms_forms/tests/e2e/contact_form.cy.js
+
15
−
15
View file @
7c1b9f21
describe
(
'
Contact form
'
,
()
=>
{
beforeEach
(()
=>
{
cy
.
setUp
(
'
standard
'
).
applyRecipe
()
.
visit
(
'
/contact
'
)
;
cy
.
setUp
(
'
standard
'
).
applyRecipe
();
});
after
(()
=>
{
cy
.
tearDown
();
});
it
(
'
appears in the main menu
'
,
()
=>
{
it
(
'
requires all fields and has spam protection
'
,
()
=>
{
// Ensure the viewport is wide enough to see the main menu links.
cy
.
viewport
(
'
macbook-13
'
);
cy
.
findByText
(
'
Main navigation
'
).
parent
().
find
(
'
a:contains("Contact")
'
);
});
// Use the main menu link to visit the contact form.
cy
.
findByText
(
'
Main navigation
'
)
.
parent
()
.
find
(
'
a:contains("Contact")
'
)
.
click
();
it
(
'
requires all fields
'
,
()
=>
{
cy
.
findByLabelText
(
'
Name
'
).
should
(
'
have.attr
'
,
'
required
'
);
cy
.
findByLabelText
(
'
Email
'
).
should
(
'
have.attr
'
,
'
required
'
);
cy
.
findByLabelText
(
'
Message
'
).
should
(
'
have.attr
'
,
'
required
'
);
cy
.
findByText
(
'
CAPTCHA
'
,
{
selector
:
'
fieldset > legend
'
}).
should
(
'
exist
'
);
});
cy
.
get
(
'
[id^"=webform-submission-contact-form-node-"]
'
).
within
(()
=>
{
cy
.
findByLabelText
(
'
Name
'
).
should
(
'
have.attr
'
,
'
required
'
);
cy
.
findByLabelText
(
'
Email
'
).
should
(
'
have.attr
'
,
'
required
'
);
cy
.
findByLabelText
(
'
Message
'
).
should
(
'
have.attr
'
,
'
required
'
);
cy
.
findByText
(
'
CAPTCHA
'
,
{
selector
:
'
fieldset > legend
'
})
.
should
(
'
exist
'
)
.
findByText
(
'
Click to start verification
'
)
.
should
(
'
exist
'
);
it
(
'
has spam protection
'
,
()
=>
{
// Confirm the Antibot, Honeypot and Friendly CAPTCHA fields exist within the form.
cy
.
get
(
'
[id^=webform-submission-contact-form-node]
'
).
within
(()
=>
{
cy
.
get
(
'
input[type="hidden"][name="antibot_key"]
'
).
should
(
'
exist
'
);
cy
.
get
(
'
input[name="url"]
'
).
should
(
'
not.be.visible
'
);
// Confirm the friendly CAPTCHA is present.
cy
.
findByText
(
'
Click to start verification
'
).
should
(
'
exist
'
);
});
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment