2017 © Pedro Peláez
 

library codeception-utilities

Generic helper and utility methods for Codeception.

image

ixis/codeception-utilities

Generic helper and utility methods for Codeception.

  • Thursday, May 5, 2016
  • by pfaocle
  • Repository
  • 2 Watchers
  • 3 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Codeception utilities

A handful of generic helper and utility methods for Codeception., (*1)

  • seeLinkInSelector/dontSeeLinkInSelector - looks for a link in a particular CSS or XPath selector.
  • seeElementHasStyle/dontSeeElementHasStyle - see an element has been applied a style. Allows you to check a single element has a CSS style assigned, e.g. you can check that ".icon-r" class is floated right. Requires WebDriver.
  • seeRegexInSource/dontSeeRegexInSource - see page source matches a regular expression.

CkEditor utilities

  • fillCkEditor - Fill a CKEditor WYSIWYG field.
  • grabCkEditorValue - Grab the current value of the CKEditor field.
  • seeInCkEditor/dontSeeInCkEditor - see specified text inside a CKEditor instance.

Installing

Add to your composer.json, e.g., (*2)

{
  "repositories": [
    {
      "type":"vcs",
      "url":"git@github.com:ixis/codeception-utilities.git"
    }
  ],
  "require": {
    "ixis/codeception-utilities": "dev-develop"
  }
}

Configuring

modules:
    enabled:
        - CodeceptionUtilities
        - CodeceptionCkEditorUtilities

Examples

// See a link with title and URL as specified in the element selected by "#content #footer".
$I->seeLinkInSelector("Facebook", "https://www.facebook.com/", "#content #footer");

// See the element selected by "#footer .icon-r" has the float:right style applied.
$I->seeElementHasStyle("#footer .icon-r", "float", "right");

// Set the ckeditor with id "editor1" to "

hello world, (*3)

" $I->fillCkEditor("editor1", "

hello world, (*4)

"); // Grab the current value of the ckeditor field and assert it contains "hello" $value = $I->grabCkEditorValue("editor1"); PHPUnit_Framework_Assert::assertContains("hello", $value); // or, if using Asserts Codeception module: $I->assertContains("hello", $value)

The Versions

05/05 2016

dev-develop

dev-develop

Generic helper and utility methods for Codeception.

  Sources   Download

MIT

The Requires

 

04/05 2016

dev-feature/dont-see-link-in-selector

dev-feature/dont-see-link-in-selector

Generic helper and utility methods for Codeception.

  Sources   Download

MIT

The Requires