Coder Social home page Coder Social logo

behat-tools's People

Contributors

brooke-heaton avatar miiimooo avatar pookmish avatar twod avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

behat-tools's Issues

Call to a member function parseEntityFields() on paragraph creatio

I am trying to create a paragraph with behat-tools but without any success.
Maybe I am missing something.

I have this in my scenario:

  Scenario: Create a node                                                       
    Given a "par_text" paragraph named "text_paragraph":                           
      | field_par_text | Lorem Ipsum |

And I get this when I try to test:

  Scenario: Create a node                                               # features/api.feature:5
    Given a "par_text" paragraph named "text_paragraph":                # miiimooo\BehatTools\Context\ParagraphsContext::createParagraph()
      | field_par_text | Lorem Ipsum |
      Fatal error: Call to a member function parseEntityFields() on null (Behat\Testwork\Call\Exception\FatalThrowableError)
    │
    ╳  Unable to access the response content before visiting a page (Behat\Mink\Exception\DriverException)
    │
    └─ @AfterStep # miiimooo\BehatTools\Context\DavScreenshotFailureContext::takeScreenshotAfterFailedStep()

This is my behat.yml:

default:
  suites:
    default:
      contexts:
        - FeatureContext
        - Drupal\DrupalExtension\Context\DrupalContext
        - Drupal\DrupalExtension\Context\MinkContext
        - Drupal\DrupalExtension\Context\MessageContext
        - Drupal\DrupalExtension\Context\DrushContext
        - miiimooo\BehatTools\Context\ParagraphsContext
        - miiimooo\BehatTools\Context\DavScreenshotFailureContext
      failure_path: %paths.base%/screenshots
  extensions:
    Behat\MinkExtension:
      goutte: ~
      selenium2: ~
      #base_url: http://localhost
    Drupal\DrupalExtension:
      blackbox: ~

# Usage: bin/behat --profile=local
local:
  extensions:
    Behat\MinkExtension:
      base_url: 'http://0.0.0.0:8888'
    Drupal\DrupalExtension:
      drush:
        alias: '@self'
      api_driver: 'drupal'
      drupal:
        drupal_root: '/home/bserem/Development/drupal87/web'
      text:
        log_out: "Manage" # A logged in user can see the Manage link in the admin toolbar

Warning: Illegal string offset 'target_id'

I may be doing something wrong but have followed the documentation in implementing this.

Warning: Illegal string offset 'target_id' in /app/web/modules/contrib/entity_reference_revisions/src/Plugin/DataType/EntityReferenceRevisions.php line 116

Below are my steps to create and attach a Paragraph to a user entity in D9:

  Given a "committee_member" paragraph named "behat_committee_chair": # miiimooo\BehatTools\Context\ParagraphsContext::createParagraph()
      | field_committee            | Behat |
      | field_committee_leadership | Chair |
    Given users:                                                        # Drupal\DrupalExtension\Context\DrupalContext::createUsers()
      | name                       | roles  | status | field_name                       | field_name              | mail                                     | field_committee_membership |
      | Test Behat Committee Chair | member | 1      | given: Test Behat Communications | family: Committee Chair | [email protected] | behat_committee_chair      |
      Warning: Illegal string offset 'target_id' in /app/web/modules/contrib/entity_reference_revisions/src/Plugin/DataType/EntityReferenceRevisions.php line 116
    │
    ╳  Fatal error: Call to a member function source() on null (Behat\Testwork\Call\Exception\FatalThrowableError)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.