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: Descriptive message when no speaker/session #4582

Merged
merged 5 commits into from
Jul 20, 2020

Conversation

Haider8
Copy link
Contributor

@Haider8 Haider8 commented Jul 20, 2020

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

descriptive-message

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Jul 20, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/2a4mkuwcx
✅ Preview: https://open-event-frontend-git-fork-haider8-issue-2898.eventyay.vercel.app

@@ -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(''));
Copy link
Member

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

Copy link
Contributor Author

@Haider8 Haider8 Jul 20, 2020

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?

Copy link
Contributor Author

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
Copy link

codecov bot commented Jul 20, 2020

Codecov Report

Merging #4582 into development will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f8172c...cfe5d23. Read the comment docs.

@iamareebjamal iamareebjamal changed the title enh: Descriptive message when no speaker/session fix: Descriptive message when no speaker/session Jul 20, 2020
@auto-label auto-label bot added the fix label Jul 20, 2020
Copy link
Member

@iamareebjamal iamareebjamal left a 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

@iamareebjamal iamareebjamal merged commit 36b66bf into fossasia:development Jul 20, 2020
@Haider8 Haider8 deleted the issue-2898 branch July 20, 2020 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show Descriptive Message when No Session or Speaker is Present
2 participants