Comments

GoZ created an issue. See original summary.

goz’s picture

Status: Active » Needs review
StatusFileSize
new47.04 KB

Status: Needs review » Needs work

The last submitted patch, 2: 2753891-ParagraphsTranslationTest.patch, failed testing.

The last submitted patch, 2: 2753891-ParagraphsTranslationTest.patch, failed testing.

The last submitted patch, 2: 2753891-ParagraphsTranslationTest.patch, failed testing.

johnchque’s picture

Thanks for the patch but I wonder if we really need a javascript based test here? AFAIK extending from BrowserTestBase should be more than enough. Also, extending from JavaScriptTestBase makes the tests slower.

goz’s picture

Assigned: Unassigned » goz

We need JavaScriptTestBase to replace DrupalPostAjaxForm and to "submit" buttons which load embed paragraph entities.

I just figure out this patch is a work in progress. I did it in train yesterday and forgot this morning i hadn't test it. So i continue working on it.

johnchque’s picture

I would say that BrowserTestBase::drupalPostForm() can also be called to emulate an Ajax submission. So a browser test should be fine here.

miro_dietiker’s picture

As of Berdir: BrowserTestBase does not and will not simulate Ajax.
If you need Ajax emulation, use JavascriptTestBase.

The Paragraphs UI works "perfectly" (although looking ugly) without JS. So the tests can easily do all the things without (simulating or real JS based) Ajax.

IMHO it's fine if we have a few real JS head browser tests that focus on the JS aspects and keep the Translation workflow test non-JS for speed reasons.

jmuzz’s picture

Status: Needs work » Postponed
Related issues: +#2738567: Add test trait for drupalGetTestFiles and drupalCompareFile
StatusFileSize
new13.02 KB

I think this is a step in the right direction, and testParagraphTranslation() will pass.

The rest of them make use of drupalGetTestFiles() so lets wait until they make a version of the function for PHPUnit before continuing.

berdir’s picture

Status: Postponed » Closed (duplicate)

Closing as a duplicate.