Commit Graph

4 Commits

Author SHA1 Message Date
Daniel Calviño Sánchez c4613733eb Add acceptance tests related to access levels
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-04-19 08:26:03 +02:00
Daniel Calviño Sánchez 1203369ea6 Add acceptance tests related to login
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-04-19 08:26:03 +02:00
Daniel Calviño Sánchez 7c07f01d59 Add actors for test scenarios
An actor plays the role of an end-user in the test scenario. As such,
each actor has its own web browser session used to perform the actions
specified by the steps of the scenario. Only one actor is active at a
time in a test scenario, and the current actor can be set through the "I
act as XXX" step; from then on, all the steps are performed by that
actor, until a different actor is set by calling "I act as XXX" again.
If no actor was explicitly set in a scenario then the default actor,
unsurprisingly named "default", is the one used.

The ActorContext class is added to provide automatic support for all
that. To use the ActorContext, besides adding it to the context list in
"behat.yml", a Mink session for each actor used in the features must be
specified in "behat.yml". Once done other Contexts just need to
implement the ActorAwareInterface (which can be done simply by using the
ActorAware trait) to have access to the current Actor object of the test
scenario; as the Actor object provides its own session other Contexts do
not need to extend from RawMinkContext. The ActorContext is itself a
RawMinkContext, so it automatically receives the base URL of the
Nextcloud test server run by NextcloudTestServerContext and propagates
that base URL to all the actors.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-04-19 08:26:03 +02:00
Daniel Calviño Sánchez b5fba56499 Add basic files for the automated acceptance test system
The acceptance tests verify that a Nextcloud server works as expected
from the point of view of an end-user. They are specified as user
stories using Behat paired with Mink, which provides web browser
automation.

Mink supports several browser emulators, but the system is set up to use
Selenium, as it is FOSS and the one that better reflects the use of a
web browser by an end-user (as, in fact, it controls real web browsers).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-04-19 08:26:03 +02:00