Sha256: 3842ab92d668236b14cb9d778f4571482d0f53fc614e76e361b18994a4f636d2
Contents?: true
Size: 918 Bytes
Versions: 6
Compression:
Stored size: 918 Bytes
Contents
#!/usr/bin/env ruby $LOAD_PATH << "./lib" require "rspec" include RSpec::Matchers require "testable" Capybara.configure do |config| config.run_server = false config.default_driver = :selenium config.app_host = "https://veilus.herokuapp.com" end class HomePage < Testable::Page element :login_form, "#open" element :username, "#username" element :password, "#password" element :login, "#login-button" def path "/" end end home_page = HomePage.visit puts home_page.current? expect(home_page).to be_current puts home_page.find("article").text puts home_page.login_form.inspect puts home_page.has_login_form? puts home_page.has_no_login_form? expect(home_page).to have_login_form # The next statement would (correctly) fail. # expect(home_page).to have_no_login_form home_page.login_form.click home_page.username.set "admin" home_page.password.set "admin" home_page.login.click
Version data entries
6 entries across 6 versions & 1 rubygems