File size: 12,781 Bytes
da20256
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
import { test, expect } from '@playwright/test';

test.describe('Functional - homepage', () => {
  test('homepage: h1 "A framework for teams who buil"', async ({ page }) => {
    await page.goto('/');
    const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'A framework for teams who build to last.' || t.startsWith('A framework for teams who build to last.'))).toBeTruthy();
  });
});

test.describe('Functional - builds', () => {
  test('builds: title matches GT', async ({ page }) => {
    await page.goto('/builds/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('releases');
  });
  test('builds: h2 "Latest Release: 6.11.0"', async ({ page }) => {
    await page.goto('/builds/');
    const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'Latest Release: 6.11.0' || t.startsWith('Latest Release: 6.11.0'))).toBeTruthy();
  });
});

test.describe('Functional - editions', () => {
  test('editions: title matches GT', async ({ page }) => {
    await page.goto('/editions/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('editions');
  });
});

test.describe('Functional - guidelines', () => {
  test('guidelines: title matches GT', async ({ page }) => {
    await page.goto('/guidelines/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('community guidelines');
  });
});

test.describe('Functional - logos', () => {
  test('logos: title matches GT', async ({ page }) => {
    await page.goto('/logos/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('branding');
  });
  test('logos: h2 "The Bramble Mascots"', async ({ page }) => {
    await page.goto('/logos/');
    const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'The Bramble Mascots' || t.startsWith('The Bramble Mascots'))).toBeTruthy();
  });
  test('logos: h2 "Company Technology Pages"', async ({ page }) => {
    await page.goto('/logos/');
    const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'Company Technology Pages' || t.startsWith('Company Technology Pages'))).toBeTruthy();
  });
});

test.describe('Functional - security', () => {
  test('security: title matches GT', async ({ page }) => {
    await page.goto('/security/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('security');
  });
  test('security: h1 "Bramble Security Policy"', async ({ page }) => {
    await page.goto('/security/');
    const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'Bramble Security Policy' || t.startsWith('Bramble Security Policy'))).toBeTruthy();
  });
  test('security: h2 "Reporting a Bug"', async ({ page }) => {
    await page.goto('/security/');
    const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'Reporting a Bug' || t.startsWith('Reporting a Bug'))).toBeTruthy();
  });
  test('security: h2 "Disclosure Policy"', async ({ page }) => {
    await page.goto('/security/');
    const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'Disclosure Policy' || t.startsWith('Disclosure Policy'))).toBeTruthy();
  });
  test('security: h2 "Receiving Security Updates"', async ({ page }) => {
    await page.goto('/security/');
    const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'Receiving Security Updates' || t.startsWith('Receiving Security Updates'))).toBeTruthy();
  });
  test('security: footer link "Team"', async ({ page }) => {
    await page.goto('/security/');
    const links = page.locator('footer a, [role="contentinfo"] a');
    const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'Team' || t.startsWith('Team')), 'link text in footer').toBeTruthy();
    const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
    expect(hrefs.some(h => h.includes('teams')), 'href fragment present').toBeTruthy();
  });
  test('security: footer link "Sponsors"', async ({ page }) => {
    await page.goto('/security/');
    const links = page.locator('footer a, [role="contentinfo"] a');
    const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'Sponsors' || t.startsWith('Sponsors')), 'link text in footer').toBeTruthy();
    const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
    expect(hrefs.some(h => h.includes('sponsors')), 'href fragment present').toBeTruthy();
  });
  test('security: footer link "Security"', async ({ page }) => {
    await page.goto('/security/');
    const links = page.locator('footer a, [role="contentinfo"] a');
    const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'Security' || t.startsWith('Security')), 'link text in footer').toBeTruthy();
    const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
    expect(hrefs.some(h => h.includes('security')), 'href fragment present').toBeTruthy();
  });
  test('security: footer link "Legal"', async ({ page }) => {
    await page.goto('/security/');
    const links = page.locator('footer a, [role="contentinfo"] a');
    const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'Legal' || t.startsWith('Legal')), 'link text in footer').toBeTruthy();
    const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
    expect(hrefs.some(h => h.includes('legal')), 'href fragment present').toBeTruthy();
  });
});

