1
1
/*global cy*/
2
2
3
- const platformUrl = "/platform/M01%20-%2044037 "
3
+ const platformUrl = "/platform/M01"
4
4
5
5
describe ( "Platfrom M01" , ( ) => {
6
- xit ( "Can get to from Home Page" , ( ) => {
6
+ it ( "Can get to from Home Page" , ( ) => {
7
7
cy . visit ( "/" )
8
8
9
9
cy . contains ( "Regions" ) . click ( )
@@ -12,9 +12,15 @@ describe("Platfrom M01", () => {
12
12
cy . contains ( "M01" ) . click ( )
13
13
14
14
cy . contains ( "Station M01" )
15
+ cy . contains ( "NDBC ID: 44037" )
15
16
} )
16
17
17
- xit ( "Shows platform status" , ( ) => {
18
+ it ( "Will get redirected" , ( ) => {
19
+ cy . visit ( "/platform/M01%20-%2044037" )
20
+ cy . location ( "pathname" ) . should ( "eq" , platformUrl )
21
+ } )
22
+
23
+ it ( "Shows platform status" , ( ) => {
18
24
cy . visit ( platformUrl )
19
25
20
26
cy . contains ( "Lat:" )
@@ -23,7 +29,7 @@ describe("Platfrom M01", () => {
23
29
cy . contains ( "Last updated at:" )
24
30
} )
25
31
26
- xit ( "Shows current conditions" , ( ) => {
32
+ it ( "Shows current conditions" , ( ) => {
27
33
cy . visit ( platformUrl )
28
34
29
35
cy . contains ( "Latest Conditions" )
@@ -32,19 +38,19 @@ describe("Platfrom M01", () => {
32
38
cy . get ( "[style='margin-top: 1rem;'] > :nth-child(2) .card" ) . should ( "have.length.be.gte" , 4 )
33
39
} )
34
40
35
- xit ( "Shows air temp plot" , ( ) => {
41
+ it ( "Shows air temp plot" , ( ) => {
36
42
cy . visit ( platformUrl )
37
43
38
44
cy . contains ( "Air Temperature:" ) . click ( )
39
45
40
46
cy . get ( "h4" ) . contains ( "Air Temperature" )
41
47
} )
42
48
43
- xit ( "Shows wind plot" , ( ) => {
49
+ it ( "Shows wind plot" , ( ) => {
44
50
cy . visit ( platformUrl )
45
51
46
52
cy . contains ( "Observations" ) . click ( )
47
- cy . get ( '[href="/platform/M01 - 44037 /observations/wind"]' ) . first ( ) . click ( )
53
+ cy . get ( '[href="/platform/M01/observations/wind"]' ) . first ( ) . click ( )
48
54
cy . get ( "h4" ) . contains ( "Wind" )
49
55
cy . get ( "svg.highcharts-root" )
50
56
cy . get ( "svg.highcharts-root" ) . contains ( "Gust" ) . click ( )
@@ -53,12 +59,12 @@ describe("Platfrom M01", () => {
53
59
cy . get ( "svg.highcharts-root" ) . contains ( "Knots" )
54
60
} )
55
61
56
- xit ( "Shows wave forecast" , ( ) => {
62
+ it ( "Shows wave forecast" , ( ) => {
57
63
cy . visit ( platformUrl )
58
64
59
65
cy . contains ( "Forecasts loading" )
60
66
cy . get ( "#forecast" ) . click ( )
61
- cy . get ( "[href='/platform/M01 - 44037 /forecast/significant_wave_height']" ) . click ( )
67
+ cy . get ( "[href='/platform/M01/forecast/significant_wave_height']" ) . click ( )
62
68
cy . get ( "h4" ) . contains ( "Significant Wave Height Forecast" )
63
69
64
70
cy . get ( "svg.highcharts-root" ) . contains ( "Feet" )
@@ -70,7 +76,7 @@ describe("Platfrom M01", () => {
70
76
cy . get ( "svg.highcharts-root" ) . contains ( "Bedford Institute Wave Model - Height" ) . click ( )
71
77
} )
72
78
73
- xit ( "Has More info menu" , ( ) => {
79
+ it ( "Has More info menu" , ( ) => {
74
80
cy . visit ( platformUrl )
75
81
76
82
cy . contains ( "More info" ) . click ( )
@@ -80,7 +86,7 @@ describe("Platfrom M01", () => {
80
86
cy . contains ( "Tides" )
81
87
} )
82
88
83
- xit ( "Updated recently" , ( ) => {
89
+ it ( "Updated recently" , ( ) => {
84
90
cy . visit ( platformUrl )
85
91
86
92
cy . contains ( "Observations" ) . click ( )
@@ -100,7 +106,7 @@ describe("Platfrom M01", () => {
100
106
} )
101
107
} )
102
108
103
- xit ( "Can view all observations" , ( ) => {
109
+ it ( "Can view all observations" , ( ) => {
104
110
cy . visit ( platformUrl )
105
111
106
112
cy . contains ( "Observations" ) . click ( )
0 commit comments