See #2735005: Convert all Simpletest web tests to BrowserTestBase (or UnitTestBase/KernelTestBase)

Settings Tray module already has real Javascript tests so I don't think it's needed to convert OffCanvasDialogTest to a real Javascript test, OffCanvasDialogTest tests response formatting, not javascript functionality, so fine to keep this as-is

CommentFileSizeAuthor
#4 2870456-4.patch1.93 KBApacheEx
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

michielnugter created an issue. See original summary.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

jonathan1055’s picture

Title: Convert web tests to browser tests for outside_in module » Convert web tests to browser tests for Settings Tray module

In the current readme.txt it says:

Drupal 8.2.0, 2016-10-05
------------------------
- Added modules:
    * Added the Settings Tray module (experimental) to edit the configuration of any block on the page. Its machine name in this release is "outside_in".

However, that string is the only occurence of "outside_in" in the entire core codebase, hence I have renamed this issue.

For info, the tests in SettingsTrayTest.php are already converted to BrowserTestBase. The only other test file is /core/modules/settings_tray/src/Tests/Ajax/OffCanvasDialogTest.php and this class extends AjaxTestBase

ApacheEx’s picture

Component: phpunit » settings_tray.module
Status: Active » Needs review
Issue tags: +phpunit initiative
FileSize
1.93 KB

Previously AjaxTestBase extends WebTestBase.
So, I've converted this to BrowserTestBase. Here is a patch.

Lendude’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
  • This cleans out the /src/Tests dir.
  • It's nice and minimal.
  • Settings Tray module already has real Javascript tests so I don't think it's needed to convert this to a real Javascript test, this tests response formatting, not javascript functionality, so fine to keep this as-is

Nice work! Updated IS to reflect the direction that was taken here.

alexpott’s picture

Crediting @Lendude for the review and considering the issue of whether this should be converted to a JavascriptTestBase or not.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed a08af1ac93 to 8.5.x and 54fa50e0d3 to 8.4.x. Thanks!

  • alexpott committed a08af1a on 8.5.x
    Issue #2870456 by ApacheEx, Lendude: Convert web tests to browser tests...

  • alexpott committed 54fa50e on 8.4.x
    Issue #2870456 by ApacheEx, Lendude: Convert web tests to browser tests...

Status: Fixed » Closed (fixed)

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