-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug Fix: Fixing bad CSS in action-list.css and writing test to check …
…for error (#1539)
- Loading branch information
Showing
5 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/view-components": patch | ||
--- | ||
|
||
Bug Fix: Fixing bad CSS in action-list.css and writing test to check for error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
require "components/test_helper" | ||
|
||
class ComponentCssTest < Minitest::Test | ||
include Primer::ComponentTestHelpers | ||
|
||
def test_css_gets_compiled | ||
assert File.exist?("app/assets/styles/primer_view_components.css"), "Compiled CSS file not found" | ||
end | ||
|
||
def test_css_is_compiled_correctly | ||
Dir["app/components/**/*.css"].each do |file| | ||
css = File.read(file) | ||
|
||
refute(css.include?("@import"), "CSS files should not import other CSS files:\n#{file} contains @import") | ||
refute(css.include?("&"), "CSS Nesting wasn't compiled correctly:\n#{file} contains &") | ||
end | ||
end | ||
end |