In #2867739: remove FlagViewsFlaggableArgument I am about to modify ShowOnEntityFormTest as part of the process of removing redundant code.

Beforehand I want to modernize ShowOnEntityFormTest.

1) That means moving away from simpletest to BtowserTestBase.
2) D8 core has a policy of tests not using $this->t() unless directly testing translations ... so I am dropping $this->t()
3) I have created a new trait so that we can use grantFlagPermissions() in simpletest test and the more modern form.

Comments

martin107 created an issue. See original summary.

martin107’s picture

StatusFileSize
new8.63 KB

Initial version ... not passing yet.

martin107’s picture

Status: Active » Needs review
martin107’s picture

The passing tests are a screw up...

I can see the linter reporting no errors for ShowOnEntityFormTest

BUT unlike all the other functional tests ShowOnEntityFormTest is not run as far as I can see....

There is a @flag group and the class names/namespaces/file names seem in order.

Can anyone spot my screw up ?

running

../vendor/bin/phpunit --debug -vvv ../modules/flag/tests/src/Functional/ShowOnEntityFormTest.php

shows the state of the test!

martin107’s picture

StatusFileSize
new8.63 KB
new434 bytes

Fix the screw up in #4

The test now successfully fail!!!! ... as expected.

martin107’s picture

Title: Convert ShowOnEntityFormTest to BrowserTestBase » Restore/Convert ShowOnEntityFormTest to BrowserTestBase
Assigned: martin107 » Unassigned
Category: Task » Bug report
Priority: Normal » Critical
StatusFileSize
new8.57 KB
new1.92 KB

Here is the change record which shows the corruption of the existing tests since last commit!

https://www.drupal.org/node/2847274

The label on a button has been simplified.

That makes this issue a critical bug report.

  • socketwench committed 879c7d8 on 8.x-4.x authored by martin107
    Issue #2895893 by martin107: Restore/Convert ShowOnEntityFormTest to...
socketwench’s picture

Status: Needs review » Fixed

Fixed! Also added the missing newline. Thanks Martin!

Status: Fixed » Closed (fixed)

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