Skip to content

Commit

Permalink
Merge branch 'main' into 16959-vamc-editors-cant-save-detail-pages-un…
Browse files Browse the repository at this point in the history
…der-work-with-us
  • Loading branch information
Edmund Dunn committed Jan 23, 2024
2 parents 0a2f45d + 9921868 commit 0288c51
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
"symfony/phpunit-bridge": "^5.1",
"symfony/process": "^6.3",
"symfony/routing": "^6.3",
"va-gov/content-build": "^0.0.3424",
"va-gov/content-build": "^0.0.3425",
"vlucas/phpdotenv": "^5.3",
"webflo/drupal-finder": "^1.0.0",
"webmozart/path-util": "^2.3",
Expand Down
6 changes: 3 additions & 3 deletions composer.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "fd6aedc5fcaf7b1b85a3a3ba52650962",
"content-hash": "57c2908d2309e44f8a31050b6b3aac55",
"packages": [
{
"name": "asm89/stack-cors",
Expand Down Expand Up @@ -25862,7 +25862,7 @@
},
{
"name": "va-gov/content-build",
"version": "v0.0.3424",
"version": "v0.0.3425",
"source": {
"type": "git",
"url": "https://github.com/department-of-veterans-affairs/content-build.git",
Expand Down Expand Up @@ -25898,7 +25898,7 @@
"description": "Front-end for VA.gov. This repository contains the code that generates the www.va.gov website. It contains a Metalsmith static site builder that uses a Drupal CMS for content. This file is here to publish releases to https://packagist.org/packages/va-gov/content-build, so that the CMS CI system can install it and update it using standard composer processes, and so that we can run tests across both systems. See https://github.com/department-of-veterans-affairs/va.gov-cms for the CMS repo, and stand by for more documentation.",
"support": {
"issues": "https://github.com/department-of-veterans-affairs/content-build/issues",
"source": "https://github.com/department-of-veterans-affairs/content-build/tree/v0.0.3424"
"source": "https://github.com/department-of-veterans-affairs/content-build/tree/v0.0.3425"
},
"time": "2024-01-17T18:59:30+00:00"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ public function addToNationalOutreachCalendar(EventInterface $node): void {
if ($node->hasField(EventOutreachInterface::LISTING_FIELD) &&
$node->hasField(EventOutreachInterface::PUBLISH_TO_OUTREACH_CAL_FIELD) &&
$node->hasField(EventOutreachInterface::ADDITIONAL_LISTING_FIELD)) {
$addToCalValue = $node->get(EventOutreachInterface::PUBLISH_TO_OUTREACH_CAL_FIELD)->first()->getValue();
if (isset($addToCalValue['value'])) {
if ($node->get(EventOutreachInterface::PUBLISH_TO_OUTREACH_CAL_FIELD)->first()) {
$addToCalValue = $node->get(EventOutreachInterface::PUBLISH_TO_OUTREACH_CAL_FIELD)->first()->getValue();
$listings = $node->get(EventOutreachInterface::LISTING_FIELD)->getValue();
$additionalListings = $node->get(EventOutreachInterface::ADDITIONAL_LISTING_FIELD)->getValue();
assert(array_key_exists('value', $addToCalValue));
if ($addToCalValue['value'] === 1 || $this->outreachHubOnlyUser()) {
// Add to Outreach calendar selected, or user is Outreach Hub only
// user.
Expand Down
8 changes: 8 additions & 0 deletions tests/cypress/integration/features/content_type/event.feature
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,11 @@ Feature: Content Type: Event
Given I am logged in as a user with the "content_admin" role
When I am at "node/add/event"
Then an element with the selector "#edit-field-datetime-range-timezone-wrapper button.tabledrag-toggle-weight" should not exist

Scenario: Confirm creating "Featured" Events is possible.
Given I am logged in as a user with the "content_admin" role
And I create a "event" node and continue
And I fill in field with selector "#edit-revision-log-0-value" with fake text
And I feature the content
When I save the node
Then I should see "has been updated."
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Given } from "@badeball/cypress-cucumber-preprocessor";

Given("I feature the content", () => {
cy.get("#edit-field-featured-value").check({ force: true });
});

0 comments on commit 0288c51

Please sign in to comment.