-
Notifications
You must be signed in to change notification settings - Fork 6
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
base: main
Are you sure you want to change the base?
fix(frontend): hide task form after creating new project task #221
Conversation
cd363e4
to
77fe1aa
Compare
77fe1aa
to
d7195aa
Compare
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"); |
There was a problem hiding this comment.
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.
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(); | ||
}); | ||
|
There was a problem hiding this comment.
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.
fix: #44