The default testbot for this module seems to be returning the same error in all cases: PHP 7.1 & MySQL 8, D8.9 Composer error. Unable to continue.

Example: https://www.drupal.org/pift-ci-job/1764314
fixed in #30

but we have other issues...

CommentFileSizeAuthor
#59 3128333-59.patch9.46 KBNeslee Canil Pinto
#58 3128333-58.patch16.91 KBNeslee Canil Pinto
#57 3128333-57.patch3.6 KBNeslee Canil Pinto
#56 3128333-56.patch3.13 KBNeslee Canil Pinto
#55 3128333-55.patch2.32 KBNeslee Canil Pinto
#53 3128333-53.patch1.98 KBNeslee Canil Pinto
#48 3128333-48.patch13.42 KBKrzysztof Domański
#48 interdiff-45-48.txt1.6 KBKrzysztof Domański
#45 3128333-debug.patch13.42 KBKrzysztof Domański
#44 3128333-44.patch13.34 KBKrzysztof Domański
#44 interdiff-42-44.txt5.23 KBKrzysztof Domański
#42 3128333-42.patch8.38 KBKrzysztof Domański
#42 interdiff-41-42.txt6.16 KBKrzysztof Domański
#41 3128333-40.patch2.22 KBKrzysztof Domański
#39 3128333-39.patch2.17 KBKrzysztof Domański
#39 interdiff-38-39.txt624 bytesKrzysztof Domański
#38 3128333-38.patch2.16 KBKrzysztof Domański
#31 3128333-31-debug.patch2.76 KBKrzysztof Domański
#30 3128333-28.patch1.46 KBKrzysztof Domański
#28 3128333-26.patch1.49 KBKrzysztof Domański
#27 3128333-25.patch1.22 KBKrzysztof Domański
#22 juicebox-n3128333-22.patch2.07 KBDamienMcKenna
#22 juicebox-n3128333-22.interdiff.txt1.61 KBDamienMcKenna
#19 juicebox-n3128333-18.patch2.15 KBDamienMcKenna
#17 3128333-17.patch1.41 KBNeslee Canil Pinto
#16 3128333-16.patch2.64 KBNeslee Canil Pinto
#15 3128333-15.patch1.99 KBNeslee Canil Pinto
#14 3128333-14.patch1.99 KBNeslee Canil Pinto
#13 3128333-13.patch1.12 KBNeslee Canil Pinto
#9 3128333-9.patch9.79 KBNeslee Canil Pinto
#8 3128333-8.patch8.59 KBNeslee Canil Pinto
#7 3128333-7.patch8.47 KBNeslee Canil Pinto
#6 3128333-6.patch6.67 KBNeslee Canil Pinto
#5 3128333-5.patch6.67 KBNeslee Canil Pinto
#4 3128333-4.patch6.7 KBNeslee Canil Pinto
#3 3128333-3.patch2.37 KBNeslee Canil Pinto
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xeM8VfDh created an issue. See original summary.

Neslee Canil Pinto’s picture

Status: Active » Needs work
Neslee Canil Pinto’s picture

Neslee Canil Pinto’s picture

Neslee Canil Pinto’s picture

Neslee Canil Pinto’s picture

Neslee Canil Pinto’s picture

Neslee Canil Pinto’s picture

Neslee Canil Pinto’s picture

Neslee Canil Pinto’s picture

Title: Composer error. Unable to continue. [TESTBOT] » Tests are broken in 8.x-2.x-dev
Neslee Canil Pinto’s picture

Issue summary: View changes
Neslee Canil Pinto’s picture

Issue summary: View changes
Neslee Canil Pinto’s picture

Neslee Canil Pinto’s picture

Neslee Canil Pinto’s picture

Neslee Canil Pinto’s picture

Neslee Canil Pinto’s picture

Neslee Canil Pinto’s picture

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
2.15 KB

This is the sort of change I had in mind. Note: I haven't tested it yet, but it shows the direction to take.

