Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spa
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
spa
Commits
f54e2068
Commit
f54e2068
authored
6 months ago
by
Dominik Wille
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3469140
by Harlor: Make tests pass
parent
b67365ac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1
Fix source in composer.json
Pipeline
#260015
passed with warnings
6 months ago
Stage: build
Stage: validate
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
composer.json
+1
-1
1 addition, 1 deletion
composer.json
tests/FunctionalJavascript/SpaFormTest.php
+11
-10
11 additions, 10 deletions
tests/FunctionalJavascript/SpaFormTest.php
with
12 additions
and
11 deletions
composer.json
+
1
−
1
View file @
f54e2068
...
...
@@ -4,7 +4,7 @@
"type"
:
"drupal-module"
,
"description"
:
"Integrate a single-page application into your website using a block."
,
"support"
:
{
"source"
:
"
git@git.erdfisch.de:contrib/spa.git
"
"source"
:
"
https://git.drupalcode.org/project/spa
"
},
"require"
:
{
"php"
:
">=8.1"
,
...
...
This diff is collapsed.
Click to expand it.
tests/FunctionalJavascript/SpaFormTest.php
+
11
−
10
View file @
f54e2068
...
...
@@ -43,16 +43,16 @@ class SpaFormTest extends WebDriverTestBase {
// Basic settings.
$page
=
$this
->
getSession
()
->
getPage
();
$page
->
selectFieldOption
(
'arguments[
actions][add
_plugin
_
id]'
,
'static'
);
$page
->
selectFieldOption
(
'arguments[
new
_plugin
][
id]'
,
'static'
);
$page
->
fillField
(
'label'
,
'Test SPA'
);
sleep
(
2
);
$this
->
assertSession
()
->
assertWaitOnAjaxRequest
();
//
$this->assertSession()->assertWaitOnAjaxRequest();
// Add an argument
$page
->
pressButton
(
'
a
dd
a
rgument
s
'
);
$page
->
pressButton
(
'
A
dd
A
rgument'
);
sleep
(
1
);
$this
->
assertSession
()
->
pageTextContains
(
'Argument name'
);
$page
->
pressButton
(
'
a
dd
a
rgument
s
'
);
$page
->
pressButton
(
'
A
dd
A
rgument'
);
sleep
(
1
);
$uuids
=
$this
->
getUUIDs
(
'arguments'
);
$i
=
0
;
...
...
@@ -76,20 +76,21 @@ class SpaFormTest extends WebDriverTestBase {
$this
->
drupalGet
(
Url
::
fromRoute
(
'entity.spa.edit_form'
,
[
'spa'
=>
'test_spa'
]));
// Add a context more argument
$page
=
$this
->
getSession
()
->
getPage
();
$page
->
selectFieldOption
(
'arguments[
actions][add
_plugin
_
id]'
,
'context'
);
$page
->
pressButton
(
'
a
dd
a
rgument
s
'
);
$page
->
selectFieldOption
(
'arguments[
new
_plugin
][
id]'
,
'context'
);
$page
->
pressButton
(
'
A
dd
A
rgument'
);
sleep
(
1
);
self
::
assertCount
(
2
,
$uuids
);
// Remove the 0 arg
$tab
=
$page
->
find
(
'
css'
,
'[
href
^="
#edit-arguments-
'
.
$uuids
[
0
]
.
'"]'
);
$tab
=
$page
->
find
(
'
xpath'
,
"//a[contains(@
href
, '
#edit-arguments-
"
.
$uuids
[
0
]
.
"')]"
);
$tab
->
click
();
$page
->
find
(
'css'
,
'[name="remove
'
.
$uuids
[
0
]
.
'
arguments
"]'
)
->
click
();
$page
->
find
(
'css'
,
'[name="remove
-plugin-
'
.
$uuids
[
0
]
.
'"]'
)
->
click
();
sleep
(
1
);
$uuids
=
$this
->
getUUIDs
(
'arguments'
);
// Add a library
$page
->
selectFieldOption
(
'libraries[
actions][add
_plugin
_
id]'
,
'css_snippet'
);
$page
->
pressButton
(
'
a
dd
l
ibrar
ies
'
);
$page
->
selectFieldOption
(
'libraries[
new
_plugin
][
id]'
,
'css_snippet'
);
$page
->
pressButton
(
'
A
dd
L
ibrar
y
'
);
sleep
(
1
);
$library_uuids
=
$this
->
getUUIDs
(
'libraries'
);
$page
->
fillField
(
'libraries['
.
$library_uuids
[
0
]
.
'][css]'
,
'.foo { display: block; }'
);
...
...
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