Skip to content

Commit

Permalink
test(textarea): add test with helper text
Browse files Browse the repository at this point in the history
  • Loading branch information
max-umain committed Dec 20, 2024
1 parent d3b3c4d commit 9dfb425
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8" />
<title>Textarea - With helper text</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<link rel="stylesheet" href="../../../../../dist/tegel/tegel.css" />
<script type="module">
import { defineCustomElements } from '../../../../../loader/index.es2017.js';
defineCustomElements();
</script>
</head>

<body>
<tds-textarea placeholder="Placeholder" helper="Helper text"></tds-textarea>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { test } from 'stencil-playwright';
import { expect } from '@playwright/test';
import {
testConfigurations,
getTestDescribeText,
setupPage,
} from '../../../../utils/testConfiguration';

const componentTestPath = 'src/components/textarea/test/with-helper-text/index.html';
const componentName = 'tds-textarea';
const testDescription = 'tds-textarea-with-helper-text';

testConfigurations.withModeVariants.forEach((config) => {
test.describe.parallel(getTestDescribeText(config, testDescription), () => {
test.beforeEach(async ({ page }) => {
await setupPage(page, config, componentTestPath, componentName);
});

test('renders textarea with helper text', async ({ page }) => {
/* Expect no diff on screenshot */
await expect(page).toHaveScreenshot({ maxDiffPixels: 0 });
});
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9dfb425

Please sign in to comment.