Skip to content
Snippets Groups Projects

ISTWCMS-4775 Check pathauto pattern for Contact and Profile content types

1 file
+ 30
0
Compare changes
  • Side-by-side
  • Inline
@@ -1572,6 +1572,21 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this->submitForm($req_fields, 'Save');
// Contact successfully created when only required fields are submitted.
$this->assertSession()->statusCodeEquals(200);
// Check pathauto pattern to make sure they are in same row.
$this->drupalGet('admin/config/search/path/patterns');
$this->assertSession()->statusCodeEquals(200);
$elements = $this->xpath('//div[@id="block-uw-theme-admin-mainpagecontent"]
//table/tbody/tr[@data-drupal-selector="edit-entities-uw-path-contact"]/td');
$expected_items = [
'Contact path pattern',
'contacts/[node:title]',
'Content',
'The node bundle is uw_ct_contact',
];
foreach ($expected_items as $key => $value) {
$this->assertEqual($elements[$key]->getText(), $value);
}
}
/**
@@ -1629,6 +1644,21 @@ class UwWcmsBasicTest extends BrowserTestBase {
// Validate new content has been created with same name.
$this->assertSession()->pageTextContains('Profile ' . $profile_name . ' has been created.');
// Check pathauto pattern to make sure they are in same row.
$this->drupalGet('admin/config/search/path/patterns');
$this->assertSession()->statusCodeEquals(200);
$elements = $this->xpath('//div[@id="block-uw-theme-admin-mainpagecontent"]
//table/tbody/tr[@data-drupal-selector="edit-entities-uw-path-profile"]/td');
$expected_items = [
'Profile path pattern',
'profiles/[node:title]',
'Content',
'The node bundle is uw_ct_profile',
];
foreach ($expected_items as $key => $value) {
$this->assertEqual($elements[$key]->getText(), $value);
}
}
/**
Loading