Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- After click w hotline sprawdż:
- - If host public:
- Kliknij w hotline, sprawdż czy wchodzi w profil i czy można z niego odpisać
- Kliknij w wiadomość i sprawdź czy otwiera się messenger
- -If host private
- Kliknij w hotline, sprawdż czy wchodzi w profil i czy można z niego odpisać
- Kliknij w wiadomość i sprawdź czy otwiera się messenger
- After respond na hotline sprawdź:
- -If reposonder public
- Czy po wejściu w odpowiedź otwierany jest profil
- Czy z poziomu profilu można otworzy MSG
- -If responder private
- Czy po wejściu w odpowiedź otwierany jest messanger
- Jeśli responder anonimowy nie można wejść na profil.
- Jeśli responder anonimowy pokaże się można wejść na profil.
- Sprawdź na odpowiedź do respondera na mobile
- require 'rails_helper'
- describe "HotlineMessages" do
- let(:users) { FactoryBot.create_list(:user, 2) }
- before(:each) do
- load "#{Rails.root}/db/seeds.rb"
- login_as(users[0], :scope => :user)
- end
- it "checks open profile on hot click if hot user public" do
- visit "/hotline"
- cont = find("div", :class => "main-content")
- cont.first("span", :class => "first-person").click
- expect(page).to have_current_path("/profile/2?hot=2")
- end
- it "checks can respond to public user hotline from profile" do
- visit "/profile/2?hot=2"
- find("button", :text => "Odpowiedz na hotline").click
- expect(page).to have_content("Hej, chętnie Cię poznam ;)")
- end
- it "checks open messenger on hot click if hot user private" do
- User.find(2).update_attribute("is_private", true)
- visit "/hotline"
- cont = find("div", :class => "main-content")
- cont.first("span", :class => "first-person").click
- expect(page).to have_content("Hej, chętnie Cię poznam ;)")
- end
- it "checks open" do
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement