Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding E2E Testing Automation #755

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Adding E2E Testing Automation #755

wants to merge 2 commits into from

Conversation

rgrnearform
Copy link

Ticket:

Description

Type

  • Dependency upgrade
  • Bug fix
  • New feature
  • Dev change

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • This change might impact the developer experience of others and should be communicated

Screenshots:

N/A

Copy link
Collaborator

@Thurfjell Thurfjell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is abstracting actions and assertions in a class best practice? Just curious, there's a lot of LoC regardless for e2e right.

Is it overkill in that case to adopt some kind of builder pattern (return *self on each object function)?
eg.

await somePage
 .doStuff()
 .expectStuff();

@@ -0,0 +1,86 @@
# Playwright Tests with TypeScript

This repository contains end-to-end tests for a web application using Playwright and TypeScript. The tests are organized using the Page Object Model (POM) to enhance maintainability and readability.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Should probably describe this in other words, as repository is quite a trademarked word in the git context. Also, confusing as it is, apps/web is a legacy naming we never got around to update, but (correct me if I'm wrong) it's essentially the life events web app.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On another note, a tl;dr description on POM and best practice would be cool 😎

Comment on lines +9 to +10
- Node.js (>=14.x)
- npm (>=6.x)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary?

Comment on lines +12 to +23
### Installation

1. Clone the repository:
```sh
git clone https://github.com/your-repo/playwright-tests.git
cd playwright-tests
```

2. Install dependencies:
```sh
npm install
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary?

Comment on lines +25 to +31
### Running Tests

To run all tests, use the following command:
```sh
npx playwright test

npx playwright test --grep @critical
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need two Running Tests sections?


For more information on configuring Playwright, visit the [official documentation](https://playwright.dev/docs/test-configuration).

### Running Tests
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General question, is there any merit in describing (tl;dr fashion) what headed eg. means, or are we supposed to know this already (me problem)?

@rgrnearform rgrnearform marked this pull request as ready for review August 5, 2024 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants