Skip to content

Commit 6f46d25

Browse files
committed
Updated snapshot testing
Signed-off-by: Dan Dong <danieldong51@gmail.com>
1 parent adfda03 commit 6f46d25

File tree

11 files changed

+281
-195
lines changed

11 files changed

+281
-195
lines changed

public/components/FeatureAnywhereContextMenu/AssociatedDetectors/components/__tests__/__snapshots__/EmptyAssociatedDetectorMessage.test.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ exports[`ConfirmUnlinkDetectorModal spec renders the component with filter appli
2222
class="euiText euiText--medium"
2323
>
2424
<div
25-
class="euiText euiText--medium"
25+
class="euiText euiText--small"
2626
>
2727
<p>
2828
There are no detectors matching your search
@@ -56,7 +56,7 @@ exports[`ConfirmUnlinkDetectorModal spec renders the component with filter appli
5656
class="euiText euiText--medium"
5757
>
5858
<div
59-
class="euiText euiText--medium"
59+
class="euiText euiText--small"
6060
>
6161
<p>
6262
There are no anomaly detectors associated with test-title visualization.

public/pages/ConfigureModel/containers/__tests__/__snapshots__/ConfigureModel.test.tsx.snap

+17-13
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,20 @@ exports[`<ConfigureModel /> spec creating model configuration renders the compon
1414
<div
1515
class="euiPageHeaderSection"
1616
>
17-
<h1
18-
class="euiTitle euiTitle--large"
17+
<div
18+
class="euiText euiText--small"
1919
data-test-subj="configureOrEditModelConfigurationTitle"
2020
>
21-
Configure model
22-
23-
</h1>
21+
<h1>
22+
Configure model
23+
24+
</h1>
25+
</div>
2426
<div
2527
class="euiSpacer euiSpacer--s"
2628
/>
2729
<div
28-
class="euiText euiText--medium"
30+
class="euiText euiText--small"
2931
>
3032
Set the index fields that you want to find anomalies for by defining the model features. You can also set other model parameters such as category field and shingle size for more granular views. After you set the model features and other optional parameters, you can preview your anomalies from a sample feature output.
3133
@@ -910,7 +912,7 @@ exports[`<ConfigureModel /> spec creating model configuration renders the compon
910912
class="euiFlexItem"
911913
>
912914
<div
913-
class="euiText euiText--medium"
915+
class="euiText euiText--small"
914916
>
915917
You can preview how your anomalies may look like from sample feature output and adjust the feature settings as needed.
916918
@@ -995,18 +997,20 @@ exports[`<ConfigureModel /> spec editing model configuration renders the compone
995997
<div
996998
class="euiPageHeaderSection"
997999
>
998-
<h1
999-
class="euiTitle euiTitle--large"
1000+
<div
1001+
class="euiText euiText--small"
10001002
data-test-subj="configureOrEditModelConfigurationTitle"
10011003
>
1002-
Edit model configuration
1003-
1004-
</h1>
1004+
<h1>
1005+
Edit model configuration
1006+
1007+
</h1>
1008+
</div>
10051009
<div
10061010
class="euiSpacer euiSpacer--s"
10071011
/>
10081012
<div
1009-
class="euiText euiText--medium"
1013+
class="euiText euiText--small"
10101014
>
10111015
Set the index fields that you want to find anomalies for by defining the model features. You can also set other model parameters such as category field and shingle size for more granular views. After you set the model features and other optional parameters, you can preview your anomalies from a sample feature output.
10121016

public/pages/Dashboard/Components/EmptyDashboard/__tests__/__snapshots__/EmptyDashboard.test.tsx.snap

+42-38
Original file line numberDiff line numberDiff line change
@@ -19,45 +19,49 @@ exports[`<EmptyDetector /> spec Empty results renders component with empty messa
1919
<div
2020
class="euiText euiText--medium"
2121
>
22-
<p>
23-
Create detector first to detect anomalies in your data.
24-
</p>
25-
<p>
26-
Dashboard will generate insights on the anomalies across all of your detectors.
27-
</p>
28-
<p>
29-
Read about
30-
31-
<a
32-
class="euiLink euiLink--primary"
33-
href="https://opensearch.org/docs/monitoring-plugins/ad"
34-
rel="noopener noreferrer"
35-
target="_blank"
36-
>
37-
Get started with Anomaly detection
38-
<svg
39-
aria-hidden="true"
40-
aria-label="External link"
41-
class="euiIcon euiIcon--small euiIcon-isLoading euiLink__externalIcon"
42-
focusable="false"
43-
height="16"
44-
role="img"
45-
viewBox="0 0 16 16"
46-
width="16"
47-
xmlns="http://www.w3.org/2000/svg"
48-
>
49-
<path
50-
d="M5.277 10.088c.02.014.04.03.057.047.582.55 1.134.812 1.666.812.586 0 1.84-.293 3.713-.88L9 6.212V2H7v4.212l-1.723 3.876Zm-.438.987L3.539 14h8.922l-1.32-2.969C9.096 11.677 7.733 12 7 12c-.74 0-1.463-.315-2.161-.925ZM6 2H5V1h6v1h-1v4l3.375 7.594A1 1 0 0 1 12.461 15H3.54a1 1 0 0 1-.914-1.406L6 6V2Z"
51-
/>
52-
</svg>
53-
<span
54-
class="euiScreenReaderOnly"
22+
<div
23+
class="euiText euiText--small"
24+
>
25+
<p>
26+
Create detector first to detect anomalies in your data.
27+
</p>
28+
<p>
29+
Dashboard will generate insights on the anomalies across all of your detectors.
30+
</p>
31+
<p>
32+
Read about
33+
34+
<a
35+
class="euiLink euiLink--primary"
36+
href="https://opensearch.org/docs/monitoring-plugins/ad"
37+
rel="noopener noreferrer"
38+
target="_blank"
5539
>
56-
(opens in a new tab or window)
57-
</span>
58-
</a>
59-
60-
</p>
40+
Get started with Anomaly detection
41+
<svg
42+
aria-hidden="true"
43+
aria-label="External link"
44+
class="euiIcon euiIcon--small euiIcon-isLoading euiLink__externalIcon"
45+
focusable="false"
46+
height="16"
47+
role="img"
48+
viewBox="0 0 16 16"
49+
width="16"
50+
xmlns="http://www.w3.org/2000/svg"
51+
>
52+
<path
53+
d="M5.277 10.088c.02.014.04.03.057.047.582.55 1.134.812 1.666.812.586 0 1.84-.293 3.713-.88L9 6.212V2H7v4.212l-1.723 3.876Zm-.438.987L3.539 14h8.922l-1.32-2.969C9.096 11.677 7.733 12 7 12c-.74 0-1.463-.315-2.161-.925ZM6 2H5V1h6v1h-1v4l3.375 7.594A1 1 0 0 1 12.461 15H3.54a1 1 0 0 1-.914-1.406L6 6V2Z"
54+
/>
55+
</svg>
56+
<span
57+
class="euiScreenReaderOnly"
58+
>
59+
(opens in a new tab or window)
60+
</span>
61+
</a>
62+
63+
</p>
64+
</div>
6165
</div>
6266
</span>
6367
<div

public/pages/Dashboard/Components/__tests__/__snapshots__/AnomaliesLiveCharts.test.tsx.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ exports[`<AnomaliesLiveChart /> spec AnomaliesLiveChart with Sample anomaly data
5151
class="euiFlexItem content-panel-subTitle"
5252
style="line-height: normal; max-width: 75%;"
5353
>
54-
Live anomaly results across detectors for the last 30 minutes.
54+
Live anomaly results across detectors for the last 30 minutes.
5555
'The results refresh every 1 minute.
5656
'For each detector, if an anomaly occurrence is detected at the end of the detector interval,
5757
'you will see a bar representing its anomaly grade.

public/pages/DefineDetector/containers/__tests__/__snapshots__/DefineDetector.test.tsx.snap

+21-15
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ exports[`<DefineDetector /> Full creating detector definition renders the compon
1414
<div
1515
class="euiPageHeaderSection"
1616
>
17-
<h1
18-
class="euiTitle euiTitle--large"
17+
<div
18+
class="euiText euiText--small"
1919
data-test-subj="defineOrEditDetectorTitle"
2020
>
21-
Define detector
22-
23-
</h1>
21+
<h1>
22+
Define detector
23+
24+
</h1>
25+
</div>
2426
</div>
2527
</header>
2628
<div
@@ -1003,13 +1005,15 @@ exports[`<DefineDetector /> empty creating detector definition renders the compo
10031005
<div
10041006
class="euiPageHeaderSection"
10051007
>
1006-
<h1
1007-
class="euiTitle euiTitle--large"
1008+
<div
1009+
class="euiText euiText--small"
10081010
data-test-subj="defineOrEditDetectorTitle"
10091011
>
1010-
Define detector
1011-
1012-
</h1>
1012+
<h1>
1013+
Define detector
1014+
1015+
</h1>
1016+
</div>
10131017
</div>
10141018
</header>
10151019
<div
@@ -1990,13 +1994,15 @@ exports[`<DefineDetector /> empty editing detector definition renders the compon
19901994
<div
19911995
class="euiPageHeaderSection"
19921996
>
1993-
<h1
1994-
class="euiTitle euiTitle--large"
1997+
<div
1998+
class="euiText euiText--small"
19951999
data-test-subj="defineOrEditDetectorTitle"
19962000
>
1997-
Edit detector settings
1998-
1999-
</h1>
2001+
<h1>
2002+
Edit detector settings
2003+
2004+
</h1>
2005+
</div>
20002006
</div>
20012007
</header>
20022008
<div

public/pages/DetectorJobs/containers/__tests__/__snapshots__/DetectorJobs.test.tsx.snap

+6-4
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ exports[`<DetectorJobs /> spec configuring detector jobs renders the component 1
1414
<div
1515
class="euiPageHeaderSection"
1616
>
17-
<h1
18-
class="euiTitle euiTitle--large"
17+
<div
18+
class="euiText euiText--small"
1919
data-test-subj="detectorJobsTitle"
2020
>
21-
Set up detector jobs
22-
</h1>
21+
<h1>
22+
Set up detector jobs
23+
</h1>
24+
</div>
2325
</div>
2426
</header>
2527
<div

public/pages/DetectorsList/components/EmptyMessage/__tests__/__snapshots__/EmptyMessage.test.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ exports[`<EmptyDetectorMessage /> spec Empty results renders component with empt
1313
class="euiText euiText--medium"
1414
>
1515
<div
16-
class="euiText euiText--medium"
16+
class="euiText euiText--small"
1717
>
1818
<p>
1919
A detector is an individual anomaly detection task. You can create multiple detectors, and all the detectors can run simultaneously, with each analyzing data from different sources. Create an anomaly detector to get started.
@@ -86,7 +86,7 @@ exports[`<EmptyDetectorMessage /> spec Filters results message renders component
8686
class="euiText euiText--medium"
8787
>
8888
<div
89-
class="euiText euiText--medium"
89+
class="euiText euiText--small"
9090
>
9191
<p>
9292
There are no detectors matching your applied filters. Reset your filters to view all detectors.

public/pages/HistoricalDetectorResults/components/__tests__/__snapshots__/EmptyHistoricalDetectorResults.test.tsx.snap

+36-32
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,43 @@ exports[`<EmptyHistoricalDetectorResults /> spec renders component 1`] = `
1919
<div
2020
class="euiText euiText--medium"
2121
>
22-
<p>
23-
Historical analysis lets you apply anomaly detection models over long historical data windows (weeks or months). You can identify anomaly patterns, seasonality, and trends.
24-
25-
<a
26-
class="euiLink euiLink--primary"
27-
href="https://opensearch.org/docs/monitoring-plugins/ad/index/#step-6-analyze-historical-data"
28-
rel="noopener noreferrer"
29-
target="_blank"
30-
>
31-
Learn more
32-
<svg
33-
aria-hidden="true"
34-
aria-label="External link"
35-
class="euiIcon euiIcon--small euiIcon-isLoading euiLink__externalIcon"
36-
focusable="false"
37-
height="16"
38-
role="img"
39-
viewBox="0 0 16 16"
40-
width="16"
41-
xmlns="http://www.w3.org/2000/svg"
42-
>
43-
<path
44-
d="M5.277 10.088c.02.014.04.03.057.047.582.55 1.134.812 1.666.812.586 0 1.84-.293 3.713-.88L9 6.212V2H7v4.212l-1.723 3.876Zm-.438.987L3.539 14h8.922l-1.32-2.969C9.096 11.677 7.733 12 7 12c-.74 0-1.463-.315-2.161-.925ZM6 2H5V1h6v1h-1v4l3.375 7.594A1 1 0 0 1 12.461 15H3.54a1 1 0 0 1-.914-1.406L6 6V2Z"
45-
/>
46-
</svg>
47-
<span
48-
class="euiScreenReaderOnly"
22+
<div
23+
class="euiText euiText--small"
24+
>
25+
<p>
26+
Historical analysis lets you apply anomaly detection models over long historical data windows (weeks or months). You can identify anomaly patterns, seasonality, and trends.
27+
28+
<a
29+
class="euiLink euiLink--primary"
30+
href="https://opensearch.org/docs/monitoring-plugins/ad/index/#step-6-analyze-historical-data"
31+
rel="noopener noreferrer"
32+
target="_blank"
4933
>
50-
(opens in a new tab or window)
51-
</span>
52-
</a>
53-
54-
</p>
34+
Learn more
35+
<svg
36+
aria-hidden="true"
37+
aria-label="External link"
38+
class="euiIcon euiIcon--small euiIcon-isLoading euiLink__externalIcon"
39+
focusable="false"
40+
height="16"
41+
role="img"
42+
viewBox="0 0 16 16"
43+
width="16"
44+
xmlns="http://www.w3.org/2000/svg"
45+
>
46+
<path
47+
d="M5.277 10.088c.02.014.04.03.057.047.582.55 1.134.812 1.666.812.586 0 1.84-.293 3.713-.88L9 6.212V2H7v4.212l-1.723 3.876Zm-.438.987L3.539 14h8.922l-1.32-2.969C9.096 11.677 7.733 12 7 12c-.74 0-1.463-.315-2.161-.925ZM6 2H5V1h6v1h-1v4l3.375 7.594A1 1 0 0 1 12.461 15H3.54a1 1 0 0 1-.914-1.406L6 6V2Z"
48+
/>
49+
</svg>
50+
<span
51+
class="euiScreenReaderOnly"
52+
>
53+
(opens in a new tab or window)
54+
</span>
55+
</a>
56+
57+
</p>
58+
</div>
5559
</div>
5660
</span>
5761
<div

0 commit comments

Comments
 (0)