Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala committed Dec 19, 2024
1 parent aa71bd5 commit 715f108
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@ public function testIconGood()
$this->login();
$storage = [
// Holds available
['holds' => ['in_transit' => 0, 'available' => 1]],
['holds' => ['in_transit' => 0, 'available' => 1, 'level' => 1]],
// ILL Requests available
['illRequests' => ['in_transit' => 0, 'available' => 1]],
['illRequests' => ['in_transit' => 0, 'available' => 1, 'level' => 1]],
// Storage Retrievals available
['storageRetrievalRequests' => ['in_transit' => 0, 'available' => 1]],
['storageRetrievalRequests' => ['in_transit' => 0, 'available' => 1, 'level' => 1]],
];
$this->checkIcon($storage, '.account-status-good');
}
Expand All @@ -404,7 +404,7 @@ public function testIconWarning()
$this->login();
$storage = [
// Checked out due soon
['checkedOut' => ['warn' => 1]],
['checkedOut' => ['warn' => 1, 'level' => 2]],
];
$this->checkIcon($storage, '.account-status-warning');
}
Expand All @@ -419,9 +419,9 @@ public function testIconDanger()
$this->login();
$storage = [
// User has fines
['fines' => ['value' => 1000000, 'display' => '$...yikes']],
['fines' => ['value' => 1000000, 'display' => '$...yikes', 'level' => 3]],
// Checkedout overdue
['checkedOut' => ['overdue' => 1]],
['checkedOut' => ['overdue' => 1, 'level' => 3]],
];
$this->checkIcon($storage, '.account-status-danger');
}
Expand All @@ -438,15 +438,15 @@ public function testIconClashes()
$this->login();
// Danger overrides warning
$this->checkIcon(
[['checkedOut' => ['warn' => 2, 'overdue' => 1]]],
[['checkedOut' => ['warn' => 2, 'overdue' => 1, 'level' => 3]]],
'.account-status-danger'
);
// Danger overrides good
$this->checkIcon(
[
[
'checkedOut' => ['overdue' => 1],
'holds' => ['available' => 1],
'checkedOut' => ['overdue' => 1, 'level' => 3],
'holds' => ['available' => 1, 'level' => 1],
],
],
'.account-status-danger'
Expand All @@ -455,8 +455,8 @@ public function testIconClashes()
$this->checkIcon(
[
[
'checkedOut' => ['warn' => 1],
'holds' => ['available' => 1],
'checkedOut' => ['warn' => 1, 'level' => 2],
'holds' => ['available' => 1, 'level' => 1],
],
],
'.account-status-warning'
Expand All @@ -465,8 +465,8 @@ public function testIconClashes()
$this->checkIcon(
[
[
'holds' => ['available' => 1],
'fines' => ['total' => 0, 'display' => 'none'],
'holds' => ['available' => 1, 'level' => 1],
'fines' => ['total' => 0, 'display' => 'none', 'level' => 0],
],
],
'.account-status-good'
Expand Down

0 comments on commit 715f108

Please sign in to comment.