Giter VIP home page Giter VIP logo

behat-drush-endpoint's People

Contributors

greg-1-anderson avatar herrwalter avatar ptmkenny avatar stevector avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

behat-drush-endpoint's Issues

Bump symfony/dependency-injection version?

Github is recommending that we bump symfony/dependency-injection from 3.4.15 to 3.4.37 due to a security vulnerability.

Is this something you would be able to update?

timezone settings issue

Customer is getting a strtotime() warning that causes test to fail.

Here is the error:

Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /opt/drupalextension/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php line 225

Existing issue on Drupal.org - https://www.drupal.org/node/2671220

Original Ticket:
https://pantheon-systems.desk.com/agent/case/58722

@greg-1-anderson

Creating a term fails when description has special characters

I'm running this command against a Pantheon site:

drush @pantheon.alias  behat  --nocolor= create-term '{"name":"Test Term","vocabulary_machine_name":"Test Vocab","description":"g&lx\\#r)J\"kBm~?>Z^sY$;v23l=Mi7%Jsn|w93AgHCJ\/UBw9oZ|ss>+I#|'\''\\h*TXlU8i%lJ4{e-~Jr\"*^Rs81v=z5~8u$3u@M;@y#h.boHf*NX&(DI}AiR!V0H,i8^h\/3<M$NEz3]@`<4f3v58nzq{:e[Y PX5lN#$5N>zat\/u@aye$a@0q Lf7H3OT3Xm,&2^><;<4Vg(l8>7EiRljaggt~IOwbWuTlB`B*`6LM>}+E3WbzA8Ez[DfVH\"C}#}0"}'

It fails with the error Command not supported as typed. When I remove the special characters in the description it works.

The above command is being generated by the DrushDriver class and the description with the special characters is generated by the DrupalContext class. My work around for now is to extend the DrupalContext class and createTerm method to use the name() method of generating a random string rather than the string() method.

Non core fields dont work

Im trying to use this extension to allow behat tests to create nodes on a remote server and have hit a stumbling block, it seems to work great until the list of fields being passed in the json contains a non core field. Things like "title", "author", "status" work fine, but adding a custom "long text" field breaks it with the error:

Fatal error: Class '\Drupal\Driver\Fields\Drupal7\DefaultHandler' not found in behat-drush-common.inc on line 41

Now there is a comment on the _drush_behat_get_field_handler_common function that i believe is relevant here but cant for the life of me figure it out, the Drupal 7 site in question itself is not managed by composer but all the behat stuff for it is. Im guessing I have to do something about the autoload.inc part but cant work that out.

Some more info that may or may not be useful is that the above is the command line erroring (the drush behat create-node command), when running the actual behat tests themselves with JUST core fields (the 3 mentioned above) I get:

Error: __clone method called on non-object in behat-drush-endpoint\behat.d7.drush.inc,

Any help would be greatly appreciated.

Add back drupal/drupal-driver dependency

The dependency for drupal/drupal-driver was removed in #8, but it isn't clear why. If I run composer require drupal/drupal-driver in an empty directory, it's dev dependencies aren't pulled in.

This library utilizes code from that library, and can be installed independently of drupal/drupal-extension, so should mark the driver as a dependency.

I have a workaround for failing tests in jhedstrom/drupalextension#483, but would prefer to not have to do that. Folks running this drush endpoint on remote servers would also encounter this missing dependency issue.

entityManager is deprecated; breaks on Drupal 9

Attempting to test drupal 9.0-beta2 with Behat Drupal Extension 4 with Pantheon Build Tools repo.

Got this error:

[error] Error: Call to undefined method Drupal::entityManager() in _drush_behat_get_entity_field_types() (line 92 of /app/drush/Commands/contrib/behat-drush-endpoint/behat.inc) #0 /app/drush/Commands/contrib/behat-drush-endpoint/behat.inc(120): _drush_behat_get_entity_field_types('node')

According to drupal.org, entityManager should generally be replaced with entityTypeManager.

Command "behat" is not defined

Both drush 9.5.2 and behat-drush-endpoint installed successfully, but command still not found.

Composer.json file:

