Skip to content

Commit

Permalink
FI-1237 feat: run tests via Playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
uid11 committed Jun 28, 2024
1 parent 63199a9 commit 977bad2
Show file tree
Hide file tree
Showing 71 changed files with 1,085 additions and 5,718 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ignorePatterns: [bin/forks/*/package, build, local]
rules:
class-methods-use-this: off
complexity: [error, {max: 10}]
consistent-return: off
curly: [error, all]
default-param-last: off
dot-notation: off
Expand All @@ -45,6 +46,7 @@ rules:
import/no-nodejs-modules:
- error
- allow:
- node:async_hooks
- node:child_process
- node:crypto
- node:fs
Expand Down Expand Up @@ -85,6 +87,7 @@ rules:
- src/*/index.ts
- src/*/internal.ts
- src/bin/*.ts
- src/config.ts
- src/createLocator.ts
- src/esm/*.ts
- src/getModulesGraph.ts
Expand Down Expand Up @@ -163,6 +166,7 @@ rules:
'@typescript-eslint/class-literal-property-style': error
'@typescript-eslint/consistent-generic-constructors': error
'@typescript-eslint/consistent-indexed-object-style': error
'@typescript-eslint/consistent-return': error
'@typescript-eslint/consistent-type-assertions':
[error, {assertionStyle: as, objectLiteralTypeAssertions: never}]
'@typescript-eslint/consistent-type-definitions': [error, type]
Expand Down
15 changes: 15 additions & 0 deletions autotests/tests/example.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import {test} from 'autotests';

import {expect} from 'e2ed';

test('get started link', {meta: {testId: '19'}}, async ({page}) => {
await page.goto('https://playwright.dev/');

// Click the get started link.
await page.getByRole('link', {name: 'Get started'}).click();

await expect(
page.getByRole('heading', {name: 'Installation'}),
'page to have a heading with the name of Installation',
).ok();
});
20 changes: 0 additions & 20 deletions autotests/tests/internalTypeTests/selectors.skip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,11 @@ locatorIdSelector(3); // eslint-disable-line @typescript-eslint/no-magic-numbers

// ok
htmlElementSelector.filterByLocatorId('id') satisfies Selector;
// ok
htmlElementSelector.parentByLocatorId('id') satisfies Selector;
// ok
htmlElementSelector.childByLocatorId('id') satisfies Selector;
// ok
htmlElementSelector.siblingByLocatorId('id') satisfies Selector;
// ok
htmlElementSelector.nextSiblingByLocatorId('id') satisfies Selector;
// ok
htmlElementSelector.prevSiblingByLocatorId('id') satisfies Selector;

// ok
htmlElementSelector.filterByLocatorParameter('prop', 'value') satisfies Selector;
// ok
htmlElementSelector.findByLocatorParameter('prop', 'value') satisfies Selector;
// ok
htmlElementSelector.parentByLocatorParameter('prop', 'value') satisfies Selector;
// ok
htmlElementSelector.childByLocatorParameter('prop', 'value') satisfies Selector;
// ok
htmlElementSelector.siblingByLocatorParameter('prop', 'value') satisfies Selector;
// ok
htmlElementSelector.nextSiblingByLocatorParameter('prop', 'value') satisfies Selector;
// ok
htmlElementSelector.prevSiblingByLocatorParameter('prop', 'value') satisfies Selector;

// ok
void htmlElementSelector.getLocatorId();
Expand Down
Loading

0 comments on commit 977bad2

Please sign in to comment.