-
Notifications
You must be signed in to change notification settings - Fork 11
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
New batch of fixes + integration test improvements #489
Conversation
Signed-off-by: Emanuele Feliziani <feliziani.emanuele@gmail.com>
Signed-off-by: Emanuele Feliziani <feliziani.emanuele@gmail.com>
'signupWithFormInModal': 'pages/signup-in-modal.html', | ||
'loginCovered': 'pages/login-covered.html', | ||
'loginMultistep': 'pages/login-multistep.html' | ||
'overlay': `${localPagesPrefix}/overlay.html`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Referencing either the local path or the privacy test pages path. I will migrate more and more over time.
await page.waitForFunction(selector => Boolean(document.querySelector(selector)?.getAttribute('style')), selector) | ||
// don't make assertions until the element has been scanned | ||
const field = page.locator(selector) | ||
await expect(field).toHaveAttribute('data-ddg-inputtype') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've switched this to use the locator with expect
so that playwright automatically pierces the shadow tree and waits for the attribute to be set. Otherwise, I'd have to implement something custom for waitForFunction
. This also seems much cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
@@ -21,22 +21,25 @@ | |||
"test:passwords": "PASSWORD_STRESS_TEST=true jest generate.test.js", | |||
"test:unit": "jest", | |||
"test:integration": "npm run build && npm run copy-assets && playwright test", | |||
"test:integration:fast": "playwright test --timeout 10000 --workers 8", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A shortcut that skips the build, runs with more workers and a shorter timeout so tests fail faster. This is great for faster test iterations. The other is safer (you're always re-creating the build).
{ "html": "rottentomatoes_signup.html", "expectedFailures": ["emailAddress"], "expectedSubmitFalsePositives": 1 }, | ||
{ "html": "rottentomatoes_signup.html" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff :)
await page.waitForFunction(selector => Boolean(document.querySelector(selector)?.getAttribute('style')), selector) | ||
// don't make assertions until the element has been scanned | ||
const field = page.locator(selector) | ||
await expect(field).toHaveAttribute('data-ddg-inputtype') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
Task/Issue URL: https://app.asana.com/0/1206475855296108/1206475855296108 Autofill Release: https://github.com/duckduckgo/duckduckgo-autofill/releases/tag/10.1.0 ## Description Updates Autofill to version [10.1.0](https://github.com/duckduckgo/duckduckgo-autofill/releases/tag/10.1.0). ### Autofill 10.1.0 release notes ## What's Changed * Support shadow dom by @GioSensation in duckduckgo/duckduckgo-autofill#485 * New batch of fixes + integration test improvements by @GioSensation in duckduckgo/duckduckgo-autofill#489 * Update password-related json files (2024-01-17) by @daxmobile in duckduckgo/duckduckgo-autofill#474 * Bump playwright from 1.38.1 to 1.40.1 by @dependabot in duckduckgo/duckduckgo-autofill#458 * Update password-related json files (2024-01-26) by @daxmobile in duckduckgo/duckduckgo-autofill#484 * Bump json-schema-to-typescript from 13.1.1 to 13.1.2 by @dependabot in duckduckgo/duckduckgo-autofill#479 **Full Changelog**: duckduckgo/duckduckgo-autofill@10.0.3...10.1.0 ## Steps to test This release has been tested during autofill development. For smoke test steps see [this task](https://app.asana.com/0/1198964220583541/1200583647142330/f). Co-authored-by: GioSensation <GioSensation@users.noreply.github.com>
Reviewer: @shakyShane
Asana: https://app.asana.com/0/0/1206048671514097/f
Description
Apart from the usual minor bug fixes, this includes nice updates to the integration tests:
npm run test:integration:fast
that skips recompiling the files and uses shorter timeouts and more workers. This enables faster iterations when working on tests locally 💪.Steps to test
Everything tested.