Add integration test for attachment handling on cards
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -16,6 +16,7 @@ class BoardContext implements Context {
|
||||
private $stack = null;
|
||||
/** @var array last card response */
|
||||
private $card = null;
|
||||
private array $storedCards = [];
|
||||
|
||||
/** @var ServerContext */
|
||||
private $serverContext;
|
||||
@@ -31,6 +32,15 @@ class BoardContext implements Context {
|
||||
return $this->card;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^creates a board with example content$/
|
||||
*/
|
||||
public function createExampleContent() {
|
||||
$this->createsABoardNamedWithColor('Example board', 'ff0000');
|
||||
$this->createAStackNamed('ToDo');
|
||||
$this->createACardNamed('My example card');
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^creates a board named "([^"]*)" with color "([^"]*)"$/
|
||||
*/
|
||||
@@ -232,4 +242,15 @@ class BoardContext implements Context {
|
||||
$this->requestContext->sendJSONrequest('POST', '/index.php/apps/deck/cards/' . $this->card['id'] .'/label/' . $label['id']);
|
||||
$this->requestContext->getResponse()->getBody()->seek(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When remember the last card as :arg1
|
||||
*/
|
||||
public function rememberTheLastCardAs($arg1) {
|
||||
$this->storedCards[$arg1] = $this->getLastUsedCard();
|
||||
}
|
||||
|
||||
public function getRememberedCard($arg1) {
|
||||
return $this->storedCards[$arg1] ?? null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user