test(e2e,playwright): certification page improvement (#52476)

pull/52505/head
weilirs 2023-12-06 11:38:07 -06:00 committed by GitHub
parent 20afbfd601
commit 01b24a50aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 44 additions and 0 deletions

View File

@ -112,6 +112,28 @@ test.describe('Certification page - Non Microsoft', () => {
'href',
'/learn/2022/responsive-web-design/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage'
);
await expect(
page.getByText(
'If you suspect that any of these projects violate the academic honesty policy, please report this to our team.'
)
).toBeVisible();
const policyLink = projectLinks.getByRole('link', {
name: 'academic honesty policy'
});
await expect(policyLink).toHaveAttribute(
'href',
'https://www.freecodecamp.org/news/academic-honesty-policy/'
);
const reportLink = projectLinks.getByRole('link', {
name: 'report this to our team'
});
await expect(reportLink).toHaveAttribute(
'href',
'/user/certifieduser/report-user'
);
});
});
@ -190,5 +212,27 @@ test.describe('Certification page - Microsoft', () => {
'href',
'/learn/foundational-c-sharp-with-microsoft/foundational-c-sharp-with-microsoft-certification-exam/foundational-c-sharp-with-microsoft-certification-exam'
);
await expect(
page.getByText(
'If you suspect that any of these projects violate the academic honesty policy, please report this to our team.'
)
).toBeVisible();
const policyLink = projectLinks.getByRole('link', {
name: 'academic honesty policy'
});
await expect(policyLink).toHaveAttribute(
'href',
'https://www.freecodecamp.org/news/academic-honesty-policy/'
);
const reportLink = projectLinks.getByRole('link', {
name: 'report this to our team'
});
await expect(reportLink).toHaveAttribute(
'href',
'/user/certifieduser/report-user'
);
});
});