I want to pull on some threads from two separate issues and create a new smaller easier to handle thing.
1) PhpUnit test is prefered but what to do about javascript testing - how to maintain test coverage?
as berdir says
https://www.drupal.org/node/2751053#comment-11359129
When all else fails we have javascriptTestBase,
2) From
A single conversion of creteFlagWithForm() is impossible to convert.
An approach suggested by joachim - doCreateAjaxFlag() - we should create a separate test
This issue is to make a test that extends javascriptTestBase and maintains that test coverage.
Comment | File | Size | Author |
---|---|---|---|
#7 | trait-2759945-7.patch | 16.74 KB | martin107 |
#7 | interdiff-4-7.txt | 427 bytes | martin107 |
#4 | fancy-pants-2759945-3.patch | 16.78 KB | martin107 |
Comments
Comment #2
martin107 CreditAttribution: martin107 commentedMy focus is shifting here.
Comment #3
martin107 CreditAttribution: martin107 commentedEarly patch - just want to show the general direction and to welcome nudges in the right direction.
1) For methods common to tests extending BrowserBase, JavascriptTestBase and FlagTestBase. I have created FlagTestTrait.
I have moved in only the functions I needed here - as we convert more tests this little trait will grow.
2) To maintain test coverage, ie running through flag creation via the UI there is a new test FlagAddFormTest - yes it is simplistic but that is all the coverage we ever had...
maybe a separate issue as followup
3) In the end LinkTypeAjax test will be the fancy pants test extending JavascriptTestBase it will makes assertJsCondition() calls.
I have put zero effort into getting the new LinkTypeAjaxTest working - For now want testbot to confirm FlagAddForm works.
I hope to have more time over the weekend.
Comment #4
martin107 CreditAttribution: martin107 commentedDoh
Comment #7
martin107 CreditAttribution: martin107 commentedJust fixing gross errors.
locally I was only checking new functional tests - did not check other tests.