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

[admin] Build the admin CSS before running the specs #5558

Merged
merged 2 commits into from
Dec 19, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
flex gap-3 items-center
py-1 px-3 rounded
hover:text-red-500 hover:bg-gray-50
<%= "text-red-500 bg-gray-50" if active? %>
<%= "text-red-600 bg-gray-50" if active? %>
<%= @item.top_level ? "font-semibold text-sm text-black" : "font-normal text-sm text-gray-600" %>
"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
flex gap-1 flex-col
">
<%= tag.span @hint if @hint.present? %>
<%= tag.span safe_join(@error, tag.br), class: "text-red-400" if @error.present? %>
<%= tag.span safe_join(@error, tag.br), class: "text-red-600" if @error.present? %>
</div>
<% end %>
</label>
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def initialize(tag: :input, size: :m, error: nil, **attributes)
hover:border-gray-500
focus:ring focus:ring-gray-300 focus:ring-0.5 focus:bg-white focus:ring-offset-0 [&:focus-visible]:outline-none
disabled:bg-gray-50 disabled:text-gray-500 disabled:placeholder:text-gray-300 disabled:cursor-not-allowed
invalid:border-red-400 invalid:hover:border-red-400 invalid:text-red-400
aria-invalid:border-red-400 aria-invalid:hover:border-red-400 aria-invalid:text-red-400
invalid:border-red-600 invalid:hover:border-red-600 invalid:text-red-600
aria-invalid:border-red-600 aria-invalid:hover:border-red-600 aria-invalid:text-red-600
],
SIZES[size],
specialized_classes,
Expand Down
6 changes: 6 additions & 0 deletions admin/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
mount Spree::Core::Engine, at: '/'
end

unless SolidusAdmin::Engine.root.join('app/assets/builds/solidus_admin/tailwind.css').exist?
Dir.chdir(SolidusAdmin::Engine.root) do
system 'bundle exec rake tailwindcss:build' or abort 'Failed to build Tailwind CSS'
end
end

# RAILS
require "rspec/rails"
ENV["RAILS_ENV"] ||= 'test'
Expand Down