@@ -16,53 +16,53 @@ test.describe("Header", () => {
16
16
await expect ( page . locator ( "#nav-icon" ) ) . toHaveClass ( / o p e n / ) ;
17
17
await expect ( page . locator ( "button>> nth=0" ) ) . toHaveText ( "shop" ) ;
18
18
await page . locator ( "button>> nth=0" ) . click ( ) ;
19
- await page . waitForURL ( "http://localhost:4000/shop/ " ) ;
20
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/shop/ " ) ;
19
+ await page . waitForURL ( "http://localhost:4000/shop" ) ;
20
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/shop" ) ;
21
21
await page . locator ( "img.enki-logo" ) . click ( ) ;
22
22
await page . waitForURL ( "http://localhost:4000/" ) ;
23
23
expect ( page . url ( ) ) . toBe ( "http://localhost:4000/" ) ;
24
24
await page . locator ( "#nav-icon" ) . click ( ) ;
25
25
26
26
await expect ( page . locator ( "button>> nth=1" ) ) . toHaveText ( "gift guide" ) ;
27
27
await page . locator ( "button>> nth=1" ) . click ( ) ;
28
- await page . waitForURL ( "http://localhost:4000/gift-guide/ " ) ;
29
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/gift-guide/ " ) ;
28
+ await page . waitForURL ( "http://localhost:4000/gift-guide" ) ;
29
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/gift-guide" ) ;
30
30
await page . locator ( "img.enki-logo" ) . click ( ) ;
31
31
await page . waitForURL ( "http://localhost:4000/" ) ;
32
32
expect ( page . url ( ) ) . toBe ( "http://localhost:4000/" ) ;
33
33
await page . locator ( "#nav-icon" ) . click ( ) ;
34
34
35
35
await expect ( page . locator ( "button>> nth=2" ) ) . toHaveText ( "repairs" ) ;
36
36
await page . locator ( "button>> nth=2" ) . click ( ) ;
37
- await page . waitForURL ( "http://localhost:4000/repairs/ " ) ;
38
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/repairs/ " ) ;
37
+ await page . waitForURL ( "http://localhost:4000/repairs" ) ;
38
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/repairs" ) ;
39
39
await page . locator ( "img.enki-logo" ) . click ( ) ;
40
40
await page . waitForURL ( "http://localhost:4000/" ) ;
41
41
expect ( page . url ( ) ) . toBe ( "http://localhost:4000/" ) ;
42
42
await page . locator ( "#nav-icon" ) . click ( ) ;
43
43
44
44
await expect ( page . locator ( "button>> nth=3" ) ) . toHaveText ( "classes" ) ;
45
45
await page . locator ( "button>> nth=3" ) . click ( ) ;
46
- await page . waitForURL ( "http://localhost:4000/classes/ " ) ;
47
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/classes/ " ) ;
46
+ await page . waitForURL ( "http://localhost:4000/classes" ) ;
47
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/classes" ) ;
48
48
await page . locator ( "img.enki-logo" ) . click ( ) ;
49
49
await page . waitForURL ( "http://localhost:4000/" ) ;
50
50
expect ( page . url ( ) ) . toBe ( "http://localhost:4000/" ) ;
51
51
await page . locator ( "#nav-icon" ) . click ( ) ;
52
52
53
53
await expect ( page . locator ( "button>> nth=4" ) ) . toHaveText ( "about" ) ;
54
54
await page . locator ( "button>> nth=4" ) . click ( ) ;
55
- await page . waitForURL ( "http://localhost:4000/about/ " ) ;
56
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/about/ " ) ;
55
+ await page . waitForURL ( "http://localhost:4000/about" ) ;
56
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/about" ) ;
57
57
await page . locator ( "img.enki-logo" ) . click ( ) ;
58
58
await page . waitForURL ( "http://localhost:4000/" ) ;
59
59
expect ( page . url ( ) ) . toBe ( "http://localhost:4000/" ) ;
60
60
await page . locator ( "#nav-icon" ) . click ( ) ;
61
61
62
62
await expect ( page . locator ( "button>> nth=5" ) ) . toHaveText ( "contact" ) ;
63
63
await page . locator ( "button>> nth=5" ) . click ( ) ;
64
- await page . waitForURL ( "http://localhost:4000/contact/ " ) ;
65
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/contact/ " ) ;
64
+ await page . waitForURL ( "http://localhost:4000/contact" ) ;
65
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/contact" ) ;
66
66
await page . locator ( "img.enki-logo" ) . click ( ) ;
67
67
await page . waitForURL ( "http://localhost:4000/" ) ;
68
68
expect ( page . url ( ) ) . toBe ( "http://localhost:4000/" ) ;
@@ -78,72 +78,72 @@ test.describe("Header", () => {
78
78
79
79
await expect ( page . locator ( "a >> nth=0" ) ) . toHaveText ( "shop" ) ;
80
80
await page . locator ( "a >> nth=0" ) . click ( ) ;
81
- await page . waitForURL ( "http://localhost:4000/shop/ " ) ;
82
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/shop/ " ) ;
81
+ await page . waitForURL ( "http://localhost:4000/shop" ) ;
82
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/shop" ) ;
83
83
await page . locator ( "img.enki-logo" ) . click ( ) ;
84
84
await page . waitForURL ( "http://localhost:4000/" ) ;
85
85
expect ( page . url ( ) ) . toBe ( "http://localhost:4000/" ) ;
86
86
87
87
await expect ( page . locator ( "a >> nth=1" ) ) . toHaveText ( "gift guide" ) ;
88
88
await page . locator ( "a >> nth=1" ) . click ( ) ;
89
- await page . waitForURL ( "http://localhost:4000/gift-guide/ " ) ;
90
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/gift-guide/ " ) ;
89
+ await page . waitForURL ( "http://localhost:4000/gift-guide" ) ;
90
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/gift-guide" ) ;
91
91
await page . locator ( "img.enki-logo" ) . click ( ) ;
92
92
await page . waitForURL ( "http://localhost:4000/" ) ;
93
93
expect ( page . url ( ) ) . toBe ( "http://localhost:4000/" ) ;
94
94
95
95
await expect ( page . locator ( "a >> nth=2" ) ) . toHaveText ( "repairs" ) ;
96
96
await page . locator ( "a >> nth=2" ) . click ( ) ;
97
- await page . waitForURL ( "http://localhost:4000/repairs/ " ) ;
98
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/repairs/ " ) ;
97
+ await page . waitForURL ( "http://localhost:4000/repairs" ) ;
98
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/repairs" ) ;
99
99
await page . locator ( "img.enki-logo" ) . click ( ) ;
100
100
await page . waitForURL ( "http://localhost:4000/" ) ;
101
101
expect ( page . url ( ) ) . toBe ( "http://localhost:4000/" ) ;
102
102
103
103
await expect ( page . locator ( "a >> nth=3" ) ) . toHaveText ( "classes" ) ;
104
104
await page . locator ( "a >> nth=3" ) . click ( ) ;
105
- await page . waitForURL ( "http://localhost:4000/classes/ " ) ;
106
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/classes/ " ) ;
105
+ await page . waitForURL ( "http://localhost:4000/classes" ) ;
106
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/classes" ) ;
107
107
await page . locator ( "img.enki-logo" ) . click ( ) ;
108
108
await page . waitForURL ( "http://localhost:4000/" ) ;
109
109
expect ( page . url ( ) ) . toBe ( "http://localhost:4000/" ) ;
110
110
111
111
await expect ( page . locator ( "a >> nth=4" ) ) . toHaveText ( "about" ) ;
112
112
await page . locator ( "a >> nth=4" ) . click ( ) ;
113
- await page . waitForURL ( "http://localhost:4000/about/ " ) ;
114
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/about/ " ) ;
113
+ await page . waitForURL ( "http://localhost:4000/about" ) ;
114
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/about" ) ;
115
115
await page . locator ( "img.enki-logo" ) . click ( ) ;
116
116
await page . waitForURL ( "http://localhost:4000/" ) ;
117
117
expect ( page . url ( ) ) . toBe ( "http://localhost:4000/" ) ;
118
118
119
119
await expect ( page . locator ( "a >> nth=5" ) ) . toHaveText ( "contact" ) ;
120
120
await page . locator ( "a >> nth=5" ) . click ( ) ;
121
- await page . waitForURL ( "http://localhost:4000/contact/ " ) ;
122
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/contact/ " ) ;
121
+ await page . waitForURL ( "http://localhost:4000/contact" ) ;
122
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/contact" ) ;
123
123
await page . locator ( "img.enki-logo" ) . click ( ) ;
124
124
await page . waitForURL ( "http://localhost:4000/" ) ;
125
125
expect ( page . url ( ) ) . toBe ( "http://localhost:4000/" ) ;
126
126
127
127
// this block clicks each of the links in the header without returning to the homepage
128
128
// making sure they go to the correct place
129
129
await page . locator ( "a >> nth=0" ) . click ( ) ;
130
- await page . waitForURL ( "http://localhost:4000/shop/ " ) ;
131
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/shop/ " ) ;
130
+ await page . waitForURL ( "http://localhost:4000/shop" ) ;
131
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/shop" ) ;
132
132
await page . locator ( "a >> nth=1" ) . click ( ) ;
133
- await page . waitForURL ( "http://localhost:4000/gift-guide/ " ) ;
134
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/gift-guide/ " ) ;
133
+ await page . waitForURL ( "http://localhost:4000/gift-guide" ) ;
134
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/gift-guide" ) ;
135
135
await page . locator ( "a >> nth=2" ) . click ( ) ;
136
- await page . waitForURL ( "http://localhost:4000/repairs/ " ) ;
137
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/repairs/ " ) ;
136
+ await page . waitForURL ( "http://localhost:4000/repairs" ) ;
137
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/repairs" ) ;
138
138
await page . locator ( "a >> nth=3" ) . click ( ) ;
139
- await page . waitForURL ( "http://localhost:4000/classes/ " ) ;
140
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/classes/ " ) ;
139
+ await page . waitForURL ( "http://localhost:4000/classes" ) ;
140
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/classes" ) ;
141
141
await page . locator ( "a >> nth=4" ) . click ( ) ;
142
- await page . waitForURL ( "http://localhost:4000/about/ " ) ;
143
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/about/ " ) ;
142
+ await page . waitForURL ( "http://localhost:4000/about" ) ;
143
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/about" ) ;
144
144
await page . locator ( "a >> nth=5" ) . click ( ) ;
145
- await page . waitForURL ( "http://localhost:4000/contact/ " ) ;
146
- expect ( page . url ( ) ) . toBe ( "http://localhost:4000/contact/ " ) ;
145
+ await page . waitForURL ( "http://localhost:4000/contact" ) ;
146
+ expect ( page . url ( ) ) . toBe ( "http://localhost:4000/contact" ) ;
147
147
await page . locator ( "img.enki-logo" ) . click ( ) ;
148
148
await page . waitForURL ( "http://localhost:4000/" ) ;
149
149
expect ( page . url ( ) ) . toBe ( "http://localhost:4000/" ) ;
0 commit comments