test(e2e,playwright): <lower-jaw> (#52040)

Co-authored-by: Aidan <aidanlowson@gmail.com>
This commit is contained in:
Aidan
2023-11-01 17:38:04 +00:00
committed by GitHub
parent 43062102d5
commit 5c5889dd3a

View File

@@ -37,3 +37,26 @@ test('Click on the "Reset" button', async ({ page }) => {
await expect(resetModal).toBeVisible();
});
test('Should render UI correctly', async ({ page }) => {
const codeCheckButton = page.getByRole('button', {
name: 'Check Your Code'
});
const lowerJawTips = page.getByTestId('failing-test-feedback');
await expect(codeCheckButton).toHaveText('Check Your Code (Ctrl + Enter)');
await expect(lowerJawTips).toHaveCount(0);
});
test('Should display full button text on desktop but hide (Ctrl + Enter on mobile)', async ({
page,
isMobile
}) => {
const codeCheckButton = page.getByRole('button', {
name: 'Check Your Code'
});
await expect(codeCheckButton).toHaveText('Check Your Code (Ctrl + Enter)');
if (isMobile) {
await expect(codeCheckButton).toHaveText('Check Your Code');
}
});