Skip to content

Commit

Permalink
Updated contrib dependencies, configs, and tests (#808)
Browse files Browse the repository at this point in the history
* Updated contrib dependencies and configs

* reverted extlink update

* Updated tests for contrib updates

* Update test

* fix person test
  • Loading branch information
pookmish authored Sep 13, 2024
1 parent 318aa03 commit 555f7b6
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 71 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"drupal/name": "^1.0@RC",
"drupal/next": "^1.2",
"drupal/nobots": "^1.0",
"drupal/node_revision_delete": "^1.0@RC",
"drupal/node_revision_delete": "^2.0@RC",
"drupal/page_cache_query_ignore": "^2.2",
"drupal/page_manager": "^4.0@beta",
"drupal/paragraphs": "^1.11",
Expand Down Expand Up @@ -141,7 +141,7 @@
"drupal/view_unpublished": "^1.0",
"drupal/viewfield": "^3.0@beta",
"drupal/views_block_filter_block": "^2.0@beta",
"drupal/views_bulk_edit": "^2.6",
"drupal/views_bulk_edit": "^3.0",
"drupal/views_contextual_filters_or": "^1.3",
"drupal/views_custom_cache_tag": "^1.2",
"drupal/views_infinite_scroll": "^2.0",
Expand Down
7 changes: 4 additions & 3 deletions config/sync/node.type.stanford_event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ third_party_settings:
available_menus: { }
parent: ''
node_revision_delete:
minimum_revisions_to_keep: 5
minimum_age_to_delete: 0
when_to_delete: 0
amount:
status: true
settings:
amount: 5
scheduler:
expand_fieldset: when_required
fields_display_mode: vertical_tab
Expand Down
7 changes: 4 additions & 3 deletions config/sync/node.type.stanford_event_series.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ third_party_settings:
- main
parent: 'main:'
node_revision_delete:
minimum_revisions_to_keep: 5
minimum_age_to_delete: 0
when_to_delete: 0
amount:
status: true
settings:
amount: 5
scheduler:
expand_fieldset: when_required
fields_display_mode: vertical_tab
Expand Down
7 changes: 4 additions & 3 deletions config/sync/node.type.stanford_news.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ third_party_settings:
available_menus: { }
parent: ''
node_revision_delete:
minimum_revisions_to_keep: 5
minimum_age_to_delete: 0
when_to_delete: 0
amount:
status: true
settings:
amount: 5
scheduler:
expand_fieldset: when_required
fields_display_mode: vertical_tab
Expand Down
7 changes: 4 additions & 3 deletions config/sync/node.type.stanford_opportunity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ third_party_settings:
- main
parent: 'main:'
node_revision_delete:
minimum_revisions_to_keep: 5
minimum_age_to_delete: 0
when_to_delete: 0
amount:
status: true
settings:
amount: 5
scheduler:
expand_fieldset: when_required
fields_display_mode: vertical_tab
Expand Down
7 changes: 4 additions & 3 deletions config/sync/node.type.stanford_page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ third_party_settings:
- main
parent: 'main:'
node_revision_delete:
minimum_revisions_to_keep: 5
minimum_age_to_delete: 0
when_to_delete: 0
amount:
status: true
settings:
amount: 5
scheduler:
expand_fieldset: when_required
fields_display_mode: vertical_tab
Expand Down
7 changes: 4 additions & 3 deletions config/sync/node.type.stanford_person.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ third_party_settings:
- stanford-person-type
parent: 'main:'
node_revision_delete:
minimum_revisions_to_keep: 5
minimum_age_to_delete: 0
when_to_delete: 0
amount:
status: true
settings:
amount: 5
scheduler:
expand_fieldset: when_required
fields_display_mode: vertical_tab
Expand Down
7 changes: 4 additions & 3 deletions config/sync/node.type.stanford_publication.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ third_party_settings:
available_menus: { }
parent: ''
node_revision_delete:
minimum_revisions_to_keep: 5
minimum_age_to_delete: 0
when_to_delete: 0
amount:
status: true
settings:
amount: 5
scheduler:
expand_fieldset: when_required
fields_display_mode: vertical_tab
Expand Down
12 changes: 1 addition & 11 deletions config/sync/node_revision_delete.settings.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
_core:
default_config_hash: Pxmt-VsuXAuxxpRjBCrKQOxetjgmBAE2DfSD7s276UM
delete_newer: false
node_revision_delete_cron: 50
node_revision_delete_time: 0
node_revision_delete_minimum_age_to_delete_time:
max_number: 6
time: months
node_revision_delete_when_to_delete_time:
max_number: 6
time: months
disable_automatic_queueing: false
20 changes: 0 additions & 20 deletions config/sync/ultimate_cron.job.node_revision_delete_cron.yml

This file was deleted.

16 changes: 6 additions & 10 deletions tests/codeception/acceptance/AuthenticatedPermissionsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,8 @@ public function testAuthenticatedUserRestrictions(AcceptanceTester $I) {
*/
public function testSiteManagerEscalationSelf(AcceptanceTester $I) {
$site_manager = $I->logInWithRole('site_manager');
$site_manager_id = $site_manager->id();
$I->amOnPage('/admin/users');
$I->canSee($site_manager->getDisplayName());
$I->click(['link' => $site_manager->getDisplayName()]);
$I->click('.roles.tabs__tab a');
$I->canSeeInCurrentUrl("/user/$site_manager_id/roles");
$I->amOnPage($site_manager->toUrl('edit-form')->toString());

$I->dontSee('Administrator');
$I->dontSee('Site Builder');
$I->dontSee('Site Developer');
Expand All @@ -95,11 +91,11 @@ public function testSiteManagerEscalationSelf(AcceptanceTester $I) {
* Site Manager cannot escalate others' role above Site Manager.
*/
public function testSiteManagerEscalationOthers(AcceptanceTester $I) {
$name = $this->faker->words(3, TRUE);
$user = $I->createEntity(['name' => $name], 'user');
$I->logInWithRole('site_manager');
$I->amOnPage('/admin/users');
$I->canSee('Morgan');
$I->click('Morgan');
$I->click('.roles.tabs__tab a');
$I->amOnPage($user->toUrl('edit-form')->toString());
$I->canSeeInField('Username', $name);
$I->dontSee('Administrator');
$I->dontSee('Site Builder');
$I->dontSee('Site Developer');
Expand Down
5 changes: 2 additions & 3 deletions tests/codeception/acceptance/Content/NewsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ public function testXMLMetaDataRevisions(AcceptanceTester $I) {

// Revision Delete is enabled.
$I->amOnPage('/admin/structure/types/manage/stanford_news');
$I->seeCheckboxIsChecked("#edit-node-revision-delete-track");
$I->seeCheckboxIsChecked("#edit-options-revision");
$I->seeInField("#edit-minimum-revisions-to-keep", 5);
$I->seeCheckboxIsChecked("#edit-amount-status");
$I->seeInField("Minimum number of revisions to keep (per language)", 5);

// XML Sitemap.
$I->amOnPage("/admin/config/search/xmlsitemap/settings");
Expand Down
5 changes: 2 additions & 3 deletions tests/codeception/acceptance/Content/PersonCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ public function testXMLMetaDataRevisions(AcceptanceTester $I) {

// Revision Delete is enabled.
$I->amOnPage('/admin/structure/types/manage/stanford_person');
$I->seeCheckboxIsChecked('#edit-node-revision-delete-track');
$I->seeCheckboxIsChecked('#edit-options-revision');
$I->seeInField('#edit-minimum-revisions-to-keep', 5);
$I->seeCheckboxIsChecked("#edit-amount-status");
$I->seeInField("Minimum number of revisions to keep (per language)", 5);

// XML Sitemap.
$I->amOnPage('/admin/config/search/xmlsitemap/settings');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function testNodeRevisionDelete(AcceptanceTester $I) {
$I->amOnPage("/node/{$node->id()}/revisions");
$I->canSeeNumberOfElements('.diff-revisions tbody tr', 11);

$I->runDrush('cron:run node_revision_delete_cron --force');
$I->runDrush('queue:run node_revision_delete');
$I->amOnPage("/node/{$node->id()}/revisions");
$I->canSeeNumberOfElements('.diff-revisions tbody tr', 5);
}
Expand Down

0 comments on commit 555f7b6

Please sign in to comment.