-
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.
Write test to make sure asset naming matches component (#1540)
- Loading branch information
Showing
5 changed files
with
115 additions
and
94 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 | ||
--- | ||
|
||
`app/components/primer/alpha/action_list/action-list.pcss` was re-written to `app/components/primer/alpha/action_list.pcss` |
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
92 changes: 0 additions & 92 deletions
92
app/components/primer/alpha/action_list/action-list-selection.pcss
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* CSS component styles here */ | ||
@import './alpha/segmented_control.pcss'; | ||
@import "./alpha/action_list.pcss"; | ||
@import "./beta/banner.pcss"; | ||
@import "./beta/button.pcss"; | ||
@import "./alpha/action_list/action-list.pcss"; | ||
@import './alpha/segmented_control.pcss'; |
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,17 @@ | ||
# frozen_string_literal: true | ||
|
||
require "components/test_helper" | ||
|
||
class AssetNamingTest < Minitest::Test | ||
include Primer::ComponentTestHelpers | ||
|
||
def test_css_naming_matches_component | ||
Dir["app/components/**/*.pcss"].each do |file| | ||
next if file.include?("primer.pcss") | ||
|
||
component_file = file.sub(".pcss", ".rb") | ||
|
||
assert File.exist?(component_file), "CSS file #{file} does not have a corresponding component file. The file should be named to match the component." | ||
end | ||
end | ||
end |