source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/user/posts_spec.rb | Ruby | mit | 8,966 | main | 27,640 | # frozen_string_literal: true
require("spec_helper")
require "shared_examples/authorize_called"
describe("Posts on seller profile", type: :system, js: true) do
include FillInUserProfileHelpers
let(:seller) { create(:named_seller, :with_avatar) }
let(:buyer) { create(:named_user) }
before do
section = cr... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/user/product_panel/product_panel_spec.rb | Ruby | mit | 8,966 | main | 4,017 | # frozen_string_literal: true
require("spec_helper")
describe("Product panel on creator profile", type: :system, js: true) do
before do
@creator = create(:named_user)
purchaser_email = "one@gr.test"
@preview_image_url = "#{AWS_S3_ENDPOINT}/#{S3_BUCKET}/specs/kFDzu.png"
@a = create(:product_with_file... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/user/product_panel/scroll_pagination_spec.rb | Ruby | mit | 8,966 | main | 5,271 | # frozen_string_literal: true
require("spec_helper")
describe("Product panel on creator profile - infinite scroll pagination", type: :system, js: true) do
before do
@creator = create(:named_user)
purchaser_email = "one@gr.test"
@preview_image_url = "#{AWS_S3_ENDPOINT}/#{S3_BUCKET}/specs/kFDzu.png"
@... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/user/product_panel/product_panel_sort_filter_spec.rb | Ruby | mit | 8,966 | main | 8,815 | # frozen_string_literal: true
require("spec_helper")
describe("Product panel on creator profile - Sort/Filter", type: :system, js: true) do
before do
@creator = create(:named_user)
purchaser_email = "one@gr.test"
@preview_image_url = "#{AWS_S3_ENDPOINT}/#{S3_BUCKET}/specs/kFDzu.png"
@a = create(:pro... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/admin/impersonate_spec.rb | Ruby | mit | 8,966 | main | 1,431 | # frozen_string_literal: true
require "spec_helper"
describe "Impersonate", type: :system, js: true do
include StripeMerchantAccountHelper
let(:admin) { create(:admin_user, name: "Gumlord") }
let(:seller) do
user = create(:named_seller)
create(:merchant_account, user:, charge_processor_merchant_id: cre... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/admin/purchases_spec.rb | Ruby | mit | 8,966 | main | 6,212 | # frozen_string_literal: true
require "spec_helper"
describe "Admin::PurchasesController Scenario", type: :system, js: true do
let(:admin) { create(:admin_user) }
let(:purchase) { create(:purchase, purchaser: create(:user), is_deleted_by_buyer: true) }
before do
login_as(admin)
end
describe "undelete ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/admin/sales_reports_spec.rb | Ruby | mit | 8,966 | main | 4,195 | # frozen_string_literal: true
require "spec_helper"
describe "Admin::SalesReportsController", type: :system, js: true do
let(:admin) { create(:admin_user) }
before do
login_as(admin)
end
describe "GET /admin/sales_reports" do
it "displays the sales reports page" do
visit admin_sales_reports_pa... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/admin/pages_spec.rb | Ruby | mit | 8,966 | main | 5,764 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "Admin Pages Scenario", type: :system, js: true do
let(:admin) { create(:named_user, :admin) }
before do
allow_any_instance_of(Aws::S3::Object).to receive(:content_length).and_return(1_000_000)
login_a... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/admin/search_spec.rb | Ruby | mit | 8,966 | main | 1,875 | # frozen_string_literal: true
require "spec_helper"
describe "Admin::SearchController Scenario", type: :system, js: true do
let(:admin) { create(:admin_user) }
before do
sign_in admin
end
describe "purchases" do
describe "product_title_query" do
let(:product_title_query) { "design" }
let... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/admin/users_spec.rb | Ruby | mit | 8,966 | main | 9,400 | # frozen_string_literal: true
require "spec_helper"
describe "Admin::UsersController Scenario", type: :system, js: true do
let(:admin) { create(:admin_user) }
let(:user) { create(:user) }
let!(:user_compliance_info) { create(:user_compliance_info, user:) }
before do
login_as(admin)
end
context "when... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/admin/products_spec.rb | Ruby | mit | 8,966 | main | 6,583 | # frozen_string_literal: true
require "spec_helper"
describe "Admin::LinksController Scenario", type: :system, js: true do
let(:admin_user) { create(:admin_user) }
let(:product) { create(:product) }
before do
login_as(admin_user)
end
it "renders the product page", :sidekiq_inline, :elasticsearch_wait_... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/admin/affiliates_spec.rb | Ruby | mit | 8,966 | main | 1,750 | # frozen_string_literal: true
require "spec_helper"
describe "Admin::AffiliatesController Scenario", type: :system, js: true do
let(:admin) { create(:admin_user) }
let(:affiliate_user) { create(:affiliate_user) }
before do
login_as(admin)
end
context "when user has no affiliated products" do
befor... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/admin/unreviewed_users_spec.rb | Ruby | mit | 8,966 | main | 4,123 | # frozen_string_literal: true
require "spec_helper"
describe "Admin::UnreviewedUsersController", type: :system, js: true do
let(:admin) { create(:admin_user) }
before do
login_as(admin)
end
describe "GET /admin/unreviewed_users" do
context "when no cached data exists" do
before do
$red... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/discover/top_creator_badge_spec.rb | Ruby | mit | 8,966 | main | 1,790 | # frozen_string_literal: true
require "spec_helper"
describe("Top creator badge on Discover and Product pages", js: true, type: :system) do
include StripeMerchantAccountHelper
let(:discover_host) { UrlService.discover_domain_with_protocol }
before do
allow_any_instance_of(Link).to receive(:update_asset_pr... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/discover/filtering_spec.rb | Ruby | mit | 8,966 | main | 16,331 | # frozen_string_literal: true
require "spec_helper"
describe("Discover - Filtering scenarios", js: true, type: :system) do
let(:discover_host) { UrlService.discover_domain_with_protocol }
before do
@audio_taxonomy = Taxonomy.find_by(slug: "audio")
@wallpapers_taxonomy = Taxonomy.find_by(slug: "wallpapers... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/discover/discover_mobile_spec.rb | Ruby | mit | 8,966 | main | 1,995 | # frozen_string_literal: true
require "spec_helper"
describe("Discover - Nav - Mobile", :js, :mobile_view, type: :system) do
let(:discover_host) { UrlService.discover_domain_with_protocol }
before do
software_taxonomy = Taxonomy.find_by(slug: "software-development")
@software_product = create(:product, u... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/discover/search_spec.rb | Ruby | mit | 8,966 | main | 11,526 | # frozen_string_literal: true
require "spec_helper"
describe("Discover - Search scenarios", js: true, type: :system) do
let(:discover_host) { UrlService.discover_domain_with_protocol }
before do
allow_any_instance_of(Link).to receive(:update_asset_preview)
@buyer = create(:user)
@png = Rack::Test::Up... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/discover/blackfriday_spec.rb | Ruby | mit | 8,966 | main | 5,238 | # frozen_string_literal: true
require "spec_helper"
describe("Black Friday 2025", js: true, type: :system) do
let(:discover_host) { UrlService.discover_domain_with_protocol }
before do
allow_any_instance_of(Link).to receive(:update_asset_preview)
@creator = create(:compliant_user, name: "Black Friday Sel... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/discover/discover_spec.rb | Ruby | mit | 8,966 | main | 27,127 | # frozen_string_literal: true
require "spec_helper"
describe("Discover", js: true, type: :system) do
include StripeMerchantAccountHelper
let(:discover_host) { UrlService.discover_domain_with_protocol }
before do
allow_any_instance_of(Link).to receive(:update_asset_preview)
@buyer = create(:user)
@... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/discover/discover_domain_spec.rb | Ruby | mit | 8,966 | main | 2,858 | # frozen_string_literal: true
require "spec_helper"
describe "DiscoverDomainScenario", type: :system, js: true do
let(:films_best_selling_section) do
find("section", text: "Best selling products")
end
before do
@port = Capybara.current_session.server.port
@discover_domain = "discover.test.gumroad.... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/discover/recommendations_spec.rb | Ruby | mit | 8,966 | main | 2,779 | # frozen_string_literal: true
require "spec_helper"
describe("Discover recommendations", js: true, type: :system) do
let(:host) { UrlService.discover_domain_with_protocol }
let(:user) { create(:buyer_user) }
let(:product) { create(:product) }
let(:products) do
create_list(:product, 5) do |product, i|
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/subscription/tiered_membership_fixed_length_spec.rb | Ruby | mit | 8,966 | main | 3,258 | # frozen_string_literal: true
require "spec_helper"
describe "Tiered Memberships Fixed Length Spec", type: :system, js: true do
include ManageSubscriptionHelpers
before :each do
setup_subscription
@subscription.update!(charge_occurrence_count: 4)
travel_to(@originally_subscribed_at + 1.month)
set... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/subscription/tiered_membership_sca_spec.rb | Ruby | mit | 8,966 | main | 3,038 | # frozen_string_literal: true
require "spec_helper"
describe "Subscription manage page tier upgrade with SCA", :js, type: :system do
include ManageSubscriptionHelpers
before do
MerchantAccount.find_or_create_by!(user_id: nil, charge_processor_id: StripeChargeProcessor.charge_processor_id) do |ma|
ma.ch... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/subscription/tiered_membership_offer_codes_spec.rb | Ruby | mit | 8,966 | main | 18,067 | # frozen_string_literal: true
require "spec_helper"
describe "Tiered Membership Offer code Spec", type: :system, js: true do
include ManageSubscriptionHelpers
context "when the subscription has an offer code applied" do
let(:offer_code) { create(:universal_offer_code, amount_cents: 200) }
before do
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/subscription/tiered_membership_free_trial_spec.rb | Ruby | mit | 8,966 | main | 11,092 | # frozen_string_literal: true
require "spec_helper"
describe "Tiered Membership Free Trial Spec", type: :system, js: true do
include ManageSubscriptionHelpers
include ProductWantThisHelpers
let(:is_pwyw) { false }
before :each do
setup_subscription(free_trial: true, pwyw: is_pwyw)
setup_subscription_... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/subscription/tiered_membership_pwyw_spec.rb | Ruby | mit | 8,966 | main | 2,873 | # frozen_string_literal: true
require "spec_helper"
describe "Tiered Membership Spec for a PWYW tier", type: :system, js: true do
include ManageSubscriptionHelpers
include ProductWantThisHelpers
include CurrencyHelper
before :each do
setup_subscription
travel_to(@originally_subscribed_at + 1.month)
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/subscription/magic_link_page_spec.rb | Ruby | mit | 8,966 | main | 8,948 | # frozen_string_literal: true
require "spec_helper"
describe "Membership magic link page", type: :system, js: true do
include ManageSubscriptionHelpers
before { setup_subscription }
context "when the buyer is logged in" do
it "allows the user to access the manage page" do
sign_in @subscription.user
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/subscription/tiered_membership_spec.rb | Ruby | mit | 8,966 | main | 14,615 | # frozen_string_literal: true
require "spec_helper"
describe "Tiered Membership Spec", type: :system, js: true do
include ManageSubscriptionHelpers
include ProductWantThisHelpers
include CurrencyHelper
before :each do
setup_subscription
travel_to(@originally_subscribed_at + 1.month)
setup_subscri... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/subscription/missing_tiered_membership_spec.rb | Ruby | mit | 8,966 | main | 3,562 | # frozen_string_literal: true
require "spec_helper"
describe "Missing Tiered Membership Spec", type: :system, js: true do
include ManageSubscriptionHelpers
include ProductWantThisHelpers
include CurrencyHelper
before :each do
setup_subscription
travel_to(@originally_subscribed_at + 1.month)
setup... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/subscription/tiered_membership_price_changes_spec.rb | Ruby | mit | 8,966 | main | 22,609 | # frozen_string_literal: true
require "spec_helper"
describe "Tiered Membership Price Changes Spec", type: :system, js: true do
include ManageSubscriptionHelpers
include ProductWantThisHelpers
include CurrencyHelper
before :each do
setup_subscription
allow_any_instance_of(Purchase).to receive(:mandat... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/subscription/non_tiered_membership_spec.rb | Ruby | mit | 8,966 | main | 22,726 | # frozen_string_literal: true
require "spec_helper"
describe "Non Tiered Membership Subscriptions", type: :system, js: true do
include ManageSubscriptionHelpers
include ProductWantThisHelpers
context "that are active" do
before :each do
@originally_subscribed_at = Time.utc(2020, 04, 01)
travel_... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/subscription/installment_plan_spec.rb | Ruby | mit | 8,966 | main | 4,105 | # frozen_string_literal: true
require "spec_helper"
describe "Installment Plans", type: :system, js: true do
include ManageSubscriptionHelpers
let(:seller) { create(:user) }
let(:buyer) { create(:user) }
let(:credit_card) { create(:credit_card) }
let(:product) { create(:product, :with_installment_plan, us... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/subscription/tiered_membership_payment_updates_specs.rb | Ruby | mit | 8,966 | main | 12,310 | # frozen_string_literal: true
require "spec_helper"
describe "Tiered Membership Spec for Payment/Settings updates", type: :system, js: true do
include ManageSubscriptionHelpers
include ProductWantThisHelpers
include CurrencyHelper
let(:gift) { null }
before do
setup_subscription(gift:)
travel_to(@... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/subscription/tiered_membership_vat_spec.rb | Ruby | mit | 8,966 | main | 5,077 | # frozen_string_literal: true
require "spec_helper"
describe "Tiered Membership VAT Spec", type: :system, js: true do
include ManageSubscriptionHelpers
include ProductWantThisHelpers
before :each do
setup_subscription
travel_to(@originally_subscribed_at + 1.month)
setup_subscription_token
Capyba... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/download_page/download_page_spec.rb | Ruby | mit | 8,966 | main | 44,779 | # frozen_string_literal: true
require("spec_helper")
describe("Download Page", type: :system, js: true) do
describe "open in app" do
before do
@product = create(:product, user: create(:user))
create(:product_file, link_id: @product.id, url: "#{AWS_S3_ENDPOINT}/#{S3_BUCKET}/specs/test.pdf").analyze
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/download_page/rich_text_editor_spec.rb | Ruby | mit | 8,966 | main | 67,770 | # frozen_string_literal: true
require("spec_helper")
require "shared_examples/file_group_download_all"
describe("Download Page – Rich Text Editor Content", type: :system, js: true) do
def embed_files_for_product(product:, files:)
product_rich_content = product.alive_rich_contents.first_or_initialize
descrip... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/download_page/audio_files_spec.rb | Ruby | mit | 8,966 | main | 12,969 | # frozen_string_literal: true
require("spec_helper")
describe("Download Page Audio files", type: :system, js: true) do
before do
@url_redirect = create(:listenable_url_redirect)
@product = @url_redirect.referenced_link
login_as(@url_redirect.purchase.purchaser)
Link.import(refresh: true)
end
de... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/download_page/product_reviews_spec.rb | Ruby | mit | 8,966 | main | 8,534 | # frozen_string_literal: true
require("spec_helper")
describe("Download Page product reviews", type: :system, js: true) do
let(:product) { create(:product_with_pdf_files_with_size, custom_permalink: "custom") }
let(:purchase) { create(:purchase_with_balance, link: product, email: "one@gr.test", created_at: 2.year... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/checkout/upsells_spec.rb | Ruby | mit | 8,966 | main | 31,198 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/creator_dashboard_page"
describe("Checkout upsells page", type: :system, js: true) do
let(:seller) { create(:named_seller, :eligible_for_service_products) }
let(:product1) { create(:product_with... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/checkout/currencies_spec.rb | Ruby | mit | 8,966 | main | 569 | # frozen_string_literal: true
require "spec_helper"
describe "Checkout currency conversions", :js, type: :system do
before do
$currency_namespace = Redis::Namespace.new(:currencies, redis: $redis)
$currency_namespace.set("GBP", 5.1651)
@product = create(:product, price_cents: 2300, price_currency_type: ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/checkout/offer_codes_spec.rb | Ruby | mit | 8,966 | main | 8,362 | # frozen_string_literal: true
require "spec_helper"
describe "Checkout offer codes", :js, type: :system do
before do
@product = create(:product, price_cents: 1000)
@product2 = create(:product, price_cents: 1000)
end
it "only shows the discount code field for users that have it enabled" do
visit "/l... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/checkout/apple_google_pay_spec.rb | Ruby | mit | 8,966 | main | 8,927 | # frozen_string_literal: true
require "spec_helper"
describe "Checkout with Payment Request API", :js, type: :system do
# Builds a minimal Stripe Payment Request mock and injects it via CDP so it
# runs before any other scripts on every subsequent page load.
def inject_payment_request_mock(apple_pay: false, goo... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/checkout/multi_item_receipt_spec.rb | Ruby | mit | 8,966 | main | 1,198 | # frozen_string_literal: true
require "spec_helper"
describe "Multi-item receipt", :js, type: :system do
include ActiveJob::TestHelper
let(:seller_one) { create(:user) }
let(:product_one) { create(:product, user: seller_one, price_cents: 110, name: "Product One") }
let(:seller_two) { create(:user) }
let(:... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/checkout/payment_spec.rb | Ruby | mit | 8,966 | main | 3,430 | # frozen_string_literal: true
require "spec_helper"
describe "Checkout payment", :js, type: :system do
before do
@product = create(:product, price_cents: 1000)
Feature.deactivate(:disable_braintree_sales)
end
it "shows native, braintree, or no paypal button depending on availability" do
create(:mer... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/checkout/form_spec.rb | Ruby | mit | 8,966 | main | 8,929 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/creator_dashboard_page"
describe("Checkout form page", type: :system, js: true) do
let(:seller) { create(:named_seller, recommendation_type: User::RecommendationType::OWN_PRODUCTS) }
include_co... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/checkout/bundle_spec.rb | Ruby | mit | 8,966 | main | 9,214 | # frozen_string_literal: true
require "spec_helper"
describe "Checkout bundles", :js, type: :system do
let(:seller) { create(:named_seller) }
let(:bundle) { create(:product, user: seller, is_bundle: true, price_cents: 1000) }
let(:product) { create(:product, user: seller, name: "Product", price_cents: 500, thu... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/checkout/cart_spec.rb | Ruby | mit | 8,966 | main | 18,524 | # frozen_string_literal: true
require "spec_helper"
describe "Checkout cart", :js, type: :system do
before do
@product = create(:product, price_cents: 1000, quantity_enabled: true)
@pwyw_product = create(:product, price_cents: 1000, customizable_price: true, thumbnail: create(:thumbnail))
@versioned_pro... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/checkout/subscription_restart_spec.rb | Ruby | mit | 8,966 | main | 5,025 | # frozen_string_literal: true
require "spec_helper"
describe "Subscription restart at checkout", :js, type: :system do
before do
@seller = create(:named_user)
@product = create(:membership_product, user: @seller, price_cents: 500)
@tier = @product.default_tier
@buyer = create(:user)
@credit_card... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/checkout/discounts_spec.rb | Ruby | mit | 8,966 | main | 42,440 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/creator_dashboard_page"
describe("Checkout discounts page", type: :system, js: true) do
include CurrencyHelper
let(:seller) { create(:named_seller) }
let(:product1) { create(:product, name: "... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/checkout/test_subscription_purchases_spec.rb | Ruby | mit | 8,966 | main | 2,155 | # frozen_string_literal: true
require "spec_helper"
describe "Test subscription purchases", :js, type: :system do
let(:seller) { create(:named_seller) }
let(:product) { create(:product, user: seller, is_recurring_billing: true, subscription_duration: :monthly, price_cents: 500) }
it "allows the seller to creat... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/followers/followers_spec.rb | Ruby | mit | 8,966 | main | 4,757 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/creator_dashboard_page"
describe("Followers", js: true, type: :system) do
let(:seller) { create(:named_seller) }
before do
@page_limit = FollowersController::FOLLOWERS_PER_PAGE
@identif... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/archived_products_spec.rb | Ruby | mit | 8,966 | main | 7,695 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/products_navigation"
require "shared_examples/with_sorting_and_pagination"
describe "Archived Products", type: :system, js: true do
let(:seller) { create(:named_seller) }
include_context "with ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/dropbox_spec.rb | Ruby | mit | 8,966 | main | 6,936 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "Dropbox uploads", type: :system, js: true do
include ProductEditPageHelpers
let(:seller) { create(:named_seller) }
let(:product) { create(:product, user: seller) }
include_context "with switching account... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/third_party_analytics_spec.rb | Ruby | mit | 8,966 | main | 6,781 | # frozen_string_literal: true
require("spec_helper")
describe("Third party analytics", type: :system, js: true) do
before do
@user = create(:user)
@product = create(:product, user: @user)
@product2 = create(:product, user: @user)
@product_without_3pa = create(:product)
end
context "on product p... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/affiliated_products_spec.rb | Ruby | mit | 8,966 | main | 16,617 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/products_navigation"
describe "Affiliated Products", type: :system, js: true do
let(:affiliate_user) { create(:affiliate_user) }
include_context "with switching account to user as admin for sel... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/index_mobile_spec.rb | Ruby | mit | 8,966 | main | 1,072 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "Products Page Scenario - Mobile", type: :system, js: true, mobile_view: true do
let(:seller) { create(:named_seller) }
before do
login_as(seller)
end
it "shows Sales and Revenue labels in the product... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/collabs_mobile_spec.rb | Ruby | mit | 8,966 | main | 1,111 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "Collabs - Mobile", type: :system, js: true, mobile_view: true do
let(:seller) { create(:named_seller) }
before do
login_as(seller)
end
it "shows Sales and Revenue labels in the collab products table ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/collabs_spec.rb | Ruby | mit | 8,966 | main | 8,204 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/products_navigation"
require "shared_examples/with_sorting_and_pagination"
describe "Collabs", type: :system, js: true do
let(:user) { create(:user) }
include_context "with switching account to... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/index_spec.rb | Ruby | mit | 8,966 | main | 24,805 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/products_navigation"
require "shared_examples/with_sorting_and_pagination"
describe "Products Page Scenario", type: :system, js: true do
include ProductEditPageHelpers
def find_product_row(prod... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/creation_spec.rb | Ruby | mit | 8,966 | main | 17,517 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "Product creation", type: :system, js: true do
let(:seller) { create(:named_seller) }
let(:product) { create(:product, user: seller) }
let(:user_with_admin_role) { create(:user, name: "Admin") }
include_co... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/mobile_tracking_spec.rb | Ruby | mit | 8,966 | main | 1,643 | # frozen_string_literal: true
describe "Mobile tracking", type: :system, js: true do
let(:product) { create(:product) }
before do
allow_any_instance_of(ApplicationController).to receive(:analytics_enabled?).and_return(true)
end
it "adds global functions the apps can call to track product events" do
v... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/show/supporter_count_spec.rb | Ruby | mit | 8,966 | main | 2,176 | # frozen_string_literal: true
require("spec_helper")
describe("The supporter count", js: true, type: :system) do
before do
recreate_model_indices(Purchase)
@user = create(:user)
@product = create(:membership_product, user: @user, should_show_sales_count: true)
end
it "doesn't show the supporter cou... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/show/user_info_spec.rb | Ruby | mit | 8,966 | main | 1,462 | # frozen_string_literal: true
require("spec_helper")
describe("ProductUserInfoScenario", type: :system, js: true) do
it("it fills the logged in user's information in the form") do
user = create(:user, name: "amir", street_address: "1640 17th st", zip_code: "94103", country: "United States", city: "San Francisco... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/show/reviews_spec.rb | Ruby | mit | 8,966 | main | 13,520 | # frozen_string_literal: true
require("spec_helper")
describe("Product page reviews", js: true, type: :system) do
include ActionView::Helpers::TextHelper
def create_review(index, rating)
purchase = create(:purchase, link: product, full_name: "Purchaser #{index}")
create(:product_review, rating:, purchase... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/show/sections_spec.rb | Ruby | mit | 8,966 | main | 7,871 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "Profile settings on product pages", type: :system, js: true do
let(:seller) { create(:user) }
let(:product) { create(:product, user: seller) }
it "renders sections correctly when the user is logged out" do
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/show/wishlist_selector_spec.rb | Ruby | mit | 8,966 | main | 6,223 | # frozen_string_literal: true
require("spec_helper")
describe "Product page wishlist selector", js: true, type: :system do
let(:user) { create(:user) }
let(:product) { create(:product, user:) }
def add_to_wishlist(option)
select_combo_box_option option, from: "Add to wishlist"
expect(page).to have_comb... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/show/preview_spec.rb | Ruby | mit | 8,966 | main | 3,129 | # frozen_string_literal: true
require("spec_helper")
describe("Product page previews", js: true, type: :system) do
before do
@product = create(:product, user: create(:user), custom_receipt: "<h1>Hello</h1>")
create(:asset_preview, link: @product)
create(:asset_preview, url: "https://www.youtube.com/watc... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/show/subscription_choice_modal_spec.rb | Ruby | mit | 8,966 | main | 2,653 | # frozen_string_literal: true
require "spec_helper"
describe "Subscription choice modal on product page", :js, type: :system do
let(:seller) { create(:named_user) }
let(:product) { create(:membership_product, user: seller, price_cents: 500) }
let(:tier) { product.default_tier }
let(:buyer) { create(:user) }
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/show/show_spec.rb | Ruby | mit | 8,966 | main | 27,587 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/discover_layout"
describe("ProductShowScenario", type: :system, js: true) do
it("sets the quantity and price based on the parameters in the query string and allows purchase") do
product = crea... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/show/sales_count_spec.rb | Ruby | mit | 8,966 | main | 3,817 | # frozen_string_literal: true
require("spec_helper")
describe("Product page sales count", js: true, type: :system) do
before(:each) do
@user = create(:user)
@product = create(:product, user: @user, should_show_sales_count: true, price_cents: 100)
recreate_model_index(Purchase)
end
it "hides the sa... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/publishing_spec.rb | Ruby | mit | 8,966 | main | 5,609 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe("Product Edit - Publishing Scenario", type: :system, js: true) do
include ProductEditPageHelpers
let(:seller) { create(:named_seller, payment_address: nil) }
include_context "with switching account to user ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/receipt_spec.rb | Ruby | mit | 8,966 | main | 1,860 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe("Product Edit Receipt Tab", type: :system, js: true) do
include ProductEditPageHelpers
include PreviewBoxHelpers
let(:seller) { create(:named_seller) }
let!(:product) { create(:product_with_pdf_file, user:... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/rich_text_editor_spec.rb | Ruby | mit | 8,966 | main | 55,357 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe("Product Edit Rich Text Editor", type: :system, js: true) do
include ProductEditPageHelpers
let(:seller) { create(:named_seller, :eligible_for_service_products) }
before do
@product = create(:product_wi... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/pwyw_spec.rb | Ruby | mit | 8,966 | main | 2,221 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe("Product Edit pay what you want setting", type: :system, js: true) do
include ProductEditPageHelpers
let(:seller) { create(:named_seller) }
let(:product) { create(:product_with_pdf_file, user: seller, size: ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/coffee_spec.rb | Ruby | mit | 8,966 | main | 2,767 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "Coffee Edit", type: :system, js: true do
let(:seller) { create(:user, :eligible_for_service_products, name: "Caffeine Addict") }
let(:coffee) do
create(
:product,
user: seller,
name: "Cof... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/file_embeds_spec.rb | Ruby | mit | 8,966 | main | 26,341 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
require "shared_examples/file_group_download_all"
describe("File embeds in product content editor", type: :system, js: true) do
include ProductEditPageHelpers
let(:seller) { create(:named_seller) }
before :each do
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/multiple_preview_spec.rb | Ruby | mit | 8,966 | main | 3,643 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
def upload_image
click_on "Upload images or videos"
page.attach_file(Rails.root.join("spec", "support", "fixtures", "smaller.png")) do
select_tab "Computer files"
end
end
describe("Product edit multiple-preview S... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/calls_spec.rb | Ruby | mit | 8,966 | main | 6,151 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "Calls Edit", type: :system, js: true do
def upload_image(filenames)
click_on "Upload images or videos"
page.attach_file(filenames.map { |filename| file_fixture(filename) }) do
select_tab "Computer ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/covers_spec.rb | Ruby | mit | 8,966 | main | 6,679 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe "Product Edit Covers", type: :system, js: true do
include ProductEditPageHelpers
def upload_image(filenames)
click_on "Upload images or videos"
page.attach_file(filenames.map { |filename| file_fixture(... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/custom_permalink_spec.rb | Ruby | mit | 8,966 | main | 4,198 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe("Product Edit custom permalink edit", type: :system, js: true) do
include ManageSubscriptionHelpers
include ProductEditPageHelpers
let(:seller) { create(:named_seller) }
let!(:product) { create(:product_wi... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/purchase_flow_spec.rb | Ruby | mit | 8,966 | main | 848 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe("ProductPurchaseFlowScenario", type: :system, js: true) do
include ProductEditPageHelpers
let(:seller) { create(:named_seller) }
let(:product) { create(:product_with_pdf_file, user: seller, size: 1024) }
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/membership_tiers_spec.rb | Ruby | mit | 8,966 | main | 31,035 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe("Product Edit Memberships", type: :system, js: true) do
include ProductTieredPricingHelpers
include ProductEditPageHelpers
def reorder_rows(row:, place_before:)
row.find("[aria-grabbed='false']").drag_to... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/edit_spec.rb | Ruby | mit | 8,966 | main | 46,877 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe("Product Edit Scenario", type: :system, js: true) do
include ManageSubscriptionHelpers
include ProductEditPageHelpers
let(:seller) { create(:named_seller) }
let!(:product) { create(:product_with_pdf_file, ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/preview_spec.rb | Ruby | mit | 8,966 | main | 7,361 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe("Product Edit Previews", type: :system, js: true) do
include ProductEditPageHelpers
def nth(index, selector)
el = all(selector)[index]
raise "no elements found using selector '#{selector}'" unless el
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/options_spec.rb | Ruby | mit | 8,966 | main | 13,050 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe("ProductMoreOptionScenario", type: :system, js: true) do
include ProductEditPageHelpers
def visit_product_edit(link)
visit("/products/#{link.unique_permalink}/edit")
wait_for_ajax
end
def visit_pr... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/digital_versions_spec.rb | Ruby | mit | 8,966 | main | 10,239 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe("Product Edit Digital Versions", type: :system, js: true) do
include ProductEditPageHelpers
let(:seller) { create(:named_seller) }
let!(:product) { create(:product_with_pdf_files_with_size, user: seller) }
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/thumbnails_spec.rb | Ruby | mit | 8,966 | main | 3,465 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe("Product Edit Thumbnail Scenario", type: :system, js: true) do
include ManageSubscriptionHelpers
let(:seller) { create(:named_seller) }
before :each do
@product = create(:product_with_pdf_file, user: se... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/integrations/google_calendar_integrations_spec.rb | Ruby | mit | 8,966 | main | 5,287 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe("Product Edit Integrations edit - Google Calendar", type: :system, js: true) do
include ProductTieredPricingHelpers
include ProductEditPageHelpers
let(:seller) { create(:named_seller, created_at: 60.days.ago... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/integrations/discord_integrations_spec.rb | Ruby | mit | 8,966 | main | 26,027 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe("Product Edit Integrations edit - Discord", type: :system, js: true) do
include ProductTieredPricingHelpers
include ProductEditPageHelpers
let(:seller) { create(:named_seller) }
before :each do
@produ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/products/edit/integrations/circle_integrations_spec.rb | Ruby | mit | 8,966 | main | 14,565 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/authorize_called"
describe("Product Edit Integrations edit - Circle", :without_circle_rate_limit, type: :system, js: true) do
include ProductTieredPricingHelpers
include ProductEditPageHelpers
let(:seller) { create(:named_seller) }
... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/wishlists/wishlist_index_spec.rb | Ruby | mit | 8,966 | main | 2,182 | # frozen_string_literal: true
require "spec_helper"
describe "Wishlist index page", :js, type: :system do
let(:wishlist) { create(:wishlist, name: "My Wishlist", user: create(:user, name: "Wishlist User")) }
let(:quantity_item) { create(:wishlist_product, :with_quantity, wishlist:) }
let(:variant_item) { create... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/wishlists/wishlist_following_spec.rb | Ruby | mit | 8,966 | main | 1,380 | # frozen_string_literal: true
require "spec_helper"
describe "Wishlist following page", :js, type: :system do
include Rails.application.routes.url_helpers
let(:user) { create(:user, name: "Follower") }
let(:wishlist) { create(:wishlist, name: "Followed Wishlist") }
let!(:wishlist_follower) { create(:wishlist... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/wishlists/wishlist_show_spec.rb | Ruby | mit | 8,966 | main | 13,137 | # frozen_string_literal: true
require "spec_helper"
require "shared_examples/discover_layout"
describe "Wishlist show page", :js, type: :system do
include Rails.application.routes.url_helpers
let(:physical_product) { create(:product, :recommendable, name: "Quantity Product", price_cents: 1000, quantity_enabled: ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/purchases/tipping_spec.rb | Ruby | mit | 8,966 | main | 15,130 | # frozen_string_literal: true
require("spec_helper")
describe("Product checkout with tipping", type: :system, js: true) do
let(:seller) { create(:named_seller, :eligible_for_service_products, tipping_enabled: true) }
let(:product1) { create(:product, name: "Product 1", user: seller, price_cents: 1000, quantity_en... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/purchases/product_spec.rb | Ruby | mit | 8,966 | main | 1,530 | # frozen_string_literal: true
require("spec_helper")
describe("Purchase product page", type: :system, js: true) do
let(:purchase) { create(:purchase) }
let(:product) { purchase.link }
it "shows the product for the purchase" do
visit purchase_product_path(purchase.external_id)
expect(page).to have_text... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/purchases/dispute_evidence_spec.rb | Ruby | mit | 8,966 | main | 7,926 | # frozen_string_literal: true
require("spec_helper")
describe("Dispute evidence page", type: :system, js: true) do
let(:dispute) { create(:dispute_formalized, reason: Dispute::REASON_FRAUDULENT) }
let(:dispute_evidence) { create(:dispute_evidence, dispute:) }
let(:purchase) { dispute_evidence.disputable.purchas... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/purchases/generate_invoice_confirmation_page_spec.rb | Ruby | mit | 8,966 | main | 1,770 | # frozen_string_literal: true
require "spec_helper"
describe "Generate invoice confirmation page", type: :system, js: true do
before :each do
@purchase = create(:purchase)
end
it "asks to confirm the email address before showing the generate invoice page" do
visit new_purchase_invoice_path(@purchase.ex... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/purchases/receipt_spec.rb | Ruby | mit | 8,966 | main | 3,317 | # frozen_string_literal: true
require "spec_helper"
describe("Viewing a purchase receipt", type: :system, js: true) do
# Shared context for all tests
let(:purchase) { create(:membership_purchase) }
let(:manage_membership_url) { Rails.application.routes.url_helpers.manage_subscription_url(purchase.subscription.e... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/purchases/product/collaborators_spec.rb | Ruby | mit | 8,966 | main | 1,092 | # frozen_string_literal: true
require("spec_helper")
describe("Product checkout - with collaborator", type: :system, js: true) do
let(:product) { create(:product, :recommendable, price_cents: 20_00) }
let!(:collaborator) { create(:collaborator, affiliate_basis_points: 50_00, products: [product]) }
it "credits ... |
github | antiwork/gumroad | https://github.com/antiwork/gumroad | spec/requests/purchases/product/affiliates_spec.rb | Ruby | mit | 8,966 | main | 8,907 | # frozen_string_literal: true
require("spec_helper")
describe("Product checkout - with affiliate", type: :system, js: true) do
def set_affiliate_cookie
browser = Capybara.current_session.driver.browser
browser.manage.add_cookie(name: CGI.escape(affiliate.cookie_key), value: {
value: Time.current.to_i,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.