Commit 4b1f7405 authored by Liam Morland's avatar Liam Morland
Browse files

Merge branch...

Merge branch 'feature/ISTWCMS-4838-l26yan-Fix-catalog-test-error-due-to-add-settings-for-tabs' into '3.0.x'

ISTWCMS-4838 Remove audience field check for catalog item content type due to...

See merge request !159
parents ce558f6f ef74f494
...@@ -368,10 +368,15 @@ class UwWcmsBasicTest extends BrowserTestBase { ...@@ -368,10 +368,15 @@ class UwWcmsBasicTest extends BrowserTestBase {
if ($key != 'catalog') { if ($key != 'catalog') {
$taxonomies = $this->getSession()->getPage()->find('xpath', "//span[contains(text(), 'Taxonomies')]"); $taxonomies = $this->getSession()->getPage()->find('xpath', "//span[contains(text(), 'Taxonomies')]");
$this->assertEquals('edit-group-uw-' . $key . '-tags', $taxonomies->getParent()->getParent()->getAttribute('id')); $this->assertEquals('edit-group-uw-' . $key . '-tags', $taxonomies->getParent()->getParent()->getAttribute('id'));
}
$audience = $this->getSession()->getPage()->find('xpath', "//span[contains(text(), 'Audience')]"); $audience = $this->getSession()->getPage()->find('xpath', "//span[contains(text(), 'Audience')]");
$this->assertEquals('edit-field-uw-audience--wrapper', $audience->getParent()->getParent()->getAttribute('id')); $this->assertEquals('edit-field-uw-audience--wrapper', $audience->getParent()->getParent()->getAttribute('id'));
} }
else {
// The message is displayed when creating a catalog item
// without a catalog term created.
$this->assertSession()->pageTextContains('You must create at least one catalog before adding a catalog item.');
}
}
// Test field_uw_event_map exists. // Test field_uw_event_map exists.
$this->drupalGet('node/add/uw_ct_event'); $this->drupalGet('node/add/uw_ct_event');
...@@ -793,9 +798,6 @@ class UwWcmsBasicTest extends BrowserTestBase { ...@@ -793,9 +798,6 @@ class UwWcmsBasicTest extends BrowserTestBase {
$edit = [ $edit = [
'edit-title-0-value' => $this->randomString(), 'edit-title-0-value' => $this->randomString(),
'edit-field-uw-catalog-summary-0-value' => $this->randomString(), 'edit-field-uw-catalog-summary-0-value' => $this->randomString(),
'edit-field-uw-catalog-popularity-0-value' => rand(1, 9),
'edit-field-uw-catalog-category-target-id-value-field' => $this->randomString(),
'edit-field-uw-catalog-faculty-21' => 21,
'edit-moderation-state-0-state' => 'uw_wf_needs_review', 'edit-moderation-state-0-state' => 'uw_wf_needs_review',
]; ];
// Create a catalog item node. // Create a catalog item node.
...@@ -823,10 +825,6 @@ class UwWcmsBasicTest extends BrowserTestBase { ...@@ -823,10 +825,6 @@ class UwWcmsBasicTest extends BrowserTestBase {
'edit-title-0-value' => 'Test catalog item', 'edit-title-0-value' => 'Test catalog item',
'edit-field-uw-catalog-catalog-35' => 35, 'edit-field-uw-catalog-catalog-35' => 35,
'edit-field-uw-catalog-summary-0-value' => $this->randomString(), 'edit-field-uw-catalog-summary-0-value' => $this->randomString(),
'edit-field-uw-catalog-popularity-0-value' => rand(1, 9),
'edit-field-uw-catalog-category-target-id-value-field' => 36,
'edit-field-uw-catalog-faculty-15' => 15,
'edit-field-uw-audience-0-8-8' => 8,
'edit-moderation-state-0-state' => 'uw_wf_needs_review', 'edit-moderation-state-0-state' => 'uw_wf_needs_review',
]; ];
// Create a catalog item node with needs review. // Create a catalog item node with needs review.
...@@ -842,7 +840,7 @@ class UwWcmsBasicTest extends BrowserTestBase { ...@@ -842,7 +840,7 @@ class UwWcmsBasicTest extends BrowserTestBase {
// Check all paths related to catalog views exist. // Check all paths related to catalog views exist.
$this->drupalGet('catalogs'); $this->drupalGet('catalogs');
$this->assertSession()->statusCodeEquals(200); $this->assertSession()->statusCodeEquals(200);
$this->assertSession()->pageTextContains('There are no catalogs available.'); $this->assertSession()->pageTextContains('Your filters returned no results please review criteria selected.');
$paths = [ $paths = [
'taxonomy/term/35', 'taxonomy/term/35',
'taxonomy/term/35/new', 'taxonomy/term/35/new',
...@@ -858,7 +856,7 @@ class UwWcmsBasicTest extends BrowserTestBase { ...@@ -858,7 +856,7 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this->drupalGet($path); $this->drupalGet($path);
$this->assertSession()->statusCodeEquals(200); $this->assertSession()->statusCodeEquals(200);
// There is no published catalog item node existing. // There is no published catalog item node existing.
$this->assertSession()->pageTextContains('There are no items available.'); $this->assertSession()->pageTextContains('Your filters returned no results please review criteria selected.');
} }
// Make sure Metatags display extender is enabled. // Make sure Metatags display extender is enabled.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment