mirror of
https://github.com/nextcloud/tables.git
synced 2025-08-16 15:17:20 +00:00
enh: rename migration
Signed-off-by: Cleopatra Enjeck M <patrathewhiz@gmail.com>
This commit is contained in:

committed by
Julius Härtl

parent
a320fc540e
commit
6968538fdf
@ -413,6 +413,7 @@ class FeatureContext implements Context {
|
||||
|
||||
$newColumn = $this->getDataFromResponse($this->response)['ocs']['data'];
|
||||
$this->columnIds[$columnName] = $newColumn['id'];
|
||||
$this->columnId = $newColumn['id'];
|
||||
|
||||
Assert::assertEquals(200, $this->response->getStatusCode());
|
||||
|
||||
@ -1202,7 +1203,14 @@ class FeatureContext implements Context {
|
||||
|
||||
Assert::assertEquals(200, $this->response->getStatusCode());
|
||||
foreach ($props as $key => $value) {
|
||||
Assert::assertEquals($column[$key], $value);
|
||||
if (is_array($column[$key])) {
|
||||
// I am afraid this is usergroupcolumn specific, but not generic
|
||||
$retrieved = json_encode($column[$key], true);
|
||||
} else {
|
||||
$retrieved = $column[$key];
|
||||
}
|
||||
|
||||
Assert::assertEquals($value, $retrieved, 'Failing key: ' . $key);
|
||||
}
|
||||
|
||||
$this->sendRequest(
|
||||
@ -1213,7 +1221,14 @@ class FeatureContext implements Context {
|
||||
$columnToVerify = $this->getDataFromResponse($this->response);
|
||||
Assert::assertEquals(200, $this->response->getStatusCode());
|
||||
foreach ($props as $key => $value) {
|
||||
Assert::assertEquals($columnToVerify[$key], $value);
|
||||
// I am afraid this is usergroupcolumn specific, but not generic
|
||||
if (is_array($columnToVerify[$key])) {
|
||||
$retrieved = json_encode($columnToVerify[$key], true);
|
||||
} else {
|
||||
$retrieved = $columnToVerify[$key];
|
||||
}
|
||||
|
||||
Assert::assertEquals($value, $retrieved, 'Failing key: ' . $key);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1253,7 +1268,17 @@ class FeatureContext implements Context {
|
||||
$rowToVerify = $this->getDataFromResponse($this->response);
|
||||
Assert::assertEquals(200, $this->response->getStatusCode());
|
||||
foreach ($rowToVerify['data'] as $cell) {
|
||||
Assert::assertEquals($props[$cell['columnId']], $cell['value']);
|
||||
// I am afraid this is usergroupcolumn specific, but not generic
|
||||
if (is_array($cell['value'])) {
|
||||
$retrieved = json_encode(array_reduce($cell['value'], function (array $carry, string $item): array {
|
||||
$carry[] = json_decode($item, true);
|
||||
return $carry;
|
||||
}, []));
|
||||
} else {
|
||||
$retrieved = $cell['value'];
|
||||
}
|
||||
|
||||
Assert::assertEquals($props[$cell['columnId']], $retrieved);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1429,7 +1454,17 @@ class FeatureContext implements Context {
|
||||
$rowToVerify = $this->getDataFromResponse($this->response);
|
||||
Assert::assertEquals(200, $this->response->getStatusCode());
|
||||
foreach ($rowToVerify['data'] as $cell) {
|
||||
Assert::assertEquals($props[$cell['columnId']], $cell['value']);
|
||||
// I am afraid this is usergroupcolumn specific, but not generic
|
||||
if (is_array($cell['value'])) {
|
||||
$retrieved = json_encode(array_reduce($cell['value'], function (array $carry, string $item): array {
|
||||
$carry[] = json_decode($item, true);
|
||||
return $carry;
|
||||
}, []));
|
||||
} else {
|
||||
$retrieved = $cell['value'];
|
||||
}
|
||||
|
||||
Assert::assertEquals($props[$cell['columnId']], $retrieved);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user