import { test, expect } from '@playwright/test'; test.describe('Functional - homepage', () => { test('homepage: nav link "Search marketing"', async ({ page }) => { await page.goto('/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('homepage: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' websites.' || t.startsWith('Site ExplorerResearch your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('homepage: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); test('homepage: nav link "Rank TrackerTrack your ranking"', async ({ page }) => { await page.goto('/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rank TrackerTrack your rankings across search engines.' || t.startsWith('Rank TrackerTrack your rankings across search engines.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('rank-tracker')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - agencies', () => { test('agencies: title matches GT', async ({ page }) => { await page.goto('/agencies/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('digital marketing agencies'); }); test('agencies: h2 "ARC22 LIMITED"', async ({ page }) => { await page.goto('/agencies/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'ARC22 LIMITED' || t.startsWith('ARC22 LIMITED'))).toBeTruthy(); }); test('agencies: h2 "SEO 360"', async ({ page }) => { await page.goto('/agencies/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'SEO 360' || t.startsWith('SEO 360'))).toBeTruthy(); }); test('agencies: h2 "Stellar Labs"', async ({ page }) => { await page.goto('/agencies/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Stellar Labs' || t.startsWith('Stellar Labs'))).toBeTruthy(); }); test('agencies: header link "Rankspire"', async ({ page }) => { await page.goto('/agencies/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('agencies: nav link "Search marketing"', async ({ page }) => { await page.goto('/agencies/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('agencies: nav link "Domain ExplorerExplore your co"', async ({ page }) => { await page.goto('/agencies/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Domain ExplorerExplore your competitors’ websites.' || t.startsWith('Domain ExplorerExplore your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('agencies: nav link "Keyword ExplorerDiscover exact"', async ({ page }) => { await page.goto('/agencies/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword ExplorerDiscover exactly what your customers search ' || t.startsWith('Keyword ExplorerDiscover exactly what your customers search ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - agent_a', () => { test('agent_a: page loads without error', async ({ page }) => { const response = await page.goto('/agent-a/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('agent_a: title matches GT', async ({ page }) => { await page.goto('/agent-a/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('agent r by rankspire'); }); test('agent_a: h1 "A top talent joins your market"', async ({ page }) => { await page.goto('/agent-a/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'A top talent joins your marketing team' || t.startsWith('A top talent joins your marketing team'))).toBeTruthy(); }); test('agent_a: h2 "One agent. Every marketing tas"', async ({ page }) => { await page.goto('/agent-a/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'One agent. Every marketing task on your list.' || t.startsWith('One agent. Every marketing task on your list.'))).toBeTruthy(); }); test('agent_a: h2 "Practical use cases for every "', async ({ page }) => { await page.goto('/agent-a/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Practical use cases for every kind of business' || t.startsWith('Practical use cases for every kind of business'))).toBeTruthy(); }); test('agent_a: h2 "Takes action on your marketing"', async ({ page }) => { await page.goto('/agent-a/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Takes action on your marketing data' || t.startsWith('Takes action on your marketing data'))).toBeTruthy(); }); test('agent_a: footer link "Agencies"', async ({ page }) => { await page.goto('/agent-a/'); 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 === 'Agencies' || t.startsWith('Agencies')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('agencies')), 'href fragment present').toBeTruthy(); }); test('agent_a: footer link "SaaS"', async ({ page }) => { await page.goto('/agent-a/'); 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 === 'SaaS' || t.startsWith('SaaS')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('saas')), 'href fragment present').toBeTruthy(); }); test('agent_a: footer link "Ecommerce"', async ({ page }) => { await page.goto('/agent-a/'); 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 === 'Ecommerce' || t.startsWith('Ecommerce')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('ecommerce')), 'href fragment present').toBeTruthy(); }); test('agent_a: footer link "Enterprise"', async ({ page }) => { await page.goto('/agent-a/'); 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 === 'Enterprise' || t.startsWith('Enterprise')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('enterprise')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - ai', () => { test('ai: page loads without error', async ({ page }) => { const response = await page.goto('/ai/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('ai: title matches GT', async ({ page }) => { await page.goto('/ai/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire ai'); }); test('ai: h1 "Rankspire AI"', async ({ page }) => { await page.goto('/ai/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire AI' || t.startsWith('Rankspire AI'))).toBeTruthy(); }); test('ai: h2 "Our in-house infrastructure po"', async ({ page }) => { await page.goto('/ai/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Our in-house infrastructure powers LLMs and enriches data with AI—so you can turn raw numbers into c' || t.startsWith('Our in-house infrastructure powers LLMs and enriches data with AI—so you can turn raw numbers into c'))).toBeTruthy(); }); test('ai: h2 "Connect Rankspire to your favo"', async ({ page }) => { await page.goto('/ai/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Connect Rankspire to your favorite AI chatbots' || t.startsWith('Connect Rankspire to your favorite AI chatbots'))).toBeTruthy(); }); test('ai: h2 "Turn keyword data into content"', async ({ page }) => { await page.goto('/ai/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Turn keyword data into content wins. Let AI surface high-value topics and decode search intent, savi' || t.startsWith('Turn keyword data into content wins. Let AI surface high-value topics and decode search intent, savi'))).toBeTruthy(); }); test('ai: header link "Rankspire"', async ({ page }) => { await page.goto('/ai/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('ai: nav link "Search marketing"', async ({ page }) => { await page.goto('/ai/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('ai: nav link "Site ExplorerAnalyze your comp"', async ({ page }) => { await page.goto('/ai/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyze your competitors\' websites.' || t.startsWith('Site ExplorerAnalyze your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('ai: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/ai/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - ai_content_helper', () => { test('ai_content_helper: page loads without error', async ({ page }) => { const response = await page.goto('/ai-content-helper/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('ai_content_helper: title matches GT', async ({ page }) => { await page.goto('/ai-content-helper/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire ai content helper'); }); test('ai_content_helper: h1 "AI Content Helper"', async ({ page }) => { await page.goto('/ai-content-helper/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'AI Content Helper' || t.startsWith('AI Content Helper'))).toBeTruthy(); }); test('ai_content_helper: h2 "To rank higher in search resul"', async ({ page }) => { await page.goto('/ai-content-helper/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'To rank higher in search results and earn citations from AI, your content must be:' || t.startsWith('To rank higher in search results and earn citations from AI, your content must be:'))).toBeTruthy(); }); test('ai_content_helper: h2 "Cut down on manual research. S"', async ({ page }) => { await page.goto('/ai-content-helper/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cut down on manual research. See what content performs best right from the start.' || t.startsWith('Cut down on manual research. See what content performs best right from the start.'))).toBeTruthy(); }); test('ai_content_helper: h2 "Streamline content creation wi"', async ({ page }) => { await page.goto('/ai-content-helper/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Streamline content creation with an editor that behaves like a genuine writing assistant.' || t.startsWith('Streamline content creation with an editor that behaves like a genuine writing assistant.'))).toBeTruthy(); }); test('ai_content_helper: header link "Rankspire"', async ({ page }) => { await page.goto('/ai-content-helper/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('ai_content_helper: nav link "Search marketing"', async ({ page }) => { await page.goto('/ai-content-helper/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('ai_content_helper: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/ai-content-helper/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' websites.' || t.startsWith('Site ExplorerResearch your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('ai_content_helper: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/ai-content-helper/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - ai_tech_seo', () => { test('ai_tech_seo: page loads without error', async ({ page }) => { const response = await page.goto('/ai-tech-seo/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('ai_tech_seo: h1 "Take technical SEO beyond basi"', async ({ page }) => { await page.goto('/ai-tech-seo/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Take technical SEO beyond basic site audits with AI' || t.startsWith('Take technical SEO beyond basic site audits with AI'))).toBeTruthy(); }); test('ai_tech_seo: h2 "24/7 real-time monitoring of w"', async ({ page }) => { await page.goto('/ai-tech-seo/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '24/7 real-time monitoring of website issues' || t.startsWith('24/7 real-time monitoring of website issues'))).toBeTruthy(); }); test('ai_tech_seo: h2 "Rankspire Always-on Audit has "', async ({ page }) => { await page.goto('/ai-tech-seo/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire Always-on Audit has two main benefits:' || t.startsWith('Rankspire Always-on Audit has two main benefits:'))).toBeTruthy(); }); test('ai_tech_seo: h2 "Notify search engines and AI c"', async ({ page }) => { await page.goto('/ai-tech-seo/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Notify search engines and AI chatbots about changes to your website faster' || t.startsWith('Notify search engines and AI chatbots about changes to your website faster'))).toBeTruthy(); }); test('ai_tech_seo: header link "Rankspire"', async ({ page }) => { await page.goto('/ai-tech-seo/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('ai_tech_seo: nav link "Search marketing"', async ({ page }) => { await page.goto('/ai-tech-seo/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('ai_tech_seo: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/ai-tech-seo/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors\' websites.' || t.startsWith('Site ExplorerDig into your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('ai_tech_seo: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/ai-tech-seo/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - alerts', () => { test('alerts: page loads without error', async ({ page }) => { const response = await page.goto('/alerts/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('alerts: title matches GT', async ({ page }) => { await page.goto('/alerts/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('alerts by rankspire'); }); test('alerts: h1 "Alerts"', async ({ page }) => { await page.goto('/alerts/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Alerts' || t.startsWith('Alerts'))).toBeTruthy(); }); test('alerts: h2 "New & Lost backlinks alert"', async ({ page }) => { await page.goto('/alerts/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'New & Lost backlinks alert' || t.startsWith('New & Lost backlinks alert'))).toBeTruthy(); }); test('alerts: h2 "Web Mentions alert"', async ({ page }) => { await page.goto('/alerts/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Web Mentions alert' || t.startsWith('Web Mentions alert'))).toBeTruthy(); }); test('alerts: h2 "New Keywords alert"', async ({ page }) => { await page.goto('/alerts/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'New Keywords alert' || t.startsWith('New Keywords alert'))).toBeTruthy(); }); test('alerts: header link "Rankspire"', async ({ page }) => { await page.goto('/alerts/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('alerts: nav link "Search marketing"', async ({ page }) => { await page.goto('/alerts/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('alerts: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/alerts/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' sites.' || t.startsWith('Site ExplorerResearch your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('alerts: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/alerts/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - all', () => { test('all: title matches GT', async ({ page }) => { await page.goto('/all/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('all rankspire tools'); }); test('all: h2 "Search marketing"', async ({ page }) => { await page.goto('/all/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing'))).toBeTruthy(); }); test('all: h2 "Content marketing"', async ({ page }) => { await page.goto('/all/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Content marketing' || t.startsWith('Content marketing'))).toBeTruthy(); }); test('all: h2 "Website performance"', async ({ page }) => { await page.goto('/all/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Website performance' || t.startsWith('Website performance'))).toBeTruthy(); }); test('all: header link "Rankspire"', async ({ page }) => { await page.goto('/all/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('all: nav link "Search marketing"', async ({ page }) => { await page.goto('/all/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('all: nav link "Site ExplorerExamine your comp"', async ({ page }) => { await page.goto('/all/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerExamine your competitors\' websites.' || t.startsWith('Site ExplorerExamine your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('all: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/all/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - backlink_checker', () => { test('backlink_checker: page loads without error', async ({ page }) => { const response = await page.goto('/backlink-checker/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('backlink_checker: title matches GT', async ({ page }) => { await page.goto('/backlink-checker/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free backlink checker by rankspire'); }); test('backlink_checker: h1 "Backlink Checker"', async ({ page }) => { await page.goto('/backlink-checker/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Backlink Checker' || t.startsWith('Backlink Checker'))).toBeTruthy(); }); test('backlink_checker: h2 "Gauge any website\'s authority "', async ({ page }) => { await page.goto('/backlink-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Gauge any website\'s authority as you browse' || t.startsWith('Gauge any website\'s authority as you browse'))).toBeTruthy(); }); test('backlink_checker: h2 "View domain and page-level met"', async ({ page }) => { await page.goto('/backlink-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'View domain and page-level metrics for any target' || t.startsWith('View domain and page-level metrics for any target'))).toBeTruthy(); }); test('backlink_checker: h2 "Track the growth and decline o"', async ({ page }) => { await page.goto('/backlink-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Track the growth and decline of any backlink profile' || t.startsWith('Track the growth and decline of any backlink profile'))).toBeTruthy(); }); test('backlink_checker: header link "Rankspire"', async ({ page }) => { await page.goto('/backlink-checker/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('backlink_checker: nav link "Search marketing"', async ({ page }) => { await page.goto('/backlink-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('backlink_checker: nav link "Site ExplorerAnalyse your comp"', async ({ page }) => { await page.goto('/backlink-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyse your competitors’ websites.' || t.startsWith('Site ExplorerAnalyse your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('backlink_checker: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/backlink-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - batch_analysis', () => { test('batch_analysis: page loads without error', async ({ page }) => { const response = await page.goto('/batch-analysis/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('batch_analysis: title matches GT', async ({ page }) => { await page.goto('/batch-analysis/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('batch analysis by rankspire'); }); test('batch_analysis: h1 "Batch Analysis"', async ({ page }) => { await page.goto('/batch-analysis/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Batch Analysis' || t.startsWith('Batch Analysis'))).toBeTruthy(); }); test('batch_analysis: h2 "Bulk backlink checker by Ranks"', async ({ page }) => { await page.goto('/batch-analysis/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Bulk backlink checker by Rankspire' || t.startsWith('Bulk backlink checker by Rankspire'))).toBeTruthy(); }); test('batch_analysis: header link "Rankspire"', async ({ page }) => { await page.goto('/batch-analysis/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('batch_analysis: nav link "Search marketing"', async ({ page }) => { await page.goto('/batch-analysis/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('batch_analysis: nav link "Domain ExplorerDig deep into y"', async ({ page }) => { await page.goto('/batch-analysis/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Domain ExplorerDig deep into your competitors’' || t.startsWith('Domain ExplorerDig deep into your competitors’')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('batch_analysis: nav link "Keyword ExplorerDiscover exact"', async ({ page }) => { await page.goto('/batch-analysis/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword ExplorerDiscover exactly what your customers search ' || t.startsWith('Keyword ExplorerDiscover exactly what your customers search ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - big_data', () => { test('big_data: page loads without error', async ({ page }) => { const response = await page.goto('/big-data/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('big_data: title matches GT', async ({ page }) => { await page.goto('/big-data/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('big data built for marketers and seo pro'); }); test('big_data: h1 "Powered by seriously massive d"', async ({ page }) => { await page.goto('/big-data/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Powered by seriously massive datasets' || t.startsWith('Powered by seriously massive datasets'))).toBeTruthy(); }); test('big_data: h2 "Infrastructure made for scale"', async ({ page }) => { await page.goto('/big-data/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Infrastructure made for scale' || t.startsWith('Infrastructure made for scale'))).toBeTruthy(); }); test('big_data: h2 "Meet Vex1, our blazing-fast su"', async ({ page }) => { await page.goto('/big-data/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Meet Vex1, our blazing-fast supercomputer' || t.startsWith('Meet Vex1, our blazing-fast supercomputer'))).toBeTruthy(); }); test('big_data: h2 "Types of data available in Ran"', async ({ page }) => { await page.goto('/big-data/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Types of data available in Rankspire' || t.startsWith('Types of data available in Rankspire'))).toBeTruthy(); }); test('big_data: header link "Rankspire"', async ({ page }) => { await page.goto('/big-data/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('big_data: nav link "Search marketing"', async ({ page }) => { await page.goto('/big-data/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('big_data: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/big-data/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' sites.' || t.startsWith('Site ExplorerResearch your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('big_data: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/big-data/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - bot_analytics', () => { test('bot_analytics: page loads without error', async ({ page }) => { const response = await page.goto('/bot-analytics/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('bot_analytics: title matches GT', async ({ page }) => { await page.goto('/bot-analytics/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire bot analytics'); }); test('bot_analytics: h1 "Bot Analytics"', async ({ page }) => { await page.goto('/bot-analytics/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Bot Analytics' || t.startsWith('Bot Analytics'))).toBeTruthy(); }); test('bot_analytics: h2 "What makes Rankspire Bot Analy"', async ({ page }) => { await page.goto('/bot-analytics/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What makes Rankspire Bot Analytics different' || t.startsWith('What makes Rankspire Bot Analytics different'))).toBeTruthy(); }); test('bot_analytics: h2 "Gain full visibility through b"', async ({ page }) => { await page.goto('/bot-analytics/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Gain full visibility through bot insights — from AI crawlers to search engines and social bots.' || t.startsWith('Gain full visibility through bot insights — from AI crawlers to search engines and social bots.'))).toBeTruthy(); }); test('bot_analytics: h2 "Spot which bots waste your cra"', async ({ page }) => { await page.goto('/bot-analytics/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Spot which bots waste your crawl budget by hitting 404s or low-value pages, then improve crawl effic' || t.startsWith('Spot which bots waste your crawl budget by hitting 404s or low-value pages, then improve crawl effic'))).toBeTruthy(); }); test('bot_analytics: header link "Rankspire"', async ({ page }) => { await page.goto('/bot-analytics/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('bot_analytics: nav link "Search marketing"', async ({ page }) => { await page.goto('/bot-analytics/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('bot_analytics: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/bot-analytics/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' sites.' || t.startsWith('Site ExplorerResearch your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('bot_analytics: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/bot-analytics/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - brand_marketing', () => { test('brand_marketing: page loads without error', async ({ page }) => { const response = await page.goto('/brand-marketing/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('brand_marketing: title matches GT', async ({ page }) => { await page.goto('/brand-marketing/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('brand marketing'); }); test('brand_marketing: h1 "Brand marketing"', async ({ page }) => { await page.goto('/brand-marketing/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Brand marketing' || t.startsWith('Brand marketing'))).toBeTruthy(); }); test('brand_marketing: header link "Rankspire"', async ({ page }) => { await page.goto('/brand-marketing/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('brand_marketing: nav link "Search marketing"', async ({ page }) => { await page.goto('/brand-marketing/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('brand_marketing: nav link "Site ExplorerSize up your comp"', async ({ page }) => { await page.goto('/brand-marketing/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerSize up your competitors’ websites.' || t.startsWith('Site ExplorerSize up your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('brand_marketing: nav link "Keywords ExplorerSee what your"', async ({ page }) => { await page.goto('/brand-marketing/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerSee what your customers are searching for.' || t.startsWith('Keywords ExplorerSee what your customers are searching for.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - brand_radar', () => { test('brand_radar: page loads without error', async ({ page }) => { const response = await page.goto('/brand-radar/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('brand_radar: title matches GT', async ({ page }) => { await page.goto('/brand-radar/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire brand radar'); }); test('brand_radar: h1 "Brand Radar"', async ({ page }) => { await page.goto('/brand-radar/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Brand Radar' || t.startsWith('Brand Radar'))).toBeTruthy(); }); test('brand_radar: h2 "How is Rankspire Brand Radar d"', async ({ page }) => { await page.goto('/brand-radar/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How is Rankspire Brand Radar different' || t.startsWith('How is Rankspire Brand Radar different'))).toBeTruthy(); }); test('brand_radar: h2 "Discover what AI says about yo"', async ({ page }) => { await page.goto('/brand-radar/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover what AI says about your brand' || t.startsWith('Discover what AI says about your brand'))).toBeTruthy(); }); test('brand_radar: h2 "Trace the sources behind your "', async ({ page }) => { await page.goto('/brand-radar/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Trace the sources behind your AI visibility' || t.startsWith('Trace the sources behind your AI visibility'))).toBeTruthy(); }); test('brand_radar: header link "Rankspire"', async ({ page }) => { await page.goto('/brand-radar/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('brand_radar: nav link "Search marketing"', async ({ page }) => { await page.goto('/brand-radar/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('brand_radar: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/brand-radar/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors\' websites.' || t.startsWith('Site ExplorerDig into your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('brand_radar: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/brand-radar/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - broken_link_checker', () => { test('broken_link_checker: page loads without error', async ({ page }) => { const response = await page.goto('/broken-link-checker/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('broken_link_checker: title matches GT', async ({ page }) => { await page.goto('/broken-link-checker/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free broken link checker'); }); test('broken_link_checker: h1 "Broken Link Checker"', async ({ page }) => { await page.goto('/broken-link-checker/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Broken Link Checker' || t.startsWith('Broken Link Checker'))).toBeTruthy(); }); test('broken_link_checker: h2 "Analyze every outgoing link, r"', async ({ page }) => { await page.goto('/broken-link-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Analyze every outgoing link, right from your browser' || t.startsWith('Analyze every outgoing link, right from your browser'))).toBeTruthy(); }); test('broken_link_checker: h2 "Say goodbye to broken links"', async ({ page }) => { await page.goto('/broken-link-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Say goodbye to broken links' || t.startsWith('Say goodbye to broken links'))).toBeTruthy(); }); test('broken_link_checker: h2 "Restore your broken pages"', async ({ page }) => { await page.goto('/broken-link-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Restore your broken pages' || t.startsWith('Restore your broken pages'))).toBeTruthy(); }); test('broken_link_checker: header link "Rankspire"', async ({ page }) => { await page.goto('/broken-link-checker/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('broken_link_checker: nav link "Search marketing"', async ({ page }) => { await page.goto('/broken-link-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('broken_link_checker: nav link "Site ExplorerAnalyse your comp"', async ({ page }) => { await page.goto('/broken-link-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyse your competitors\' websites.' || t.startsWith('Site ExplorerAnalyse your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('broken_link_checker: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/broken-link-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - careers', () => { test('careers: title matches GT', async ({ page }) => { await page.goto('/careers/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('careers at rankspire'); }); test('careers: h2 "Why work at Rankspire"', async ({ page }) => { await page.goto('/careers/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Why work at Rankspire' || t.startsWith('Why work at Rankspire'))).toBeTruthy(); }); test('careers: h2 "Hear from our team"', async ({ page }) => { await page.goto('/careers/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Hear from our team' || t.startsWith('Hear from our team'))).toBeTruthy(); }); test('careers: h2 "What you get at Rankspire"', async ({ page }) => { await page.goto('/careers/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What you get at Rankspire' || t.startsWith('What you get at Rankspire'))).toBeTruthy(); }); test('careers: header link "Rankspire"', async ({ page }) => { await page.goto('/careers/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('careers: nav link "Search marketing"', async ({ page }) => { await page.goto('/careers/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('careers: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/careers/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' sites.' || t.startsWith('Site ExplorerResearch your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('careers: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/careers/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - certification', () => { test('certification: title matches GT', async ({ page }) => { await page.goto('/certification/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire certification'); }); test('certification: h2 "Why get Rankspire certified?"', async ({ page }) => { await page.goto('/certification/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Why get Rankspire certified?' || t.startsWith('Why get Rankspire certified?'))).toBeTruthy(); }); test('certification: h2 "Exam overview"', async ({ page }) => { await page.goto('/certification/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Exam overview' || t.startsWith('Exam overview'))).toBeTruthy(); }); test('certification: h2 "Get certified for success – fo"', async ({ page }) => { await page.goto('/certification/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get certified for success – for free. Ace the exam and join the ranks of top Rankspire certified pro' || t.startsWith('Get certified for success – for free. Ace the exam and join the ranks of top Rankspire certified pro'))).toBeTruthy(); }); test('certification: header link "Rankspire"', async ({ page }) => { await page.goto('/certification/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('certification: nav link "Search marketing"', async ({ page }) => { await page.goto('/certification/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('certification: nav link "Site ExplorerAnalyse your comp"', async ({ page }) => { await page.goto('/certification/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyse your competitors\' websites.' || t.startsWith('Site ExplorerAnalyse your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('certification: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/certification/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - content_explorer', () => { test('content_explorer: page loads without error', async ({ page }) => { const response = await page.goto('/content-explorer/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('content_explorer: title matches GT', async ({ page }) => { await page.goto('/content-explorer/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('content explorer by rankspire'); }); test('content_explorer: h1 "Content Explorer"', async ({ page }) => { await page.goto('/content-explorer/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Content Explorer' || t.startsWith('Content Explorer'))).toBeTruthy(); }); test('content_explorer: h2 "Find content ideas and link pr"', async ({ page }) => { await page.goto('/content-explorer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find content ideas and link prospects across our index of 19 billion web pages.' || t.startsWith('Find content ideas and link prospects across our index of 19 billion web pages.'))).toBeTruthy(); }); test('content_explorer: h2 "Rankspire\'s Content Explorer h"', async ({ page }) => { await page.goto('/content-explorer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire\'s Content Explorer helps you with:' || t.startsWith('Rankspire\'s Content Explorer helps you with:'))).toBeTruthy(); }); test('content_explorer: h2 "Explore your top pages, uncove"', async ({ page }) => { await page.goto('/content-explorer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Explore your top pages, uncover content gaps, and plan content backed by real performance data.' || t.startsWith('Explore your top pages, uncover content gaps, and plan content backed by real performance data.'))).toBeTruthy(); }); test('content_explorer: header link "Rankspire"', async ({ page }) => { await page.goto('/content-explorer/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('content_explorer: nav link "Search marketing"', async ({ page }) => { await page.goto('/content-explorer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('content_explorer: nav link "Site ExplorerAnalyze your comp"', async ({ page }) => { await page.goto('/content-explorer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyze your competitors\' websites.' || t.startsWith('Site ExplorerAnalyze your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('content_explorer: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/content-explorer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - content_gap', () => { test('content_gap: page loads without error', async ({ page }) => { const response = await page.goto('/content-gap/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('content_gap: title matches GT', async ({ page }) => { await page.goto('/content-gap/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('content gap by rankspire'); }); test('content_gap: h1 "Content Gap"', async ({ page }) => { await page.goto('/content-gap/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Content Gap' || t.startsWith('Content Gap'))).toBeTruthy(); }); test('content_gap: h2 "Making a complex workflow simp"', async ({ page }) => { await page.goto('/content-gap/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Making a complex workflow simple for everyone' || t.startsWith('Making a complex workflow simple for everyone'))).toBeTruthy(); }); test('content_gap: header link "Rankspire"', async ({ page }) => { await page.goto('/content-gap/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('content_gap: nav link "Search marketing"', async ({ page }) => { await page.goto('/content-gap/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('content_gap: nav link "Site ExplorerStudy your compet"', async ({ page }) => { await page.goto('/content-gap/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerStudy your competitors’ websites.' || t.startsWith('Site ExplorerStudy your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('content_gap: nav link "Keywords ExplorerLearn what yo"', async ({ page }) => { await page.goto('/content-gap/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerLearn what your customers are searching for' || t.startsWith('Keywords ExplorerLearn what your customers are searching for')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - content_marketing', () => { test('content_marketing: page loads without error', async ({ page }) => { const response = await page.goto('/content-marketing/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('content_marketing: title matches GT', async ({ page }) => { await page.goto('/content-marketing/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('content marketing'); }); test('content_marketing: h1 "Content marketing"', async ({ page }) => { await page.goto('/content-marketing/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Content marketing' || t.startsWith('Content marketing'))).toBeTruthy(); }); test('content_marketing: header link "Rankspire"', async ({ page }) => { await page.goto('/content-marketing/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('content_marketing: nav link "Search marketing"', async ({ page }) => { await page.goto('/content-marketing/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('content_marketing: nav link "Site ExplorerAnalyse the websi"', async ({ page }) => { await page.goto('/content-marketing/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyse the websites your rivals run.' || t.startsWith('Site ExplorerAnalyse the websites your rivals run.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('content_marketing: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/content-marketing/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your audience is searching fo' || t.startsWith('Keywords ExplorerDiscover what your audience is searching fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - custom_prompts', () => { test('custom_prompts: page loads without error', async ({ page }) => { const response = await page.goto('/custom-prompts/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('custom_prompts: title matches GT', async ({ page }) => { await page.goto('/custom-prompts/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire custom prompts'); }); test('custom_prompts: h1 "Custom Prompts"', async ({ page }) => { await page.goto('/custom-prompts/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Custom Prompts' || t.startsWith('Custom Prompts'))).toBeTruthy(); }); test('custom_prompts: h2 "Brand Radar charts your AI vis"', async ({ page }) => { await page.goto('/custom-prompts/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Brand Radar charts your AI visibility at scale. Custom Prompts take you deeper.' || t.startsWith('Brand Radar charts your AI visibility at scale. Custom Prompts take you deeper.'))).toBeTruthy(); }); test('custom_prompts: h2 "Monitor the prompts your buyer"', async ({ page }) => { await page.goto('/custom-prompts/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Monitor the prompts your buyers really use' || t.startsWith('Monitor the prompts your buyers really use'))).toBeTruthy(); }); test('custom_prompts: h2 "Track the specific AI question"', async ({ page }) => { await page.goto('/custom-prompts/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Track the specific AI questions that drive sales. Appear in the AI prompts buyers use before they de' || t.startsWith('Track the specific AI questions that drive sales. Appear in the AI prompts buyers use before they de'))).toBeTruthy(); }); test('custom_prompts: header link "Rankspire"', async ({ page }) => { await page.goto('/custom-prompts/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('custom_prompts: nav link "Search marketing"', async ({ page }) => { await page.goto('/custom-prompts/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('custom_prompts: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/custom-prompts/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' sites.' || t.startsWith('Site ExplorerResearch your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('custom_prompts: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/custom-prompts/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - dashboard', () => { test('dashboard: page loads without error', async ({ page }) => { const response = await page.goto('/dashboard/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('dashboard: title matches GT', async ({ page }) => { await page.goto('/dashboard/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire seo dashboard'); }); test('dashboard: h1 "SEO Dashboard"', async ({ page }) => { await page.goto('/dashboard/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'SEO Dashboard' || t.startsWith('SEO Dashboard'))).toBeTruthy(); }); test('dashboard: h2 "Watch your entire SEO ecosyste"', async ({ page }) => { await page.goto('/dashboard/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Watch your entire SEO ecosystem, from individual websites all the way to the competitive landscape.' || t.startsWith('Watch your entire SEO ecosystem, from individual websites all the way to the competitive landscape.'))).toBeTruthy(); }); test('dashboard: h2 "Monitor an unlimited number of"', async ({ page }) => { await page.goto('/dashboard/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Monitor an unlimited number of verified projects' || t.startsWith('Monitor an unlimited number of verified projects'))).toBeTruthy(); }); test('dashboard: h2 "Unlock deeper insights from yo"', async ({ page }) => { await page.goto('/dashboard/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Unlock deeper insights from your Zentra SearchLight' || t.startsWith('Unlock deeper insights from your Zentra SearchLight'))).toBeTruthy(); }); test('dashboard: header link "Rankspire"', async ({ page }) => { await page.goto('/dashboard/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('dashboard: nav link "Search marketing"', async ({ page }) => { await page.goto('/dashboard/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('dashboard: nav link "Domain ExplorerAnalyze your co"', async ({ page }) => { await page.goto('/dashboard/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Domain ExplorerAnalyze your competitors\' websites.' || t.startsWith('Domain ExplorerAnalyze your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('dashboard: nav link "Keyword ExplorerDiscover what "', async ({ page }) => { await page.goto('/dashboard/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword ExplorerDiscover what your customers are searching f' || t.startsWith('Keyword ExplorerDiscover what your customers are searching f')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - domain_comparison', () => { test('domain_comparison: page loads without error', async ({ page }) => { const response = await page.goto('/domain-comparison/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('domain_comparison: title matches GT', async ({ page }) => { await page.goto('/domain-comparison/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('domain comparison'); }); test('domain_comparison: h1 "Domain Comparison"', async ({ page }) => { await page.goto('/domain-comparison/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Domain Comparison' || t.startsWith('Domain Comparison'))).toBeTruthy(); }); test('domain_comparison: h2 "Unlock deep competitive intell"', async ({ page }) => { await page.goto('/domain-comparison/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Unlock deep competitive intelligence at scale' || t.startsWith('Unlock deep competitive intelligence at scale'))).toBeTruthy(); }); test('domain_comparison: h2 "See competitor SEO metrics in "', async ({ page }) => { await page.goto('/domain-comparison/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See competitor SEO metrics in one view' || t.startsWith('See competitor SEO metrics in one view'))).toBeTruthy(); }); test('domain_comparison: h2 "Reveal your organic competitor"', async ({ page }) => { await page.goto('/domain-comparison/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Reveal your organic competitors' || t.startsWith('Reveal your organic competitors'))).toBeTruthy(); }); test('domain_comparison: header link "Rankspire"', async ({ page }) => { await page.goto('/domain-comparison/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('domain_comparison: nav link "Search marketing"', async ({ page }) => { await page.goto('/domain-comparison/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('domain_comparison: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/domain-comparison/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' sites.' || t.startsWith('Site ExplorerResearch your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('domain_comparison: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/domain-comparison/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - events', () => { test('events: title matches GT', async ({ page }) => { await page.goto('/events/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire events'); }); test('events: h2 "Join Us at Ascend 2026 in San "', async ({ page }) => { await page.goto('/events/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join Us at Ascend 2026 in San Diego' || t.startsWith('Join Us at Ascend 2026 in San Diego'))).toBeTruthy(); }); test('events: h2 "Get notified of the next Ranks"', async ({ page }) => { await page.goto('/events/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get notified of the next Rankspire event' || t.startsWith('Get notified of the next Rankspire event'))).toBeTruthy(); }); test('events: h2 "Past events"', async ({ page }) => { await page.goto('/events/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Past events' || t.startsWith('Past events'))).toBeTruthy(); }); test('events: header link "Rankspire"', async ({ page }) => { await page.goto('/events/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('events: nav link "Search marketing"', async ({ page }) => { await page.goto('/events/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('events: nav link "Site ExplorerAnalyse what your"', async ({ page }) => { await page.goto('/events/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyse what your competitors are' || t.startsWith('Site ExplorerAnalyse what your competitors are')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('events: nav link "Keywords ExplorerSee exactly w"', async ({ page }) => { await page.goto('/events/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerSee exactly what your customers are searchi' || t.startsWith('Keywords ExplorerSee exactly what your customers are searchi')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - free', () => { test('free: page loads without error', async ({ page }) => { const response = await page.goto('/free/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('free: title matches GT', async ({ page }) => { await page.goto('/free/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire free'); }); test('free: h1 "Rankspire Free Account"', async ({ page }) => { await page.goto('/free/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire Free Account' || t.startsWith('Rankspire Free Account'))).toBeTruthy(); }); test('free: h2 "Six tools. Yours forever."', async ({ page }) => { await page.goto('/free/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Six tools. Yours forever.' || t.startsWith('Six tools. Yours forever.'))).toBeTruthy(); }); test('free: h2 "Rankspire Free vs. SEO free tr"', async ({ page }) => { await page.goto('/free/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire Free vs. SEO free trials' || t.startsWith('Rankspire Free vs. SEO free trials'))).toBeTruthy(); }); test('free: h2 "Rankspire Free limits"', async ({ page }) => { await page.goto('/free/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire Free limits' || t.startsWith('Rankspire Free limits'))).toBeTruthy(); }); test('free: header link "Rankspire"', async ({ page }) => { await page.goto('/free/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('free: nav link "Search marketing"', async ({ page }) => { await page.goto('/free/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('free: nav link "Site ExplorerStudy your compet"', async ({ page }) => { await page.goto('/free/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerStudy your competitors\' sites.' || t.startsWith('Site ExplorerStudy your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('free: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/free/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - free_seo_tools', () => { test('free_seo_tools: page loads without error', async ({ page }) => { const response = await page.goto('/free-seo-tools/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('free_seo_tools: title matches GT', async ({ page }) => { await page.goto('/free-seo-tools/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free seo tools'); }); test('free_seo_tools: h1 "Free SEO Tools"', async ({ page }) => { await page.goto('/free-seo-tools/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Free SEO Tools' || t.startsWith('Free SEO Tools'))).toBeTruthy(); }); test('free_seo_tools: h2 "Keyword Research"', async ({ page }) => { await page.goto('/free-seo-tools/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword Research' || t.startsWith('Keyword Research'))).toBeTruthy(); }); test('free_seo_tools: h2 "Link Building"', async ({ page }) => { await page.goto('/free-seo-tools/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Link Building' || t.startsWith('Link Building'))).toBeTruthy(); }); test('free_seo_tools: h2 "SERP & Ranking"', async ({ page }) => { await page.goto('/free-seo-tools/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'SERP & Ranking' || t.startsWith('SERP & Ranking'))).toBeTruthy(); }); test('free_seo_tools: header link "Rankspire"', async ({ page }) => { await page.goto('/free-seo-tools/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('free_seo_tools: nav link "Search marketing"', async ({ page }) => { await page.goto('/free-seo-tools/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('free_seo_tools: nav link "Site ExplorerAnalyse your comp"', async ({ page }) => { await page.goto('/free-seo-tools/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyse your competitors’ websites.' || t.startsWith('Site ExplorerAnalyse your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('free_seo_tools: nav link "Keywords ExplorerSee what your"', async ({ page }) => { await page.goto('/free-seo-tools/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerSee what your customers are searching for.' || t.startsWith('Keywords ExplorerSee what your customers are searching for.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - gbp_monitor', () => { test('gbp_monitor: page loads without error', async ({ page }) => { const response = await page.goto('/gbp-monitor/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('gbp_monitor: title matches GT', async ({ page }) => { await page.goto('/gbp-monitor/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('local business listing monitor by ranksp'); }); test('gbp_monitor: h1 "Business Listing Monitor"', async ({ page }) => { await page.goto('/gbp-monitor/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Business Listing Monitor' || t.startsWith('Business Listing Monitor'))).toBeTruthy(); }); test('gbp_monitor: h2 "Stop unwanted changes in their"', async ({ page }) => { await page.goto('/gbp-monitor/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Stop unwanted changes in their tracks. Defend your Business Listing profiles against attacks from an' || t.startsWith('Stop unwanted changes in their tracks. Defend your Business Listing profiles against attacks from an'))).toBeTruthy(); }); test('gbp_monitor: h2 "Manage Business Listings at sc"', async ({ page }) => { await page.goto('/gbp-monitor/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Manage Business Listings at scale. Run your entire local presence from a single place.' || t.startsWith('Manage Business Listings at scale. Run your entire local presence from a single place.'))).toBeTruthy(); }); test('gbp_monitor: h2 "Don’t let your Zentra Business"', async ({ page }) => { await page.goto('/gbp-monitor/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Don’t let your Zentra Business Listing get hijacked. Rankspire’s Business Listing Monitor helps you' || t.startsWith('Don’t let your Zentra Business Listing get hijacked. Rankspire’s Business Listing Monitor helps you'))).toBeTruthy(); }); test('gbp_monitor: header link "Rankspire"', async ({ page }) => { await page.goto('/gbp-monitor/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('gbp_monitor: nav link "Search marketing"', async ({ page }) => { await page.goto('/gbp-monitor/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('gbp_monitor: nav link "Site ExplorerExplore your comp"', async ({ page }) => { await page.goto('/gbp-monitor/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerExplore your competitors’ websites.' || t.startsWith('Site ExplorerExplore your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('gbp_monitor: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/gbp-monitor/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - gsc_insights', () => { test('gsc_insights: page loads without error', async ({ page }) => { const response = await page.goto('/gsc-insights/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('gsc_insights: title matches GT', async ({ page }) => { await page.goto('/gsc-insights/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('searchlight insights by rankspire'); }); test('gsc_insights: h1 "SearchLight Insights"', async ({ page }) => { await page.goto('/gsc-insights/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'SearchLight Insights' || t.startsWith('SearchLight Insights'))).toBeTruthy(); }); test('gsc_insights: h2 "Get the insights search engine"', async ({ page }) => { await page.goto('/gsc-insights/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get the insights search engines hide' || t.startsWith('Get the insights search engines hide'))).toBeTruthy(); }); test('gsc_insights: h2 "Connect SearchLight to Rankspi"', async ({ page }) => { await page.goto('/gsc-insights/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Connect SearchLight to Rankspire in just seconds' || t.startsWith('Connect SearchLight to Rankspire in just seconds'))).toBeTruthy(); }); test('gsc_insights: h2 "More reasons to make Rankspire"', async ({ page }) => { await page.goto('/gsc-insights/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More reasons to make Rankspire your go-to marketing platform' || t.startsWith('More reasons to make Rankspire your go-to marketing platform'))).toBeTruthy(); }); test('gsc_insights: header link "Rankspire"', async ({ page }) => { await page.goto('/gsc-insights/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('gsc_insights: nav link "Search marketing"', async ({ page }) => { await page.goto('/gsc-insights/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('gsc_insights: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/gsc-insights/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors\' websites.' || t.startsWith('Site ExplorerDig into your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('gsc_insights: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/gsc-insights/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - index_now', () => { test('index_now: page loads without error', async ({ page }) => { const response = await page.goto('/index-now/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('index_now: title matches GT', async ({ page }) => { await page.goto('/index-now/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire indexnow integration'); }); test('index_now: h1 "Rankspire\'s IndexNow Integrati"', async ({ page }) => { await page.goto('/index-now/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire\'s IndexNow Integration' || t.startsWith('Rankspire\'s IndexNow Integration'))).toBeTruthy(); }); test('index_now: h2 "IndexNow saves resources"', async ({ page }) => { await page.goto('/index-now/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'IndexNow saves resources' || t.startsWith('IndexNow saves resources'))).toBeTruthy(); }); test('index_now: h2 "IndexNow — a smarter successor"', async ({ page }) => { await page.goto('/index-now/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'IndexNow — a smarter successor to sitemaps' || t.startsWith('IndexNow — a smarter successor to sitemaps'))).toBeTruthy(); }); test('index_now: h2 "Set up IndexNow in Rankspire w"', async ({ page }) => { await page.goto('/index-now/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Set up IndexNow in Rankspire within seconds' || t.startsWith('Set up IndexNow in Rankspire within seconds'))).toBeTruthy(); }); test('index_now: header link "Rankspire"', async ({ page }) => { await page.goto('/index-now/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('index_now: nav link "Search marketing"', async ({ page }) => { await page.goto('/index-now/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('index_now: nav link "Domain ExplorerAnalyze your co"', async ({ page }) => { await page.goto('/index-now/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Domain ExplorerAnalyze your competitors’ websites.' || t.startsWith('Domain ExplorerAnalyze your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('index_now: nav link "Keyword ExplorerDiscover what "', async ({ page }) => { await page.goto('/index-now/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword ExplorerDiscover what your customers are searching f' || t.startsWith('Keyword ExplorerDiscover what your customers are searching f')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - keyword_difficulty', () => { test('keyword_difficulty: page loads without error', async ({ page }) => { const response = await page.goto('/keyword-difficulty/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('keyword_difficulty: title matches GT', async ({ page }) => { await page.goto('/keyword-difficulty/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free keyword difficulty checker'); }); test('keyword_difficulty: h1 "Keyword Difficulty Checker"', async ({ page }) => { await page.goto('/keyword-difficulty/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword Difficulty Checker' || t.startsWith('Keyword Difficulty Checker'))).toBeTruthy(); }); test('keyword_difficulty: h2 "Discover keyword ideas right i"', async ({ page }) => { await page.goto('/keyword-difficulty/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover keyword ideas right inside your browser' || t.startsWith('Discover keyword ideas right inside your browser'))).toBeTruthy(); }); test('keyword_difficulty: h2 "What is Keyword Difficulty?"', async ({ page }) => { await page.goto('/keyword-difficulty/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What is Keyword Difficulty?' || t.startsWith('What is Keyword Difficulty?'))).toBeTruthy(); }); test('keyword_difficulty: h2 "Rankspire’s Keyword Difficulty"', async ({ page }) => { await page.goto('/keyword-difficulty/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire’s Keyword Difficulty metric' || t.startsWith('Rankspire’s Keyword Difficulty metric'))).toBeTruthy(); }); test('keyword_difficulty: header link "Rankspire"', async ({ page }) => { await page.goto('/keyword-difficulty/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('keyword_difficulty: nav link "Search marketing"', async ({ page }) => { await page.goto('/keyword-difficulty/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('keyword_difficulty: nav link "Site ExplorerAnalyze your comp"', async ({ page }) => { await page.goto('/keyword-difficulty/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyze your competitors\' websites.' || t.startsWith('Site ExplorerAnalyze your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('keyword_difficulty: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/keyword-difficulty/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - keyword_generator', () => { test('keyword_generator: page loads without error', async ({ page }) => { const response = await page.goto('/keyword-generator/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('keyword_generator: title matches GT', async ({ page }) => { await page.goto('/keyword-generator/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free keyword generator'); }); test('keyword_generator: h1 "Free Keyword Generator"', async ({ page }) => { await page.goto('/keyword-generator/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Free Keyword Generator' || t.startsWith('Free Keyword Generator'))).toBeTruthy(); }); test('keyword_generator: h2 "Find keyword ideas right insid"', async ({ page }) => { await page.goto('/keyword-generator/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find keyword ideas right inside your browser' || t.startsWith('Find keyword ideas right inside your browser'))).toBeTruthy(); }); test('keyword_generator: h2 "Uncover keyword ideas around t"', async ({ page }) => { await page.goto('/keyword-generator/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Uncover keyword ideas around the clock' || t.startsWith('Uncover keyword ideas around the clock'))).toBeTruthy(); }); test('keyword_generator: h2 "Check key SEO metrics"', async ({ page }) => { await page.goto('/keyword-generator/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Check key SEO metrics' || t.startsWith('Check key SEO metrics'))).toBeTruthy(); }); test('keyword_generator: header link "Rankspire"', async ({ page }) => { await page.goto('/keyword-generator/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('keyword_generator: nav link "Search marketing"', async ({ page }) => { await page.goto('/keyword-generator/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('keyword_generator: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/keyword-generator/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors’ websites.' || t.startsWith('Site ExplorerDig into your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('keyword_generator: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/keyword-generator/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - keyword_rank_checker', () => { test('keyword_rank_checker: page loads without error', async ({ page }) => { const response = await page.goto('/keyword-rank-checker/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('keyword_rank_checker: title matches GT', async ({ page }) => { await page.goto('/keyword-rank-checker/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free keyword rank checker tool'); }); test('keyword_rank_checker: h1 "Keyword Rank Checker"', async ({ page }) => { await page.goto('/keyword-rank-checker/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword Rank Checker' || t.startsWith('Keyword Rank Checker'))).toBeTruthy(); }); test('keyword_rank_checker: h2 "Explore search results worldwi"', async ({ page }) => { await page.goto('/keyword-rank-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Explore search results worldwide, right inside your browser' || t.startsWith('Explore search results worldwide, right inside your browser'))).toBeTruthy(); }); test('keyword_rank_checker: h2 "What is Keyword Rank Checker?"', async ({ page }) => { await page.goto('/keyword-rank-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What is Keyword Rank Checker?' || t.startsWith('What is Keyword Rank Checker?'))).toBeTruthy(); }); test('keyword_rank_checker: h2 "View every keyword ranking for"', async ({ page }) => { await page.goto('/keyword-rank-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'View every keyword ranking for any website or web page.' || t.startsWith('View every keyword ranking for any website or web page.'))).toBeTruthy(); }); test('keyword_rank_checker: header link "Rankspire"', async ({ page }) => { await page.goto('/keyword-rank-checker/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('keyword_rank_checker: nav link "Search marketing"', async ({ page }) => { await page.goto('/keyword-rank-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('keyword_rank_checker: nav link "Site ExplorerAnalyze your comp"', async ({ page }) => { await page.goto('/keyword-rank-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyze your competitors’ websites.' || t.startsWith('Site ExplorerAnalyze your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('keyword_rank_checker: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/keyword-rank-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - keywords_explorer', () => { test('keywords_explorer: page loads without error', async ({ page }) => { const response = await page.goto('/keywords-explorer/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('keywords_explorer: title matches GT', async ({ page }) => { await page.goto('/keywords-explorer/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('keywords explorer by rankspire'); }); test('keywords_explorer: h1 "Keywords Explorer"', async ({ page }) => { await page.goto('/keywords-explorer/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords Explorer' || t.startsWith('Keywords Explorer'))).toBeTruthy(); }); test('keywords_explorer: h2 "Examine search queries in deta"', async ({ page }) => { await page.goto('/keywords-explorer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Examine search queries in detail. Use our proprietary SEO metrics and reliable volume data to surfac' || t.startsWith('Examine search queries in detail. Use our proprietary SEO metrics and reliable volume data to surfac'))).toBeTruthy(); }); test('keywords_explorer: h2 "Search through our database of"', async ({ page }) => { await page.goto('/keywords-explorer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search through our database of billions of keywords. We surface the most popular ones from the tens' || t.startsWith('Search through our database of billions of keywords. We surface the most popular ones from the tens'))).toBeTruthy(); }); test('keywords_explorer: h2 "Generate keywords with AI in s"', async ({ page }) => { await page.goto('/keywords-explorer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Generate keywords with AI in seconds, get thousands of ideas, and cluster them instantly.' || t.startsWith('Generate keywords with AI in seconds, get thousands of ideas, and cluster them instantly.'))).toBeTruthy(); }); test('keywords_explorer: header link "Rankspire"', async ({ page }) => { await page.goto('/keywords-explorer/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('keywords_explorer: nav link "Search marketing"', async ({ page }) => { await page.goto('/keywords-explorer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('keywords_explorer: nav link "Site ExplorerAnalyze your comp"', async ({ page }) => { await page.goto('/keywords-explorer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyze your competitors’ websites.' || t.startsWith('Site ExplorerAnalyze your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('keywords_explorer: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/keywords-explorer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - legal', () => { test('legal: title matches GT', async ({ page }) => { await page.goto('/legal/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('legal information'); }); test('legal: h2 "Terms of Service"', async ({ page }) => { await page.goto('/legal/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Terms of Service' || t.startsWith('Terms of Service'))).toBeTruthy(); }); test('legal: h2 "Terms of Service — USA"', async ({ page }) => { await page.goto('/legal/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Terms of Service — USA' || t.startsWith('Terms of Service — USA'))).toBeTruthy(); }); test('legal: h2 "Privacy Policy"', async ({ page }) => { await page.goto('/legal/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Privacy Policy' || t.startsWith('Privacy Policy'))).toBeTruthy(); }); test('legal: header link "Rankspire"', async ({ page }) => { await page.goto('/legal/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('legal: nav link "Search marketing"', async ({ page }) => { await page.goto('/legal/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('legal: nav link "Site ExplorerStudy the sites y"', async ({ page }) => { await page.goto('/legal/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerStudy the sites your rivals operate.' || t.startsWith('Site ExplorerStudy the sites your rivals operate.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('legal: nav link "Keywords ExplorerSee what your"', async ({ page }) => { await page.goto('/legal/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerSee what your customers are searching for.' || t.startsWith('Keywords ExplorerSee what your customers are searching for.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - legal_privacy_policy', () => { test('legal_privacy_policy: title matches GT', async ({ page }) => { await page.goto('/legal/privacy-policy/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire privacy policy'); }); test('legal_privacy_policy: h1 "Privacy Policy"', async ({ page }) => { await page.goto('/legal/privacy-policy/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Privacy Policy' || t.startsWith('Privacy Policy'))).toBeTruthy(); }); test('legal_privacy_policy: h2 "1. Introduction"', async ({ page }) => { await page.goto('/legal/privacy-policy/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '1. Introduction' || t.startsWith('1. Introduction'))).toBeTruthy(); }); test('legal_privacy_policy: h2 "2. Interpretation"', async ({ page }) => { await page.goto('/legal/privacy-policy/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '2. Interpretation' || t.startsWith('2. Interpretation'))).toBeTruthy(); }); test('legal_privacy_policy: h2 "3. Collection of Information"', async ({ page }) => { await page.goto('/legal/privacy-policy/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '3. Collection of Information' || t.startsWith('3. Collection of Information'))).toBeTruthy(); }); test('legal_privacy_policy: header link "Rankspire"', async ({ page }) => { await page.goto('/legal/privacy-policy/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('legal_privacy_policy: nav link "Search marketing"', async ({ page }) => { await page.goto('/legal/privacy-policy/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('legal_privacy_policy: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/legal/privacy-policy/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' sites.' || t.startsWith('Site ExplorerResearch your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('legal_privacy_policy: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/legal/privacy-policy/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - legal_terms', () => { test('legal_terms: title matches GT', async ({ page }) => { await page.goto('/legal/terms/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('terms of service'); }); test('legal_terms: h2 "1. Introduction"', async ({ page }) => { await page.goto('/legal/terms/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '1. Introduction' || t.startsWith('1. Introduction'))).toBeTruthy(); }); test('legal_terms: h2 "2. Definitions"', async ({ page }) => { await page.goto('/legal/terms/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '2. Definitions' || t.startsWith('2. Definitions'))).toBeTruthy(); }); test('legal_terms: h2 "3. Interpretation"', async ({ page }) => { await page.goto('/legal/terms/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '3. Interpretation' || t.startsWith('3. Interpretation'))).toBeTruthy(); }); test('legal_terms: header link "Rankspire"', async ({ page }) => { await page.goto('/legal/terms/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('legal_terms: nav link "Search marketing"', async ({ page }) => { await page.goto('/legal/terms/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('legal_terms: nav link "Domain ExplorerAnalyse your co"', async ({ page }) => { await page.goto('/legal/terms/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Domain ExplorerAnalyse your competitors\' websites.' || t.startsWith('Domain ExplorerAnalyse your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('legal_terms: nav link "Keyword ExplorerDiscover what "', async ({ page }) => { await page.goto('/legal/terms/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword ExplorerDiscover what your audience is searching for' || t.startsWith('Keyword ExplorerDiscover what your audience is searching for')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - link_intersect', () => { test('link_intersect: page loads without error', async ({ page }) => { const response = await page.goto('/link-intersect/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('link_intersect: title matches GT', async ({ page }) => { await page.goto('/link-intersect/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('link intersect by rankspire'); }); test('link_intersect: h1 "Link Intersect"', async ({ page }) => { await page.goto('/link-intersect/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Link Intersect' || t.startsWith('Link Intersect'))).toBeTruthy(); }); test('link_intersect: h2 "Uncover your missing link oppo"', async ({ page }) => { await page.goto('/link-intersect/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Uncover your missing link opportunities' || t.startsWith('Uncover your missing link opportunities'))).toBeTruthy(); }); test('link_intersect: h2 "Reveal linking patterns"', async ({ page }) => { await page.goto('/link-intersect/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Reveal linking patterns' || t.startsWith('Reveal linking patterns'))).toBeTruthy(); }); test('link_intersect: header link "Rankspire"', async ({ page }) => { await page.goto('/link-intersect/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('link_intersect: nav link "Search marketing"', async ({ page }) => { await page.goto('/link-intersect/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('link_intersect: nav link "Site ExplorerExplore your comp"', async ({ page }) => { await page.goto('/link-intersect/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerExplore your competitors’ websites.' || t.startsWith('Site ExplorerExplore your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('link_intersect: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/link-intersect/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your audience is searching fo' || t.startsWith('Keywords ExplorerDiscover what your audience is searching fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - local_seo', () => { test('local_seo: page loads without error', async ({ page }) => { const response = await page.goto('/local-seo/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('local_seo: title matches GT', async ({ page }) => { await page.goto('/local-seo/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('local seo'); }); test('local_seo: h1 "Local SEO"', async ({ page }) => { await page.goto('/local-seo/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Local SEO' || t.startsWith('Local SEO'))).toBeTruthy(); }); test('local_seo: header link "Rankspire"', async ({ page }) => { await page.goto('/local-seo/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('local_seo: nav link "Search marketing"', async ({ page }) => { await page.goto('/local-seo/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('local_seo: nav link "Site ExplorerExplore your comp"', async ({ page }) => { await page.goto('/local-seo/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerExplore your competitors\' websites.' || t.startsWith('Site ExplorerExplore your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('local_seo: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/local-seo/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - mcp', () => { test('mcp: page loads without error', async ({ page }) => { const response = await page.goto('/mcp/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('mcp: title matches GT', async ({ page }) => { await page.goto('/mcp/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire mcp'); }); test('mcp: h1 "Rankspire MCP"', async ({ page }) => { await page.goto('/mcp/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire MCP' || t.startsWith('Rankspire MCP'))).toBeTruthy(); }); test('mcp: h2 "Rankspire MCP use cases"', async ({ page }) => { await page.goto('/mcp/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire MCP use cases' || t.startsWith('Rankspire MCP use cases'))).toBeTruthy(); }); test('mcp: h2 "Ready wherever you already wor"', async ({ page }) => { await page.goto('/mcp/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ready wherever you already work' || t.startsWith('Ready wherever you already work'))).toBeTruthy(); }); test('mcp: h2 "Included on all paid Rankspire"', async ({ page }) => { await page.goto('/mcp/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Included on all paid Rankspire plans' || t.startsWith('Included on all paid Rankspire plans'))).toBeTruthy(); }); test('mcp: header link "Rankspire"', async ({ page }) => { await page.goto('/mcp/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('mcp: nav link "Search marketing"', async ({ page }) => { await page.goto('/mcp/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('mcp: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/mcp/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors\' websites.' || t.startsWith('Site ExplorerDig into your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('mcp: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/mcp/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - media_kit', () => { test('media_kit: title matches GT', async ({ page }) => { await page.goto('/media-kit/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire media kit'); }); test('media_kit: h2 "Logo"', async ({ page }) => { await page.goto('/media-kit/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Logo' || t.startsWith('Logo'))).toBeTruthy(); }); test('media_kit: h2 "About us"', async ({ page }) => { await page.goto('/media-kit/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'About us' || t.startsWith('About us'))).toBeTruthy(); }); test('media_kit: h2 "Product screenshots"', async ({ page }) => { await page.goto('/media-kit/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Product screenshots' || t.startsWith('Product screenshots'))).toBeTruthy(); }); test('media_kit: header link "Rankspire"', async ({ page }) => { await page.goto('/media-kit/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('media_kit: nav link "Search marketing"', async ({ page }) => { await page.goto('/media-kit/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('media_kit: nav link "Site ExplorerAnalyse your comp"', async ({ page }) => { await page.goto('/media-kit/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyse your competitors’ websites.' || t.startsWith('Site ExplorerAnalyse your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('media_kit: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/media-kit/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your audience is searching fo' || t.startsWith('Keywords ExplorerDiscover what your audience is searching fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - patches', () => { test('patches: page loads without error', async ({ page }) => { const response = await page.goto('/patches/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('patches: title matches GT', async ({ page }) => { await page.goto('/patches/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('patches by rankspire'); }); test('patches: h1 "Patches"', async ({ page }) => { await page.goto('/patches/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Patches' || t.startsWith('Patches'))).toBeTruthy(); }); test('patches: h2 "Fix SEO issues without ever op"', async ({ page }) => { await page.goto('/patches/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Fix SEO issues without ever opening your CMS' || t.startsWith('Fix SEO issues without ever opening your CMS'))).toBeTruthy(); }); test('patches: h2 "AI does the fixing, you stay o"', async ({ page }) => { await page.goto('/patches/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'AI does the fixing, you stay on quality control' || t.startsWith('AI does the fixing, you stay on quality control'))).toBeTruthy(); }); test('patches: h2 "Launch Patches in seconds"', async ({ page }) => { await page.goto('/patches/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Launch Patches in seconds' || t.startsWith('Launch Patches in seconds'))).toBeTruthy(); }); test('patches: header link "Rankspire"', async ({ page }) => { await page.goto('/patches/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('patches: nav link "Search marketing"', async ({ page }) => { await page.goto('/patches/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('patches: nav link "Site InsightsAnalyse your comp"', async ({ page }) => { await page.goto('/patches/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site InsightsAnalyse your competitors’ websites.' || t.startsWith('Site InsightsAnalyse your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('patches: nav link "Keyword DiscoveryDiscover what"', async ({ page }) => { await page.goto('/patches/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword DiscoveryDiscover what your customers are searching ' || t.startsWith('Keyword DiscoveryDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - portfolios', () => { test('portfolios: page loads without error', async ({ page }) => { const response = await page.goto('/portfolios/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('portfolios: title matches GT', async ({ page }) => { await page.goto('/portfolios/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('portfolios by rankspire'); }); test('portfolios: h1 "Portfolios"', async ({ page }) => { await page.goto('/portfolios/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Portfolios' || t.startsWith('Portfolios'))).toBeTruthy(); }); test('portfolios: h2 "Flexible reporting, limitless "', async ({ page }) => { await page.goto('/portfolios/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Flexible reporting, limitless possibilities' || t.startsWith('Flexible reporting, limitless possibilities'))).toBeTruthy(); }); test('portfolios: h2 "See the whole picture, then zo"', async ({ page }) => { await page.goto('/portfolios/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See the whole picture, then zoom in' || t.startsWith('See the whole picture, then zoom in'))).toBeTruthy(); }); test('portfolios: h2 "Collaborate seamlessly across "', async ({ page }) => { await page.goto('/portfolios/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Collaborate seamlessly across every department' || t.startsWith('Collaborate seamlessly across every department'))).toBeTruthy(); }); test('portfolios: header link "Rankspire"', async ({ page }) => { await page.goto('/portfolios/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('portfolios: nav link "Search marketing"', async ({ page }) => { await page.goto('/portfolios/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('portfolios: nav link "Site ExplorerAnalyse your comp"', async ({ page }) => { await page.goto('/portfolios/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyse your competitors\' websites.' || t.startsWith('Site ExplorerAnalyse your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('portfolios: nav link "Keywords ExplorerDiscover the "', async ({ page }) => { await page.goto('/portfolios/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover the terms your customers search fo' || t.startsWith('Keywords ExplorerDiscover the terms your customers search fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - pricing', () => { test('pricing: title matches GT', async ({ page }) => { await page.goto('/pricing/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('plans & pricing'); }); test('pricing: h1 "Plans & pricing"', async ({ page }) => { await page.goto('/pricing/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Plans & pricing' || t.startsWith('Plans & pricing'))).toBeTruthy(); }); test('pricing: h2 "Optional add-ons"', async ({ page }) => { await page.goto('/pricing/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Optional add-ons' || t.startsWith('Optional add-ons'))).toBeTruthy(); }); test('pricing: h2 "Compare plans & features"', async ({ page }) => { await page.goto('/pricing/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Compare plans & features' || t.startsWith('Compare plans & features'))).toBeTruthy(); }); test('pricing: h2 "Questions? We have answers"', async ({ page }) => { await page.goto('/pricing/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Questions? We have answers' || t.startsWith('Questions? We have answers'))).toBeTruthy(); }); test('pricing: header link "Rankspire"', async ({ page }) => { await page.goto('/pricing/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('pricing: nav link "Search marketing"', async ({ page }) => { await page.goto('/pricing/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('pricing: nav link "Site ExplorerAnalyse your comp"', async ({ page }) => { await page.goto('/pricing/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyse your competitors’ websites.' || t.startsWith('Site ExplorerAnalyse your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('pricing: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/pricing/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - rank_tracker', () => { test('rank_tracker: page loads without error', async ({ page }) => { const response = await page.goto('/rank-tracker/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('rank_tracker: title matches GT', async ({ page }) => { await page.goto('/rank-tracker/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rank tracker by rankspire'); }); test('rank_tracker: h1 "Rank Tracker"', async ({ page }) => { await page.goto('/rank-tracker/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rank Tracker' || t.startsWith('Rank Tracker'))).toBeTruthy(); }); test('rank_tracker: h2 "Rankspire\'s Rank Tracker gives"', async ({ page }) => { await page.goto('/rank-tracker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire\'s Rank Tracker gives you:' || t.startsWith('Rankspire\'s Rank Tracker gives you:'))).toBeTruthy(); }); test('rank_tracker: h2 "Stay on top of your website\'s "', async ({ page }) => { await page.goto('/rank-tracker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Stay on top of your website\'s rankings' || t.startsWith('Stay on top of your website\'s rankings'))).toBeTruthy(); }); test('rank_tracker: h2 "Benchmark your keyword ranking"', async ({ page }) => { await page.goto('/rank-tracker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Benchmark your keyword rankings against rivals' || t.startsWith('Benchmark your keyword rankings against rivals'))).toBeTruthy(); }); test('rank_tracker: header link "Rankspire"', async ({ page }) => { await page.goto('/rank-tracker/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('rank_tracker: nav link "Search marketing"', async ({ page }) => { await page.goto('/rank-tracker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('rank_tracker: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/rank-tracker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' sites.' || t.startsWith('Site ExplorerResearch your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('rank_tracker: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/rank-tracker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - reporting', () => { test('reporting: page loads without error', async ({ page }) => { const response = await page.goto('/reporting/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('reporting: title matches GT', async ({ page }) => { await page.goto('/reporting/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('reporting by rankspire'); }); test('reporting: h1 "Reporting"', async ({ page }) => { await page.goto('/reporting/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Reporting' || t.startsWith('Reporting'))).toBeTruthy(); }); test('reporting: header link "Rankspire"', async ({ page }) => { await page.goto('/reporting/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('reporting: nav link "Search marketing"', async ({ page }) => { await page.goto('/reporting/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('reporting: nav link "Rival ExplorerBreak down what "', async ({ page }) => { await page.goto('/reporting/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rival ExplorerBreak down what your rivals are' || t.startsWith('Rival ExplorerBreak down what your rivals are')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('reporting: nav link "Keyword ExplorerSee exactly wh"', async ({ page }) => { await page.goto('/reporting/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword ExplorerSee exactly what your audience is searching ' || t.startsWith('Keyword ExplorerSee exactly what your audience is searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - reviews', () => { test('reviews: title matches GT', async ({ page }) => { await page.goto('/reviews/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire customer reviews'); }); test('reviews: h1 "Testimonials"', async ({ page }) => { await page.goto('/reviews/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Testimonials' || t.startsWith('Testimonials'))).toBeTruthy(); }); test('reviews: h2 "Loved by users, essential for "', async ({ page }) => { await page.goto('/reviews/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Loved by users, essential for results' || t.startsWith('Loved by users, essential for results'))).toBeTruthy(); }); test('reviews: h2 "Proven, Trackable Traffic Gain"', async ({ page }) => { await page.goto('/reviews/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Proven, Trackable Traffic Gains' || t.startsWith('Proven, Trackable Traffic Gains'))).toBeTruthy(); }); test('reviews: h2 "An outlay that repays itself m"', async ({ page }) => { await page.goto('/reviews/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'An outlay that repays itself many times over' || t.startsWith('An outlay that repays itself many times over'))).toBeTruthy(); }); test('reviews: header link "Rankspire"', async ({ page }) => { await page.goto('/reviews/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('reviews: nav link "Search marketing"', async ({ page }) => { await page.goto('/reviews/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('reviews: nav link "Site ExplorerAnalyze your comp"', async ({ page }) => { await page.goto('/reviews/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyze your competitors’ websites.' || t.startsWith('Site ExplorerAnalyze your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('reviews: nav link "Keywords ExplorerFind out what"', async ({ page }) => { await page.goto('/reviews/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerFind out what your audience is searching fo' || t.startsWith('Keywords ExplorerFind out what your audience is searching fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - robot', () => { test('robot: page loads without error', async ({ page }) => { const response = await page.goto('/robot/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('robot: title matches GT', async ({ page }) => { await page.goto('/robot/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire bots'); }); test('robot: h1 "Rankspire Bots"', async ({ page }) => { await page.goto('/robot/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire Bots' || t.startsWith('Rankspire Bots'))).toBeTruthy(); }); test('robot: h2 "Our bots"', async ({ page }) => { await page.goto('/robot/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Our bots' || t.startsWith('Our bots'))).toBeTruthy(); }); test('robot: h2 "Verification and IP lists"', async ({ page }) => { await page.goto('/robot/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Verification and IP lists' || t.startsWith('Verification and IP lists'))).toBeTruthy(); }); test('robot: h2 "Benefits for site owners"', async ({ page }) => { await page.goto('/robot/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Benefits for site owners' || t.startsWith('Benefits for site owners'))).toBeTruthy(); }); test('robot: header link "Rankspire"', async ({ page }) => { await page.goto('/robot/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('robot: nav link "Search marketing"', async ({ page }) => { await page.goto('/robot/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('robot: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/robot/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' sites.' || t.startsWith('Site ExplorerResearch your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('robot: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/robot/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - search_marketing', () => { test('search_marketing: page loads without error', async ({ page }) => { const response = await page.goto('/search-marketing/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('search_marketing: title matches GT', async ({ page }) => { await page.goto('/search-marketing/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('search marketing'); }); test('search_marketing: h1 "Search marketing"', async ({ page }) => { await page.goto('/search-marketing/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing'))).toBeTruthy(); }); test('search_marketing: header link "Rankspire"', async ({ page }) => { await page.goto('/search-marketing/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('search_marketing: nav link "Search marketing"', async ({ page }) => { await page.goto('/search-marketing/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('search_marketing: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/search-marketing/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' sites.' || t.startsWith('Site ExplorerResearch your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('search_marketing: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/search-marketing/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - seo', () => { test('seo: page loads without error', async ({ page }) => { const response = await page.goto('/seo/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('seo: title matches GT', async ({ page }) => { await page.goto('/seo/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('seo'); }); test('seo: h1 "SEO Guide for Beginners"', async ({ page }) => { await page.goto('/seo/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'SEO Guide for Beginners' || t.startsWith('SEO Guide for Beginners'))).toBeTruthy(); }); test('seo: h2 "Ten chapters researched, writt"', async ({ page }) => { await page.goto('/seo/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ten chapters researched, written, and reviewed by seasoned search experts—everything you need to mas' || t.startsWith('Ten chapters researched, written, and reviewed by seasoned search experts—everything you need to mas'))).toBeTruthy(); }); test('seo: h2 "SEO Book for Beginners"', async ({ page }) => { await page.goto('/seo/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'SEO Book for Beginners' || t.startsWith('SEO Book for Beginners'))).toBeTruthy(); }); test('seo: h2 "Our SEO Glossary helps you cut"', async ({ page }) => { await page.goto('/seo/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Our SEO Glossary helps you cut through common industry jargon by introducing the key terms and conce' || t.startsWith('Our SEO Glossary helps you cut through common industry jargon by introducing the key terms and conce'))).toBeTruthy(); }); test('seo: header link "Rankspire"', async ({ page }) => { await page.goto('/seo/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('seo: nav link "Search marketing"', async ({ page }) => { await page.goto('/seo/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('seo: nav link "Site OverviewAnalyse your comp"', async ({ page }) => { await page.goto('/seo/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site OverviewAnalyse your competitors’ websites.' || t.startsWith('Site OverviewAnalyse your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('seo: nav link "Keyword ExplorerDiscover what "', async ({ page }) => { await page.goto('/seo/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword ExplorerDiscover what your customers are searching f' || t.startsWith('Keyword ExplorerDiscover what your customers are searching f')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - seo_audit_tool', () => { test('seo_audit_tool: page loads without error', async ({ page }) => { const response = await page.goto('/seo-audit-tool/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('seo_audit_tool: title matches GT', async ({ page }) => { await page.goto('/seo-audit-tool/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free seo audit tool'); }); test('seo_audit_tool: h1 "Free SEO Audit Tool"', async ({ page }) => { await page.goto('/seo-audit-tool/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Free SEO Audit Tool' || t.startsWith('Free SEO Audit Tool'))).toBeTruthy(); }); test('seo_audit_tool: h2 "Check how your website is perf"', async ({ page }) => { await page.goto('/seo-audit-tool/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Check how your website is performing' || t.startsWith('Check how your website is performing'))).toBeTruthy(); }); test('seo_audit_tool: h2 "Get a breakdown of every SEO i"', async ({ page }) => { await page.goto('/seo-audit-tool/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get a breakdown of every SEO issue' || t.startsWith('Get a breakdown of every SEO issue'))).toBeTruthy(); }); test('seo_audit_tool: h2 "Get guidance on fixing SEO iss"', async ({ page }) => { await page.goto('/seo-audit-tool/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get guidance on fixing SEO issues' || t.startsWith('Get guidance on fixing SEO issues'))).toBeTruthy(); }); test('seo_audit_tool: header link "Rankspire"', async ({ page }) => { await page.goto('/seo-audit-tool/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('seo_audit_tool: nav link "Search marketing"', async ({ page }) => { await page.goto('/seo-audit-tool/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('seo_audit_tool: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/seo-audit-tool/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors\' websites.' || t.startsWith('Site ExplorerDig into your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('seo_audit_tool: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/seo-audit-tool/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - seo_checker', () => { test('seo_checker: page loads without error', async ({ page }) => { const response = await page.goto('/seo-checker/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('seo_checker: title matches GT', async ({ page }) => { await page.goto('/seo-checker/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('seo checker'); }); test('seo_checker: h1 "SEO Checker"', async ({ page }) => { await page.goto('/seo-checker/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'SEO Checker' || t.startsWith('SEO Checker'))).toBeTruthy(); }); test('seo_checker: h2 "What is SEO Checker?"', async ({ page }) => { await page.goto('/seo-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What is SEO Checker?' || t.startsWith('What is SEO Checker?'))).toBeTruthy(); }); test('seo_checker: h2 "See exactly how your site is p"', async ({ page }) => { await page.goto('/seo-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See exactly how your site is performing' || t.startsWith('See exactly how your site is performing'))).toBeTruthy(); }); test('seo_checker: h2 "Scan for 140+ SEO issues"', async ({ page }) => { await page.goto('/seo-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Scan for 140+ SEO issues' || t.startsWith('Scan for 140+ SEO issues'))).toBeTruthy(); }); test('seo_checker: header link "Rankspire"', async ({ page }) => { await page.goto('/seo-checker/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('seo_checker: nav link "Search marketing"', async ({ page }) => { await page.goto('/seo-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('seo_checker: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/seo-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' sites.' || t.startsWith('Site ExplorerResearch your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('seo_checker: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/seo-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - seo_toolbar', () => { test('seo_toolbar: page loads without error', async ({ page }) => { const response = await page.goto('/seo-toolbar/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('seo_toolbar: title matches GT', async ({ page }) => { await page.goto('/seo-toolbar/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire free seo toolbar'); }); test('seo_toolbar: h1 "Rankspire SEO Toolbar"', async ({ page }) => { await page.goto('/seo-toolbar/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire SEO Toolbar' || t.startsWith('Rankspire SEO Toolbar'))).toBeTruthy(); }); test('seo_toolbar: h2 "Push your SEO research further"', async ({ page }) => { await page.goto('/seo-toolbar/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Push your SEO research further , still 100% free' || t.startsWith('Push your SEO research further , still 100% free'))).toBeTruthy(); }); test('seo_toolbar: h2 "Have a paid account? Unlock pr"', async ({ page }) => { await page.goto('/seo-toolbar/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Have a paid account? Unlock premium metrics in your browser' || t.startsWith('Have a paid account? Unlock premium metrics in your browser'))).toBeTruthy(); }); test('seo_toolbar: h2 "You’ll love the Rankspire SEO "', async ({ page }) => { await page.goto('/seo-toolbar/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'You’ll love the Rankspire SEO Toolbar' || t.startsWith('You’ll love the Rankspire SEO Toolbar'))).toBeTruthy(); }); test('seo_toolbar: header link "Rankspire"', async ({ page }) => { await page.goto('/seo-toolbar/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('seo_toolbar: nav link "Search marketing"', async ({ page }) => { await page.goto('/seo-toolbar/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('seo_toolbar: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/seo-toolbar/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' sites.' || t.startsWith('Site ExplorerResearch your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('seo_toolbar: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/seo-toolbar/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - serp_checker', () => { test('serp_checker: page loads without error', async ({ page }) => { const response = await page.goto('/serp-checker/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('serp_checker: title matches GT', async ({ page }) => { await page.goto('/serp-checker/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free serp checker'); }); test('serp_checker: h1 "SERP Checker"', async ({ page }) => { await page.goto('/serp-checker/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'SERP Checker' || t.startsWith('SERP Checker'))).toBeTruthy(); }); test('serp_checker: h2 "View global search results dir"', async ({ page }) => { await page.goto('/serp-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'View global search results directly from your browser' || t.startsWith('View global search results directly from your browser'))).toBeTruthy(); }); test('serp_checker: h2 "Local SERP breakdowns"', async ({ page }) => { await page.goto('/serp-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Local SERP breakdowns' || t.startsWith('Local SERP breakdowns'))).toBeTruthy(); }); test('serp_checker: h2 "Measure ranking difficulty"', async ({ page }) => { await page.goto('/serp-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Measure ranking difficulty' || t.startsWith('Measure ranking difficulty'))).toBeTruthy(); }); test('serp_checker: header link "Rankspire"', async ({ page }) => { await page.goto('/serp-checker/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('serp_checker: nav link "Search marketing"', async ({ page }) => { await page.goto('/serp-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('serp_checker: nav link "Domain InsightsSee exactly how"', async ({ page }) => { await page.goto('/serp-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Domain InsightsSee exactly how rival websites win.' || t.startsWith('Domain InsightsSee exactly how rival websites win.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('serp_checker: nav link "Keyword DiscoveryDiscover the "', async ({ page }) => { await page.goto('/serp-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword DiscoveryDiscover the terms your customers search fo' || t.startsWith('Keyword DiscoveryDiscover the terms your customers search fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - site_explorer', () => { test('site_explorer: page loads without error', async ({ page }) => { const response = await page.goto('/site-explorer/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('site_explorer: title matches GT', async ({ page }) => { await page.goto('/site-explorer/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire site explorer'); }); test('site_explorer: h1 "Site Explorer"', async ({ page }) => { await page.goto('/site-explorer/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site Explorer' || t.startsWith('Site Explorer'))).toBeTruthy(); }); test('site_explorer: h2 "Analyze websites across 3 majo"', async ({ page }) => { await page.goto('/site-explorer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Analyze websites across 3 major areas' || t.startsWith('Analyze websites across 3 major areas'))).toBeTruthy(); }); test('site_explorer: h2 "Sift through trillions of data"', async ({ page }) => { await page.goto('/site-explorer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Sift through trillions of data insights about websites in any industry.' || t.startsWith('Sift through trillions of data insights about websites in any industry.'))).toBeTruthy(); }); test('site_explorer: h2 "Reverse-engineer any website\'s"', async ({ page }) => { await page.goto('/site-explorer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Reverse-engineer any website\'s traffic, keywords, and site structure.' || t.startsWith('Reverse-engineer any website\'s traffic, keywords, and site structure.'))).toBeTruthy(); }); test('site_explorer: header link "Rankspire"', async ({ page }) => { await page.goto('/site-explorer/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('site_explorer: nav link "Search marketing"', async ({ page }) => { await page.goto('/site-explorer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('site_explorer: nav link "Domain ExplorerDig deep into y"', async ({ page }) => { await page.goto('/site-explorer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Domain ExplorerDig deep into your competitors’' || t.startsWith('Domain ExplorerDig deep into your competitors’')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('site_explorer: nav link "Keyword ExplorerDiscover exact"', async ({ page }) => { await page.goto('/site-explorer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword ExplorerDiscover exactly what your customers search ' || t.startsWith('Keyword ExplorerDiscover exactly what your customers search ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - team', () => { test('team: title matches GT', async ({ page }) => { await page.goto('/team/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('meet the team behind rankspire'); }); test('team: h3 "Ready to jump in?"', async ({ page }) => { await page.goto('/team/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ready to jump in?' || t.startsWith('Ready to jump in?'))).toBeTruthy(); }); test('team: h4 "Nathaniel Brooks"', async ({ page }) => { await page.goto('/team/'); const texts = (await page.locator('h4').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Nathaniel Brooks' || t.startsWith('Nathaniel Brooks'))).toBeTruthy(); }); test('team: h4 "Lucas Meyerhoff"', async ({ page }) => { await page.goto('/team/'); const texts = (await page.locator('h4').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Lucas Meyerhoff' || t.startsWith('Lucas Meyerhoff'))).toBeTruthy(); }); test('team: header link "Rankspire"', async ({ page }) => { await page.goto('/team/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('team: nav link "Search marketing"', async ({ page }) => { await page.goto('/team/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('team: nav link "Site ExplorerInspect your comp"', async ({ page }) => { await page.goto('/team/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerInspect your competitors\' websites.' || t.startsWith('Site ExplorerInspect your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('team: nav link "Keywords ExplorerSee exactly w"', async ({ page }) => { await page.goto('/team/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerSee exactly what your audience searches for' || t.startsWith('Keywords ExplorerSee exactly what your audience searches for')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - traffic_checker', () => { test('traffic_checker: page loads without error', async ({ page }) => { const response = await page.goto('/traffic-checker/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('traffic_checker: title matches GT', async ({ page }) => { await page.goto('/traffic-checker/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('website traffic checker'); }); test('traffic_checker: h1 "Website Traffic Checker"', async ({ page }) => { await page.goto('/traffic-checker/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Website Traffic Checker' || t.startsWith('Website Traffic Checker'))).toBeTruthy(); }); test('traffic_checker: h2 "See any website’s authority as"', async ({ page }) => { await page.goto('/traffic-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See any website’s authority as you browse.' || t.startsWith('See any website’s authority as you browse.'))).toBeTruthy(); }); test('traffic_checker: h2 "See exactly how much traffic y"', async ({ page }) => { await page.goto('/traffic-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See exactly how much traffic your competitors get' || t.startsWith('See exactly how much traffic your competitors get'))).toBeTruthy(); }); test('traffic_checker: h2 "Uncover your competitors’ best"', async ({ page }) => { await page.goto('/traffic-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Uncover your competitors’ best-performing content' || t.startsWith('Uncover your competitors’ best-performing content'))).toBeTruthy(); }); test('traffic_checker: header link "Rankspire"', async ({ page }) => { await page.goto('/traffic-checker/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('traffic_checker: nav link "Search marketing"', async ({ page }) => { await page.goto('/traffic-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('traffic_checker: nav link "Site ExplorerStudy your compet"', async ({ page }) => { await page.goto('/traffic-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerStudy your competitors’ websites.' || t.startsWith('Site ExplorerStudy your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('traffic_checker: nav link "Keywords ExplorerLearn what yo"', async ({ page }) => { await page.goto('/traffic-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerLearn what your customers are searching for' || t.startsWith('Keywords ExplorerLearn what your customers are searching for')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - use_cases', () => { test('use_cases: title matches GT', async ({ page }) => { await page.goto('/use-cases/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('ai marketing platform for every marketer'); }); test('use_cases: h1 "AI marketing platform built fo"', async ({ page }) => { await page.goto('/use-cases/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'AI marketing platform built for every marketer' || t.startsWith('AI marketing platform built for every marketer'))).toBeTruthy(); }); test('use_cases: h2 "Every marketer wins with Ranks"', async ({ page }) => { await page.goto('/use-cases/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Every marketer wins with Rankspire' || t.startsWith('Every marketer wins with Rankspire'))).toBeTruthy(); }); test('use_cases: h3 "Content Marketer"', async ({ page }) => { await page.goto('/use-cases/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Content Marketer' || t.startsWith('Content Marketer'))).toBeTruthy(); }); test('use_cases: h3 "PPC Specialist"', async ({ page }) => { await page.goto('/use-cases/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'PPC Specialist' || t.startsWith('PPC Specialist'))).toBeTruthy(); }); test('use_cases: header link "Rankspire"', async ({ page }) => { await page.goto('/use-cases/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('use_cases: nav link "Search marketing"', async ({ page }) => { await page.goto('/use-cases/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('use_cases: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/use-cases/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' websites.' || t.startsWith('Site ExplorerResearch your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('use_cases: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/use-cases/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - use_cases_aeo', () => { test('use_cases_aeo: title matches GT', async ({ page }) => { await page.goto('/use-cases/aeo/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('ai marketing platform for aeo specialist'); }); test('use_cases_aeo: h1 "Rankspire for AEO"', async ({ page }) => { await page.goto('/use-cases/aeo/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire for AEO' || t.startsWith('Rankspire for AEO'))).toBeTruthy(); }); test('use_cases_aeo: h2 "Tap into 395 million search-ba"', async ({ page }) => { await page.goto('/use-cases/aeo/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Tap into 395 million search-backed prompts drawn from real keywords that real users actually search.' || t.startsWith('Tap into 395 million search-backed prompts drawn from real keywords that real users actually search.'))).toBeTruthy(); }); test('use_cases_aeo: h2 "Find where your brand appears "', async ({ page }) => { await page.goto('/use-cases/aeo/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find where your brand appears in AI answers' || t.startsWith('Find where your brand appears in AI answers'))).toBeTruthy(); }); test('use_cases_aeo: h2 "Create articles that AI assist"', async ({ page }) => { await page.goto('/use-cases/aeo/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Create articles that AI assistants actually cite' || t.startsWith('Create articles that AI assistants actually cite'))).toBeTruthy(); }); test('use_cases_aeo: header link "Rankspire"', async ({ page }) => { await page.goto('/use-cases/aeo/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('use_cases_aeo: nav link "Search marketing"', async ({ page }) => { await page.goto('/use-cases/aeo/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('use_cases_aeo: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/use-cases/aeo/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors\' websites.' || t.startsWith('Site ExplorerDig into your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('use_cases_aeo: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/use-cases/aeo/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your audience is searching fo' || t.startsWith('Keywords ExplorerDiscover what your audience is searching fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - use_cases_investing', () => { test('use_cases_investing: title matches GT', async ({ page }) => { await page.goto('/use-cases/investing/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('ai marketing platform for investors'); }); test('use_cases_investing: h1 "Rankspire for Investors"', async ({ page }) => { await page.goto('/use-cases/investing/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire for Investors' || t.startsWith('Rankspire for Investors'))).toBeTruthy(); }); test('use_cases_investing: h2 "Focus on what truly matters in"', async ({ page }) => { await page.goto('/use-cases/investing/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Focus on what truly matters in investing, minus the guesswork' || t.startsWith('Focus on what truly matters in investing, minus the guesswork'))).toBeTruthy(); }); test('use_cases_investing: h2 "Make confident investment deci"', async ({ page }) => { await page.goto('/use-cases/investing/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Make confident investment decisions. Lean on hard evidence, never on assumptions.' || t.startsWith('Make confident investment decisions. Lean on hard evidence, never on assumptions.'))).toBeTruthy(); }); test('use_cases_investing: h2 "Grasp the whole competitive la"', async ({ page }) => { await page.goto('/use-cases/investing/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Grasp the whole competitive landscape before you step into it.' || t.startsWith('Grasp the whole competitive landscape before you step into it.'))).toBeTruthy(); }); test('use_cases_investing: header link "Rankspire"', async ({ page }) => { await page.goto('/use-cases/investing/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('use_cases_investing: nav link "Search marketing"', async ({ page }) => { await page.goto('/use-cases/investing/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('use_cases_investing: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/use-cases/investing/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' websites.' || t.startsWith('Site ExplorerResearch your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('use_cases_investing: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/use-cases/investing/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - use_cases_ppc', () => { test('use_cases_ppc: title matches GT', async ({ page }) => { await page.goto('/use-cases/ppc/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('ai marketing platform for ppc specialist'); }); test('use_cases_ppc: h1 "Rankspire for PPC"', async ({ page }) => { await page.goto('/use-cases/ppc/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire for PPC' || t.startsWith('Rankspire for PPC'))).toBeTruthy(); }); test('use_cases_ppc: h2 "Win with sharper paid search i"', async ({ page }) => { await page.goto('/use-cases/ppc/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Win with sharper paid search intelligence' || t.startsWith('Win with sharper paid search intelligence'))).toBeTruthy(); }); test('use_cases_ppc: h2 "Decode the paid search landsca"', async ({ page }) => { await page.goto('/use-cases/ppc/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Decode the paid search landscape in your industry. Find the gaps and outbid your rivals wherever it' || t.startsWith('Decode the paid search landscape in your industry. Find the gaps and outbid your rivals wherever it'))).toBeTruthy(); }); test('use_cases_ppc: h2 "Expose your rivals\' PPC playbo"', async ({ page }) => { await page.goto('/use-cases/ppc/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Expose your rivals\' PPC playbook. Redirect ad dollars toward the pages and keywords they already win' || t.startsWith('Expose your rivals\' PPC playbook. Redirect ad dollars toward the pages and keywords they already win'))).toBeTruthy(); }); test('use_cases_ppc: header link "Rankspire"', async ({ page }) => { await page.goto('/use-cases/ppc/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('use_cases_ppc: nav link "Search marketing"', async ({ page }) => { await page.goto('/use-cases/ppc/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('use_cases_ppc: nav link "Domain InsightsSee exactly how"', async ({ page }) => { await page.goto('/use-cases/ppc/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Domain InsightsSee exactly how rival websites win.' || t.startsWith('Domain InsightsSee exactly how rival websites win.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('use_cases_ppc: nav link "Keyword DiscoveryDiscover the "', async ({ page }) => { await page.goto('/use-cases/ppc/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword DiscoveryDiscover the terms your customers search fo' || t.startsWith('Keyword DiscoveryDiscover the terms your customers search fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - use_cases_seo', () => { test('use_cases_seo: title matches GT', async ({ page }) => { await page.goto('/use-cases/seo/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('ai marketing platform for seos'); }); test('use_cases_seo: h1 "Rankspire for SEO"', async ({ page }) => { await page.goto('/use-cases/seo/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire for SEO' || t.startsWith('Rankspire for SEO'))).toBeTruthy(); }); test('use_cases_seo: h2 "Spend more time on SEO that ma"', async ({ page }) => { await page.goto('/use-cases/seo/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Spend more time on SEO that matters, without the guesswork' || t.startsWith('Spend more time on SEO that matters, without the guesswork'))).toBeTruthy(); }); test('use_cases_seo: h2 "Build links like a pro. Win va"', async ({ page }) => { await page.goto('/use-cases/seo/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Build links like a pro. Win valuable backlinks and raise your domain authority.' || t.startsWith('Build links like a pro. Win valuable backlinks and raise your domain authority.'))).toBeTruthy(); }); test('use_cases_seo: h2 "Get competitive-intelligence i"', async ({ page }) => { await page.goto('/use-cases/seo/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get competitive-intelligence insights into any website\'s traffic, keywords, and site structure.' || t.startsWith('Get competitive-intelligence insights into any website\'s traffic, keywords, and site structure.'))).toBeTruthy(); }); test('use_cases_seo: header link "Rankspire"', async ({ page }) => { await page.goto('/use-cases/seo/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('use_cases_seo: nav link "Search marketing"', async ({ page }) => { await page.goto('/use-cases/seo/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('use_cases_seo: nav link "Site ExplorerAnalyze any compe"', async ({ page }) => { await page.goto('/use-cases/seo/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyze any competitor\'s website.' || t.startsWith('Site ExplorerAnalyze any competitor\'s website.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('use_cases_seo: nav link "Keywords ExplorerSee exactly w"', async ({ page }) => { await page.goto('/use-cases/seo/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerSee exactly what your audience searches for' || t.startsWith('Keywords ExplorerSee exactly what your audience searches for')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - vs', () => { test('vs: title matches GT', async ({ page }) => { await page.goto('/vs/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('compare rankspire vs. serply'); }); test('vs: h1 "Rankspire vs Serply"', async ({ page }) => { await page.goto('/vs/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire vs Serply' || t.startsWith('Rankspire vs Serply'))).toBeTruthy(); }); test('vs: h2 "Richer data than anyone else i"', async ({ page }) => { await page.goto('/vs/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Richer data than anyone else in the industry' || t.startsWith('Richer data than anyone else in the industry'))).toBeTruthy(); }); test('vs: h2 "Compare Rankspire vs Serply"', async ({ page }) => { await page.goto('/vs/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Compare Rankspire vs Serply' || t.startsWith('Compare Rankspire vs Serply'))).toBeTruthy(); }); test('vs: h2 "Serply got acquired by Adverra"', async ({ page }) => { await page.goto('/vs/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Serply got acquired by Adverra' || t.startsWith('Serply got acquired by Adverra'))).toBeTruthy(); }); test('vs: header link "Rankspire"', async ({ page }) => { await page.goto('/vs/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('vs: nav link "Search marketing"', async ({ page }) => { await page.goto('/vs/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('vs: nav link "Site ExplorerAnalyse your comp"', async ({ page }) => { await page.goto('/vs/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyse your competitors\' websites.' || t.startsWith('Site ExplorerAnalyse your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('vs: nav link "Keywords ExplorerSee exactly w"', async ({ page }) => { await page.goto('/vs/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerSee exactly what your customers are searchi' || t.startsWith('Keywords ExplorerSee exactly what your customers are searchi')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - vs_semrush', () => { test('vs_semrush: title matches GT', async ({ page }) => { await page.goto('/vs/semrush/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('compare rankspire vs. serply'); }); test('vs_semrush: h1 "Rankspire vs Serply"', async ({ page }) => { await page.goto('/vs/semrush/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire vs Serply' || t.startsWith('Rankspire vs Serply'))).toBeTruthy(); }); test('vs_semrush: h2 "Richer data than anyone else i"', async ({ page }) => { await page.goto('/vs/semrush/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Richer data than anyone else in the industry' || t.startsWith('Richer data than anyone else in the industry'))).toBeTruthy(); }); test('vs_semrush: h2 "Compare Rankspire vs Serply"', async ({ page }) => { await page.goto('/vs/semrush/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Compare Rankspire vs Serply' || t.startsWith('Compare Rankspire vs Serply'))).toBeTruthy(); }); test('vs_semrush: h2 "Serply got acquired by Adverra"', async ({ page }) => { await page.goto('/vs/semrush/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Serply got acquired by Adverra' || t.startsWith('Serply got acquired by Adverra'))).toBeTruthy(); }); test('vs_semrush: header link "Rankspire"', async ({ page }) => { await page.goto('/vs/semrush/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('vs_semrush: nav link "Search marketing"', async ({ page }) => { await page.goto('/vs/semrush/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('vs_semrush: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/vs/semrush/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors’ websites.' || t.startsWith('Site ExplorerResearch your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('vs_semrush: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/vs/semrush/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - web_analytics', () => { test('web_analytics: page loads without error', async ({ page }) => { const response = await page.goto('/web-analytics/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('web_analytics: title matches GT', async ({ page }) => { await page.goto('/web-analytics/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire web analytics'); }); test('web_analytics: h1 "Rankspire Web Analytics"', async ({ page }) => { await page.goto('/web-analytics/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire Web Analytics' || t.startsWith('Rankspire Web Analytics'))).toBeTruthy(); }); test('web_analytics: h2 "What makes Rankspire Web Analy"', async ({ page }) => { await page.goto('/web-analytics/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What makes Rankspire Web Analytics different' || t.startsWith('What makes Rankspire Web Analytics different'))).toBeTruthy(); }); test('web_analytics: h2 "See everything happening on yo"', async ({ page }) => { await page.goto('/web-analytics/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See everything happening on your website' || t.startsWith('See everything happening on your website'))).toBeTruthy(); }); test('web_analytics: h2 "Set up Rankspire Web Analytics"', async ({ page }) => { await page.goto('/web-analytics/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Set up Rankspire Web Analytics in seconds —no technical skills needed' || t.startsWith('Set up Rankspire Web Analytics in seconds —no technical skills needed'))).toBeTruthy(); }); test('web_analytics: header link "Rankspire"', async ({ page }) => { await page.goto('/web-analytics/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('web_analytics: nav link "Search marketing"', async ({ page }) => { await page.goto('/web-analytics/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('web_analytics: nav link "Rank ExplorerResearch your com"', async ({ page }) => { await page.goto('/web-analytics/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rank ExplorerResearch your competitors\' websites.' || t.startsWith('Rank ExplorerResearch your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('web_analytics: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/web-analytics/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your audience is searching fo' || t.startsWith('Keywords ExplorerDiscover what your audience is searching fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - webinars', () => { test('webinars: title matches GT', async ({ page }) => { await page.goto('/webinars/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('seo & digital marketing webinars, by ran'); }); test('webinars: h1 "Webinars"', async ({ page }) => { await page.goto('/webinars/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Webinars' || t.startsWith('Webinars'))).toBeTruthy(); }); test('webinars: h2 "May"', async ({ page }) => { await page.goto('/webinars/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'May' || t.startsWith('May'))).toBeTruthy(); }); test('webinars: h2 "April"', async ({ page }) => { await page.goto('/webinars/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'April' || t.startsWith('April'))).toBeTruthy(); }); test('webinars: h2 "March"', async ({ page }) => { await page.goto('/webinars/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'March' || t.startsWith('March'))).toBeTruthy(); }); test('webinars: header link "Rankspire"', async ({ page }) => { await page.goto('/webinars/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('webinars: nav link "Search marketing"', async ({ page }) => { await page.goto('/webinars/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('webinars: nav link "Site ExplorerAnalyze the sites"', async ({ page }) => { await page.goto('/webinars/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyze the sites your rivals run.' || t.startsWith('Site ExplorerAnalyze the sites your rivals run.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('webinars: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/webinars/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers search for.' || t.startsWith('Keywords ExplorerDiscover what your customers search for.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - website_authority_checker', () => { test('website_authority_checker: page loads without error', async ({ page }) => { const response = await page.goto('/website-authority-checker/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('website_authority_checker: title matches GT', async ({ page }) => { await page.goto('/website-authority-checker/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('website authority checker'); }); test('website_authority_checker: h1 "Website “Authority” Checker"', async ({ page }) => { await page.goto('/website-authority-checker/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Website “Authority” Checker' || t.startsWith('Website “Authority” Checker'))).toBeTruthy(); }); test('website_authority_checker: h2 "Check any website’s authority "', async ({ page }) => { await page.goto('/website-authority-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Check any website’s authority while you browse' || t.startsWith('Check any website’s authority while you browse'))).toBeTruthy(); }); test('website_authority_checker: h2 "What is “website authority”?"', async ({ page }) => { await page.goto('/website-authority-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What is “website authority”?' || t.startsWith('What is “website authority”?'))).toBeTruthy(); }); test('website_authority_checker: h2 "How we calculate our Domain Ra"', async ({ page }) => { await page.goto('/website-authority-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How we calculate our Domain Rating (DR) score' || t.startsWith('How we calculate our Domain Rating (DR) score'))).toBeTruthy(); }); test('website_authority_checker: header link "Rankspire"', async ({ page }) => { await page.goto('/website-authority-checker/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('website_authority_checker: nav link "Search marketing"', async ({ page }) => { await page.goto('/website-authority-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('website_authority_checker: nav link "Domain ExplorerDig deep into y"', async ({ page }) => { await page.goto('/website-authority-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Domain ExplorerDig deep into your competitors’' || t.startsWith('Domain ExplorerDig deep into your competitors’')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('website_authority_checker: nav link "Keyword ExplorerDiscover exact"', async ({ page }) => { await page.goto('/website-authority-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword ExplorerDiscover exactly what your customers search ' || t.startsWith('Keyword ExplorerDiscover exactly what your customers search ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - website_checker', () => { test('website_checker: page loads without error', async ({ page }) => { const response = await page.goto('/website-checker/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('website_checker: title matches GT', async ({ page }) => { await page.goto('/website-checker/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free website checker'); }); test('website_checker: h1 "Website Checker"', async ({ page }) => { await page.goto('/website-checker/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Website Checker' || t.startsWith('Website Checker'))).toBeTruthy(); }); test('website_checker: h2 "What is Website Checker?"', async ({ page }) => { await page.goto('/website-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What is Website Checker?' || t.startsWith('What is Website Checker?'))).toBeTruthy(); }); test('website_checker: h2 "What do you check for?"', async ({ page }) => { await page.goto('/website-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What do you check for?' || t.startsWith('What do you check for?'))).toBeTruthy(); }); test('website_checker: h2 "What should I do once the chec"', async ({ page }) => { await page.goto('/website-checker/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What should I do once the check is done?' || t.startsWith('What should I do once the check is done?'))).toBeTruthy(); }); test('website_checker: header link "Rankspire"', async ({ page }) => { await page.goto('/website-checker/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('website_checker: nav link "Search marketing"', async ({ page }) => { await page.goto('/website-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('website_checker: nav link "Site ExplorerSee exactly how r"', async ({ page }) => { await page.goto('/website-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerSee exactly how rival websites win.' || t.startsWith('Site ExplorerSee exactly how rival websites win.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('website_checker: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/website-checker/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - website_performance', () => { test('website_performance: page loads without error', async ({ page }) => { const response = await page.goto('/website-performance/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('website_performance: title matches GT', async ({ page }) => { await page.goto('/website-performance/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('website performance'); }); test('website_performance: h1 "Website performance"', async ({ page }) => { await page.goto('/website-performance/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Website performance' || t.startsWith('Website performance'))).toBeTruthy(); }); test('website_performance: header link "Rankspire"', async ({ page }) => { await page.goto('/website-performance/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('website_performance: nav link "Search marketing"', async ({ page }) => { await page.goto('/website-performance/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('website_performance: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/website-performance/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors\' websites.' || t.startsWith('Site ExplorerDig into your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('website_performance: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/website-performance/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your audience is searching fo' || t.startsWith('Keywords ExplorerDiscover what your audience is searching fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - writing_tools', () => { test('writing_tools: page loads without error', async ({ page }) => { const response = await page.goto('/writing-tools/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('writing_tools: title matches GT', async ({ page }) => { await page.goto('/writing-tools/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free ai writing toolkit'); }); test('writing_tools: h1 "Free AI Writing Toolkit"', async ({ page }) => { await page.goto('/writing-tools/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Free AI Writing Toolkit' || t.startsWith('Free AI Writing Toolkit'))).toBeTruthy(); }); test('writing_tools: h2 "Writing"', async ({ page }) => { await page.goto('/writing-tools/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Writing' || t.startsWith('Writing'))).toBeTruthy(); }); test('writing_tools: h2 "SEO & Content Marketing"', async ({ page }) => { await page.goto('/writing-tools/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'SEO & Content Marketing' || t.startsWith('SEO & Content Marketing'))).toBeTruthy(); }); test('writing_tools: h2 "Social Media"', async ({ page }) => { await page.goto('/writing-tools/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Social Media' || t.startsWith('Social Media'))).toBeTruthy(); }); test('writing_tools: header link "Rankspire"', async ({ page }) => { await page.goto('/writing-tools/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('writing_tools: nav link "Search marketing"', async ({ page }) => { await page.goto('/writing-tools/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('writing_tools: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/writing-tools/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors\' websites.' || t.startsWith('Site ExplorerDig into your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('writing_tools: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/writing-tools/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your audience is searching fo' || t.startsWith('Keywords ExplorerDiscover what your audience is searching fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_blogging_for_business', () => { test('academy_blogging_for_business: page loads without error', async ({ page }) => { const response = await page.goto('/academy/blogging-for-business/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_blogging_for_business: title matches GT', async ({ page }) => { await page.goto('/academy/blogging-for-business/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('blogging to grow sales'); }); test('academy_blogging_for_business: h1 "Blogging to Grow Sales"', async ({ page }) => { await page.goto('/academy/blogging-for-business/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Blogging to Grow Sales' || t.startsWith('Blogging to Grow Sales'))).toBeTruthy(); }); test('academy_blogging_for_business: h2 "What you’ll learn"', async ({ page }) => { await page.goto('/academy/blogging-for-business/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What you’ll learn' || t.startsWith('What you’ll learn'))).toBeTruthy(); }); test('academy_blogging_for_business: h2 "Course breakdown"', async ({ page }) => { await page.goto('/academy/blogging-for-business/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Course breakdown' || t.startsWith('Course breakdown'))).toBeTruthy(); }); test('academy_blogging_for_business: h2 "Leo Marsh"', async ({ page }) => { await page.goto('/academy/blogging-for-business/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Leo Marsh' || t.startsWith('Leo Marsh'))).toBeTruthy(); }); test('academy_blogging_for_business: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/blogging-for-business/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_blogging_for_business: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/blogging-for-business/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_blogging_for_business: nav link "Site ExplorerStudy your compet"', async ({ page }) => { await page.goto('/academy/blogging-for-business/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerStudy your competitors’ websites.' || t.startsWith('Site ExplorerStudy your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_blogging_for_business: nav link "Keywords ExplorerLearn what yo"', async ({ page }) => { await page.goto('/academy/blogging-for-business/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerLearn what your customers are searching for' || t.startsWith('Keywords ExplorerLearn what your customers are searching for')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire', () => { test('academy_how_to_use_rankspire: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('how to use rankspire'); }); test('academy_how_to_use_rankspire: h1 "How to Use Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to Use Rankspire' || t.startsWith('How to Use Rankspire'))).toBeTruthy(); }); test('academy_how_to_use_rankspire: h2 "Get Rankspire certified"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get Rankspire certified' || t.startsWith('Get Rankspire certified'))).toBeTruthy(); }); test('academy_how_to_use_rankspire: h2 "What you’ll learn"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What you’ll learn' || t.startsWith('What you’ll learn'))).toBeTruthy(); }); test('academy_how_to_use_rankspire: h2 "Course breakdown"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Course breakdown' || t.startsWith('Course breakdown'))).toBeTruthy(); }); test('academy_how_to_use_rankspire: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire: nav link "Site ExplorerAnalyse your comp"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyse your competitors’ websites.' || t.startsWith('Site ExplorerAnalyse your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_brand_radar', () => { test('academy_how_to_use_brand_radar: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-brand-radar/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_brand_radar: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-brand-radar/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('how to use brand radar'); }); test('academy_how_to_use_brand_radar: h1 "How to Use Brand Radar"', async ({ page }) => { await page.goto('/academy/how-to-use-brand-radar/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to Use Brand Radar' || t.startsWith('How to Use Brand Radar'))).toBeTruthy(); }); test('academy_how_to_use_brand_radar: h2 "What you’ll learn"', async ({ page }) => { await page.goto('/academy/how-to-use-brand-radar/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What you’ll learn' || t.startsWith('What you’ll learn'))).toBeTruthy(); }); test('academy_how_to_use_brand_radar: h2 "Course breakdown"', async ({ page }) => { await page.goto('/academy/how-to-use-brand-radar/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Course breakdown' || t.startsWith('Course breakdown'))).toBeTruthy(); }); test('academy_how_to_use_brand_radar: h2 "Marco Devlin"', async ({ page }) => { await page.goto('/academy/how-to-use-brand-radar/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Marco Devlin' || t.startsWith('Marco Devlin'))).toBeTruthy(); }); test('academy_how_to_use_brand_radar: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-brand-radar/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_brand_radar: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-brand-radar/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_brand_radar: nav link "Link ExplorerAnalyze what your"', async ({ page }) => { await page.goto('/academy/how-to-use-brand-radar/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Link ExplorerAnalyze what your rivals rank for.' || t.startsWith('Link ExplorerAnalyze what your rivals rank for.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_brand_radar: nav link "Keyword ExplorerDiscover the t"', async ({ page }) => { await page.goto('/academy/how-to-use-brand-radar/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword ExplorerDiscover the terms your audience searches fo' || t.startsWith('Keyword ExplorerDiscover the terms your audience searches fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - agent_a_agencies', () => { test('agent_a_agencies: page loads without error', async ({ page }) => { const response = await page.goto('/agent-a/agencies/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('agent_a_agencies: title matches GT', async ({ page }) => { await page.goto('/agent-a/agencies/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('agent r for agencies'); }); test('agent_a_agencies: h1 "The AI growth agent for agenci"', async ({ page }) => { await page.goto('/agent-a/agencies/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'The AI growth agent for agencies' || t.startsWith('The AI growth agent for agencies'))).toBeTruthy(); }); test('agent_a_agencies: h2 "Run client audits and competit"', async ({ page }) => { await page.goto('/agent-a/agencies/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Run client audits and competitor research' || t.startsWith('Run client audits and competitor research'))).toBeTruthy(); }); test('agent_a_agencies: h2 "Build paid campaigns from live"', async ({ page }) => { await page.goto('/agent-a/agencies/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Build paid campaigns from live ad data' || t.startsWith('Build paid campaigns from live ad data'))).toBeTruthy(); }); test('agent_a_agencies: h2 "Ship landing pages quickly"', async ({ page }) => { await page.goto('/agent-a/agencies/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ship landing pages quickly' || t.startsWith('Ship landing pages quickly'))).toBeTruthy(); }); test('agent_a_agencies: footer link "SaaS"', async ({ page }) => { await page.goto('/agent-a/agencies/'); 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 === 'SaaS' || t.startsWith('SaaS')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('saas')), 'href fragment present').toBeTruthy(); }); test('agent_a_agencies: footer link "Ecommerce"', async ({ page }) => { await page.goto('/agent-a/agencies/'); 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 === 'Ecommerce' || t.startsWith('Ecommerce')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('ecommerce')), 'href fragment present').toBeTruthy(); }); test('agent_a_agencies: footer link "Enterprise"', async ({ page }) => { await page.goto('/agent-a/agencies/'); 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 === 'Enterprise' || t.startsWith('Enterprise')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('enterprise')), 'href fragment present').toBeTruthy(); }); test('agent_a_agencies: footer link "Freelancers"', async ({ page }) => { await page.goto('/agent-a/agencies/'); 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 === 'Freelancers' || t.startsWith('Freelancers')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('freelance')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - agent_a_ecommerce', () => { test('agent_a_ecommerce: page loads without error', async ({ page }) => { const response = await page.goto('/agent-a/ecommerce/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('agent_a_ecommerce: title matches GT', async ({ page }) => { await page.goto('/agent-a/ecommerce/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('agent r for ecommerce'); }); test('agent_a_ecommerce: h1 "AI marketing agent for online "', async ({ page }) => { await page.goto('/agent-a/ecommerce/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'AI marketing agent for online stores' || t.startsWith('AI marketing agent for online stores'))).toBeTruthy(); }); test('agent_a_ecommerce: h2 "Refresh product copy at catalo"', async ({ page }) => { await page.goto('/agent-a/ecommerce/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Refresh product copy at catalog scale' || t.startsWith('Refresh product copy at catalog scale'))).toBeTruthy(); }); test('agent_a_ecommerce: h2 "Track every product ranking ev"', async ({ page }) => { await page.goto('/agent-a/ecommerce/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Track every product ranking every day' || t.startsWith('Track every product ranking every day'))).toBeTruthy(); }); test('agent_a_ecommerce: h2 "Catch traffic declines before "', async ({ page }) => { await page.goto('/agent-a/ecommerce/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Catch traffic declines before revenue drops' || t.startsWith('Catch traffic declines before revenue drops'))).toBeTruthy(); }); test('agent_a_ecommerce: footer link "Agencies"', async ({ page }) => { await page.goto('/agent-a/ecommerce/'); 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 === 'Agencies' || t.startsWith('Agencies')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('agencies')), 'href fragment present').toBeTruthy(); }); test('agent_a_ecommerce: footer link "SaaS"', async ({ page }) => { await page.goto('/agent-a/ecommerce/'); 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 === 'SaaS' || t.startsWith('SaaS')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('saas')), 'href fragment present').toBeTruthy(); }); test('agent_a_ecommerce: footer link "Enterprise"', async ({ page }) => { await page.goto('/agent-a/ecommerce/'); 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 === 'Enterprise' || t.startsWith('Enterprise')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('enterprise')), 'href fragment present').toBeTruthy(); }); test('agent_a_ecommerce: footer link "Freelancers"', async ({ page }) => { await page.goto('/agent-a/ecommerce/'); 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 === 'Freelancers' || t.startsWith('Freelancers')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('freelance')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - agent_a_enterprise', () => { test('agent_a_enterprise: page loads without error', async ({ page }) => { const response = await page.goto('/agent-a/enterprise/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('agent_a_enterprise: title matches GT', async ({ page }) => { await page.goto('/agent-a/enterprise/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('agent r for enterprises'); }); test('agent_a_enterprise: h1 "Enterprise-scale AI marketing "', async ({ page }) => { await page.goto('/agent-a/enterprise/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Enterprise-scale AI marketing agent' || t.startsWith('Enterprise-scale AI marketing agent'))).toBeTruthy(); }); test('agent_a_enterprise: h2 "Scale copy across every brand "', async ({ page }) => { await page.goto('/agent-a/enterprise/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Scale copy across every brand and market' || t.startsWith('Scale copy across every brand and market'))).toBeTruthy(); }); test('agent_a_enterprise: h2 "Unite SEO, content, brand, and"', async ({ page }) => { await page.goto('/agent-a/enterprise/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Unite SEO, content, brand, and marketing teams' || t.startsWith('Unite SEO, content, brand, and marketing teams'))).toBeTruthy(); }); test('agent_a_enterprise: h2 "Write copy that clears brand a"', async ({ page }) => { await page.goto('/agent-a/enterprise/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Write copy that clears brand and legal' || t.startsWith('Write copy that clears brand and legal'))).toBeTruthy(); }); test('agent_a_enterprise: footer link "Agencies"', async ({ page }) => { await page.goto('/agent-a/enterprise/'); 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 === 'Agencies' || t.startsWith('Agencies')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('agencies')), 'href fragment present').toBeTruthy(); }); test('agent_a_enterprise: footer link "SaaS"', async ({ page }) => { await page.goto('/agent-a/enterprise/'); 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 === 'SaaS' || t.startsWith('SaaS')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('saas')), 'href fragment present').toBeTruthy(); }); test('agent_a_enterprise: footer link "Ecommerce"', async ({ page }) => { await page.goto('/agent-a/enterprise/'); 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 === 'Ecommerce' || t.startsWith('Ecommerce')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('ecommerce')), 'href fragment present').toBeTruthy(); }); test('agent_a_enterprise: footer link "Freelancers"', async ({ page }) => { await page.goto('/agent-a/enterprise/'); 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 === 'Freelancers' || t.startsWith('Freelancers')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('freelance')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - agent_a_freelance', () => { test('agent_a_freelance: page loads without error', async ({ page }) => { const response = await page.goto('/agent-a/freelance/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('agent_a_freelance: title matches GT', async ({ page }) => { await page.goto('/agent-a/freelance/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('agent r for freelancers'); }); test('agent_a_freelance: h1 "AI marketing agent for freelan"', async ({ page }) => { await page.goto('/agent-a/freelance/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'AI marketing agent for freelancers' || t.startsWith('AI marketing agent for freelancers'))).toBeTruthy(); }); test('agent_a_freelance: h2 "Draft client deliverables on r"', async ({ page }) => { await page.goto('/agent-a/freelance/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Draft client deliverables on real data' || t.startsWith('Draft client deliverables on real data'))).toBeTruthy(); }); test('agent_a_freelance: h2 "Validate niches before you com"', async ({ page }) => { await page.goto('/agent-a/freelance/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Validate niches before you commit' || t.startsWith('Validate niches before you commit'))).toBeTruthy(); }); test('agent_a_freelance: h2 "Keep your brand and outreach c"', async ({ page }) => { await page.goto('/agent-a/freelance/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keep your brand and outreach consistent' || t.startsWith('Keep your brand and outreach consistent'))).toBeTruthy(); }); test('agent_a_freelance: footer link "Agencies"', async ({ page }) => { await page.goto('/agent-a/freelance/'); 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 === 'Agencies' || t.startsWith('Agencies')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('agencies')), 'href fragment present').toBeTruthy(); }); test('agent_a_freelance: footer link "SaaS"', async ({ page }) => { await page.goto('/agent-a/freelance/'); 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 === 'SaaS' || t.startsWith('SaaS')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('saas')), 'href fragment present').toBeTruthy(); }); test('agent_a_freelance: footer link "Ecommerce"', async ({ page }) => { await page.goto('/agent-a/freelance/'); 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 === 'Ecommerce' || t.startsWith('Ecommerce')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('ecommerce')), 'href fragment present').toBeTruthy(); }); test('agent_a_freelance: footer link "Enterprise"', async ({ page }) => { await page.goto('/agent-a/freelance/'); 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 === 'Enterprise' || t.startsWith('Enterprise')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('enterprise')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - agent_a_saas', () => { test('agent_a_saas: page loads without error', async ({ page }) => { const response = await page.goto('/agent-a/saas/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('agent_a_saas: title matches GT', async ({ page }) => { await page.goto('/agent-a/saas/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('agent r for saas'); }); test('agent_a_saas: h1 "AI growth agent for SaaS teams"', async ({ page }) => { await page.goto('/agent-a/saas/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'AI growth agent for SaaS teams' || t.startsWith('AI growth agent for SaaS teams'))).toBeTruthy(); }); test('agent_a_saas: h2 "Publish programmatic pages at "', async ({ page }) => { await page.goto('/agent-a/saas/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Publish programmatic pages at scale' || t.startsWith('Publish programmatic pages at scale'))).toBeTruthy(); }); test('agent_a_saas: h2 "Keep battlecards current autom"', async ({ page }) => { await page.goto('/agent-a/saas/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keep battlecards current automatically' || t.startsWith('Keep battlecards current automatically'))).toBeTruthy(); }); test('agent_a_saas: h2 "Convert call transcripts into "', async ({ page }) => { await page.goto('/agent-a/saas/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Convert call transcripts into positioning' || t.startsWith('Convert call transcripts into positioning'))).toBeTruthy(); }); test('agent_a_saas: footer link "Agencies"', async ({ page }) => { await page.goto('/agent-a/saas/'); 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 === 'Agencies' || t.startsWith('Agencies')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('agencies')), 'href fragment present').toBeTruthy(); }); test('agent_a_saas: footer link "Ecommerce"', async ({ page }) => { await page.goto('/agent-a/saas/'); 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 === 'Ecommerce' || t.startsWith('Ecommerce')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('ecommerce')), 'href fragment present').toBeTruthy(); }); test('agent_a_saas: footer link "Enterprise"', async ({ page }) => { await page.goto('/agent-a/saas/'); 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 === 'Enterprise' || t.startsWith('Enterprise')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('enterprise')), 'href fragment present').toBeTruthy(); }); test('agent_a_saas: footer link "Freelancers"', async ({ page }) => { await page.goto('/agent-a/saas/'); 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 === 'Freelancers' || t.startsWith('Freelancers')), 'link text in footer').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('freelance')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - blog_ai_features', () => { test('blog_ai_features: page loads without error', async ({ page }) => { const response = await page.goto('/blog/ai-features/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('blog_ai_features: title matches GT', async ({ page }) => { await page.goto('/blog/ai-features/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire ai'); }); test('blog_ai_features: h1 "Rankspire AI"', async ({ page }) => { await page.goto('/blog/ai-features/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire AI' || t.startsWith('Rankspire AI'))).toBeTruthy(); }); test('blog_ai_features: h2 "Our own in-house infrastructur"', async ({ page }) => { await page.goto('/blog/ai-features/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Our own in-house infrastructure runs the LLMs and enriches data with AI—so you can turn raw numbers' || t.startsWith('Our own in-house infrastructure runs the LLMs and enriches data with AI—so you can turn raw numbers'))).toBeTruthy(); }); test('blog_ai_features: h2 "Connect Rankspire to your favo"', async ({ page }) => { await page.goto('/blog/ai-features/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Connect Rankspire to your favorite AI chatbots' || t.startsWith('Connect Rankspire to your favorite AI chatbots'))).toBeTruthy(); }); test('blog_ai_features: h2 "Turn keyword data into content"', async ({ page }) => { await page.goto('/blog/ai-features/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Turn keyword data into content wins. Let AI surface high-value topics and decode search intent, savi' || t.startsWith('Turn keyword data into content wins. Let AI surface high-value topics and decode search intent, savi'))).toBeTruthy(); }); test('blog_ai_features: header link "Rankspire"', async ({ page }) => { await page.goto('/blog/ai-features/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('blog_ai_features: nav link "Search marketing"', async ({ page }) => { await page.goto('/blog/ai-features/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('blog_ai_features: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/blog/ai-features/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors\' websites.' || t.startsWith('Site ExplorerDig into your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('blog_ai_features: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/blog/ai-features/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - blog_link_building', () => { test('blog_link_building: page loads without error', async ({ page }) => { const response = await page.goto('/blog/link-building/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('blog_link_building: title matches GT', async ({ page }) => { await page.goto('/blog/link-building/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('link building for seo'); }); test('blog_link_building: h1 "Link Building for SEO: A Pract"', async ({ page }) => { await page.goto('/blog/link-building/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Link Building for SEO: A Practical Starter Guide' || t.startsWith('Link Building for SEO: A Practical Starter Guide'))).toBeTruthy(); }); test('blog_link_building: h2 "The basics of link building"', async ({ page }) => { await page.goto('/blog/link-building/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'The basics of link building' || t.startsWith('The basics of link building'))).toBeTruthy(); }); test('blog_link_building: h2 "How to build links"', async ({ page }) => { await page.goto('/blog/link-building/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to build links' || t.startsWith('How to build links'))).toBeTruthy(); }); test('blog_link_building: h2 "Which links move the needle?"', async ({ page }) => { await page.goto('/blog/link-building/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Which links move the needle?' || t.startsWith('Which links move the needle?'))).toBeTruthy(); }); test('blog_link_building: header link "Rankspire"', async ({ page }) => { await page.goto('/blog/link-building/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('blog_link_building: nav link "Search marketing"', async ({ page }) => { await page.goto('/blog/link-building/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('blog_link_building: nav link "Site ExplorerAnalyze your comp"', async ({ page }) => { await page.goto('/blog/link-building/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyze your competitors’ websites.' || t.startsWith('Site ExplorerAnalyze your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('blog_link_building: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/blog/link-building/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - legal_cookie_notice', () => { test('legal_cookie_notice: page loads without error', async ({ page }) => { const response = await page.goto('/legal/cookie-notice/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('legal_cookie_notice: title matches GT', async ({ page }) => { await page.goto('/legal/cookie-notice/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('rankspire cookie notice'); }); test('legal_cookie_notice: h1 "Cookie Notice"', async ({ page }) => { await page.goto('/legal/cookie-notice/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cookie Notice' || t.startsWith('Cookie Notice'))).toBeTruthy(); }); test('legal_cookie_notice: h2 "1. What are cookies and simila"', async ({ page }) => { await page.goto('/legal/cookie-notice/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '1. What are cookies and similar technologies?' || t.startsWith('1. What are cookies and similar technologies?'))).toBeTruthy(); }); test('legal_cookie_notice: h2 "2. Details on the use of cooki"', async ({ page }) => { await page.goto('/legal/cookie-notice/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '2. Details on the use of cookies and similar technologies' || t.startsWith('2. Details on the use of cookies and similar technologies'))).toBeTruthy(); }); test('legal_cookie_notice: h3 "a) Cookies"', async ({ page }) => { await page.goto('/legal/cookie-notice/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'a) Cookies' || t.startsWith('a) Cookies'))).toBeTruthy(); }); test('legal_cookie_notice: header link "Rankspire"', async ({ page }) => { await page.goto('/legal/cookie-notice/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('legal_cookie_notice: nav link "Search marketing"', async ({ page }) => { await page.goto('/legal/cookie-notice/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('legal_cookie_notice: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/legal/cookie-notice/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors\' websites.' || t.startsWith('Site ExplorerDig into your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('legal_cookie_notice: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/legal/cookie-notice/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - legal_subprocessors_list', () => { test('legal_subprocessors_list: page loads without error', async ({ page }) => { const response = await page.goto('/legal/subprocessors-list/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('legal_subprocessors_list: title matches GT', async ({ page }) => { await page.goto('/legal/subprocessors-list/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('sub'); }); test('legal_subprocessors_list: h1 "Sub-Processors List"', async ({ page }) => { await page.goto('/legal/subprocessors-list/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Sub-Processors List' || t.startsWith('Sub-Processors List'))).toBeTruthy(); }); test('legal_subprocessors_list: h4 "Sub-processor name"', async ({ page }) => { await page.goto('/legal/subprocessors-list/'); const texts = (await page.locator('h4').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Sub-processor name' || t.startsWith('Sub-processor name'))).toBeTruthy(); }); test('legal_subprocessors_list: h4 "Service provided"', async ({ page }) => { await page.goto('/legal/subprocessors-list/'); const texts = (await page.locator('h4').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Service provided' || t.startsWith('Service provided'))).toBeTruthy(); }); test('legal_subprocessors_list: h4 "Location"', async ({ page }) => { await page.goto('/legal/subprocessors-list/'); const texts = (await page.locator('h4').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Location' || t.startsWith('Location'))).toBeTruthy(); }); test('legal_subprocessors_list: header link "Rankspire"', async ({ page }) => { await page.goto('/legal/subprocessors-list/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('legal_subprocessors_list: nav link "Search marketing"', async ({ page }) => { await page.goto('/legal/subprocessors-list/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('legal_subprocessors_list: nav link "Site ExplorerAnalyse your comp"', async ({ page }) => { await page.goto('/legal/subprocessors-list/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyse your competitors’ websites.' || t.startsWith('Site ExplorerAnalyse your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('legal_subprocessors_list: nav link "Keywords ExplorerLearn what yo"', async ({ page }) => { await page.goto('/legal/subprocessors-list/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerLearn what your customers are searching for' || t.startsWith('Keywords ExplorerLearn what your customers are searching for')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_aeo_course_lesson_0_1', () => { test('academy_aeo_course_lesson_0_1: page loads without error', async ({ page }) => { const response = await page.goto('/academy/aeo-course/lesson-0-1/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_aeo_course_lesson_0_1: title matches GT', async ({ page }) => { await page.goto('/academy/aeo-course/lesson-0-1/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('answer engine optimization (aeo) course '); }); test('academy_aeo_course_lesson_0_1: h1 "Answer Engine Optimization (AE"', async ({ page }) => { await page.goto('/academy/aeo-course/lesson-0-1/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Answer Engine Optimization (AEO) Course by Rankspire: What is AEO?' || t.startsWith('Answer Engine Optimization (AEO) Course by Rankspire: What is AEO?'))).toBeTruthy(); }); test('academy_aeo_course_lesson_0_1: h2 "Answer Engine Optimization (AE"', async ({ page }) => { await page.goto('/academy/aeo-course/lesson-0-1/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Answer Engine Optimization (AEO) Course' || t.startsWith('Answer Engine Optimization (AEO) Course'))).toBeTruthy(); }); test('academy_aeo_course_lesson_0_1: h3 "What you\'ll learn"', async ({ page }) => { await page.goto('/academy/aeo-course/lesson-0-1/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What you\'ll learn' || t.startsWith('What you\'ll learn'))).toBeTruthy(); }); test('academy_aeo_course_lesson_0_1: h3 "Course by"', async ({ page }) => { await page.goto('/academy/aeo-course/lesson-0-1/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Course by' || t.startsWith('Course by'))).toBeTruthy(); }); test('academy_aeo_course_lesson_0_1: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/aeo-course/lesson-0-1/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_aeo_course_lesson_0_1: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/aeo-course/lesson-0-1/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_aeo_course_lesson_0_1: nav link "Site ExplorerSee how rival web"', async ({ page }) => { await page.goto('/academy/aeo-course/lesson-0-1/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerSee how rival websites perform.' || t.startsWith('Site ExplorerSee how rival websites perform.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_aeo_course_lesson_0_1: nav link "Keywords ExplorerUncover the t"', async ({ page }) => { await page.goto('/academy/aeo-course/lesson-0-1/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerUncover the terms your audience searches fo' || t.startsWith('Keywords ExplorerUncover the terms your audience searches fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_blogging_for_business_lesson_1_1', () => { test('academy_blogging_for_business_lesson_1_1: page loads without error', async ({ page }) => { const response = await page.goto('/academy/blogging-for-business/lesson-1-1/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_blogging_for_business_lesson_1_1: title matches GT', async ({ page }) => { await page.goto('/academy/blogging-for-business/lesson-1-1/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('the core purpose behind business bloggin'); }); test('academy_blogging_for_business_lesson_1_1: h1 "The core purpose behind busine"', async ({ page }) => { await page.goto('/academy/blogging-for-business/lesson-1-1/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'The core purpose behind business blogging' || t.startsWith('The core purpose behind business blogging'))).toBeTruthy(); }); test('academy_blogging_for_business_lesson_1_1: h2 "Blogging for Business"', async ({ page }) => { await page.goto('/academy/blogging-for-business/lesson-1-1/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Blogging for Business' || t.startsWith('Blogging for Business'))).toBeTruthy(); }); test('academy_blogging_for_business_lesson_1_1: h3 "What you’ll learn"', async ({ page }) => { await page.goto('/academy/blogging-for-business/lesson-1-1/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What you’ll learn' || t.startsWith('What you’ll learn'))).toBeTruthy(); }); test('academy_blogging_for_business_lesson_1_1: h3 "Course by"', async ({ page }) => { await page.goto('/academy/blogging-for-business/lesson-1-1/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Course by' || t.startsWith('Course by'))).toBeTruthy(); }); test('academy_blogging_for_business_lesson_1_1: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/blogging-for-business/lesson-1-1/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_blogging_for_business_lesson_1_1: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/blogging-for-business/lesson-1-1/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_blogging_for_business_lesson_1_1: nav link "Site ExplorerAnalyse your comp"', async ({ page }) => { await page.goto('/academy/blogging-for-business/lesson-1-1/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyse your competitors\' websites.' || t.startsWith('Site ExplorerAnalyse your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_blogging_for_business_lesson_1_1: nav link "Keywords ExplorerDiscover the "', async ({ page }) => { await page.goto('/academy/blogging-for-business/lesson-1-1/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover the terms your audience is searchi' || t.startsWith('Keywords ExplorerDiscover the terms your audience is searchi')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_account_add_first_portfolio', () => { test('academy_how_to_use_rankspire_account_add_first_portfolio: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/account/add-first-portfolio/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_account_add_first_portfolio: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/add-first-portfolio/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('how to set up and use portfolios'); }); test('academy_how_to_use_rankspire_account_add_first_portfolio: h1 "How to set up and use portfoli"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/add-first-portfolio/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to set up and use portfolios' || t.startsWith('How to set up and use portfolios'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_account_add_first_portfolio: h2 "How to Use Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/add-first-portfolio/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to Use Rankspire' || t.startsWith('How to Use Rankspire'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_account_add_first_portfolio: h3 "Monitor how your competitors a"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/add-first-portfolio/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Monitor how your competitors are performing' || t.startsWith('Monitor how your competitors are performing'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_account_add_first_portfolio: h3 "Monitor how your content write"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/add-first-portfolio/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Monitor how your content writers are performing' || t.startsWith('Monitor how your content writers are performing'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_account_add_first_portfolio: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/add-first-portfolio/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_account_add_first_portfolio: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/add-first-portfolio/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_account_add_first_portfolio: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/add-first-portfolio/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' sites.' || t.startsWith('Site ExplorerResearch your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_account_add_first_portfolio: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/add-first-portfolio/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_account_navigating', () => { test('academy_how_to_use_rankspire_account_navigating: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/account/navigating/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_account_navigating: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/navigating/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('navigating rankspire'); }); test('academy_how_to_use_rankspire_account_navigating: h1 "Navigating Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/navigating/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Navigating Rankspire' || t.startsWith('Navigating Rankspire'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_account_navigating: h2 "Rankspire\'s core tools"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/navigating/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire\'s core tools' || t.startsWith('Rankspire\'s core tools'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_account_navigating: h2 "Rankspire\'s standalone"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/navigating/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire\'s standalone' || t.startsWith('Rankspire\'s standalone'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_account_navigating: h2 "How to Use Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/navigating/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to Use Rankspire' || t.startsWith('How to Use Rankspire'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_account_navigating: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/navigating/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_account_navigating: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/navigating/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_account_navigating: nav link "Site ExplorerAnalyse your comp"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/navigating/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyse your competitors\' websites.' || t.startsWith('Site ExplorerAnalyse your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_account_navigating: nav link "Keywords ExplorerDiscover the "', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/account/navigating/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover the terms your audience is searchi' || t.startsWith('Keywords ExplorerDiscover the terms your audience is searchi')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_rankspire_seo_metrics_keyword_and_search_traffic', () => { test('academy_how_to_use_rankspire_rankspire_seo_metrics_keyword_and_search_traffic: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/rankspire-seo-metrics/keyword-and-search-traffic/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_rankspire_seo_metrics_keyword_and_search_traffic: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rankspire-seo-metrics/keyword-and-search-traffic/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('keyword and search traffic metrics'); }); test('academy_how_to_use_rankspire_rankspire_seo_metrics_keyword_and_search_traffic: h1 "Keyword and search traffic met"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rankspire-seo-metrics/keyword-and-search-traffic/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword and search traffic metrics' || t.startsWith('Keyword and search traffic metrics'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rankspire_seo_metrics_keyword_and_search_traffic: h2 "Search volume"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rankspire-seo-metrics/keyword-and-search-traffic/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search volume' || t.startsWith('Search volume'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rankspire_seo_metrics_keyword_and_search_traffic: h2 "Total number of keywords"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rankspire-seo-metrics/keyword-and-search-traffic/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Total number of keywords' || t.startsWith('Total number of keywords'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rankspire_seo_metrics_keyword_and_search_traffic: h2 "Organic traffic"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rankspire-seo-metrics/keyword-and-search-traffic/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Organic traffic' || t.startsWith('Organic traffic'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rankspire_seo_metrics_keyword_and_search_traffic: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rankspire-seo-metrics/keyword-and-search-traffic/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_rankspire_seo_metrics_keyword_and_search_traffic: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rankspire-seo-metrics/keyword-and-search-traffic/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_rankspire_seo_metrics_keyword_and_search_traffic: nav link "Domain ExplorerAnalyze your co"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rankspire-seo-metrics/keyword-and-search-traffic/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Domain ExplorerAnalyze your competitors’ websites.' || t.startsWith('Domain ExplorerAnalyze your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_rankspire_seo_metrics_keyword_and_search_traffic: nav link "Keyword ExplorerSee what your "', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rankspire-seo-metrics/keyword-and-search-traffic/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword ExplorerSee what your customers are searching for.' || t.startsWith('Keyword ExplorerSee what your customers are searching for.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_alerts_mentions', () => { test('academy_how_to_use_rankspire_alerts_mentions: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/alerts/mentions/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_alerts_mentions: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/mentions/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('mentions alerts'); }); test('academy_how_to_use_rankspire_alerts_mentions: h1 "Mentions alerts"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/mentions/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Mentions alerts' || t.startsWith('Mentions alerts'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_alerts_mentions: h2 "Scan the web for mentions of y"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/mentions/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Scan the web for mentions of your brand' || t.startsWith('Scan the web for mentions of your brand'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_alerts_mentions: h2 "Watch for pages that mention y"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/mentions/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Watch for pages that mention your competitors, but not you' || t.startsWith('Watch for pages that mention your competitors, but not you'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_alerts_mentions: h2 "How to Use Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/mentions/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to Use Rankspire' || t.startsWith('How to Use Rankspire'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_alerts_mentions: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/mentions/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_alerts_mentions: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/mentions/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_alerts_mentions: nav link "Site ExplorerAnalyse your comp"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/mentions/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyse your competitors\' websites.' || t.startsWith('Site ExplorerAnalyse your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_alerts_mentions: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/mentions/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_alerts_new_keywords', () => { test('academy_how_to_use_rankspire_alerts_new_keywords: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/alerts/new-keywords/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_alerts_new_keywords: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/new-keywords/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('new keywords alerts'); }); test('academy_how_to_use_rankspire_alerts_new_keywords: h1 "New keywords alerts"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/new-keywords/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'New keywords alerts' || t.startsWith('New keywords alerts'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_alerts_new_keywords: h2 "Track the keywords you rank fo"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/new-keywords/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Track the keywords you rank for' || t.startsWith('Track the keywords you rank for'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_alerts_new_keywords: h2 "Track the keywords your compet"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/new-keywords/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Track the keywords your competitors rank for' || t.startsWith('Track the keywords your competitors rank for'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_alerts_new_keywords: h2 "How to Use Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/new-keywords/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to Use Rankspire' || t.startsWith('How to Use Rankspire'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_alerts_new_keywords: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/new-keywords/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_alerts_new_keywords: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/new-keywords/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_alerts_new_keywords: nav link "Domain ExplorerAnalyze any com"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/new-keywords/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Domain ExplorerAnalyze any competitor\'s website.' || t.startsWith('Domain ExplorerAnalyze any competitor\'s website.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_alerts_new_keywords: nav link "Keyword ExplorerDiscover what "', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/alerts/new-keywords/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword ExplorerDiscover what your audience is searching for' || t.startsWith('Keyword ExplorerDiscover what your audience is searching for')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_competitive_analysis_content_gap', () => { test('academy_how_to_use_rankspire_competitive_analysis_content_gap: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/competitive-analysis/content-gap/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_competitive_analysis_content_gap: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/content-gap/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('content gap'); }); test('academy_how_to_use_rankspire_competitive_analysis_content_gap: h1 "Content Gap"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/content-gap/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Content Gap' || t.startsWith('Content Gap'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_competitive_analysis_content_gap: h2 "Reveal keyword opportunities y"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/content-gap/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Reveal keyword opportunities you\'re missing' || t.startsWith('Reveal keyword opportunities you\'re missing'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_competitive_analysis_content_gap: h2 "Grab your competitors\' feature"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/content-gap/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Grab your competitors\' featured snippets' || t.startsWith('Grab your competitors\' featured snippets'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_competitive_analysis_content_gap: h2 "Spot your striking-distance"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/content-gap/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Spot your striking-distance' || t.startsWith('Spot your striking-distance'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_competitive_analysis_content_gap: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/content-gap/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_competitive_analysis_content_gap: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/content-gap/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_competitive_analysis_content_gap: nav link "Site InsightsDig into your com"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/content-gap/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site InsightsDig into your competitors\' sites.' || t.startsWith('Site InsightsDig into your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_competitive_analysis_content_gap: nav link "Keyword DiscoveryDiscover what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/content-gap/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword DiscoveryDiscover what your customers search for.' || t.startsWith('Keyword DiscoveryDiscover what your customers search for.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_competitive_analysis_link_intersect', () => { test('academy_how_to_use_rankspire_competitive_analysis_link_intersect: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/competitive-analysis/link-intersect/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_competitive_analysis_link_intersect: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/link-intersect/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('link intersect'); }); test('academy_how_to_use_rankspire_competitive_analysis_link_intersect: h1 "Link Intersect"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/link-intersect/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Link Intersect' || t.startsWith('Link Intersect'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_competitive_analysis_link_intersect: h2 "Find listicles to earn links f"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/link-intersect/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find listicles to earn links from' || t.startsWith('Find listicles to earn links from'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_competitive_analysis_link_intersect: h2 "Find websites to earn local SE"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/link-intersect/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find websites to earn local SEO citations from' || t.startsWith('Find websites to earn local SEO citations from'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_competitive_analysis_link_intersect: h2 "How to Use Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/link-intersect/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to Use Rankspire' || t.startsWith('How to Use Rankspire'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_competitive_analysis_link_intersect: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/link-intersect/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_competitive_analysis_link_intersect: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/link-intersect/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_competitive_analysis_link_intersect: nav link "Site ExplorerInvestigate your "', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/link-intersect/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerInvestigate your competitors\' sites.' || t.startsWith('Site ExplorerInvestigate your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_competitive_analysis_link_intersect: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/competitive-analysis/link-intersect/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_keywords_explorer_ads_history', () => { test('academy_how_to_use_rankspire_keywords_explorer_ads_history: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/keywords-explorer/ads-history/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_keywords_explorer_ads_history: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/ads-history/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('ads history'); }); test('academy_how_to_use_rankspire_keywords_explorer_ads_history: h1 "Ads History"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/ads-history/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ads History' || t.startsWith('Ads History'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_ads_history: h2 "Find out which websites have b"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/ads-history/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find out which websites have been competing for your target keyword' || t.startsWith('Find out which websites have been competing for your target keyword'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_ads_history: h2 "Discover where competitors sen"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/ads-history/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover where competitors send their paid traffic' || t.startsWith('Discover where competitors send their paid traffic'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_ads_history: h2 "View your competitors’ ads"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/ads-history/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'View your competitors’ ads' || t.startsWith('View your competitors’ ads'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_ads_history: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/ads-history/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_ads_history: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/ads-history/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_ads_history: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/ads-history/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors’ websites.' || t.startsWith('Site ExplorerDig into your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_ads_history: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/ads-history/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your audience is searching fo' || t.startsWith('Keywords ExplorerDiscover what your audience is searching fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_keywords_explorer_intro', () => { test('academy_how_to_use_rankspire_keywords_explorer_intro: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/keywords-explorer/intro/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_keywords_explorer_intro: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/intro/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('a quick intro to keywords explorer'); }); test('academy_how_to_use_rankspire_keywords_explorer_intro: h1 "A Quick Intro to Keywords Expl"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/intro/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'A Quick Intro to Keywords Explorer' || t.startsWith('A Quick Intro to Keywords Explorer'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_intro: h2 "Generate seed keyword ideas us"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/intro/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Generate seed keyword ideas using AI' || t.startsWith('Generate seed keyword ideas using AI'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_intro: h2 "Sort your keyword ideas into k"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/intro/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Sort your keyword ideas into keyword lists' || t.startsWith('Sort your keyword ideas into keyword lists'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_intro: h2 "How to Use Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/intro/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to Use Rankspire' || t.startsWith('How to Use Rankspire'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_intro: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/intro/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_intro: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/intro/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_intro: nav link "Site ExplorerAnalyze your comp"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/intro/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyze your competitors’ websites.' || t.startsWith('Site ExplorerAnalyze your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_intro: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/intro/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your audience is searching fo' || t.startsWith('Keywords ExplorerDiscover what your audience is searching fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_keywords_explorer_matching_terms', () => { test('academy_how_to_use_rankspire_keywords_explorer_matching_terms: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/keywords-explorer/matching-terms/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_keywords_explorer_matching_terms: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/matching-terms/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('matching terms'); }); test('academy_how_to_use_rankspire_keywords_explorer_matching_terms: h1 "Matching terms"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/matching-terms/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Matching terms' || t.startsWith('Matching terms'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_matching_terms: h2 "Uncover high-volume, low-compe"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/matching-terms/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Uncover high-volume, low-competition keywords' || t.startsWith('Uncover high-volume, low-competition keywords'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_matching_terms: h2 "Find low-competition keywords "', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/matching-terms/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find low-competition keywords where less-authoritative sites rank in the SERPs' || t.startsWith('Find low-competition keywords where less-authoritative sites rank in the SERPs'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_matching_terms: h2 "Find keywords for which your s"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/matching-terms/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find keywords for which your site doesn’t rank yet' || t.startsWith('Find keywords for which your site doesn’t rank yet'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_matching_terms: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/matching-terms/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_matching_terms: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/matching-terms/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_matching_terms: nav link "Site ExplorerAnalyse your comp"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/matching-terms/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyse your competitors\' websites.' || t.startsWith('Site ExplorerAnalyse your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_matching_terms: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/matching-terms/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_keywords_explorer_related_terms', () => { test('academy_how_to_use_rankspire_keywords_explorer_related_terms: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/keywords-explorer/related-terms/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_keywords_explorer_related_terms: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/related-terms/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('related terms'); }); test('academy_how_to_use_rankspire_keywords_explorer_related_terms: h1 "Related terms"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/related-terms/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Related terms' || t.startsWith('Related terms'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_related_terms: h2 "See keywords that the top-rank" [dup#1]', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/related-terms/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See keywords that the top-ranking pages also rank for' || t.startsWith('See keywords that the top-ranking pages also rank for'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_related_terms: h2 "See keywords that the top-rank" [dup#2]', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/related-terms/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See keywords that the top-ranking pages also talk about' || t.startsWith('See keywords that the top-ranking pages also talk about'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_related_terms: h2 "Find high-volume, low-competit"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/related-terms/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find high-volume, low-competition keyword ideas' || t.startsWith('Find high-volume, low-competition keyword ideas'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_related_terms: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/related-terms/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_related_terms: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/related-terms/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_related_terms: nav link "Site InsightsStudy your compet"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/related-terms/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site InsightsStudy your competitors’ websites in seconds.' || t.startsWith('Site InsightsStudy your competitors’ websites in seconds.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_related_terms: nav link "Keywords InsightsLearn what yo"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/related-terms/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords InsightsLearn what your customers are searching for' || t.startsWith('Keywords InsightsLearn what your customers are searching for')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_keywords_explorer_traffic_share_domains', () => { test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_domains: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-domains/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_domains: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-domains/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('traffic share by domains'); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_domains: h1 "Traffic share by domains"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-domains/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Traffic share by domains' || t.startsWith('Traffic share by domains'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_domains: h2 "Find out who your biggest riva"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-domains/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find out who your biggest rivals are' || t.startsWith('Find out who your biggest rivals are'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_domains: h2 "Uncover niche competitive keyw"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-domains/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Uncover niche competitive keywords hiding in related terms' || t.startsWith('Uncover niche competitive keywords hiding in related terms'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_domains: h2 "Read the search intent behind "', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-domains/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Read the search intent behind a keyword' || t.startsWith('Read the search intent behind a keyword'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_domains: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-domains/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_domains: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-domains/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_domains: nav link "Domain ExplorerDig deep into y"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-domains/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Domain ExplorerDig deep into your competitors’' || t.startsWith('Domain ExplorerDig deep into your competitors’')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_domains: nav link "Keyword ExplorerDiscover exact"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-domains/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword ExplorerDiscover exactly what your customers search ' || t.startsWith('Keyword ExplorerDiscover exactly what your customers search ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_keywords_explorer_traffic_share_pages', () => { test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_pages: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-pages/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_pages: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-pages/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('traffic share by pages'); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_pages: h1 "Traffic share by pages"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-pages/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Traffic share by pages' || t.startsWith('Traffic share by pages'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_pages: h2 "Discover which pages own the s"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-pages/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover which pages own the search traffic for your keyword' || t.startsWith('Discover which pages own the search traffic for your keyword'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_pages: h2 "Find keyword topics for your n"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-pages/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find keyword topics for your niche' || t.startsWith('Find keyword topics for your niche'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_pages: h2 "Uncover niche competitive keyw"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-pages/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Uncover niche competitive keywords hiding in related terms' || t.startsWith('Uncover niche competitive keywords hiding in related terms'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_pages: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-pages/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_pages: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-pages/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_pages: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-pages/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors’ websites.' || t.startsWith('Site ExplorerDig into your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_keywords_explorer_traffic_share_pages: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/keywords-explorer/traffic-share-pages/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_rank_tracker_competitors_traffic_share', () => { test('academy_how_to_use_rankspire_rank_tracker_competitors_traffic_share: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/rank-tracker/competitors-traffic-share/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_rank_tracker_competitors_traffic_share: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/competitors-traffic-share/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('competitors'); }); test('academy_how_to_use_rankspire_rank_tracker_competitors_traffic_share: h1 "Competitors: Traffic Share"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/competitors-traffic-share/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Competitors: Traffic Share' || t.startsWith('Competitors: Traffic Share'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_competitors_traffic_share: h2 "How to Use Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/competitors-traffic-share/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to Use Rankspire' || t.startsWith('How to Use Rankspire'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_competitors_traffic_share: h3 "What you’ll learn"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/competitors-traffic-share/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What you’ll learn' || t.startsWith('What you’ll learn'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_competitors_traffic_share: h3 "Course by"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/competitors-traffic-share/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Course by' || t.startsWith('Course by'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_competitors_traffic_share: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/competitors-traffic-share/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_competitors_traffic_share: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/competitors-traffic-share/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_competitors_traffic_share: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/competitors-traffic-share/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' sites.' || t.startsWith('Site ExplorerResearch your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_competitors_traffic_share: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/competitors-traffic-share/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_rank_tracker_metrics', () => { test('academy_how_to_use_rankspire_rank_tracker_metrics: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/rank-tracker/metrics/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_rank_tracker_metrics: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/metrics/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('metrics'); }); test('academy_how_to_use_rankspire_rank_tracker_metrics: h1 "Metrics"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/metrics/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Metrics' || t.startsWith('Metrics'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_metrics: h2 "View the “Parent Topic” for yo"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/metrics/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'View the “Parent Topic” for your tracked keywords' || t.startsWith('View the “Parent Topic” for your tracked keywords'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_metrics: h2 "View the ranking position hist"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/metrics/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'View the ranking position history for your tracked keywords' || t.startsWith('View the ranking position history for your tracked keywords'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_metrics: h2 "View SEO metrics for the top-r"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/metrics/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'View SEO metrics for the top-ranking pages' || t.startsWith('View SEO metrics for the top-ranking pages'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_metrics: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/metrics/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_metrics: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/metrics/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_metrics: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/metrics/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors\' websites.' || t.startsWith('Site ExplorerDig into your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_metrics: nav link "Keywords ExplorerFind out what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/metrics/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerFind out what your customers are searching ' || t.startsWith('Keywords ExplorerFind out what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_rank_tracker_overview', () => { test('academy_how_to_use_rankspire_rank_tracker_overview: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/rank-tracker/overview/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_rank_tracker_overview: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/overview/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('overview'); }); test('academy_how_to_use_rankspire_rank_tracker_overview: h1 "Overview"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/overview/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Overview' || t.startsWith('Overview'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_overview: h2 "View your desktop and mobile r"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/overview/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'View your desktop and mobile rankings' || t.startsWith('View your desktop and mobile rankings'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_overview: h2 "View keyword rankings by tag"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/overview/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'View keyword rankings by tag' || t.startsWith('View keyword rankings by tag'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_overview: h2 "View rankings by location"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/overview/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'View rankings by location' || t.startsWith('View rankings by location'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_overview: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/overview/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_overview: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/overview/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_overview: nav link "Site ExplorerAnalyze your comp"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/overview/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyze your competitors’ websites.' || t.startsWith('Site ExplorerAnalyze your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_overview: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/overview/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your audience is searching fo' || t.startsWith('Keywords ExplorerDiscover what your audience is searching fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_rank_tracker_tags', () => { test('academy_how_to_use_rankspire_rank_tracker_tags: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/rank-tracker/tags/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_rank_tracker_tags: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/tags/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('tags'); }); test('academy_how_to_use_rankspire_rank_tracker_tags: h1 "Tags"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/tags/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Tags' || t.startsWith('Tags'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_tags: h2 "How to Use Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/tags/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to Use Rankspire' || t.startsWith('How to Use Rankspire'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_tags: h3 "What you’ll learn"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/tags/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What you’ll learn' || t.startsWith('What you’ll learn'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_tags: h3 "Course by"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/tags/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Course by' || t.startsWith('Course by'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_tags: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/tags/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_tags: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/tags/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_tags: nav link "Site ExplorerAnalyze your comp"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/tags/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyze your competitors’ websites.' || t.startsWith('Site ExplorerAnalyze your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_rank_tracker_tags: nav link "Keywords ExplorerSee exactly w"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/rank-tracker/tags/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerSee exactly what your customers search for.' || t.startsWith('Keywords ExplorerSee exactly what your customers search for.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_site_audit_introduction', () => { test('academy_how_to_use_rankspire_site_audit_introduction: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/site-audit/introduction/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_site_audit_introduction: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/introduction/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('introduction to site audit'); }); test('academy_how_to_use_rankspire_site_audit_introduction: h1 "Introduction to Site Audit"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/introduction/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Introduction to Site Audit' || t.startsWith('Introduction to Site Audit'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_introduction: h2 "Customize global issues"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/introduction/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Customize global issues' || t.startsWith('Customize global issues'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_introduction: h2 "Control crawl credits usage"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/introduction/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Control crawl credits usage' || t.startsWith('Control crawl credits usage'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_introduction: h2 "How to Use Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/introduction/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to Use Rankspire' || t.startsWith('How to Use Rankspire'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_introduction: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/introduction/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_introduction: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/introduction/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_introduction: nav link "Domain InsightsSee exactly how"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/introduction/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Domain InsightsSee exactly how rival websites win.' || t.startsWith('Domain InsightsSee exactly how rival websites win.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_introduction: nav link "Keyword DiscoveryDiscover the "', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/introduction/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword DiscoveryDiscover the terms your customers search fo' || t.startsWith('Keyword DiscoveryDiscover the terms your customers search fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_site_audit_link_explorer', () => { test('academy_how_to_use_rankspire_site_audit_link_explorer: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/site-audit/link-explorer/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_site_audit_link_explorer: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-explorer/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('link explorer'); }); test('academy_how_to_use_rankspire_site_audit_link_explorer: h1 "Link Explorer"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-explorer/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Link Explorer' || t.startsWith('Link Explorer'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_link_explorer: h2 "Spot broken internal links"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-explorer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Spot broken internal links' || t.startsWith('Spot broken internal links'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_link_explorer: h2 "Spot broken outgoing links"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-explorer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Spot broken outgoing links' || t.startsWith('Spot broken outgoing links'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_link_explorer: h2 "Surface URLs that were not cra"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-explorer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Surface URLs that were not crawled by Site Audit' || t.startsWith('Surface URLs that were not crawled by Site Audit'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_link_explorer: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-explorer/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_link_explorer: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-explorer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_link_explorer: nav link "Site ExplorerAnalyze your comp"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-explorer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyze your competitors’ websites.' || t.startsWith('Site ExplorerAnalyze your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_link_explorer: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-explorer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_site_audit_link_opportunities', () => { test('academy_how_to_use_rankspire_site_audit_link_opportunities: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/site-audit/link-opportunities/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_site_audit_link_opportunities: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-opportunities/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('link opportunities'); }); test('academy_how_to_use_rankspire_site_audit_link_opportunities: h1 "Link opportunities"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-opportunities/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Link opportunities' || t.startsWith('Link opportunities'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_link_opportunities: h2 "Find link opportunities by pag"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-opportunities/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find link opportunities by page' || t.startsWith('Find link opportunities by page'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_link_opportunities: h2 "Find opportunities by keyword"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-opportunities/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find opportunities by keyword' || t.startsWith('Find opportunities by keyword'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_link_opportunities: h2 "Find opportunities by “authori"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-opportunities/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find opportunities by “authority”' || t.startsWith('Find opportunities by “authority”'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_link_opportunities: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-opportunities/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_link_opportunities: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-opportunities/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_link_opportunities: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-opportunities/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors\' websites.' || t.startsWith('Site ExplorerDig into your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_link_opportunities: nav link "Keywords ExplorerSee exactly w"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/link-opportunities/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerSee exactly what your audience searches for' || t.startsWith('Keywords ExplorerSee exactly what your audience searches for')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_site_audit_overview', () => { test('academy_how_to_use_rankspire_site_audit_overview: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/site-audit/overview/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_site_audit_overview: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/overview/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('overview'); }); test('academy_how_to_use_rankspire_site_audit_overview: h1 "Overview"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/overview/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Overview' || t.startsWith('Overview'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_overview: h2 "See your website\'s overall Hea"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/overview/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See your website\'s overall Health Score' || t.startsWith('See your website\'s overall Health Score'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_overview: h2 "Spot the biggest issues affect"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/overview/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Spot the biggest issues affecting your site' || t.startsWith('Spot the biggest issues affecting your site'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_overview: h2 "Export issues at any level"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/overview/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Export issues at any level' || t.startsWith('Export issues at any level'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_overview: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/overview/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_overview: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/overview/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_overview: nav link "Domain InsightsSee exactly how"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/overview/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Domain InsightsSee exactly how rival websites win.' || t.startsWith('Domain InsightsSee exactly how rival websites win.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_overview: nav link "Keyword DiscoveryDiscover the "', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/overview/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword DiscoveryDiscover the terms your customers search fo' || t.startsWith('Keyword DiscoveryDiscover the terms your customers search fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_site_audit_structure_explorer', () => { test('academy_how_to_use_rankspire_site_audit_structure_explorer: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/site-audit/structure-explorer/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_site_audit_structure_explorer: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/structure-explorer/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('structure explorer'); }); test('academy_how_to_use_rankspire_site_audit_structure_explorer: h1 "Structure Explorer"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/structure-explorer/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Structure Explorer' || t.startsWith('Structure Explorer'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_structure_explorer: h2 "Map out your website\'s archite"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/structure-explorer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Map out your website\'s architecture' || t.startsWith('Map out your website\'s architecture'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_structure_explorer: h2 "How to Use Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/structure-explorer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to Use Rankspire' || t.startsWith('How to Use Rankspire'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_structure_explorer: h3 "What you\'ll learn"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/structure-explorer/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What you\'ll learn' || t.startsWith('What you\'ll learn'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_structure_explorer: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/structure-explorer/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_structure_explorer: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/structure-explorer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_structure_explorer: nav link "Site ExplorerAnalyze your comp"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/structure-explorer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyze your competitors\' websites.' || t.startsWith('Site ExplorerAnalyze your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_audit_structure_explorer: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-audit/structure-explorer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_site_explorer_ads', () => { test('academy_how_to_use_rankspire_site_explorer_ads: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/site-explorer/ads/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_site_explorer_ads: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/ads/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('ads'); }); test('academy_how_to_use_rankspire_site_explorer_ads: h1 "Ads"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/ads/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ads' || t.startsWith('Ads'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_ads: h2 "See exactly what ad copy your "', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/ads/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See exactly what ad copy your competitors use' || t.startsWith('See exactly what ad copy your competitors use'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_ads: h2 "View every keyword behind each"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/ads/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'View every keyword behind each ad' || t.startsWith('View every keyword behind each ad'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_ads: h2 "View every URL behind each ad"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/ads/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'View every URL behind each ad' || t.startsWith('View every URL behind each ad'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_ads: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/ads/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_ads: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/ads/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_ads: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/ads/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' sites.' || t.startsWith('Site ExplorerResearch your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_ads: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/ads/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_site_explorer_anchors', () => { test('academy_how_to_use_rankspire_site_explorer_anchors: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/site-explorer/anchors/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_site_explorer_anchors: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/anchors/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('anchors'); }); test('academy_how_to_use_rankspire_site_explorer_anchors: h1 "Anchors"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/anchors/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Anchors' || t.startsWith('Anchors'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_anchors: h2 "Spot over-optimized anchor tex"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/anchors/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Spot over-optimized anchor texts inside a backlink profile' || t.startsWith('Spot over-optimized anchor texts inside a backlink profile'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_anchors: h2 "Guard your website against neg"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/anchors/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Guard your website against negative SEO attacks' || t.startsWith('Guard your website against negative SEO attacks'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_anchors: h2 "Uncover your competitor’s most"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/anchors/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Uncover your competitor’s most link-worthy assets' || t.startsWith('Uncover your competitor’s most link-worthy assets'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_anchors: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/anchors/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_anchors: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/anchors/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_anchors: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/anchors/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors\' websites.' || t.startsWith('Site ExplorerDig into your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_anchors: nav link "Keywords ExplorerDiscover exac"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/anchors/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover exactly what your customers search' || t.startsWith('Keywords ExplorerDiscover exactly what your customers search')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_site_explorer_intro', () => { test('academy_how_to_use_rankspire_site_explorer_intro: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/site-explorer/intro/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_site_explorer_intro: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/intro/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('introduction to domain explorer'); }); test('academy_how_to_use_rankspire_site_explorer_intro: h1 "Introduction to Domain Explore"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/intro/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Introduction to Domain Explorer' || t.startsWith('Introduction to Domain Explorer'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_intro: h2 "How to run effective searches"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/intro/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to run effective searches' || t.startsWith('How to run effective searches'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_intro: h2 "How to Use Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/intro/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to Use Rankspire' || t.startsWith('How to Use Rankspire'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_intro: h3 "1. Protocol"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/intro/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '1. Protocol' || t.startsWith('1. Protocol'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_intro: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/intro/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_intro: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/intro/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_intro: nav link "Site ExplorerDig into your com"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/intro/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerDig into your competitors’ websites.' || t.startsWith('Site ExplorerDig into your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_intro: nav link "Keywords ExplorerSee what your"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/intro/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerSee what your customers are searching for.' || t.startsWith('Keywords ExplorerSee what your customers are searching for.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_site_explorer_linked_domains', () => { test('academy_how_to_use_rankspire_site_explorer_linked_domains: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/site-explorer/linked-domains/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_site_explorer_linked_domains: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/linked-domains/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('linked domains'); }); test('academy_how_to_use_rankspire_site_explorer_linked_domains: h1 "Linked domains"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/linked-domains/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Linked domains' || t.startsWith('Linked domains'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_linked_domains: h2 "Spot links pointing to irrelev"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/linked-domains/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Spot links pointing to irrelevant or unwanted domains' || t.startsWith('Spot links pointing to irrelevant or unwanted domains'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_linked_domains: h2 "Spot links to external non-HTM"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/linked-domains/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Spot links to external non-HTML pages and images' || t.startsWith('Spot links to external non-HTML pages and images'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_linked_domains: h2 "Spot links to redirect chains"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/linked-domains/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Spot links to redirect chains' || t.startsWith('Spot links to redirect chains'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_linked_domains: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/linked-domains/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_linked_domains: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/linked-domains/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_linked_domains: nav link "Domain ExplorerDig deep into y"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/linked-domains/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Domain ExplorerDig deep into your competitors’' || t.startsWith('Domain ExplorerDig deep into your competitors’')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_linked_domains: nav link "Keyword ExplorerDiscover exact"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/linked-domains/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword ExplorerDiscover exactly what your customers search ' || t.startsWith('Keyword ExplorerDiscover exactly what your customers search ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_site_explorer_organic_keywords', () => { test('academy_how_to_use_rankspire_site_explorer_organic_keywords: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/site-explorer/organic-keywords/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_site_explorer_organic_keywords: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/organic-keywords/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('organic keywords'); }); test('academy_how_to_use_rankspire_site_explorer_organic_keywords: h1 "Organic keywords"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/organic-keywords/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Organic keywords' || t.startsWith('Organic keywords'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_organic_keywords: h2 "See your rivals\' top keywords"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/organic-keywords/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See your rivals\' top keywords' || t.startsWith('See your rivals\' top keywords'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_organic_keywords: h2 "View keyword rankings across 2"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/organic-keywords/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'View keyword rankings across 243 countries and regions' || t.startsWith('View keyword rankings across 243 countries and regions'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_organic_keywords: h2 "See your rivals\' low-difficult"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/organic-keywords/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See your rivals\' low-difficulty keywords' || t.startsWith('See your rivals\' low-difficulty keywords'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_organic_keywords: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/organic-keywords/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_organic_keywords: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/organic-keywords/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_organic_keywords: nav link "Site ExplorerAnalyze your comp"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/organic-keywords/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerAnalyze your competitors\' websites.' || t.startsWith('Site ExplorerAnalyze your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_organic_keywords: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/organic-keywords/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your audience is searching fo' || t.startsWith('Keywords ExplorerDiscover what your audience is searching fo')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_site_explorer_overview', () => { test('academy_how_to_use_rankspire_site_explorer_overview: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/site-explorer/overview/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_site_explorer_overview: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/overview/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('overview'); }); test('academy_how_to_use_rankspire_site_explorer_overview: h1 "Overview"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/overview/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Overview' || t.startsWith('Overview'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_overview: h2 "See how much search traffic yo"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/overview/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See how much search traffic your competitors earn' || t.startsWith('See how much search traffic your competitors earn'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_overview: h2 "Follow yearly trends with ease"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/overview/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Follow yearly trends with ease' || t.startsWith('Follow yearly trends with ease'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_overview: h2 "Track organic traffic changes "', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/overview/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Track organic traffic changes against search engine updates' || t.startsWith('Track organic traffic changes against search engine updates'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_overview: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/overview/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_overview: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/overview/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_overview: nav link "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/overview/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerResearch your competitors\' sites.' || t.startsWith('Site ExplorerResearch your competitors\' sites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_overview: nav link "Keywords ExplorerDiscover what"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/overview/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerDiscover what your customers are searching ' || t.startsWith('Keywords ExplorerDiscover what your customers are searching ')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_site_explorer_page_inspect', () => { test('academy_how_to_use_rankspire_site_explorer_page_inspect: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/site-explorer/page-inspect/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_site_explorer_page_inspect: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/page-inspect/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('page inspect'); }); test('academy_how_to_use_rankspire_site_explorer_page_inspect: h1 "Page Inspect"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/page-inspect/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Page Inspect' || t.startsWith('Page Inspect'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_page_inspect: h2 "Compare a page\'s content betwe"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/page-inspect/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Compare a page\'s content between any two points in time' || t.startsWith('Compare a page\'s content between any two points in time'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_page_inspect: h2 "How to Use Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/page-inspect/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How to Use Rankspire' || t.startsWith('How to Use Rankspire'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_page_inspect: h3 "What you’ll learn"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/page-inspect/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What you’ll learn' || t.startsWith('What you’ll learn'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_page_inspect: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/page-inspect/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_page_inspect: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/page-inspect/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_page_inspect: nav link "Site ScannerDig into your comp"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/page-inspect/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ScannerDig into your competitors\' websites.' || t.startsWith('Site ScannerDig into your competitors\' websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_page_inspect: nav link "Keyword FinderDiscover what yo"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/page-inspect/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keyword FinderDiscover what your customers are searching for' || t.startsWith('Keyword FinderDiscover what your customers are searching for')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_site_explorer_paid_pages', () => { test('academy_how_to_use_rankspire_site_explorer_paid_pages: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/site-explorer/paid-pages/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_site_explorer_paid_pages: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/paid-pages/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('paid pages'); }); test('academy_how_to_use_rankspire_site_explorer_paid_pages: h1 "Paid pages"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/paid-pages/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Paid pages' || t.startsWith('Paid pages'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_paid_pages: h2 "Discover which pages competito"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/paid-pages/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover which pages competitors funnel paid traffic toward' || t.startsWith('Discover which pages competitors funnel paid traffic toward'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_paid_pages: h2 "Compare the top paid pages tra"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/paid-pages/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Compare the top paid pages traffic of your competitors' || t.startsWith('Compare the top paid pages traffic of your competitors'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_paid_pages: h2 "See the top paid pages by traf"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/paid-pages/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See the top paid pages by traffic from 243 countries' || t.startsWith('See the top paid pages by traffic from 243 countries'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_paid_pages: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/paid-pages/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_paid_pages: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/paid-pages/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_paid_pages: nav link "Site ExplorerStudy your compet"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/paid-pages/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerStudy your competitors’ websites.' || t.startsWith('Site ExplorerStudy your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_paid_pages: nav link "Keywords ExplorerLearn what yo"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/paid-pages/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerLearn what your customers are searching for' || t.startsWith('Keywords ExplorerLearn what your customers are searching for')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_site_explorer_referring_domains', () => { test('academy_how_to_use_rankspire_site_explorer_referring_domains: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/site-explorer/referring-domains/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_site_explorer_referring_domains: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/referring-domains/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('referring domains'); }); test('academy_how_to_use_rankspire_site_explorer_referring_domains: h1 "Referring domains"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/referring-domains/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Referring domains' || t.startsWith('Referring domains'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_referring_domains: h2 "Find every backlink you have f"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/referring-domains/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find every backlink you have from one specific website' || t.startsWith('Find every backlink you have from one specific website'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_referring_domains: h2 "Find the websites that link to"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/referring-domains/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find the websites that link to your competitor' || t.startsWith('Find the websites that link to your competitor'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_referring_domains: h2 "Spot your competitor’s serial "', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/referring-domains/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Spot your competitor’s serial linkers' || t.startsWith('Spot your competitor’s serial linkers'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_referring_domains: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/referring-domains/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_referring_domains: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/referring-domains/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_referring_domains: nav link "Site ExplorerStudy your compet"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/referring-domains/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerStudy your competitors’ websites.' || t.startsWith('Site ExplorerStudy your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_referring_domains: nav link "Keywords ExplorerLearn what yo"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/referring-domains/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerLearn what your customers are searching for' || t.startsWith('Keywords ExplorerLearn what your customers are searching for')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_site_explorer_site_structure', () => { test('academy_how_to_use_rankspire_site_explorer_site_structure: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/site-explorer/site-structure/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_site_explorer_site_structure: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/site-structure/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('site structure'); }); test('academy_how_to_use_rankspire_site_explorer_site_structure: h1 "Site Structure"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/site-structure/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site Structure' || t.startsWith('Site Structure'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_site_structure: h2 "Analyze the website sections t" [dup#1]', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/site-structure/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Analyze the website sections that drive the most organic traffic for your competitor' || t.startsWith('Analyze the website sections that drive the most organic traffic for your competitor'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_site_structure: h2 "Analyze the website sections t" [dup#2]', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/site-structure/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Analyze the website sections that attract the most referring domains for your competitor' || t.startsWith('Analyze the website sections that attract the most referring domains for your competitor'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_site_structure: h2 "Analyze the ads activity and s"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/site-structure/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Analyze the ads activity and spending of your competitor' || t.startsWith('Analyze the ads activity and spending of your competitor'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_site_structure: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/site-structure/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_site_structure: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/site-structure/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_site_structure: nav link "Site ExplorerStudy your compet"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/site-structure/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerStudy your competitors’ websites.' || t.startsWith('Site ExplorerStudy your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_site_explorer_site_structure: nav link "Keywords ExplorerSee exactly w"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/site-explorer/site-structure/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerSee exactly what your customers search for.' || t.startsWith('Keywords ExplorerSee exactly what your customers search for.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - academy_how_to_use_rankspire_toolbar_overview', () => { test('academy_how_to_use_rankspire_toolbar_overview: page loads without error', async ({ page }) => { const response = await page.goto('/academy/how-to-use-rankspire/toolbar/overview/'); expect(response?.status()).toBeLessThan(400); await expect(page.locator('body')).toBeVisible(); }); test('academy_how_to_use_rankspire_toolbar_overview: title matches GT', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/toolbar/overview/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('overview'); }); test('academy_how_to_use_rankspire_toolbar_overview: h1 "Overview"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/toolbar/overview/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Overview' || t.startsWith('Overview'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_toolbar_overview: h2 "Opening the tools and reports"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/toolbar/overview/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Opening the tools and reports' || t.startsWith('Opening the tools and reports'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_toolbar_overview: h2 "Connecting your Rankspire acco"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/toolbar/overview/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Connecting your Rankspire account' || t.startsWith('Connecting your Rankspire account'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_toolbar_overview: h2 "Page tools and reports"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/toolbar/overview/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Page tools and reports' || t.startsWith('Page tools and reports'))).toBeTruthy(); }); test('academy_how_to_use_rankspire_toolbar_overview: header link "Rankspire"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/toolbar/overview/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rankspire' || t.startsWith('Rankspire')), 'link text in header').toBeTruthy(); }); test('academy_how_to_use_rankspire_toolbar_overview: nav link "Search marketing"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/toolbar/overview/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Search marketing' || t.startsWith('Search marketing')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('search-marketing')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_toolbar_overview: nav link "Site ExplorerStudy your compet"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/toolbar/overview/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Site ExplorerStudy your competitors’ websites.' || t.startsWith('Site ExplorerStudy your competitors’ websites.')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('site-explorer')), 'href fragment present').toBeTruthy(); }); test('academy_how_to_use_rankspire_toolbar_overview: nav link "Keywords ExplorerLearn what yo"', async ({ page }) => { await page.goto('/academy/how-to-use-rankspire/toolbar/overview/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Keywords ExplorerLearn what your customers are searching for' || t.startsWith('Keywords ExplorerLearn what your customers are searching for')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('keywords-explorer')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - Routing', () => { test('navigate to agent_a via "Learn more →"', async ({ page }) => { await page.goto('/'); const link = page.locator('a[href*="agent-a"]').first(); expect(await link.count(), 'nav link to agent_a exists').toBeGreaterThan(0); await link.click(); await page.waitForTimeout(1200); expect(page.url().toLowerCase(), 'URL changed to destination').toContain('agent-a'); const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); expect(bodyText, 'destination distinctive content shown').toContain('A top talent joins your marketing team'); }); test('navigate to search_marketing via "Search marketing"', async ({ page }) => { await page.goto('/'); const link = page.locator('a[href*="search-marketing"]').first(); expect(await link.count(), 'nav link to search_marketing exists').toBeGreaterThan(0); await link.click(); await page.waitForTimeout(1200); expect(page.url().toLowerCase(), 'URL changed to destination').toContain('search-marketing'); const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); expect(bodyText, 'destination distinctive content shown').toContain('Search marketing'); }); test('navigate to site_explorer via "Site ExplorerResearch your com"', async ({ page }) => { await page.goto('/'); const link = page.locator('a[href*="site-explorer"]').first(); expect(await link.count(), 'nav link to site_explorer exists').toBeGreaterThan(0); await link.click(); await page.waitForTimeout(1200); expect(page.url().toLowerCase(), 'URL changed to destination').toContain('site-explorer'); const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); expect(bodyText, 'destination distinctive content shown').toContain('Site Explorer'); }); });