Problem/Motivation

The patch over in #1776796: Provide a better UX for creating, editing & managing draft revisions. contains some doc fixes to the NodeForm class, and also it abstracts the assertButtons() method to a trait. Since that issue is postponed to 8.1.x, moving the node module improvements here will make life easier on contrib for testing the node form.

Proposed resolution

Move the method to a trait.

Remaining tasks

Review.

User interface changes

API changes

Data model changes

BETA EVAL:

Test only changes are unfrozen.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhedstrom’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
4.77 KB
jhedstrom’s picture

Had the wrong issue in the summary.

Fabianx’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Nice :)

xjm’s picture

Status: Reviewed & tested by the community » Needs work

Fair enough!

Looks like this no longer applies though -- the docs improvements (which are slightly of out of scope anyway) seem to be for methods that aren't there anymore.

Fabianx’s picture

Issue tags: +Needs reroll
rpayanm’s picture

Status: Needs work » Needs review
FileSize
3.54 KB

Please review.
I can not find this:

+++ b/core/modules/node/src/NodeForm.php
@@ -334,6 +334,9 @@ public function preview(array $form, FormStateInterface $form_state) {
+   *
+   * @return \Drupal\node\NodeInterface
+   *   The node object.

@@ -348,6 +351,9 @@ public function publish(array $form, FormStateInterface $form_state) {
+   *
+   * @return \Drupal\node\NodeInterface
+   *   The node object.
Fabianx’s picture

Status: Needs review » Reviewed & tested by the community
xjm’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -Needs reroll

This issue only changes test code, so per https://www.drupal.org/core/beta-changes, this can be completed any time during the Drupal 8 beta phase. Committed and pushed to 8.0.x. Thanks!

Fixed a missing newline on commit:

diff --git a/core/modules/node/src/Tests/AssertButtonsTrait.php b/core/modules/node/src/Tests/AssertButtonsTrait.php
index a0610d4..96eb6c8 100644
--- a/core/modules/node/src/Tests/AssertButtonsTrait.php
+++ b/core/modules/node/src/Tests/AssertButtonsTrait.php
@@ -49,4 +49,4 @@ public function assertButtons($buttons, $dropbutton = TRUE) {
       $this->assertNoRaw('dropbutton-wrapper');
     }
   }
-}
\ No newline at end of file
+}

  • xjm committed 2a317f4 on 8.0.x
    Issue #2511584 by jhedstrom, rpayanm: Move NodeFormButtonsTest::...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.