The last submitted patch, , failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 19: juicebox-n3128333-18.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
1.61 KB
2.07 KB

Does this work?

Status: Needs review » Needs work

The last submitted patch, 22: juicebox-n3128333-22.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Krzysztof Domański’s picture

Just remove a deprecated asserts from JavascriptTestBase. See Disabled methods to inspect headers for JavascriptTestBase tests

-         $this->assertSession()->statusCodeEquals(200);
DamienMcKenna’s picture

Per @mixologic:

So, the thing here is that the test is not running on the same filesystem as the headless chrome container.

So you cannot just “upload the file” because when you are “clicking the file upload” in chrome, its looking at its local filesystem for the file, not in the filesystem where you are running your test.

I know people have worked around this in the past by doing something that actually uploads the file to chromes’ filesystem first somehow. Im pretty sure there is a core test that does it even.

DamienMcKenna’s picture

I wonder if the tests related to uploading files could be moved into functional tests that extend BrowserTestBase, and then leave the WebDriverTestBase tests to just test the output?

Krzysztof Domański’s picture

Ignore

Krzysztof Domański’s picture

Neslee Canil Pinto’s picture

@DamienMcKenna @Krzysztof Domański, wow we are getting near to it.

Krzysztof Domański’s picture

Assigned: Unassigned » Krzysztof Domański
FileSize
1.46 KB
Krzysztof Domański’s picture

1) Drupal\Tests\juicebox\FunctionalJavascript\JuiceboxFileCaseTest::testFile
Behat\Mink\Exception\ExpectationException: The string "" was not found anywhere in the HTML response of the current page.

/var/www/html/vendor/behat/mink/src/WebAssert.php:768
/var/www/html/vendor/behat/mink/src/WebAssert.php:324
/var/www/html/core/tests/Drupal/Tests/WebAssert.php:429
/var/www/html/core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php:315
/var/www/html/modules/contrib/juicebox/tests/src/FunctionalJavascript/JuiceboxFileCaseTest.php:66

Let's see what's displayed.

--- a/tests/src/FunctionalJavascript/JuiceboxFileCaseTest.php
+++ b/tests/src/FunctionalJavascript/JuiceboxFileCaseTest.php
@@ -60,6 +60,8 @@ class JuiceboxFileCaseTest extends JuiceboxCaseTestBase {
     $this->assertRaw(Html::escape(file_url_transform_relative($test_image_url)), 'Test image found in embed code');
     // Check for correct XML.
     $this->drupalGet($xml_path);
+    $content = $this->getRawContent();
+    var_dump($content);
     $this->assertRaw('<?xml version="1.0" encoding="UTF-8"?>', 'Valid XML detected.');
Krzysztof Domański’s picture

Assigned: Krzysztof Domański » Unassigned

Unassigned. I will work on it yet. Maybe someone else will fix it in the meantime.

Krzysztof Domański’s picture

Issue summary: View changes
1) Drupal\Tests\juicebox\FunctionalJavascript\JuiceboxViewsCaseTest::testViews
Exception: invalid argument: File not found : /var/www/html/sites/simpletest/85280412/files/image-test.png
  (Session info: headless chrome=74.0.3729.157)
  (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.9.0-0.bpo.6-amd64 x86_64)
+      $uri = \Drupal\file\Entity\File::load($this->node->{$this->instFieldName}[0]->target_id)->getFileUri();
+      var_dump($uri);

This problem has been fixed in #30. File exists "public://2020-07/image-test.png".

but we have other issues... See https://www.drupal.org/pift-ci-job/1767393

Krzysztof Domański’s picture

Title: Tests are broken in 8.x-2.x-dev » Tests are broken in 8.x-2.x-dev (Exception: invalid argument: File not found)
Status: Needs work » Needs review

I think we can commit #30 because that blocks all tests. Let's create follow-up to fix other issues.

Neslee Canil Pinto’s picture

Ya i was thinking about commiting things, so we can get heads up for other tests that are failing

