Skip to content

Commit

Permalink
Merge pull request #922 from UN-OCHA/2024-gtm-barebones
Browse files Browse the repository at this point in the history
chore: Switch to gtm_barebones
  • Loading branch information
attiks authored Apr 24, 2024
2 parents a3cd8c1 + 18ec288 commit abb0e03
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 166 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
"symfony/flex": "^1.17",
"unocha/common_design": "^9",
"unocha/file_checker": "dev-8.x-1.x",
"unocha/gtm_barebones": "^1.0",
"unocha/ocha_integrations": "^2",
"unocha/ocha_monitoring": "^1.0",
"unocha/ocha_search": "^1.0",
Expand Down
31 changes: 29 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ module:
geofield: 0
geophp: 0
gnode: 0
google_tag: 0
group: 0
gtm_barebones: 0
help: 0
history: 0
honeypot: 0
Expand Down
47 changes: 0 additions & 47 deletions config/google_tag.container.default.yml

This file was deleted.

38 changes: 0 additions & 38 deletions config/google_tag.settings.yml

This file was deleted.

5 changes: 5 additions & 0 deletions config/gtm_barebones.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
_core:
default_config_hash: SKvdm9tOuxLJtYkf6Z96GCWJSQBUxJ_4D01Q1NAVpH4
container_id: ''
environment_id: ''
environment_token: ''
20 changes: 0 additions & 20 deletions config/monitoring.sensor_config.core_requirements_google_tag.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ public function testContactForAnon() {
$this->drupalGet($node->toUrl());
$this->assertSession()->statusCodeEquals(200);
$this->assertSession()->pageTextContains('To view more details, please login.');

// Login using reset link.
$this->drupalLogin($admin);

// We can browse the contact as admin.
$this->drupalGet($node->toUrl());
$this->assertSession()->statusCodeEquals(200);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -43,38 +43,6 @@ public function testFieldLegacyPublish() {

$this->assertSession()->hiddenFieldExists('form_id');
$this->assertSession()->fieldNotExists('field_legacy_publish');
}

/**
* Make sure legacy publish field is not displayed.
*
* @throws \Drupal\Core\Entity\EntityStorageException
* @throws \Drupal\Core\Entity\EntityMalformedException
* @throws \Behat\Mink\Exception\ExpectationException
*/
public function testFieldLegacyId() {
$admin = User::load(1);

// Create a contact.
$node = $this->createNode([
'title' => 'Test contact',
'type' => 'contact',
'uid' => $admin->id(),
]);
$node->setPublished()->save();

// Login using reset link.
$this->drupalLogin($admin);

// We can browse the contact.
$this->drupalGet($node->toUrl());
$this->assertSession()->statusCodeEquals(200);

// Check node edit screen.
$this->drupalGet($node->toUrl('edit-form'));
$this->assertSession()->statusCodeEquals(200);

$this->assertSession()->hiddenFieldExists('form_id');
$this->assertSession()->fieldNotExists('field_legacy_id');
}

Expand Down
19 changes: 0 additions & 19 deletions tests/settings/settings.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,6 @@
* at the bottom of 'sites/example.com/settings.php'.
*/

/**
* Assertions.
*
* The Drupal project primarily uses runtime assertions to enforce the
* expectations of the API by failing when incorrect calls are made by code
* under development.
*
* @see http://php.net/assert
* @see https://www.drupal.org/node/2492225
*
* If you are using PHP 7.0 it is strongly recommended that you set
* zend.assertions=1 in the PHP.ini file (It cannot be changed from .htaccess
* or runtime) on development machines and to 0 in production.
*
* @see https://wiki.php.net/rfc/expectations
*/
assert_options(ASSERT_ACTIVE, TRUE);
\Drupal\Component\Assertion\Handle::register();

/**
* Enable local development services.
*/
Expand Down

0 comments on commit abb0e03

Please sign in to comment.