Sha256: ba6c354e95d3379a13cf830871c81aecc9e7f6dd054752a839e86a16f2b5e698
Contents?: true
Size: 731 Bytes
Versions: 5
Compression:
Stored size: 731 Bytes
Contents
# frozen_string_literal: true require "spec_helper" feature "Promotion Codes" do stub_authorization! describe "create" do let(:promotion) { create :promotion } before do visit spree.new_admin_promotion_promotion_code_path(promotion) end it "creates a new promotion code" do fill_in "Value", with: "XYZ" click_button "Create" expect(page).to have_content "Promotion Code has been successfully created!" end it "disables the button at submit", :js do page.execute_script "$('form').submit(function(e) { e.preventDefault()})" fill_in "Value", with: "XYZ" click_button "Create" expect(page).to have_button("Create", disabled: true) end end end
Version data entries
5 entries across 5 versions & 1 rubygems