Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Clicking on login should show login modal #177

Merged
merged 3 commits into from Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 0 additions & 17 deletions assets/javascripts/discourse/components/login-required.js

This file was deleted.

Expand Up @@ -2,7 +2,7 @@

<DButton
@label="log_in"
@action={{this.createAccount}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically speaking, @action={{action "createAccount"}} would have fixed it.

@action={{route-action "showLogin"}}
@icon="user"
class="btn btn-primary"
class="btn btn-primary login-required subscriptions"
/>
16 changes: 16 additions & 0 deletions spec/system/subscription_product_spec.rb
@@ -0,0 +1,16 @@
# frozen_string_literal: true

describe "Subscription products", type: :system do
fab!(:admin) { Fabricate(:admin) }
fab!(:product) { Fabricate(:product, external_id: "prod_OiKyO6ZMFCIhQa") }

before { SiteSetting.discourse_subscriptions_enabled = true }

it "shows the login modal" do
visit("/s")

find("button.login-required.subscriptions").click

expect(page).to have_css(".modal-container .login-modal")
end
end