Skip to content

Commit

Permalink
stage login tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen committed Mar 27, 2024
1 parent 60cc069 commit 6c960ea
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions spec/requests/login_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@
# require '../common/beef_test'

RSpec.describe 'Beef Login' do
let(:session) { Capybara::Session.new(:selenium_headless) }
# let(:session) { Capybara::Session.new(:selenium_headless) }

before(:each) do
session.visit(ATTACK_URL)
sleep 2.0
end
# before(:each) do
# session.visit(ATTACK_URL)
# sleep 2.0
# end

after(:each) do
BeefTest.save_screenshot(session)
session.driver.browser.close
end
# after(:each) do
# BeefTest.save_screenshot(session)
# session.driver.browser.close
# end

it 'logs in successfully' do
session.fill_in 'user', with: BEEF_USER
session.fill_in 'pass', with: BEEF_PASSWD
session.click_button('Login')
sleep 10.0
expect(session).to have_content('Logout')
end
# it 'logs in successfully' do
# session.fill_in 'user', with: BEEF_USER
# session.fill_in 'pass', with: BEEF_PASSWD
# session.click_button('Login')
# sleep 10.0
# expect(session).to have_content('Logout')
# end

# it 'logs out successfully' do
# session.fill_in 'user', with: BEEF_USER
Expand Down

0 comments on commit 6c960ea

Please sign in to comment.