Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. After click w hotline sprawdż:
  2. - If host public:
  3. Kliknij w hotline, sprawdż czy wchodzi w profil i czy można z niego odpisać
  4. Kliknij w wiadomość i sprawdź czy otwiera się messenger
  5. -If host private
  6. Kliknij w hotline, sprawdż czy wchodzi w profil i czy można z niego odpisać
  7. Kliknij w wiadomość i sprawdź czy otwiera się messenger
  8.  
  9. After respond na hotline sprawdź:
  10. -If reposonder public
  11. Czy po wejściu w odpowiedź otwierany jest profil
  12. Czy z poziomu profilu można otworzy MSG
  13. -If responder private
  14. Czy po wejściu w odpowiedź otwierany jest messanger
  15.  
  16. Jeśli responder anonimowy nie można wejść na profil.
  17. Jeśli responder anonimowy pokaże się można wejść na profil.
  18.  
  19.  
  20. Sprawdź na odpowiedź do respondera na mobile
  21.  
  22.  
  23.  
  24. require 'rails_helper'
  25.  
  26.  
  27. describe "HotlineMessages" do
  28.  
  29. let(:users) { FactoryBot.create_list(:user, 2) }
  30.  
  31. before(:each) do
  32. load "#{Rails.root}/db/seeds.rb"
  33. login_as(users[0], :scope => :user)
  34. end
  35.  
  36.  
  37. it "checks open profile on hot click if hot user public" do
  38. visit "/hotline"
  39. cont = find("div", :class => "main-content")
  40. cont.first("span", :class => "first-person").click
  41. expect(page).to have_current_path("/profile/2?hot=2")
  42. end
  43.  
  44. it "checks can respond to public user hotline from profile" do
  45. visit "/profile/2?hot=2"
  46. find("button", :text => "Odpowiedz na hotline").click
  47. expect(page).to have_content("Hej, chętnie Cię poznam ;)")
  48. end
  49.  
  50. it "checks open messenger on hot click if hot user private" do
  51. User.find(2).update_attribute("is_private", true)
  52. visit "/hotline"
  53. cont = find("div", :class => "main-content")
  54. cont.first("span", :class => "first-person").click
  55. expect(page).to have_content("Hej, chętnie Cię poznam ;)")
  56. end
  57.  
  58. it "checks open" do
  59.  
  60. end
  61. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement