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

upcoming events tests failing due to "expired" mock date (when close to the start of the month) #96

Closed
thescientist13 opened this issue Dec 3, 2022 · 0 comments · Fixed by #97
Assignees
Labels

Comments

@thescientist13
Copy link
Contributor

As per #95, it looks like the mock events need to be fine tuned since the "Premier" is happening in the past, given these tests are running so soon to the beginning of the month

 ❌ Components/Upcoming Events > Multiple events > should display the correct month heading
      AssertionError: expected '\n                  December\n                ' to include 'November'
        at src/components/upcoming-events/upcoming-events.spec.js:137:40
        at NodeList.forEach (<anonymous>)
        at o.<anonymous> (src/components/upcoming-events/upcoming-events.spec.js:136:16)

 ❌ Components/Upcoming Events > Multiple events > should display the correct date details
      AssertionError: expected '3Tuesday\'sTunesSeason3-Premier!@3pm' to equal '28Tuesday\'sTunesSeason3-TeaserTrailer@3pm'
      + expected - actual
      
      -3Tuesday'sTunesSeason3-Premier!@3pm
      +28Tuesday'sTunesSeason3-TeaserTrailer@3pm
      
      at src/components/upcoming-events/upcoming-events.spec.js:148:77
      at NodeList.forEach (<anonymous>)
      at o.<anonymous> (src/components/upcoming-events/upcoming-events.spec.js:144:16)

 ❌ Components/Upcoming Events > Multiple events > should display the correct link details
      AssertionError: expected 'Tuesday\'s Tunes Season 3 - Premier!' to equal 'Tuesday\'s Tunes Season 3 - Teaser Trailer'
      + expected - actual
      
      -Tuesday's Tunes Season 3 - Premier!
      +Tuesday's Tunes Season 3 - Teaser Trailer
      
      at src/components/upcoming-events/upcoming-events.spec.js:164:31
      at NodeList.forEach (<anonymous>)
      at o.<anonymous> (src/components/upcoming-events/upcoming-events.spec.js:155:13)

And confirming its not even showing up in Storybook
Image


Likely because we subtract when calculating its startTime which when today 12/3/2022, puts the event back in November, and the Upcoming Events don't display past dates.

}, {
  title: 'Tuesday\'s Tunes Season 3 - Teaser Trailer',
  startTime: SINGLE_EVENT[0].startTime - (86400000 * 5),
  description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elite.',
  link: 'http://www.facebook.com/'
}, {
@thescientist13 thescientist13 converted this from a draft issue Dec 3, 2022
@thescientist13 thescientist13 self-assigned this Dec 3, 2022
@thescientist13 thescientist13 modified the milestone: Website v1.0 Dec 3, 2022
@thescientist13 thescientist13 moved this from 🔖 Ready to 🏗 In progress in TT.tv Website Design (v1) Dec 3, 2022
@thescientist13 thescientist13 changed the title upcoming events tests failing due to expired dates upcoming events tests failing due to "expired" mock date (when close to the start of the month) Dec 3, 2022
@thescientist13 thescientist13 moved this from 🏗 In progress to 👀 In review in TT.tv Website Design (v1) Dec 3, 2022
@thescientist13 thescientist13 moved this from 👀 In review to ✅ Done in TT.tv Website Design (v1) Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant