1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 15:35:22 +02:00

Fix tests

This commit is contained in:
Zach Gollwitzer 2025-05-01 15:42:08 -04:00
parent 80b871aab0
commit 2618df8843
7 changed files with 6 additions and 63 deletions

View file

@ -69,7 +69,6 @@ export default class extends Controller {
}
toggle() {
console.log("toggle");
const currentTheme = document.documentElement.getAttribute("data-theme");
if (currentTheme === "dark") {
this.toLight();

View file

@ -1,54 +0,0 @@
<!DOCTYPE html>
<html class="h-full" lang="en">
<head>
<title><%= content_for(:title) || "🔒 Maybe Early Access" %></title>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
<%= javascript_importmap_tags %>
<%= turbo_refreshes_with method: :morph, scroll: :preserve %>
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="Maybe">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="theme-color" content="#ffffff">
<%= yield :head %>
</head>
<body class="subpixel-antialiased h-full bg-black text-white flex flex-col bg-top bg-no-repeat bg-cover" style="background-image: url('<%= asset_path("bg-grid.png") %>');">
<div class="grow flex items-center justify-center p-4 sm:p-6 md:p-8">
<div class="w-full max-w-sm mx-auto text-center rounded-lg p-6">
<%= image_tag "logo-squircle.svg", alt: "Maybe Logo", class: "w-16 h-16 sm:w-18 sm:h-18 mx-auto mb-6 sm:mb-8" %>
<h1 class="text-2xl font-normal my-4">Maybe Early Access</h1>
<% if @invite_codes_count > 0 %>
<p class="text-base text-subdued">There <%= @invite_codes_count == 1 ? "is" : "are" %> <span class="text-white"><%= @invite_codes_count %> invite <%= "code".pluralize(@invite_codes_count) %></span> remaining.</p>
<div class="bg-gray-900 border border-gray-800 p-2 rounded-xl my-4">
<p class="text-sm text-subdued mt-1 mb-3 sm:mb-4">Your invite code is <span class="font-mono text-white"><%= @invite_code.token %></span></p>
<p><%= link_to "Sign up with this code", new_registration_path(invite: @invite_code.token), class: "block w-full bg-container text-black py-2 px-3 rounded-lg no-underline text-sm sm:text-base hover:bg-gray-200 transition duration-150" %></p>
</div>
<p class="text-sm text-subdued">You may need to refresh the page to get a new invite code if someone else claimed it before you.</p>
<p class="mt-4 sm:mt-6">
<%= link_to early_access_path, class: "w-full block text-center justify-center inline-flex items-center text-white hover:bg-gray-800 p-2 rounded-md text-base transition duration-150", data: { turbo_method: :get } do %>
<%= icon "refresh-cw", class: "mr-2" %>
<span>Refresh page</span>
<% end %>
</p>
<% else %>
<p class="text-base text-subdued mb-6 sm:mb-8">Sorry, there are <span class="text-white">no invite codes</span> remaining. Join our <%= link_to "Discord server", "https://link.maybe.co/discord", target: "_blank", class: "text-white hover:text-gray-300" %> to get notified when new invite codes are available.</p>
<p><%= link_to "Join Discord server", "https://link.maybe.co/discord", target: "_blank", class: "bg-container text-black px-3 py-2 rounded-md no-underline text-base hover:bg-gray-200 transition duration-150" %></p>
<% end %>
</div>
</div>
<footer class="pb-6 sm:pb-10 text-center text-subdued text-sm">
©2024 Maybe Finance, Inc.
</footer>
</body>
</html>

View file

@ -24,7 +24,6 @@ Rails.application.routes.draw do
get "changelog", to: "pages#changelog"
get "feedback", to: "pages#feedback"
get "early-access", to: "pages#early_access"
resource :registration, only: %i[new create]
resources :sessions, only: %i[new create destroy]

View file

@ -8,7 +8,6 @@ class SubscriptionsControllerTest < ActionDispatch::IntegrationTest
test "redirects to settings if self hosting" do
Rails.application.config.app_mode.stubs(:self_hosted?).returns(true)
get subscription_path
assert_redirected_to root_path
assert_equal I18n.t("subscriptions.self_hosted_alert"), flash[:alert]
assert_response :forbidden
end
end

View file

@ -1,6 +1,7 @@
require "test_helper"
class Provider::Stripe::CustomerEventProcessorTest < ActiveSupport::TestCase
test "process" do
end
# test "process" do
# end
end

View file

@ -1,6 +1,6 @@
require "test_helper"
class Provider::Stripe::SubscriptionEventProcessorTest < ActiveSupport::TestCase
test "process" do
end
# test "process" do
# end
end

View file

@ -55,7 +55,6 @@ class TradesTest < ApplicationSystemTestCase
end
private
def open_new_trade_modal
click_on "New transaction"
end