X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;ds=inline;f=web%2Fcore%2Fmodules%2Fpath%2Ftests%2Fsrc%2FFunctional%2FPathNodeFormTest.php;h=3245b17c59efe2b52be427ce11a6b7e8fe038ffb;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=ea730fdcfe734a03da49ce40023e2a333851761e;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/path/tests/src/Functional/PathNodeFormTest.php b/web/core/modules/path/tests/src/Functional/PathNodeFormTest.php index ea730fdcf..3245b17c5 100644 --- a/web/core/modules/path/tests/src/Functional/PathNodeFormTest.php +++ b/web/core/modules/path/tests/src/Functional/PathNodeFormTest.php @@ -28,13 +28,15 @@ class PathNodeFormTest extends PathTestBase { * Tests the node form ui. */ public function testNodeForm() { + $assert_session = $this->assertSession(); + $this->drupalGet('node/add/page'); - // Make sure we have a Path fieldset and Path fields. - $this->assertRaw(' id="edit-path-settings"', 'Path settings details exists'); - $this->assertFieldByName('path[0][alias]', NULL, 'Path alias field exists'); + // Make sure we have a vertical tab fieldset and 'Path' fields. + $assert_session->elementContains('css', '.form-type-vertical-tabs #edit-path-0 summary', 'URL alias'); + $assert_session->fieldExists('path[0][alias]'); - // Disable the Path field for this content type. + // Disable the 'Path' field for this content type. entity_get_form_display('node', 'page', 'default') ->removeComponent('path') ->save(); @@ -42,8 +44,8 @@ class PathNodeFormTest extends PathTestBase { $this->drupalGet('node/add/page'); // See if the whole fieldset is gone now. - $this->assertNoRaw(' id="edit-path-settings"', 'Path settings details does not exist'); - $this->assertNoFieldByName('path[0][alias]', NULL, 'Path alias field does not exist'); + $assert_session->elementNotExists('css', '.form-type-vertical-tabs #edit-path-0'); + $assert_session->fieldNotExists('path[0][alias]'); } }