Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tour
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
tour
Commits
05443cd2
Commit
05443cd2
authored
9 months ago
by
Stephen Mustgrave
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2044397
by smustgrave, thejimbirch: Write tour integration to add/edit content UI
parent
a79a27b8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#165628
failed
9 months ago
Stage: build
Stage: validate
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/optional/tour.tour.node-form.yml
+59
-0
59 additions, 0 deletions
config/optional/tour.tour.node-form.yml
tests/src/Functional/Content/NodeFormTourTest.php
+56
-0
56 additions, 0 deletions
tests/src/Functional/Content/NodeFormTourTest.php
tour.install
+2
-37
2 additions, 37 deletions
tour.install
with
117 additions
and
37 deletions
config/optional/tour.tour.node-form.yml
0 → 100644
+
59
−
0
View file @
05443cd2
langcode
:
en
status
:
true
dependencies
:
module
:
-
node
id
:
node-form
label
:
'
Edit
content'
routes
:
-
route_name
:
node.add
-
route_name
:
entity.node.edit_form
tips
:
node-form-main
:
id
:
node-form-main
plugin
:
text
label
:
'
Content
creation'
weight
:
1
body
:
'
Use
this
page
to
add
or
edit
content
on
your
site.'
node-form-title
:
id
:
node-form-title
plugin
:
text
label
:
'
The
title
field'
weight
:
2
body
:
'
Use
this
to
name
your
page.
The
title
is
typically
displayed
as
a
headline
at
the
top
of
the
page.'
selector
:
'
#edit-title-wrapper'
node-content-region
:
id
:
node-content-region
plugin
:
text
label
:
'
Content
fields'
weight
:
3
body
:
'
Use
the
fields
in
this
region
to
<em>create</em>
content.'
selector
:
'
.layout-region__content'
node-form-options
:
id
:
node-form-options
plugin
:
text
label
:
'
Optional
information'
weight
:
4
body
:
'
The
rest
of
the
settings
are
optional.
They
help
control
how
and
where
your
content
is
published
on
your
site.'
selector
:
'
#edit-advanced'
node-form-preview
:
id
:
node-form-preview
plugin
:
text
label
:
'
Previewing
content'
weight
:
5
body
:
'
Previewing
shows
you
what
your
page
will
look
like
when
published.
This
does
not
save
your
page
or
make
it
live.'
selector
:
'
#edit-preview'
node-form-published
:
id
:
node-form-published
plugin
:
text
label
:
'
Publishing
content'
weight
:
6
body
:
'
Published
checkbox
determines
if
page
is
published
or
unpublished.'
selector
:
'
.edit-status-wrapper'
node-form-submit
:
id
:
node-form-submit
plugin
:
text
label
:
'
Saving
or
deleting
content'
weight
:
7
body
:
'
This
is
where
you
save
or
delete
your
pages.
Saving
updates
them
in
your
database;
publishing
makes
them
live
and
public
on
your
site.'
selector
:
'
#edit-actions'
This diff is collapsed.
Click to expand it.
tests/src/Functional/Content/NodeFormTourTest.php
0 → 100644
+
56
−
0
View file @
05443cd2
<?php
namespace
Drupal\Tests\tour\Functional\Content
;
use
Drupal\Tests\tour\Functional\TourTestBase
;
/**
* Tests the Node form tour.
*
* @group tour
*/
class
NodeFormTourTest
extends
TourTestBase
{
/**
* Modules to enable.
*
* @var array
*/
protected
static
$modules
=
[
'node'
,
'tour'
,
'block'
];
/**
* {@inheritdoc}
*/
protected
function
setUp
():
void
{
parent
::
setUp
();
// Create Basic page node type.
$this
->
drupalCreateContentType
([
'type'
=>
'page'
,
'name'
=>
'Basic page'
]);
// Setup user.
$admin_user
=
$this
->
drupalCreateUser
([
'administer content types'
,
'access administration pages'
,
'create page content'
,
'edit own page content'
,
'access tour'
,
]);
$this
->
drupalLogin
(
$admin_user
);
$this
->
drupalPlaceBlock
(
'local_actions_block'
);
}
/**
* Tests Node edit form tour tip availability.
*/
public
function
testNodeEditFormTourTips
():
void
{
$this
->
drupalGet
(
'node/add/page'
);
$this
->
assertTourTips
();
$node
=
$this
->
drupalCreateNode
([
'type'
=>
'page'
]);
$this
->
drupalGet
(
"node/
{
$node
->
id
()
}
/edit"
);
$this
->
assertTourTips
();
}
}
This diff is collapsed.
Click to expand it.
tour.install
+
2
−
37
View file @
05443cd2
...
...
@@ -51,51 +51,16 @@ function import_new_tour_config(string $id): void {
}
/**
* Import
people tour
configuration.
* Import
new
configuration
for 2.0.x branch
.
*/
function
tour_update_10300
():
void
{
import_new_tour_config
(
'people'
);
}
/**
* Import user create/edit tour configuration.
*/
function
tour_update_10301
():
void
{
import_new_tour_config
(
'user-create'
);
import_new_tour_config
(
'user-edit'
);
}
/**
* Import appearance tour configuration.
*/
function
tour_update_10302
():
void
{
import_new_tour_config
(
'appearance'
);
}
/**
* Import modules extend tour configuration.
*/
function
tour_update_10303
():
void
{
import_new_tour_config
(
'extend'
);
}
/**
* Import modules content language tour configuration.
*/
function
tour_update_10304
():
void
{
import_new_tour_config
(
'content-language'
);
}
/**
* Import dblog tour configuration.
*/
function
tour_update_10305
():
void
{
import_new_tour_config
(
'dblog'
);
}
/**
* Import user edit language tour configuration.
*/
function
tour_update_10306
():
void
{
import_new_tour_config
(
'user-profile-language'
);
import_new_tour_config
(
'node-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