While working on the port of the Entity Embed CKEditor Plugin's test coverage to core in #2940029: Add an input filter to display embedded Media entities, I spotted:

  1. The copying of an existing file instead of using TestFileCreationTrait
  2. Several unused test class properties
  3. Inaccurate comments
  4. Every test is calling drupalLogin($this->adminUser) — might as well do that in ::setUp() then :)
  5. Some unnecessarily complex XPath-based element selection, converting them to CSS-based selectors simplifies the tests and makes them accessible to more people
  6. Some missing "waits"
  7. A few assertions that are too high-level and thus don't necessarily prove something is still working
  8. Some typos
CommentFileSizeAuthor
#2 3064782-2.patch17.12 KBwim leers

Comments

Wim Leers created an issue. See original summary.

wim leers’s picture

Status: Active » Needs review
StatusFileSize
new17.12 KB

Fixed all of the above.

wim leers’s picture

Status: Needs review » Reviewed & tested by the community

Green!

wim leers’s picture

Title: Follow-up for #3060396: one incorrect test case and a missing one, some minor problems and one significant simplification » Follow-up for #3060396: make CKEditor Widget JS tests conform to best practices, and harden them
wim leers’s picture

Status: Reviewed & tested by the community » Fixed

  • Wim Leers committed 04b303f on 8.x-1.x
    Issue #3064782 by Wim Leers: Follow-up for #3060396: make CKEditor...
wim leers’s picture

Status: Reviewed & tested by the community » Fixed

🙃

Status: Fixed » Closed (fixed)

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