diff --git a/app/components/task/holder.js b/app/components/task/holder.js
index d862a8b0..4fea4e77 100644
--- a/app/components/task/holder.js
+++ b/app/components/task/holder.js
@@ -19,7 +19,12 @@ export default class TasksHolderComponent extends Component {
constructor() {
super(...arguments);
- if (!this.args.dev) {
+ if (this.args.dev) {
+ this.status =
+ this.args.task.status === TASK_KEYS.COMPLETED
+ ? TASK_KEYS.DONE
+ : this.args.task.status;
+ } else {
this.status =
this.args.task.status === TASK_KEYS.DONE
? TASK_KEYS.COMPLETED
@@ -30,11 +35,7 @@ export default class TasksHolderComponent extends Component {
const statusToDisplay = this.availabletaskStatusList.filter(
(taskStatus) => {
if (this.args.dev) {
- return (
- taskStatus.key !== 'ALL' &&
- (taskStatus.key !== TASK_KEYS.COMPLETED ||
- this.args.task.status === TASK_KEYS.COMPLETED)
- );
+ return taskStatus.key !== 'ALL' && taskStatus.key !== 'COMPLETED';
} else {
return taskStatus.key !== 'ALL' && taskStatus.key !== 'DONE';
}
@@ -45,13 +46,10 @@ export default class TasksHolderComponent extends Component {
get taskStyleClass() {
const statusNotOverDueList = [
- TASK_KEYS.COMPLETED,
+ this.args.dev ? TASK_KEYS.DONE : TASK_KEYS.COMPLETED,
TASK_KEYS.VERIFIED,
TASK_KEYS.AVAILABLE,
];
- if (this.args.dev) {
- statusNotOverDueList.push(TASK_KEYS.DONE);
- }
if (
this.args.task.endsOn * 1000 < Date.now() &&
!statusNotOverDueList.includes(this.status)
diff --git a/tests/integration/components/tasks/holder-test.js b/tests/integration/components/tasks/holder-test.js
index 2c09130b..c600fdd6 100644
--- a/tests/integration/components/tasks/holder-test.js
+++ b/tests/integration/components/tasks/holder-test.js
@@ -385,28 +385,6 @@ module('Integration | Component | Tasks Holder', function (hooks) {
this.set('defaultType', DEFAULT_TASK_TYPE);
this.set('dev', false);
- await render(hbs``);
-
- assert.dom('[data-test-task-status-select]').exists();
- assert.dom('[data-test-dropdown-option=Completed]').hasText('Completed');
- });
- test('Render Task holder and check if task status is COMPLETED it renders COMPLETED in dev mode', async function (assert) {
- this.set('task', { ...tasksData[5], status: 'COMPLETED' });
- this.set('mock', () => {});
- this.set('isLoading', false);
- this.set('disabled', false);
- this.set('defaultType', DEFAULT_TASK_TYPE);
- this.set('dev', true);
-
await render(hbs`