Download the PHP package tappet/cypress without Composer

On this page you can find all versions of the php package tappet/cypress. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cypress

Tappet - Enjoyable GUI testing with Tappet, using Cypress

Build Status

[EXPERIMENTAL] Cypress adapter for Tappet GUI testing.

See the Tappet core README for the core Tappet concepts - arrange/act/assert specs, fixtures, pages, and in particular transitions, the mechanism used to detect and assert on whole-page-state changes such as navigation or a modal opening/closing. This README only covers what's specific to the Cypress adapter, including how custom transition detection is wired up here.

Installation

Prerequisites

1. Install the adapter

2. Configure the adapter

Create tappet.{suite-name}.suite.php in the root of your project, for example:

tappet.cypress.suite.php (to name the suite cypress):

3. Install Cypress

Inside the nested Cypress project directory referenced by cypressRoot above (e.g. tests/gui), scaffold a Cypress project along with this package's JS/TS half, which provides the Uniter defineConfig factory and Cypress plugin that bridge PHP and JavaScript:

Update cypress.config.js to register tappet/cypress:

cypress.config.js

In the same directory, create a uniter.config.js to configure Uniter, which is used to run PHP code under a JavaScript environment:

uniter.config.js

Now you can create your specs, for example tests/gui/spec/Workflow/create_workflow.spec.php. Note that the spec/ part of the path was defined by specPattern: 'spec/**/*.spec.php' in cypress.config.js above.

Custom transition detection

Tappet core defines what a transition is (TransitionInterface) and how specs assert on one (EnvironmentInterface::assertTransition()). However, detection of a transition occurring is necessarily adapter-specific, since it depends on hooking into the underlying test tool. This package detects transitions by dispatching events during the Cypress test run that plugins can listen to, and pushing detected transitions onto the shared transition log via CypressAutomationInterface::pushTransition(TransitionInterface $transition): void.

The built-in NavigationTransition is pushed automatically by this adapter whenever the AUT's window fires a load event; for plain page navigation, there is nothing you need to wire up. Anything else, such as a modal appearing or disappearing, needs a plugin.

Writing a plugin

A plugin implements Tappet\Suite\Plugin\PluginInterface (from tappet/tappet core) and declares a map of event class to listener. The most relevant event for transition detection is WindowBeforeLoadEvent, fired before each AUT window load with access to $window, a Uniter FFI wrapper of the browser's Window object so that JS methods/properties (e.g. $window->document, $window->MutationObserver) can be called/used from PHP.

Continuing the modal example from the core README, here's how tappet/tappet's own test suite detects data-ui-modal elements toggling their hidden attribute, using a MutationObserver, and pushes the corresponding ModalOpenTransition/ModalClosedTransition:

ModalOpenTransition/ModalClosedTransition and their matching ExpectModalOpen/ExpectModalClosed arrangement/assertion classes are just application-level TransitionInterface/ArrangementInterface/ AssertionInterface implementations - see the core README's transitions section for how those interfaces work. Nothing about them is Cypress-specific; only the detection plugin above is.

Registering a plugin

Register the plugin against the CypressSuite instance returned by tappet.{suite-name}.suite.php:

Custom behaviour extension

Other *InitEvent classes in Tappet\Cypress\Event (FieldActionInitEvent, FieldAssertionInitEvent, InteractionInitEvent, MatchHandlerInitEvent, RegionAssertionInitEvent, StateAssertionInitEvent) follow the same plugin-listener mechanism, but are for registering custom field actions, field assertions, interactions, matchers, matchers, region assertions and state assertions respectively rather than for transition detection.

For example:


All versions of cypress with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
tappet/tappet Version ^0.2.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tappet/cypress contains the following files

Loading the files please wait ...