test.describe('Functional - sponsors', () => {
  test('sponsors: title matches GT', async ({ page }) => {
    await page.goto('/sponsors/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('sponsors');
  });
});

test.describe('Functional - team', () => {
  test('team: title matches GT', async ({ page }) => {
    await page.goto('/team/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('team');
  });
});

test.describe('Functional - teams', () => {
  test('teams: title matches GT', async ({ page }) => {
    await page.goto('/teams/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('team');
  });
});

test.describe('Functional - about_legal', () => {
  test('about_legal: title matches GT', async ({ page }) => {
    await page.goto('/about/legal/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('legal');
  });
});

test.describe('Functional - community_meetups', () => {
  test('community_meetups: title matches GT', async ({ page }) => {
    await page.goto('/community/meetups/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('meetups');
  });
  test('community_meetups: h2 "Find a meetup in your city"', async ({ page }) => {
    await page.goto('/community/meetups/');
    const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'Find a meetup in your city' || t.startsWith('Find a meetup in your city'))).toBeTruthy();
  });
  test('community_meetups: h3 "North America"', async ({ page }) => {
    await page.goto('/community/meetups/');
    const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'North America' || t.startsWith('North America'))).toBeTruthy();
  });
});

test.describe('Functional - community_meetups_assets', () => {
  test('community_meetups_assets: title matches GT', async ({ page }) => {
    await page.goto('/community/meetups/assets/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('assets');
  });
  test('community_meetups_assets: h2 "Recording Your Meetup"', async ({ page }) => {
    await page.goto('/community/meetups/assets/');
    const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'Recording Your Meetup' || t.startsWith('Recording Your Meetup'))).toBeTruthy();
  });
  test('community_meetups_assets: h2 "Organizers Network"', async ({ page }) => {
    await page.goto('/community/meetups/assets/');
    const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'Organizers Network' || t.startsWith('Organizers Network'))).toBeTruthy();
  });
});

test.describe('Functional - community_meetups_getting_started', () => {
  test('community_meetups_getting_started: title matches GT', async ({ page }) => {
    await page.goto('/community/meetups-getting-started/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('getting started');
  });
});

test.describe('Functional - mascots_commission', () => {
});

test.describe('Functional - mascots_faq', () => {
});

test.describe('Functional - releases_beta', () => {
  test('releases_beta: title matches GT', async ({ page }) => {
    await page.goto('/releases/beta/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('beta');
  });
  test('releases_beta: h3 "Bramble"', async ({ page }) => {
    await page.goto('/releases/beta/');
    const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'Bramble' || t.startsWith('Bramble'))).toBeTruthy();
  });
});

test.describe('Functional - releases_canary', () => {
  test('releases_canary: title matches GT', async ({ page }) => {
    await page.goto('/releases/canary/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('canary');
  });
  test('releases_canary: h2 "What is canary?"', async ({ page }) => {
    await page.goto('/releases/canary/');
    const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'What is canary?' || t.startsWith('What is canary?'))).toBeTruthy();
  });
  test('releases_canary: h3 "Bramble"', async ({ page }) => {
    await page.goto('/releases/canary/');
    const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'Bramble' || t.startsWith('Bramble'))).toBeTruthy();
  });
});

test.describe('Functional - releases_lts', () => {
  test('releases_lts: title matches GT', async ({ page }) => {
    await page.goto('/releases/lts/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('lts');
  });
  test('releases_lts: h2 "What is an LTS release?"', async ({ page }) => {
    await page.goto('/releases/lts/');
    const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'What is an LTS release?' || t.startsWith('What is an LTS release?'))).toBeTruthy();
  });
});

test.describe('Functional - releases_release', () => {
  test('releases_release: title matches GT', async ({ page }) => {
    await page.goto('/releases/release/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('stable');
  });
  test('releases_release: h2 "What is a stable release?"', async ({ page }) => {
    await page.goto('/releases/release/');
    const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'What is a stable release?' || t.startsWith('What is a stable release?'))).toBeTruthy();
  });
  test('releases_release: h3 "Bramble"', async ({ page }) => {
    await page.goto('/releases/release/');
    const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
    expect(texts.some(t => t === 'Bramble' || t.startsWith('Bramble'))).toBeTruthy();
  });
});

test.describe('Functional - teams_emeritus', () => {
  test('teams_emeritus: title matches GT', async ({ page }) => {
    await page.goto('/teams/emeritus/');
    const t = (await page.title()).toLowerCase();
    expect(t).toContain('emeritus');
  });
});

test.describe('Functional - Routing', () => {
});