{
    "name": "pantheon-systems/example-drops-8-composer",
    "description": "Install drops-8 with Composer on Pantheon.",
    "type": "project",
    "license": "MIT",
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    ],
    "require": {
        "php": ">=7.0.8",
        "colours/atomic-design-access-control": "dev-master",
        "colours/codebeast": "dev-master",
        "colours/fancy-local-tasks": "dev-master",
        "colours/responsive-media-formatter": "dev-master",
        "composer/installers": "^1.0.20",
        "cweagans/composer-patches": "^1.0",
        "drupal-composer/drupal-scaffold": "^2.0.1",
        "drupal/admin_toolbar": "^1.25",
        "drupal/adminimal_admin_toolbar": "^1.8",
        "drupal/adminimal_theme": "^1.3",
        "drupal/checklistapi": "^1.8",
        "drupal/components": "^1.0",
        "drupal/config_direct_save": "^1.0",
        "drupal/config_installer": "^1.0",
        "drupal/config_update": "^1.5",
        "drupal/console": "^1",
        "drupal/contact_storage": "^1.0@beta",
        "drupal/core": "^8",
        "drupal/ctools": "^3.0",
        "drupal/devel": "^1.2",
        "drupal/diff": "^1.0@RC",
        "drupal/easy_breadcrumb": "^1.8",
        "drupal/embed": "^1.0",
        "drupal/entity_browser": "1.*",
        "drupal/entity_embed": "^1.0@beta",
        "drupal/field_group": "^1.0",
        "drupal/google_analytics": "^2.3",
        "drupal/htmlmail": "^2.64",
        "drupal/inline_entity_form": "^1.0@RC",
        "drupal/link_attributes": "^1.5",
        "drupal/linkit": "^4.3",
        "drupal/mailgun": "^1.0@beta",
        "drupal/mailsystem": "^4.1",
        "drupal/media_entity": "^1.8",
        "drupal/media_entity_document": "^1.1",
        "drupal/media_entity_download": "1.*",
        "drupal/media_entity_image": "^1.3",
        "drupal/media_entity_video": "^1.0@beta",
        "drupal/metatag": "^1.7",
        "drupal/nodeaccess": "^1.0@beta",
        "drupal/pathauto": "^1.3",
        "drupal/redirect": "^1.3",
        "drupal/seo_checklist": "^4.1",
        "drupal/simple_block": "^1.0@beta",
        "drupal/simple_revision": "^1.4",
        "drupal/simple_sitemap": "^2.12",
        "drupal/simplenews": "^1.0@alpha",
        "drupal/token": "^1.5",
        "drupal/twig_field_value": "^1.1",
        "drupal/video_embed_field": "^2.0",
        "drupal/webform": "^5.0@RC",
        "drush-ops/behat-drush-endpoint": "^9",
        "drush/drush": "~9",
        "pantheon-systems/quicksilver-pushback": "~1",
        "rvtraveller/qs-composer-installer": "^1.1",
        "solarium/solarium": "3.8.*",
        "webflo/drupal-core-strict": "^8"
    },
    "require-dev": {
        "mikey179/vfsstream": "^1.2",
        "behat/behat": "3.*",
        "behat/mink": "^1.7",
        "behat/mink-extension": "^2.2",
        "behat/mink-goutte-driver": "^1.2",
        "jcalderonzumba/gastonjs": "^1.0.2",
        "jcalderonzumba/mink-phantomjs-driver": "^0.3.1",
        "drupal/drupal-extension": "^3.1",
        "phpunit/phpunit": "^4.8",
        "symfony/css-selector": "^2.8"
    },
    "conflict": {
            "drupal/drupal": "*"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "autoload": {
        "classmap": [
            "scripts/composer/ScriptHandler.php"
        ]
    },
    "scripts": {
        "build-assets": [
            "@prepare-for-pantheon",
            "composer install --optimize-autoloader --no-dev"
        ],
        "lint": "find web/modules/custom web/themes/custom -name '*.php' -exec php -l {} \\;",
        "code-sniff": "echo 'No code sniff step defined.'",
        "unit-test": "echo 'No unit test step defined.'",
        "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold",
        "prepare-for-pantheon": "DrupalProject\\composer\\ScriptHandler::prepareForPantheon",
        "post-install-cmd": [
            "@drupal-scaffold",
            "DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
        ],
        "post-update-cmd": [
            "DrupalProject\\composer\\ScriptHandler::createRequiredFiles",
            "find .circleci/scripts/pantheon/ -type f | xargs chmod 755",
            "find tests/scripts/ -type f | xargs chmod 755"
        ],
        "post-create-project-cmd": [
            "@drupal-scaffold",
            "DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
        ]
    },
    "extra": {
        "installer-paths": {
            "web/core": ["type:drupal-core"],
            "web/modules/contrib/{$name}": ["type:drupal-module"],
            "web/profiles/contrib/{$name}": ["type:drupal-profile"],
            "web/themes/contrib/{$name}": ["type:drupal-theme"],
            "drush/contrib/{$name}": ["type:drupal-drush"]
        },
        "build-env": {
            "install-cms": [
                "drush site-install standard --account-mail={account-mail} --account-name={account-name} --account-pass={account-pass} --site-mail={site-mail} --site-name={site-name} --yes",
                "drush pm-enable config_direct_save simple_block --yes",
                "drush pm-uninstall block_content --yes"
            ],
            "export-configuration": "drush config-export --yes"
        },
        "drupal-scaffold": {
            "source": "https://raw.githubusercontent.com/pantheon-systems/drops-8-scaffolding/{version}/{path}",
            "includes": [
                "sites/default/default.services.pantheon.preproduction.yml",
                "sites/default/settings.pantheon.php"
            ],
            "excludes": [
                ".csslintrc",
                ".editorconfig",
                ".eslintignore",
                ".eslintrc.json",
                ".htaccess",
                "web.config"
            ]
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true,
        "platform": {
            "php": "7.0.8"
        }
    }
}

Drush version:
vendor/bin/drush --version Drush Commandline Tool 9.5.2

Error:
vendor/bin/drush behat Command "behat" is not defined.

Plans for Drush 9

I'm working on testing the Drupal Behat Extension with Drush 9, and the build fails during the behat drush endpoint testing.

Wondering if there are plans to port this to Drush 9?

See jhedstrom/drupalextension#419

Make it compatible with Drush 11

Wanted to test Drush 11 in our development environment but it fails, because we have drush-ops/behat-drush-endpoint in all our projects too and that has a version conflict with Drush 11.

Is it just the dependency that needs updating or any other code too?

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.