Sha256: bc8ae7aa869b65b0761c2f6b188a8b96d1bbca0d7b9d5dd96e27779a5eb4c09b
Contents?: true
Size: 562 Bytes
Versions: 13
Compression:
Stored size: 562 Bytes
Contents
# frozen_string_literal: true module FormsValidationsHelpers MESSAGES = { text: "Please fill out this field.", select: "Please select an item in the list." }.freeze def expect_blank_field_validation_message(selector, opts = {}) type = opts.fetch(:type, :text).to_sym expected_message = opts.fetch(:message, MESSAGES[type]) message = page.find(selector).native.attribute("validationMessage") expect(message).to eq expected_message end end RSpec.configure do |config| config.include FormsValidationsHelpers, type: :system end
Version data entries
13 entries across 13 versions & 1 rubygems