From 2040c9534def48e22e20a1c4dcfbc1ad205f45ae Mon Sep 17 00:00:00 2001 From: killij <51908793+killij@users.noreply.github.com> Date: Fri, 1 Mar 2024 11:34:46 +0000 Subject: [PATCH] Update regression tests --- .../tests/career-stages/asye.spec.ts | 4 ++-- .../career-stages/develop-social-work-practice.spec.ts | 2 +- .../tests/career-stages/experienced-practitioners.spec.ts | 7 ++++--- .../tests/career-stages/leaders.spec.ts | 6 +++--- .../tests/career-stages/managers.spec.ts | 2 +- .../tests/career-stages/practitioners.spec.ts | 2 +- .../tests/career-stages/senior-managers.spec.ts | 2 +- .../content-regression-tests/tests/homepage.spec.ts | 6 +++--- 8 files changed, 16 insertions(+), 15 deletions(-) diff --git a/browser-tests/content-regression-tests/tests/career-stages/asye.spec.ts b/browser-tests/content-regression-tests/tests/career-stages/asye.spec.ts index 02de2570..b135213e 100644 --- a/browser-tests/content-regression-tests/tests/career-stages/asye.spec.ts +++ b/browser-tests/content-regression-tests/tests/career-stages/asye.spec.ts @@ -36,10 +36,10 @@ test.describe('Assessed and supported year in employment (ASYE)', () => { ['post qualifying standards', 'https://www.gov.uk/government/publications/knowledge-and-skills-statements-for-child-and-family-social-work'], ['Professional Capabilities Framework', 'https://new.basw.co.uk/training-cpd/professional-capabilities-framework-pcf'], ['Find out more about each ASYE stage', 'https://www.skillsforcare.org.uk/Regulated-professions/Social-work/ASYE/ASYE-templates.aspx'], - ['Find out more about the ASYE', 'https://www.skillsforcare.org.uk/Regulated-professions/Social-work/ASYE/ASYE.aspx'], + ['Find out more about the ASYE programme', 'https://www.skillsforcare.org.uk/Regulated-professions/Social-work/ASYE/ASYE.aspx'], ['Social work post-qualifying standards', 'https://www.gov.uk/government/publications/knowledge-and-skills-statements-for-child-and-family-social-work'], ] - + for (const link of links) { test(`'${link[0]}' goes to ${link[1]}`, async ({ page }) => { await page.goto('/asye') diff --git a/browser-tests/content-regression-tests/tests/career-stages/develop-social-work-practice.spec.ts b/browser-tests/content-regression-tests/tests/career-stages/develop-social-work-practice.spec.ts index d5ca447a..6965a95e 100644 --- a/browser-tests/content-regression-tests/tests/career-stages/develop-social-work-practice.spec.ts +++ b/browser-tests/content-regression-tests/tests/career-stages/develop-social-work-practice.spec.ts @@ -67,7 +67,7 @@ test.describe('Senior Leader', () => { await page.getByLabel('Menu').getByRole('link', { name: 'Career stages', exact: true }).click() await page.getByRole('link', { name: 'Senior leader', exact: true }).click() - await expect(page.locator('h1', { hasText: /^Senior Leader$/ })).toBeVisible() + await expect(page.locator('h1', { hasText: /^Senior leader$/ })).toBeVisible() await expect(page).toHaveURL(/.*\/senior-leader/) await expect(page.locator('#mmi-career')).toHaveClass(/dfe-header__navigation-item--current/) diff --git a/browser-tests/content-regression-tests/tests/career-stages/experienced-practitioners.spec.ts b/browser-tests/content-regression-tests/tests/career-stages/experienced-practitioners.spec.ts index c6fb1992..693c507b 100644 --- a/browser-tests/content-regression-tests/tests/career-stages/experienced-practitioners.spec.ts +++ b/browser-tests/content-regression-tests/tests/career-stages/experienced-practitioners.spec.ts @@ -27,13 +27,14 @@ test.describe('Experienced Practitioners', () => { const links = [ ['Pathway 1: practice supervisors', '/pathway-1', 'Pathway 1: practice supervisors'], ['Pathway 2: middle managers', '/pathway-2', 'Pathway 2: middle managers'], - ['Explore roles', '/explore-roles', 'Explore roles in child and family social work'], + ['View all programmes', '/development-programmes', 'Child and family social work development programmes'], + ['Explore roles', '/explore-roles', 'Roles in child and family social work'], ] for (const link of links) { test(`Goes to the ${link[0]} page`, async ({ page }) => { - await page.goto('/experienced-practitioner') - await page.goto(link[1]) + await page.goto('/career-stages/experienced-practitioner') + await page.getByRole('link', { name: link[0], exact: true }).last().click() await expect(page).toHaveURL(new RegExp(`.*${link[1]}`)) await expect(page.locator('h1', { hasText: new RegExp(`^${link[2]}$`) })).toBeVisible() }) diff --git a/browser-tests/content-regression-tests/tests/career-stages/leaders.spec.ts b/browser-tests/content-regression-tests/tests/career-stages/leaders.spec.ts index d29052df..8b5dd8b1 100644 --- a/browser-tests/content-regression-tests/tests/career-stages/leaders.spec.ts +++ b/browser-tests/content-regression-tests/tests/career-stages/leaders.spec.ts @@ -7,7 +7,7 @@ test.describe('Senior leaders', () => { await page.goto('/') await page.getByRole('link', { name: 'Senior leader', exact: true }).click() - await expect(page.locator('h1', { hasText: /^Senior Leader$/ })).toBeVisible() + await expect(page.locator('h1', { hasText: /^Senior leader$/ })).toBeVisible() await expect(page).toHaveURL(/.*\/senior-leader/) await expect(page.locator('#mmi-career')).toHaveClass(/dfe-header__navigation-item--current/) }) @@ -17,7 +17,7 @@ test.describe('Senior leaders', () => { await page.getByLabel('Menu').getByRole('link', { name: 'Career stages', exact: true }).click() await page.getByRole('link', { name: 'Senior leader', exact: true }).click() - await expect(page.locator('h1', { hasText: /^Senior Leader$/ })).toBeVisible() + await expect(page.locator('h1', { hasText: /^Senior leader$/ })).toBeVisible() await expect(page).toHaveURL(/.*\/senior-leader/) await expect(page.locator('#mmi-career')).toHaveClass(/dfe-header__navigation-item--current/) }) @@ -29,7 +29,7 @@ test.describe('Senior leaders', () => { ['Pathway 4: practice leaders', '/pathway-4', 'Pathway 4: practice leaders'], ['Assistant director', '/assistant-director', 'Assistant director'], ["Director of children's services", '/director-children-services', "Director of children's services"], - ['Explore roles', '/explore-roles', 'Explore roles in child and family social work'], + ['Explore roles', '/explore-roles', 'Roles in child and family social work'], ] for (const link of links) { diff --git a/browser-tests/content-regression-tests/tests/career-stages/managers.spec.ts b/browser-tests/content-regression-tests/tests/career-stages/managers.spec.ts index 3308f19f..6e253a39 100644 --- a/browser-tests/content-regression-tests/tests/career-stages/managers.spec.ts +++ b/browser-tests/content-regression-tests/tests/career-stages/managers.spec.ts @@ -28,7 +28,7 @@ test.describe('Managers', () => { ['Quality improvement manager', '/explore-roles/quality-improvement-manager', 'Quality improvement manager'], ['Team manager', '/explore-roles/team-manager', 'Team manager'], ['Independent reviewing officer', '/explore-roles/independent-reviewing-officer', 'Independent reviewing officer'], - ['Explore roles', '/explore-roles', 'Explore roles in child and family social work'], + ['Explore roles', '/explore-roles', 'Roles in child and family social work'], ] for (const link of links) { diff --git a/browser-tests/content-regression-tests/tests/career-stages/practitioners.spec.ts b/browser-tests/content-regression-tests/tests/career-stages/practitioners.spec.ts index 183eb225..d1cef8f5 100644 --- a/browser-tests/content-regression-tests/tests/career-stages/practitioners.spec.ts +++ b/browser-tests/content-regression-tests/tests/career-stages/practitioners.spec.ts @@ -26,7 +26,7 @@ test.describe('Practitioners', () => { ['Develop your social work practice', '/develop-social-work-practice', 'Develop your social work practice'], ['Newly qualified social worker', '/explore-roles/newly-qualified-social-worker', 'Newly qualified social worker'], ['Social worker', '/explore-roles/social-worker', 'Social worker'], - ['Explore roles', '/explore-roles', 'Explore roles in child and family social work'], + ['Explore roles', '/explore-roles', 'Roles in child and family social work'], ] for (const link of links) { diff --git a/browser-tests/content-regression-tests/tests/career-stages/senior-managers.spec.ts b/browser-tests/content-regression-tests/tests/career-stages/senior-managers.spec.ts index 55611d12..a0a35c19 100644 --- a/browser-tests/content-regression-tests/tests/career-stages/senior-managers.spec.ts +++ b/browser-tests/content-regression-tests/tests/career-stages/senior-managers.spec.ts @@ -28,7 +28,7 @@ test.describe('Senior managers', () => { ['Principal social worker', '/explore-roles/principal-social-worker', 'Principal social worker'], ['Service manager', '/explore-roles/service-manager', 'Service manager'], ['Head of service', '/explore-roles/head-of-service', 'Head of service'], - ['Explore roles', '/explore-roles', 'Explore roles in child and family social work'], + ['Explore roles', '/explore-roles', 'Roles in child and family social work'], ] for (const link of links) { diff --git a/browser-tests/content-regression-tests/tests/homepage.spec.ts b/browser-tests/content-regression-tests/tests/homepage.spec.ts index 4b2dcac0..ebb8ed5e 100644 --- a/browser-tests/content-regression-tests/tests/homepage.spec.ts +++ b/browser-tests/content-regression-tests/tests/homepage.spec.ts @@ -12,7 +12,7 @@ test.describe('Homepage', () => { ['Experienced practitioner', '/experienced-practitioner', 'Experienced practitioner'], ['Manager', '/manager', 'Manager'], ['Senior manager', '/senior-manager', 'Senior manager'], - ['Senior leader', '/senior-leader', 'Senior Leader'], + ['Senior leader', '/senior-leader', 'Senior leader'], ] for (const link of links) { @@ -25,8 +25,8 @@ test.describe('Homepage', () => { test.describe('Useful information', () => { const links = [ - ['DfE funded programmes', '/development-programmes', 'Child and family social work development programmes'], - ['Explore roles', '/explore-roles', 'Explore roles in child and family social work'], + ['DfE-funded programmes', '/development-programmes', 'Child and family social work development programmes'], + ['Explore roles', '/explore-roles', 'Roles in child and family social work'], ] for (const link of links) {