We can add following tests to this module.

  1. Test to ensure website is working after enabling Disqus module.
  2. Test to verify presence of Disqus HTML elements in the DOM after adding a Disqus field.
  3. Test to verify working of Disqus Comments View field by mocking the Disqus API

Issue fork disqus-2289295

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gaurav.kapoor’s picture

Title: [META] Write tests » Add automated tests to the Disqus module.
Issue tags: -gsoc2014
gaurav.kapoor’s picture

Issue summary: View changes
gaurav.kapoor’s picture

Version: 8.x-1.x-dev » 2.0.1-alpha4
gaurav.kapoor’s picture

Assigned: Unassigned » gaurav.kapoor
gaurav.kapoor’s picture

This error will have to be resolved for any tests to work.

1) Drupal\Tests\disqus\Functional\DisqusAdminTest::testDisqusConfigurationPage
Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for disqus.settings with the following errors: disqus.settings:_core missing schema, disqus.settings:langcode missing schema

/app/web/core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php:94
/app/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php:142
/app/web/core/lib/Drupal/Core/Config/Config.php:229
/app/web/core/lib/Drupal/Core/Config/ConfigInstaller.php:399
/app/web/core/lib/Drupal/Core/Config/ConfigInstaller.php:152
/app/web/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php:75
/app/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php:324
/app/web/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php:83
/app/web/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:474
/app/web/core/tests/Drupal/Tests/BrowserTestBase.php:559
/app/web/core/tests/Drupal/Tests/BrowserTestBase.php:378
/app/web/modules/contrib/disqus/tests/src/Functional/DisqusAdminTest.php:32
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:726

gaurav.kapoor’s picture

Version: 2.0.1-alpha4 » 2.0.x-dev

Added a few basic tests along with the required changes in the module. I will be taking hint from here and then write more field-based tests.

gaurav.kapoor’s picture

gaurav.kapoor’s picture

gaurav.kapoor’s picture

Status: Active » Needs review

  • gaurav.kapoor committed 34384b8 on 2.0.x
    Issue #2289295: Add automated tests to the Disqus module.
    
gaurav.kapoor’s picture

Status: Needs review » Fixed

Merged the MR as all the threads have been resolved. Let's continue to build more tests in the follow-up issues. Thanks, everyone for working on this. Marking this issue as fixed.

Feel free to open up new issue for any changes that are needed in commit done for this issue or improvements in automated tests for the Disqus module.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.