Problem/Motivation

Currently, the module only has load tests, but should also test the functionality and especially access checks as in the past there was a security issue.

Tests to consider:
- Install / Uninstall
- Permissions / Access, e.g. #3204475: Review access checks, see #8
- Settings & Settings combinations
- FunctionalJavascript test on the autocomplete

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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:

Comments

Anybody created an issue. See original summary.

anybody’s picture

Priority: Normal » Major
Issue summary: View changes
anybody’s picture

Title: Write further basic tests » Write further basic tests and add gitlab CI
Priority: Major » Normal
Issue tags: +Novice
anybody’s picture

Title: Write further basic tests and add gitlab CI » Write basic tests and add gitlab CI
anybody’s picture

Assigned: Unassigned » lrwebks

lrwebks made their first commit to this issue’s fork.

lrwebks’s picture

We should also test getting the values from the controller for:

  • Not having the "access content" permission
  • Not having view access to the entity
  • Not having view access to the field of the entity type (Maybe not possible to test without external module, but this should already be covered by the view access checks in the controller)
  • Trying to access an unpublished entity (core currently only supports own unpublished content)
anybody’s picture

Title: Write basic tests and add gitlab CI » Write basic tests, fix schema issues, add gitlab CI and do further important cleanup
anybody’s picture

Also please fix phpcs, cspell and phpstan @lrwebks

Edit sorry that's in #3337543: Drupal Coding Standards Issues | phpcs

anybody’s picture

Issue summary: View changes

Plus we should add a FunctionalJavascript test on the autocomplete

lrwebks’s picture

Okay, everything is in place now apart from the JS test. I can't seem to figure out why the autocomplete does not appear on the field in the test environment but under the same conditions locally it works. Any suggestions?

anybody’s picture

@lrwebks Maybe this suggestion is helpful? https://copilot.microsoft.com/shares/bNPsZW4q769irSqGJsQ7P

Otherwise let's comment out the functional test for now and go ahead.

Please also fix cspell and phpstan.

lrwebks’s picture

I think we wanted to fix cspell and phpstan in #3337543: Drupal Coding Standards Issues | phpcs.
I will comment out the test for now. Everything else is working and tested by myself.

anybody’s picture

Status: Active » Needs work

Ah sorry yes!

lrwebks’s picture

Status: Needs work » Needs review

anybody’s picture

Assigned: lrwebks » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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