Skip to content

Migrate FaceBookLoginTest to Playwright TypeScript - #16

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/demo-pw-facebook-login
Open

Migrate FaceBookLoginTest to Playwright TypeScript#16
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/demo-pw-facebook-login

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 19, 2026

Copy link
Copy Markdown

Summary

Ports the single legacy Selenium/TestNG class FaceBookLoginTest (plus its page object) to a self-contained Playwright TypeScript project under e2e-playwright/ (own package.json, playwright.config.ts, chromium-only). No Java sources, pom.xml, or TestNG suites are touched — the legacy suite still runs and still fails as designed.

Locator change that matters: the legacy page object used @FindBy(id = "email"), but current facebook.com renders generated ids (id="_R_1h6kqsqppb6amH1_"), so the fields are addressed by their stable name attributes:

emailInput    = page.locator('input[name="email"]');
passwordInput = page.locator('input[name="pass"]');

Honest handling of the legacy assertion: the Java test ends in Assert.assertTrue(false, "Login failed : Test failed") — an unconditional failure, not a statement about the app, and there are no credentials in the repo to actually authenticate with. Rather than rewriting it into something that passes vacuously, the spec splits the intent:

test('loads the login page and submits the credentials entered', ...)   // steps 1-2, real assertions
test.fixme('reports a successful login - legacy assertion is an unconditional failure', ...) // step 3, pending with explanation

The passing test asserts only what it can honestly observe: the login form is visible, both fields hold the values entered ("abc"/"abc", as in the legacy test), and after submit the browser is still on a facebook.com host. Local run: 1 passed, 1 skipped (the fixme).

CI: .github/workflows/playwright-facebook.yml runs npx playwright test tests/facebook-login.spec.ts on pull_request (paths-filtered to e2e-playwright/** and the workflow itself) and uploads the HTML report. Note the spec hits the live facebook.com, so it depends on that being reachable from the runner.

Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/f6ec885af4f742e5b9c75c712adfb436

Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/f46eebc578904c8fbce42f04bb0b1898
Requested by: @sumitshatwara

@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

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.

0 participants