diff --git a/app/components/task/holder.js b/app/components/task/holder.js
index 1f908ec8..d862a8b0 100644
--- a/app/components/task/holder.js
+++ b/app/components/task/holder.js
@@ -19,12 +19,7 @@ export default class TasksHolderComponent extends Component {
constructor() {
super(...arguments);
- if (this.args.dev) {
- this.status =
- this.args.task.status === TASK_KEYS.COMPLETED
- ? TASK_KEYS.DONE
- : this.args.task.status;
- } else {
+ if (!this.args.dev) {
this.status =
this.args.task.status === TASK_KEYS.DONE
? TASK_KEYS.COMPLETED
@@ -34,8 +29,12 @@ export default class TasksHolderComponent extends Component {
get taskStatusList() {
const statusToDisplay = this.availabletaskStatusList.filter(
(taskStatus) => {
- if (this.args.dev === true) {
- return taskStatus.key !== 'ALL' && taskStatus.key !== 'COMPLETED';
+ if (this.args.dev) {
+ return (
+ taskStatus.key !== 'ALL' &&
+ (taskStatus.key !== TASK_KEYS.COMPLETED ||
+ this.args.task.status === TASK_KEYS.COMPLETED)
+ );
} else {
return taskStatus.key !== 'ALL' && taskStatus.key !== 'DONE';
}
@@ -46,10 +45,13 @@ export default class TasksHolderComponent extends Component {
get taskStyleClass() {
const statusNotOverDueList = [
- this.args.dev === true ? TASK_KEYS.DONE : TASK_KEYS.COMPLETED,
+ 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 c600fdd6..2c09130b 100644
--- a/tests/integration/components/tasks/holder-test.js
+++ b/tests/integration/components/tasks/holder-test.js
@@ -385,6 +385,28 @@ 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`