From 19fd32831b4bface525f145ba270b03fa567b3c4 Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Thu, 13 Aug 2020 16:23:49 -0500 Subject: [PATCH 1/9] look in tests for deprecated imports --- script/deprecated-imports.py | 4 ++++ 1 file changed, 4 insertions(+) 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: """ From 189fbf0881d90270f505df20c03146b301c9cbdc Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Thu, 13 Aug 2020 16:27:30 -0500 Subject: [PATCH 2/9] mark existing specs as OK to have deprecated imports --- script/deprecated-imports.csv | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/script/deprecated-imports.csv b/script/deprecated-imports.csv index d3064b1c..1aee0aa0 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/Select.elm,Html,DEPRECATED +tests/Spec/Nri/Ui/Select.elm,Nri.Ui.Select,5 +tests/Spec/Nri/Ui/Tooltip/V1.elm,Accessibility.Aria,DEPRECATED +tests/Spec/Nri/Ui/Tooltip/V1.elm,Accessibility.Widget,DEPRECATED +tests/Spec/Nri/Ui/Tooltip/V1.elm,Html,DEPRECATED From c7d6bafc9620ba2ce4ac9a62f66e7a6df3be434a Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Thu, 13 Aug 2020 16:33:15 -0500 Subject: [PATCH 3/9] move Page tests to a non-versioned file --- tests/Spec/Nri/Ui/{Page/V3.elm => Page.elm} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename tests/Spec/Nri/Ui/{Page/V3.elm => Page.elm} (97%) 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 From 9a51b4b5c29b854c5c972b79fe996428c3bf72b8 Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Thu, 13 Aug 2020 16:34:03 -0500 Subject: [PATCH 4/9] move SortableTable tests to a non-versioned file --- tests/Spec/Nri/Ui/{SortableTable/V2.elm => SortableTable.elm} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename tests/Spec/Nri/Ui/{SortableTable/V2.elm => SortableTable.elm} (99%) 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 From b014df5af73b4b63037d349dbfcf7538760a7939 Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Thu, 13 Aug 2020 16:35:23 -0500 Subject: [PATCH 5/9] move Tooltip tests to a non-versioned file --- script/deprecated-imports.csv | 6 +++--- tests/Spec/Nri/Ui/{Tooltip/V1.elm => Tooltip.elm} | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename tests/Spec/Nri/Ui/{Tooltip/V1.elm => Tooltip.elm} (99%) diff --git a/script/deprecated-imports.csv b/script/deprecated-imports.csv index 1aee0aa0..631d177e 100644 --- a/script/deprecated-imports.csv +++ b/script/deprecated-imports.csv @@ -10,8 +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 -tests/Spec/Nri/Ui/Tooltip/V1.elm,Accessibility.Aria,DEPRECATED -tests/Spec/Nri/Ui/Tooltip/V1.elm,Accessibility.Widget,DEPRECATED -tests/Spec/Nri/Ui/Tooltip/V1.elm,Html,DEPRECATED 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 From dc16e11cabbfef2e24c577848c97eca8ae0ee1ee Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Thu, 13 Aug 2020 16:35:40 -0500 Subject: [PATCH 6/9] trigger rebuild on test files as well as src files --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From b6dc6a21c84d8d3081aa5525e5a911e64ce42dac Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Thu, 13 Aug 2020 16:38:48 -0500 Subject: [PATCH 7/9] move PremiumCheckbox tests to a non-versioned file --- .../Spec/Nri/Ui/{PremiumCheckbox/V6.elm => PremiumCheckbox.elm} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename tests/Spec/Nri/Ui/{PremiumCheckbox/V6.elm => PremiumCheckbox.elm} (98%) 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 From 8b91af1ccbed71f19037e957f736041351b48a73 Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Thu, 13 Aug 2020 16:39:20 -0500 Subject: [PATCH 8/9] move SlideModal tests to a non-versioned file --- tests/Spec/Nri/Ui/{SlideModal/V2.elm => SlideModal.elm} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename tests/Spec/Nri/Ui/{SlideModal/V2.elm => SlideModal.elm} (99%) 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) From 94f5d0e5cc4249a1ac7fdc7acc411dd767b52b83 Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Thu, 13 Aug 2020 16:40:03 -0500 Subject: [PATCH 9/9] move TextInput teests to a non-versioned file --- tests/Spec/Nri/Ui/{TextInput/V6.elm => TextInput.elm} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename tests/Spec/Nri/Ui/{TextInput/V6.elm => TextInput.elm} (93%) 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