Support Translation Test
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | interdiff-11-13.txt | 817 bytes | idebr |
| #13 | 2751465-13.patch | 11.74 KB | idebr |
Issue fork eu_cookie_compliance-2751465
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
Comment #2
naveenvalechaComment #3
naveenvalechaComment #4
ivan berezhnov commentedComment #5
useernamee commentedHi.
I have put together some phpunit tests. There is a functional test that is testing the form.
Than I have also created a functional javascript test that actually compares the popup with what should be inserted. As a byproduct I have also created a functional javascript test that checks if popup is working when you click on different pages (if accept on click is set to false).
This module doesn't work the best in phantomjs and that took me a lot of time. So it's still work in progress. I hope I get some advice before I continue.
Problems:
- I don't know why it doesn't print out 'popup_info' (FunctionalJavascript tests)
- I don't know why it doesn't use translated 'popup_find_more_button_message' (EuCookieComplianceTranslationJavascriptTest)
Todo:
- Write some more comments
- Code cleanup
Comment #6
svenryen commentedHi! Looks mostly good. Just have a few remarks.
Why is this line commented out?
Same with this one :)
Comment #7
idebr commentedComment #8
svenryen commented@idebr Do you have any steps for how to validate this patch? I'm not the most familiar with WebDriver tests.
Comment #9
idebr commentedThe tests programmatically installs and configures the module and then checks events on the page. There is documentation available on running them locally, so you can see the test run in a browser. See https://www.drupal.org/docs/8/phpunit/phpunit-javascript-test-writing-tu...
Comment #10
svenryen commentedThanks. Seems like the instructions for actually running the tests were at https://www.drupal.org/docs/8/phpunit/running-phpunit-javascript-tests
I'll have a look at this next week.
Comment #11
idebr commentedUpdated #7 with the latest changes in HEAD
Comment #13
idebr commentedOne more change.
Comment #14
svenryen commentedIf anybody is free to review this, that would be really fantastic.
Thanks for the updates, @idebr!
Comment #15
anybodyWhao, TESTS are really really needed for this module. This is a fantastic little first step!
We need a lot more of that to test all functionalities and their combinations! But that's a different issue ;)
Sadly #13 fails with PHP 7.3 & MySQL 5.7, Drupal 8.9.x so this needs work.
Comment #16
svenryen commentedMarking this to see if we can make use of it for 2.x
Comment #17
svenryen commentedNew tests needs to be written once we develop 2.x
Comment #18
svenryen commentedComment #19
atowl commentedHi,
Might move this to the version 1, i've put some tests in but these were pretty basic and this might be better.
Comment #23
kieran.cottHi folks - I've used the patch in #13 to add some configuration translation tests in MR 186, and added a few more fields for additional coverage.
Comment #24
kieran.cott