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

Add a Playwright implementation of e2e tests #13755

Open
1 task done
mraible opened this issue Jan 29, 2021 · 35 comments
Open
1 task done

Add a Playwright implementation of e2e tests #13755

mraible opened this issue Jan 29, 2021 · 35 comments
Assignees
Labels
area: feature request 💡 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ status: work in progress theme: tests $500 https://www.jhipster.tech/bug-bounties/

Comments

@mraible
Copy link
Contributor

mraible commented Jan 29, 2021

Overview of the issue

Add an implementation of JHipster's e2e tests with Playwright.

I'm not sure this is necessary, but I figured I'd enter it here and put a bounty on it in case someone is interested.

Motivation for or Use Case

The least flaky system is the one we want for our CI processes.

Related issues

#13723, #13639

Suggest a Fix

Maybe Julien can get paid to do it?! 😉

  • Checking this box is mandatory (this is just to show you read everything)
@mraible mraible added $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $500 https://www.jhipster.tech/bug-bounties/ labels Jan 29, 2021
@atomfrede
Copy link
Member

You would like to use the typescript version or Java?

@mraible
Copy link
Contributor Author

mraible commented Jan 29, 2021

Both! What do you prefer? The final result should be an implementation and a good story about how it was achieved. :)

@atomfrede
Copy link
Member

atomfrede commented Jan 29, 2021

I guess the ts/node version will be much easier to implement as we have the testrunner etc. in place. Personally I would like to test out the java part (still thinking of doing a thymeleaf + tailwind + htmx + alpine blueprint and having all in java would be great), but totally fine with starting the ts version.

@atomfrede
Copy link
Member

This seems as good blueprint candidate, what do you think?

@atomfrede
Copy link
Member

atomfrede commented Jan 30, 2021

I have a first example up and running using jest as test runner via https://github.com/playwright-community/jest-playwright. Fun to work with. Will try to put it into a blueprint for jh7

export class LoginPage {
  page: any;

  constructor(page: any) {
    this.page = page;
  }
  async navigate() {
    await this.page.goto('http:https://localhost:8080/login');
  }

  async login(username: string, password: string) {
    await this.page.fill('[data-cy="username"]', username);
    await this.page.fill('[data-cy="password"]', password);
    await this.page.click('[data-cy="submit"]');
    await this.page.waitForNavigation();
  }
}
import { LoginPage } from '../models/login';

let loginPage: LoginPage;

beforeEach(async () => {
  loginPage = new LoginPage(page);
  await loginPage.navigate();
});

test('should login', async () => {
  await loginPage.login('admin', 'admin');
  await page.goto('http:https://localhost:8080');
  await page.waitForSelector('[data-cy="adminMenu"]');
});

@avdev4j
Copy link
Contributor

avdev4j commented Feb 1, 2021

I'm not against adding a new tool but I would like to go ahead on Cypress by using the Cypress Dashboard for the JHipster organization.

Maybe it will help on this subject.

https://docs.cypress.io/guides/dashboard/flaky-test-management.html#Flake-Detection

@atomfrede
Copy link
Member

Having it as a blueprint doesn't hurt. Thinking of having the choice between node/ts and java eventually. Not sure how easy it will be to keep up with upstream changes for a blueprint doing e2e tests.

@pascalgrimaud
Copy link
Member

Yes, it will go to blueprint or module

@atomfrede
Copy link
Member

atomfrede commented Feb 2, 2021

Should it be an "official" blueprint or just keep it under https://github.com/atomfrede/generator-jhipster-playwright for now? Maybe @jdubois has a preference?

@jdubois
Copy link
Member

jdubois commented Feb 2, 2021

Oh I missed this thread!
I'm in contact with the Playwright team at Microsoft, I'll ask them if they want to join.

@atomfrede
Copy link
Member

I am going to start a small blog post series about how to create a playwright blueprint. Will try to start this weekend, what do you think?

@pascalgrimaud
Copy link
Member

I'm fine

@atomfrede atomfrede self-assigned this Feb 16, 2021
@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity.
Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted.
We are accepting PRs 😃.
Comment or this will be closed in 7 days

@mraible
Copy link
Contributor Author

mraible commented Mar 19, 2021 via email

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity.
Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted.
We are accepting PRs 😃.
Comment or this will be closed in 7 days

@atomfrede
Copy link
Member

Keep it open

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity.
Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted.
We are accepting PRs 😃.
Comment or this will be closed in 7 days

@atomfrede
Copy link
Member

Keep it open

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity.
Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted.
We are accepting PRs 😃.
Comment or this will be closed in 7 days

@atomfrede
Copy link
Member

Keep it open

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity.
Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted.
We are accepting PRs 😃.
Comment or this will be closed in 7 days

@atomfrede
Copy link
Member

Keep it open

@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2021

This issue is stale because it has been open 30 days with no activity.
Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted.
We are accepting PRs 😃.
Comment or this will be closed in 7 days

@atomfrede
Copy link
Member

Keep it open

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2021

This issue is stale because it has been open 30 days with no activity.
Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted.
We are accepting PRs 😃.
Comment or this will be closed in 7 days

@atomfrede
Copy link
Member

Keep it open

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2021

This issue is stale because it has been open 30 days with no activity.
Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted.
We are accepting PRs 😃.
Comment or this will be closed in 7 days

@atomfrede
Copy link
Member

Keep it open

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2022

This issue is stale because it has been open 30 days with no activity.
Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted.
We are accepting PRs 😃.
Comment or this will be closed in 7 days

@DanielFran
Copy link
Member

@atomfrede I saw your commits in July 2022.
Is this done?

@atomfrede
Copy link
Member

Sadly no. I created a blueprint skeleton with Marcelo at the last jhipster off-site but didn't finish it.

@deepu105
Copy link
Member

is there still interest in this else lets close it cc @atomfrede

@atomfrede
Copy link
Member

I would like to have it. Do we consider the blueprint api for jh8 stable now? Did not continue work as there were so many moving parts, it was hard to keep up, with @mshima being on 🔥 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: feature request 💡 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ status: work in progress theme: tests $500 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

No branches or pull requests

7 participants