Skip to content

Commit

Permalink
#478 Enable CI testing matrix against D8/D9, fix deprecations (#490)
Browse files Browse the repository at this point in the history
* [#478] Enable testing matrix against D8 and  D9.

* [#478] Fix ResponseTemplateLoader in apigee_mock_api_client.

* [#478] Add scaffolding files to CI composer.

* [#478] Fixing tests.

* [#478] Fixed AuthenticationFormJsTest.

* [#478] Fixed DeveloperTest.

* [#478] Fixed deprecated service in EdgeEntityListBuilder.
  • Loading branch information
arlina-espinoza authored Sep 18, 2020
1 parent 5b537d6 commit b0b61db
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .circleci/RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ public function setupSkeleton()
$config = json_decode(file_get_contents('composer.json'));
$config->extra->{"enable-patching"} = 'true';
$config->extra->{"patches"} = new \stdClass();
$config->extra->{"drupal-scaffold"} = new \stdClass();
$config->extra->{"drupal-scaffold"}->{"locations"} = (object) [
'web-root' => '.',
];

file_put_contents('composer.json', json_encode($config));

Expand Down Expand Up @@ -425,12 +429,14 @@ public function drupalVersion($drupalCoreVersion)

switch ($drupalCoreVersion) {
case '9':
$config->require->{"drupal/core-composer-scaffold"} = '^9';
$config->require->{"drupal/core-recommended"} = '^9';
$config->require->{"drupal/core-dev"} = '^9';

break;

case '8':
$config->require->{"drupal/core-composer-scaffold"} = '~8';
$config->require->{"drupal/core-recommended"} = '~8';
$config->require->{"drupal/core-dev"} = '~8';

Expand Down
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ workflows:
name: update-dependencies-<< matrix.core-version >>
matrix:
parameters:
core-version: [8]
core-version: [8, 9]
- run-code-sniffer:
requires:
- update-dependencies-8
Expand All @@ -257,21 +257,21 @@ workflows:
name: run-unit-kernel-tests-<< matrix.core-version >>
matrix:
parameters:
core-version: [8]
core-version: [8, 9]
requires:
- update-dependencies-<< matrix.core-version >>
- run-functional-tests:
name: run-functional-tests-<< matrix.core-version >>
matrix:
parameters:
core-version: [8]
core-version: [8, 9]
requires:
- update-dependencies-<< matrix.core-version >>
- run-functional-js-tests:
name: run-functional-js-tests-<< matrix.core-version >>
matrix:
parameters:
core-version: [8]
core-version: [8, 9]
requires:
- update-dependencies-<< matrix.core-version >>
# - run-code-coverage:
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/ListBuilder/EdgeEntityListBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function __construct(EntityTypeInterface $entity_type, EntityTypeManagerI
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static(
$entity_type,
$container->get('entity.manager'),
$container->get('entity_type.manager'),
$container->get('config.factory')
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ public function __construct(ModuleHandlerInterface $module_handler) {
/**
* {@inheritdoc}
*/
protected function normalizeName($name) {
$name = str_replace('_', '-', parent::normalizeName($name));
protected function findTemplate($name, $throw = TRUE) {
$name = str_replace('_', '-', $name);

if (strpos($name, '.twig') === FALSE) {
$name = "{$name}.json.twig";
}

return $name;
return parent::findTemplate($name, $throw);
}

}
2 changes: 1 addition & 1 deletion tests/src/Functional/DeveloperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ protected function developerCreateByAdminTest() {
// too.
$this->stack->queueMockResponse('get_not_found');
$loaded = $this->developerStorage->loadUnchanged($test_user['email']);
$this->assertFalse($loaded, 'Developer does not exists anymore.');
$this->assertEmpty($loaded, 'Developer does not exists anymore.');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ abstract class ApigeeEdgeFunctionalJavascriptTestBase extends WebDriverTestBase

use ApigeeEdgeFunctionalTestTrait;

/**
* For tests relying on no markup at all or at least no core markup.
*
* @var string
*/
protected $defaultTheme = 'stark';

/**
* {@inheritdoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
*/
class AuthenticationFormJsTest extends ApigeeEdgeFunctionalJavascriptTestBase {

/**
* {@inheritdoc}
*/
protected $defaultTheme = 'classy';

/**
* Valid username.
*
Expand Down

0 comments on commit b0b61db

Please sign in to comment.