Skip to content

Commit

Permalink
Merge branch 'next' into refactor/module-creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Nov 6, 2023
2 parents 8754f04 + 358572d commit 415ed35
Show file tree
Hide file tree
Showing 17 changed files with 69 additions and 386 deletions.
8 changes: 7 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = defineConfig({
reportUnusedDisableDirectives: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/strict-type-checked',
'plugin:prettier/recommended',
'plugin:deprecation/recommended',
'plugin:jsdoc/recommended-typescript-error',
Expand Down Expand Up @@ -91,6 +91,7 @@ module.exports = defineConfig({
'error',
{ ignoreParameters: true },
],
'@typescript-eslint/no-unnecessary-condition': 'off', // requires `strictNullChecks` to be enabled
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
Expand All @@ -104,6 +105,11 @@ module.exports = defineConfig({
{ allowNumber: true, allowBoolean: true },
],
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/unified-signatures': 'off', // incompatible with our api docs generation

// TODO @ST-DDT 2023-10-10: The following rules currently conflict with our code.
// Each rule should be checked whether it should be enabled/configured and the problems fixed, or stay disabled permanently.
'@typescript-eslint/no-confusing-void-expression': 'off',

'jsdoc/require-jsdoc': 'off', // Enabled only for src/**/*.ts
'jsdoc/require-returns': 'off',
Expand Down
36 changes: 36 additions & 0 deletions docs/guide/frameworks.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,39 @@ describe('Testing the application', () => {
});
});
```

## Playwright

Integration with [Playwright](https://playwright.dev/) is also easy:

```ts
import { faker } from '@faker-js/faker/locale/en';
import { expect, test } from '@playwright/test';

test.describe('Testing the application', () => {
test('should create an account with username and password', async ({
page,
}) => {
const username = faker.internet.userName();
const password = faker.internet.password();
const email = faker.internet.exampleEmail();

// Visit the webpage and create an account.
await page.goto('https://www.example.com/register');
await page.getByLabel('email').fill(email);
await page.getByLabel('username').fill(username);
await page.getByLabel('password', { exact: true }).fill(password);
await page.getByLabel('confirm password').fill(password);
await page.getByRole('button', { name: 'Register' }).click();

// Now, we try to login with these credentials.
await page.goto('https://www.example.com/login');
await page.getByLabel('email').fill(email);
await page.getByLabel('password').fill(password);
await page.getByRole('button', { name: 'Login' }).click();

// We should have logged in successfully to the dashboard page.
await expect(page).toHaveURL(/.*dashboard/);
});
});
```
2 changes: 0 additions & 2 deletions src/locales/cs_CZ/person/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import male_prefix from './male_prefix';
import name_ from './name';
import prefix from './prefix';
import suffix from './suffix';
import title from './title';

const person: PersonDefinition = {
female_first_name,
Expand All @@ -32,7 +31,6 @@ const person: PersonDefinition = {
name: name_,
prefix,
suffix,
title,
};

export default person;
91 changes: 0 additions & 91 deletions src/locales/cs_CZ/person/title.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/locales/he/person/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import male_first_name from './male_first_name';
import male_prefix from './male_prefix';
import name_ from './name';
import prefix from './prefix';
import title from './title';

const person: PersonDefinition = {
female_first_name,
Expand All @@ -24,7 +23,6 @@ const person: PersonDefinition = {
male_prefix,
name: name_,
prefix,
title,
};

export default person;
91 changes: 0 additions & 91 deletions src/locales/he/person/title.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/locales/pl/person/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import male_prefix from './male_prefix';
import name_ from './name';
import prefix from './prefix';
import sex from './sex';
import title from './title';

const person: PersonDefinition = {
female_first_name,
Expand All @@ -28,7 +27,6 @@ const person: PersonDefinition = {
name: name_,
prefix,
sex,
title,
};

export default person;
91 changes: 0 additions & 91 deletions src/locales/pl/person/title.ts

This file was deleted.

Loading

0 comments on commit 415ed35

Please sign in to comment.