Neslee Canil Pinto’s picture

Status: Needs review » Needs work
Krzysztof Domański’s picture

Title: Tests are broken in 8.x-2.x-dev (Exception: invalid argument: File not found) » Tests are broken in 8.x-2.x-dev
Status: Needs work » Needs review
FileSize
2.16 KB

We need to install the Juicebox library.

Krzysztof Domański’s picture

Krzysztof Domański’s picture

Krzysztof Domański’s picture

Krzysztof Domański’s picture

Behat\Mink\Exception\UnsupportedDriverActionException: Status code is not available from Drupal\FunctionalJavascriptTests\DrupalSelenium2Driver

See Disabled methods to inspect headers for JavascriptTestBase tests

For example, if a statusCodeEquals(200) was used, change it to assert the availability of an element on the page that you'd only expect on a successful page load.

Krzysztof Domański’s picture

"Status code is not available..." has been fixed, but there is still many issues...

Krzysztof Domański’s picture

Krzysztof Domański’s picture

1) Drupal\Tests\juicebox\FunctionalJavascript\JuiceboxConfCaseTest::testConfigLite
Behat\Mink\Exception\ExpectationException: The string "" was not found anywhere in the HTML response of the current page.

Let's see raw content.

+++ b/tests/src/FunctionalJavascript/JuiceboxConfCaseTest.php
@@ -51,7 +51,9 @@ class JuiceboxConfCaseTest extends JuiceboxCaseTestBase {
     $this->drupalGet('node/' . $node->id());
     $this->assertRaw(trim(json_encode(array('gallerywidth' => '100%', 'galleryheight' => '100%', 'backgroundcolor' => '#222222')), '{}'), 'Expected default configuration options found in Drupal.settings.');
     $this->drupalGet('juicebox/xml/field/node/' . $node->id() . '/' . $this->instFieldName . '/full');
-    $this->assertRaw('<juicebox gallerywidth="100%" galleryheight="100%" backgroundcolor="#222222" textcolor="rgba(255,255,255,1)" thumbframecolor="rgba(255,255,255,.5)" showopenbutton="TRUE" showexpandbutton="TRUE" showthumbsbutton="TRUE" usethumbdots="FALSE" usefullscreenexpand="FALSE">', 'Expected default configuration options set in XML.');
+    $content = $this->getSession()->getPage()->getContent();
+    var_dump($content);
Krzysztof Domański’s picture

Re #45

Testing Drupal\Tests\juicebox\FunctionalJavascript\JuiceboxConfCaseTest
Estring(232) "
404 Not Found
Neslee Canil Pinto’s picture

Status: Needs review » Needs work
Krzysztof Domański’s picture

Krzysztof Domański’s picture

Neslee Canil Pinto’s picture

0k @Krzysztof Domański

Neslee Canil Pinto’s picture

@Krzysztof Domański should this be FunctionalJavascript test or just Functional tests?
May be we have to write only Functional test for this module

Neslee Canil Pinto’s picture

Hi @Krzysztof Domański, i fixed all the tests and committed to dev. Only 2 are remaining - https://www.drupal.org/pift-ci-job/1773556

Neslee Canil Pinto’s picture

Status: Needs work » Needs review
FileSize
1.98 KB

Status: Needs review » Needs work

The last submitted patch, 53: 3128333-53.patch, failed testing. View results

Neslee Canil Pinto’s picture

Neslee Canil Pinto’s picture

Neslee Canil Pinto’s picture

Neslee Canil Pinto’s picture

Neslee Canil Pinto’s picture

Status: Needs work » Needs review
FileSize
9.46 KB

Removed the unwanted functions.

  • Neslee Canil Pinto committed d508fb7 on 8.x-2.x
    Issue #3128333 by Neslee Canil Pinto, Krzysztof Domański, DamienMcKenna...
Neslee Canil Pinto’s picture

Status: Needs review » Fixed

Thanks @all for making this through.

Status: Fixed » Closed (fixed)

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