diff --git a/Makefile b/Makefile index c476ff1f..f3883982 100644 --- a/Makefile +++ b/Makefile @@ -23,10 +23,10 @@ axe-report: tests/axe-report.json script/format-axe-report.sh script/axe-report. percy-tests: script/percy-tests.sh -tests/deprecated-imports-report.txt: $(shell find src -type f) script/deprecated-imports.py +tests/deprecated-imports-report.txt: $(shell find src tests -type f) script/deprecated-imports.py script/deprecated-imports.py report > $@ -script/deprecated-imports.csv: $(shell find src -type f) script/deprecated-imports.py +script/deprecated-imports.csv: $(shell find src tests -type f) script/deprecated-imports.py script/deprecated-imports.py --imports-file $@ update .PHONY: deprecated-imports-report diff --git a/script/deprecated-imports.csv b/script/deprecated-imports.csv index d3064b1c..631d177e 100644 --- a/script/deprecated-imports.csv +++ b/script/deprecated-imports.csv @@ -10,3 +10,8 @@ src/Nri/Ui/Icon/V5.elm,Html,DEPRECATED src/Nri/Ui/Icon/V4.elm,Accessibility.Role,DEPRECATED src/Nri/Ui/Icon/V4.elm,Html,DEPRECATED src/Nri/Ui/Modal/V3.elm,Nri.Ui.Icon,3 +tests/Spec/Nri/Ui/Tooltip.elm,Accessibility.Aria,DEPRECATED +tests/Spec/Nri/Ui/Tooltip.elm,Accessibility.Widget,DEPRECATED +tests/Spec/Nri/Ui/Tooltip.elm,Html,DEPRECATED +tests/Spec/Nri/Ui/Select.elm,Html,DEPRECATED +tests/Spec/Nri/Ui/Select.elm,Nri.Ui.Select,5 diff --git a/script/deprecated-imports.py b/script/deprecated-imports.py index 936b1f82..e9a1da7a 100755 --- a/script/deprecated-imports.py +++ b/script/deprecated-imports.py @@ -27,6 +27,10 @@ class ElmJson: self.elm_version = self.data["elm-version"] self.source_directories = ["src"] + potential_test_directory = os.path.join(os.path.dirname(path), 'tests') + if os.path.exists(potential_test_directory): + self.source_directories.append(potential_test_directory) + class NriUiModules: """ diff --git a/tests/Spec/Nri/Ui/Page/V3.elm b/tests/Spec/Nri/Ui/Page.elm similarity index 97% rename from tests/Spec/Nri/Ui/Page/V3.elm rename to tests/Spec/Nri/Ui/Page.elm index 10eefc68..a9db04d8 100644 --- a/tests/Spec/Nri/Ui/Page/V3.elm +++ b/tests/Spec/Nri/Ui/Page.elm @@ -1,4 +1,4 @@ -module Spec.Nri.Ui.Page.V3 exposing (all) +module Spec.Nri.Ui.Page exposing (all) import Expect exposing (Expectation) import Html.Styled as Html diff --git a/tests/Spec/Nri/Ui/PremiumCheckbox/V6.elm b/tests/Spec/Nri/Ui/PremiumCheckbox.elm similarity index 98% rename from tests/Spec/Nri/Ui/PremiumCheckbox/V6.elm rename to tests/Spec/Nri/Ui/PremiumCheckbox.elm index 3b17fb60..06edca9c 100644 --- a/tests/Spec/Nri/Ui/PremiumCheckbox/V6.elm +++ b/tests/Spec/Nri/Ui/PremiumCheckbox.elm @@ -1,4 +1,4 @@ -module Spec.Nri.Ui.PremiumCheckbox.V6 exposing (spec) +module Spec.Nri.Ui.PremiumCheckbox exposing (spec) import Html.Attributes as Attributes import Html.Styled diff --git a/tests/Spec/Nri/Ui/SlideModal/V2.elm b/tests/Spec/Nri/Ui/SlideModal.elm similarity index 99% rename from tests/Spec/Nri/Ui/SlideModal/V2.elm rename to tests/Spec/Nri/Ui/SlideModal.elm index 2e6acccc..84ea66f0 100644 --- a/tests/Spec/Nri/Ui/SlideModal/V2.elm +++ b/tests/Spec/Nri/Ui/SlideModal.elm @@ -1,4 +1,4 @@ -module Spec.Nri.Ui.SlideModal.V2 exposing (all) +module Spec.Nri.Ui.SlideModal exposing (all) import Css import Expect exposing (Expectation) diff --git a/tests/Spec/Nri/Ui/SortableTable/V2.elm b/tests/Spec/Nri/Ui/SortableTable.elm similarity index 99% rename from tests/Spec/Nri/Ui/SortableTable/V2.elm rename to tests/Spec/Nri/Ui/SortableTable.elm index bb4feccd..3b8cc7e3 100644 --- a/tests/Spec/Nri/Ui/SortableTable/V2.elm +++ b/tests/Spec/Nri/Ui/SortableTable.elm @@ -1,4 +1,4 @@ -module Spec.Nri.Ui.SortableTable.V2 exposing (spec) +module Spec.Nri.Ui.SortableTable exposing (spec) import Expect exposing (Expectation) import Html.Styled diff --git a/tests/Spec/Nri/Ui/TextInput/V6.elm b/tests/Spec/Nri/Ui/TextInput.elm similarity index 93% rename from tests/Spec/Nri/Ui/TextInput/V6.elm rename to tests/Spec/Nri/Ui/TextInput.elm index 8e387834..094ae2ab 100644 --- a/tests/Spec/Nri/Ui/TextInput/V6.elm +++ b/tests/Spec/Nri/Ui/TextInput.elm @@ -1,4 +1,4 @@ -module Spec.Nri.Ui.TextInput.V6 exposing (spec) +module Spec.Nri.Ui.TextInput exposing (spec) import Html.Styled import Nri.Ui.TextInput.V6 as TextInput diff --git a/tests/Spec/Nri/Ui/Tooltip/V1.elm b/tests/Spec/Nri/Ui/Tooltip.elm similarity index 99% rename from tests/Spec/Nri/Ui/Tooltip/V1.elm rename to tests/Spec/Nri/Ui/Tooltip.elm index 9e38f1b9..6ee9dc2a 100644 --- a/tests/Spec/Nri/Ui/Tooltip/V1.elm +++ b/tests/Spec/Nri/Ui/Tooltip.elm @@ -1,4 +1,4 @@ -module Spec.Nri.Ui.Tooltip.V1 exposing (spec) +module Spec.Nri.Ui.Tooltip exposing (spec) import Accessibility.Aria as Aria import Accessibility.Widget as Widget