lnu-norge / lokaler.lnu.no

A website for finding spaces to be in for Norwegian volunteer organizations
http://lokaler.lnu.no/
GNU Affero General Public License v3.0
10 stars 2 forks source link

Notify on new review #120

Closed DanielJackson-Oslo closed 2 years ago

DanielJackson-Oslo commented 2 years ago

Adds a flash message when writing a new review, as well as a test for that flash message.

Also fixes so the reviews section is reloaded with the new review even if there were no reviews there already, fixing the bug in https://trello.com/c/85WKlQl9/178-live-stream-av-nye-reviews-til-spaceshow-oppdaterer-ikke-n%C3%A5r-de-g%C3%A5r-fra-0-1

DanielJackson-Oslo commented 2 years ago

@mathias234 Ready for review

DanielJackson-Oslo commented 2 years ago

I don't seem to be getting a flash message. But the reviews section does get the new entry

Hm... Will investigate. I even made a test for getting the flash message, so it might be faulty!

DanielJackson-Oslo commented 2 years ago

Fikset! Hadde klart å fjerne elementet som turbo stream sendte til når jeg merget inn main sine endringer.

@mathias234 Noen idé om hvordan teste at turbo streams fungerer som de skal? Trenger vi capybara-tester for det?

mathias234 commented 2 years ago

@mathias234 Noen idé om hvordan teste at turbo streams fungerer som de skal? Trenger vi capybara-tester for det?

Har funnet en guide på hvordan vi kan teste turbo stream med en request spec, men har aldri prøvd det selv https://github.com/mdominiak/hotwire-chat#testing