Skip to content
Snippets Groups Projects
Commit 05443cd2 authored by Stephen Mustgrave's avatar Stephen Mustgrave
Browse files

Issue #2044397 by smustgrave, thejimbirch: Write tour integration to add/edit content UI

parent a79a27b8
No related branches found
No related tags found
No related merge requests found
Pipeline #165628 failed
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'
<?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();
}
}
......@@ -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');
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment