Giter VIP home page Giter VIP logo

docs's People

Contributors

benji07 avatar bocharsky-bw avatar ciaranmcnulty avatar clemens-tolboom avatar dtrenz avatar emmetog avatar everzet avatar gquemener avatar greg0ire avatar hanneskaeufler avatar ifdattic avatar iwfy avatar jakzal avatar jjok avatar kayakr avatar kwisatz avatar legovaer avatar macintoshplus avatar michaelhagedon avatar ninir avatar pborreli avatar pfrenssen avatar phil-davis avatar rask avatar samnela avatar senkal avatar stof avatar svenrtbg avatar wouterj avatar yhoiseth avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

Custom formatter extension documentation

Hi,

I wanted to know if you are interested in a documentation about writing a custom formatter ?
I did implement one myself, but I think there is no such documentation out in the wild, so I had a really hard time implementing it.

I tried to sum-up everything I learned in a blog post that I wrote here : https://julien.deniau.me/posts/2024-01-24-custom-behat-formatter

If you are interested, i am willing to adapt this blog post to integrate in the official documentation.

Thank you

Describe how to filter out several tags

The documentation shows how to filter out one tag :

default:
    gherkin:
        filters:
            tags: ~@mytag

Now when I try to use an array as a value for tags, I get an error saying tags should be scalar. But it has an s, so I think it should allow arrays too… can't find the correct syntax though.

HTTPS is not valid on website

That's not related to the code but the website is not accessible through HTTPS:

https://behat.org/en/latest/

I discovered it while changing some links from HTTP from HTTPS. You may have never promoted the https://behat.org/ but having a error is surprising though.

Here is the report from Firefox:

behat.org uses an invalid security certificate.

The certificate is only valid for the following names:
*.readthedocs.org, readthedocs.org

Error code: SSL_ERROR_BAD_CERT_DOMAIN

Restructure documentation of Behat

Hi guys,

I've been thinking over and over again on the structure of the documentation for Behat 3.X. I've noticed that the structure of the documentation of 2.X is rather a bit "weird". Please do not take this as any offense, I'm trying to help here! ;-)

I've been checking a lot of different documentation spaces on readthedocs.org and I found that the documentation of phpspec looks very structured and is easy to read as well (http://www.phpspec.net/en/latest/manual/introduction.html). What do you think about re-structuring the documentation of Behat 3.X?

Again; this is a suggestion in order to improve the documentation and I'm willing to work on this.

I'd like to have your thoughts on this one.

v2.5 doc second scenario2 breaks scenario1

I think the doc should be changed somehow, as now it's a bit misleading IMO. Here: https://github.com/Behat/docs/blob/v2.5/quick_intro.rst when we have only Scenario1 then after running behat we'll end with such file structure:

test/
test/foo
test/bar

That's fine.

When we add Scenario2 it's now run from the 'test' directory, where it creates another 'test' subdirectory, so we'll have something like:

test/
test/foo
test/bar
test/test/.bar
test/test/foo

When run for the first time all test are passing ok. But if we run behat once again Scenario1 will fail, as the content of the top level 'test' directory is no longer 2 files (foo & bar), but also a 'test' subdirectory.

Add a top-level menu Nav

Problem:

In order to parse the docs one must go back and forth from the index page to the different documentation pages.

Solution:

If we add a top-level navigation item, it will be easier for folks to move between documentation regardless of where they are

Definitions Browsing

Hello there,

I'd like to drop a suggestion on definition browsing usage with the command line.
I'm always forgetting how to use the -d argument of the behat command.

How would you like to have a chapter/section/note about that on the documentation (I don't know if this usage has changed with v3?)?

I could even manage to do it.

dependency injection & container helper missing

Hello,
it could be very helpful to have some notes on injection dependencies, the container helper related to it for the extension and perhaps some docs about extension developments.

thanks

Enabling the hook for ReadTheDocs

ReadTheDocs provides a github hook allowing to rebuild the doc automatically when a commit is pushed to master. It could be great to enable it (even if ReadTheDocs is only meant as a temporary solution waiting ofr the new website, it may help contributors to see the latest doc rendered online rather than an older one)

Errors with BDD example on documentation page

I am following the BDD examples on Quick guide and I ran into some errors this is what my composer.json looks like

{
    "require-dev": {
        "behat/behat": "^3.5",
        "phpunit/phpunit": "^8.0"
    }
}

Code sample from quick start page

<?php
// features/bootstrap/FeatureContext.php

use Behat\Behat\Tester\Exception\PendingException;
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;

class FeatureContext implements SnippetAcceptingContext
{
    private $shelf;
    private $basket;

    public function __construct()
    {
        $this->shelf = new Shelf();
        $this->basket = new Basket($this->shelf);
    }

    /**
     * @Given there is a :product, which costs £:price
     */
    public function thereIsAWhichCostsPs($product, $price)
    {
        $this->shelf->setProductPrice($product, floatval($price));
    }

    /**
     * @When I add the :product to the basket
     */
    public function iAddTheToTheBasket($product)
    {
        $this->basket->addProduct($product);
    }

    /**
     * @Then I should have :count product(s) in the basket
     */
    public function iShouldHaveProductInTheBasket($count)
    {
        PHPUnit_Framework_Assert::assertCount(
            intval($count),
            $this->basket
        );
    }

    /**
     * @Then the overall basket price should be £:price
     */
    public function theOverallBasketPriceShouldBePs($price)
    {
        PHPUnit_Framework_Assert::assertSame(
            floatval($price),
            $this->basket->getTotalPrice()
        );
    }
}

First error is Fatal error: Class 'PHPUnit_Framework_Assert' not found (Behat\Testwork\Call\Exception\FatalThrowableError)

This is the case because PHPUnit_Framework_Assert used in method theOverallBasketPriceShouldBePs and else where is not defined or imported, this can be solved by adding the line

use PHPUnit\Framework\Assert as PHPUnit_Framework_Assert;
Just below the import statements

I would like to work on this issue if it is confirmed
Note I installed PHPUnit with composer require --dev phpunit/phpunit

Portuguese translation

I might have a Portuguese resource, that could translate the documentation.

Would this be of benefit?

`$environment->getContext` triggers the Psalm issue UndefinedInterfaceMethod

The example about accessing contexts from each other triggers:

  • the Psalm issue UndefinedInterfaceMethod
  • the PHPStorm issue "Potentially polymorphic call. The code may be inoperable depending on the actual class instance passed as the argument"

Indeed, the method getContext() is not necessarily present in every possible Environment interface implementation since it is not declared in this interface. Actually it is declared in InitializedContextEnvironment only.

The piece of code:

use Behat\Behat\Context\Context;
use Behat\Behat\Hook\Scope\BeforeScenarioScope;

class FeatureContext implements Context
{
    /** @var \Behat\MinkExtension\Context\MinkContext */
    private $minkContext;

    /** @BeforeScenario */
    public function gatherContexts(BeforeScenarioScope $scope)
    {
        $environment = $scope->getEnvironment();

        $this->minkContext = $environment->getContext('Behat\MinkExtension\Context\MinkContext');
    }
}

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.