Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wcms_tests
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
wcms_tests
Commits
fbd62908
Commit
fbd62908
authored
3 months ago
by
Lily Yan
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-7189 Add switchToIFrame to make WcmsTestsBlocksWebformsCest work
parent
db2eeeab
No related branches found
No related tags found
1 merge request
!83
ISTWCMS-7160 Fix service content type in testAutomaticListBlocksSettings in...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
acceptance/WcmsTestsBlocksWebformsCest.php
+9
-4
9 additions, 4 deletions
acceptance/WcmsTestsBlocksWebformsCest.php
with
9 additions
and
4 deletions
acceptance/WcmsTestsBlocksWebformsCest.php
+
9
−
4
View file @
fbd62908
<?php
<?php
use
Codeception\Util\Locator
;
use
Drupal\webform\Entity\Webform
;
use
Drupal\webform\Entity\Webform
;
/**
/**
...
@@ -65,6 +64,9 @@ class WcmsTestsBlocksWebformsCest {
...
@@ -65,6 +64,9 @@ class WcmsTestsBlocksWebformsCest {
$i
->
click
(
'Webform'
);
$i
->
click
(
'Webform'
);
$i
->
waitForText
(
'Configure block'
);
$i
->
waitForText
(
'Configure block'
);
// Switch the block form iframe.
$i
->
switchToIFrame
(
'iframe[class="lbim-dialog-iframe"]'
);
// The settings for the webform block.
// The settings for the webform block.
$title
=
$i
->
uwRandomString
();
$title
=
$i
->
uwRandomString
();
$webform_name
=
'Test form (test_form)'
;
$webform_name
=
'Test form (test_form)'
;
...
@@ -75,8 +77,11 @@ class WcmsTestsBlocksWebformsCest {
...
@@ -75,8 +77,11 @@ class WcmsTestsBlocksWebformsCest {
// Click on add block and ensure it is on the screen.
// Click on add block and ensure it is on the screen.
$i
->
click
(
'Add block'
);
$i
->
click
(
'Add block'
);
$i
->
waitForElement
(
Locator
::
contains
(
'div[class="uw-admin-label"]'
,
'Webform'
));
$i
->
seeElement
(
Locator
::
contains
(
'div[class="uw-admin-label"]'
,
'Webform'
));
// Switch to iFrame.
$i
->
switchtoIFrame
();
$i
->
waitForText
(
$title
);
$i
->
see
(
$title
);
// Need to save the layout to continue the tests.
// Need to save the layout to continue the tests.
$i
->
waitForElementClickable
(
'#edit-actions #edit-submit'
);
$i
->
waitForElementClickable
(
'#edit-actions #edit-submit'
);
...
@@ -84,7 +89,7 @@ class WcmsTestsBlocksWebformsCest {
...
@@ -84,7 +89,7 @@ class WcmsTestsBlocksWebformsCest {
// Ensure elements are on the page.
// Ensure elements are on the page.
$i
->
see
(
$title
);
$i
->
see
(
$title
);
$i
->
click
(
'input[
class*="webform-button--submit"][value="S
ubmit"]'
);
$i
->
click
(
'input[
id="edit-s
ubmit"]'
);
// Wait for a click the back to form.
// Wait for a click the back to form.
$i
->
waitForText
(
'Back to form'
);
$i
->
waitForText
(
'Back to form'
);
...
...
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