GithubHelp home page GithubHelp logo

sealedenvelope / laravel-behat-dusk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lukepaoloni/laravel-behat-dusk

0.0 0.0 0.0 39 KB

Seamlessly integrate Behat with Laravel Dusk.

License: MIT License

PHP 100.00%

laravel-behat-dusk's Introduction

Laravel Behat Dusk

Build Status Total Downloads Latest Stable Version License

Introduction

Seamlessly integrate Behat with Laravel Dusk.

Requirements

  • PHP >= 7.1

Installation

$ composer require nmfzone/laravel-behat-dusk

If you want to change the default config, you must publish the config file:

$ php artisan vendor:publish --provider="Nmflabs\LaravelBehatDusk\ServiceProvider"

Usage

I assume you're using this package for the first time you setup behat (so there is no behat.yml, etc).

  1. Run this command php artisan behat-dusk:install
  2. Duplicate your .env to .env.behat (optional). This will be the environment used by behat.
  3. Adjust behat.yml as you wish
  4. To run the test, run this command php artisan behat (it's just wrapper of the original behat command. It's automatically run php artisan serve for you, and stop it when test is done ๐Ÿ”ฅ)
  5. Enjoy!

Troubleshooting

  1. Element is not clickable at (x, y)

    If you're experiencing this issue, there is a high possibility that you're clicking an element that outside the viewport.

    What does it means? It means your element isn't appears on your screen (maybe your element located in very bottom of the page), when the browser trying to click that element. So, of course it's impossible to click that element.

    In the real usage, you're just scrolling the browser to bottom, until you see your element, right? Then, it's just the same here. You need to tell the browser, to scroll the browser to bottom, until it found the element.

    public function selectCheckbox($selector)
    {
        $this->browse(function (Browser $browser) use ($selector) {
            $browser->scrollTo('#foo-element')->check($selector);
        });    
    }

Security

If you discover any security related issues, please email to [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

laravel-behat-dusk's People

Contributors

nmfzone avatar lukepaoloni avatar piogaw avatar

laravel-behat-dusk's Issues

Blocked list

Lists will consist of multiple blocks where the number allocated to each treatment group matches the specified allocation ratio. For instance if the allocation ratio is 2:1 for treatments A:B, then a block of size 6 must contain 4 A's and 2 B's.

Block sizes

Lists can consist of blocks of different sizes, where the size is chosen randomly with equal probability from a set of specified sizes. Each block size must be a multiple of the sum of the allocation ratios (e.g. a block size of 5 would not be allowed for a ratio of 1:1).

Block ID

Each block in a list will have a unique ID

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.