-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: Descriptive message when no speaker/session #4582
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/2a4mkuwcx |
@@ -8,6 +8,6 @@ module('Integration | Component | ui table/cell/cell sessions dashboard', functi | |||
|
|||
test('it renders', async function(assert) { | |||
await render(hbs `{{ui-table/cell/cell-sessions-dashboard}}`); | |||
assert.ok(this.element.innerHTML.trim().includes('Submitted')); | |||
assert.ok(this.element.innerHTML.trim().includes('')); |
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.
Please add proper condition. This is effectively disabling the test
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.
What will the condition be like?
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.
@iamareebjamal Please check if this is a valid test
if (this.element.innerHTML.trim().includes('Submitted')) {
assert.notOk(this.element.innerHTML.trim().includes('No Session Information Added Yet'));
assert.ok(this.element.innerHTML.trim().includes('Submitted'));
} else {
assert.notOk(this.element.innerHTML.trim().includes('Submitted'));
assert.ok(this.element.innerHTML.trim().includes('No Session Information Added Yet'));
}
Codecov Report
@@ Coverage Diff @@
## development #4582 +/- ##
============================================
Coverage 22.27% 22.27%
============================================
Files 474 474
Lines 4987 4987
Branches 8 8
============================================
Hits 1111 1111
Misses 3875 3875
Partials 1 1 Continue to review full report at Codecov.
|
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.
Good job. We were previously using assert.ok for everything which is obviously wrong, and moving forward, we should use assert.dom.includesText instead so that when tests fail, they show the difference between actual and expected values. Right now, it only shows true false which is not useful. Accepting the PR for now
Fixes #2898
Short description of what this resolves:
No descriptive message when the speaker or session is not present
Changes proposed in this pull request:
Show descriptive message
Checklist
development
branch.