Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(frontend): hide task form after creating new project task #221

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MitanOmar
Copy link
Member

fix: #44

@MitanOmar MitanOmar self-assigned this May 27, 2024
@MitanOmar MitanOmar requested a review from a team as a code owner May 27, 2024 11:34
@MitanOmar MitanOmar requested a review from a team as a code owner June 3, 2024 08:31
@MitanOmar MitanOmar force-pushed the hide-task-form-after-creating-new-project-task branch from cd363e4 to 77fe1aa Compare June 5, 2024 07:01
@MitanOmar MitanOmar force-pushed the hide-task-form-after-creating-new-project-task branch from 77fe1aa to d7195aa Compare June 5, 2024 07:07
@c0rydoras c0rydoras removed the request for review from a team June 5, 2024 07:19
Comment on lines -83 to -85
assert.dom("[data-test-name]").hasValue("FooBar Task 1");
assert.dom("[data-test-reference]").hasValue("Reference of FooBar Task 1");
assert.dom("[data-test-estimated-time]").hasValue("02:15");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's test for this stuff later in the flow. Simply save the inputs and then click on the created task again.

Comment on lines +144 to +171
test("The cancel button will hide the form", async function (assert) {
await visit("/projects");
assert.strictEqual(currentURL(), "/projects");

await selectChoose(
"[data-test-customer-selection]",
".ember-power-select-option",
0
);

await selectChoose(
"[data-test-project-selection]",
".ember-power-select-option",
0
);

assert.dom("[data-test-add-task]").exists();
assert.dom("[data-test-task-table-row]").doesNotExist();

await click("[data-test-add-task]");
assert.dom("[data-test-task-form]").exists();
assert.dom("[data-test-save]").isDisabled();

await click("[data-test-cancel]");

assert.dom("[data-test-task-form]").doesNotExist();
});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could cover that in the before mentioned test for the task details. Assert the formerly created input data and after that click cancel and assert that it's closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Projects UX: Creating multiple new Tasks
2 participants