Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

fix: Fix application status tag cases. #174

Merged
merged 2 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ public function __construct($ref, $data, $sectionDetails)
switch ($status) {
case 1:
$mode = 'edit';
$statusText = 'INCOMPLETE';
$statusText = 'Incomplete';
$statusColour = 'orange';
break;
case 2:
$mode = 'edit';
$statusText = 'COMPLETE';
$statusText = 'Complete';
$statusColour = 'green';
break;
default:
$mode = 'add';
$statusText = 'NOT STARTED';
$statusText = 'Not started';
$statusColour = 'grey';
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function testViewWithRequiresAttention(): void
$this->assertInstanceOf(ViewModel::class, $viewModel);
$this->assertEquals('section.name.type_of_licence', $viewModel->getVariable('name'));
$this->assertEquals('orange', $viewModel->getVariable('statusColour'));
$this->assertEquals('INCOMPLETE', $viewModel->getVariable('status'));
$this->assertEquals('Incomplete', $viewModel->getVariable('status'));
$this->assertTrue($viewModel->getVariable('enabled'));
$this->assertEquals(1, $viewModel->getVariable('sectionNumber'));
}
Expand All @@ -50,7 +50,7 @@ public function testViewWithUpdated(): void
$this->assertInstanceOf(ViewModel::class, $viewModel);
$this->assertEquals('section.name.type_of_licence', $viewModel->getVariable('name'));
$this->assertEquals('green', $viewModel->getVariable('statusColour'));
$this->assertEquals('COMPLETE', $viewModel->getVariable('status'));
$this->assertEquals('Complete', $viewModel->getVariable('status'));
$this->assertTrue($viewModel->getVariable('enabled'));
$this->assertEquals(1, $viewModel->getVariable('sectionNumber'));
}
Expand All @@ -73,7 +73,7 @@ public function testViewWithUnchanged(): void
$this->assertInstanceOf(ViewModel::class, $viewModel);
$this->assertEquals('section.name.type_of_licence', $viewModel->getVariable('name'));
$this->assertEquals('grey', $viewModel->getVariable('statusColour'));
$this->assertEquals('NOT STARTED', $viewModel->getVariable('status'));
$this->assertEquals('Not Started', $viewModel->getVariable('status'));
$this->assertFalse($viewModel->getVariable('enabled'));
$this->assertEquals(1, $viewModel->getVariable('sectionNumber'));
}
Expand Down
Loading