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

tests: decouple 'login helpers' from navigating to separate tests #350

Merged
merged 3 commits into from
Jul 10, 2023

Conversation

shakyShane
Copy link
Collaborator

@shakyShane shakyShane commented Jul 10, 2023

Reviewer: @GioSensation @alistairjcbrown
Asana:

Description

  • removes additional page wrappers, in favour of a strongly typed 'navigate(pageType)' call instead
  • removed the string values from some test helpers - not using the constants object directly as types with keyof typeof constants.pages

** before **

export function loginPageWithPoorForm (page, opts) {
    const originalLoginPage = loginPage(page, opts)
    return {
        ...originalLoginPage,
        async navigate () {
            await page.goto(constants.pages['loginWithPoorForm'])
        }
    }
}

after

const login = loginPage(page, opts);
await login.navigate('loginWithPoorForm') // where 'loginWithPoorForm' must be a key in `constants.pages`

Steps to test

@shakyShane
Copy link
Collaborator Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

Copy link
Member

@GioSensation GioSensation left a comment

Choose a reason for hiding this comment

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

Nice little improvement. Thanks!

async navigate () {
await page.goto(server.urlForPath(constants.pages['login+setup']))
},
async assertIdentitiesWereNotDecorated () {
Copy link
Member

Choose a reason for hiding this comment

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

Mhm, weird that these weren't in use. We probably removed the feature recently and removed the tests, but forgot to remove the helpers here. Anyway, we can put them back if needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah exactly my thoughts :)

@shakyShane shakyShane merged commit f8c94b2 into main Jul 10, 2023
@shakyShane shakyShane mentioned this pull request Jul 11, 2023
@shakyShane shakyShane deleted the shane/tests-login-navigation branch July 12, 2023 07:47
CDRussell pushed a commit to duckduckgo/Android that referenced this pull request Jul 14, 2023
Task/Issue URL:
https://app.asana.com/0/1205060095332912/1205060095332912
Autofill Release:
https://github.com/duckduckgo/duckduckgo-autofill/releases/tag/8.0.0


## Description
Updates Autofill to version
[8.0.0](https://github.com/duckduckgo/duckduckgo-autofill/releases/tag/8.0.0).

### Autofill 8.0.0 release notes
## What's Changed
* Remove in-context eligible pixel by @alistairjcbrown in
duckduckgo/duckduckgo-autofill#330
* Run password rules workflow on schedule by @alistairjcbrown in
duckduckgo/duckduckgo-autofill#334
* Add build step after pulling password rules by @alistairjcbrown in
duckduckgo/duckduckgo-autofill#338
* Update password rules (2023-06-23) by @daxmobile in
duckduckgo/duckduckgo-autofill#341
* Update password rules (2023-06-27) by @daxmobile in
duckduckgo/duckduckgo-autofill#345
* tests: attach JSON mocks as attachments by @shakyShane in
duckduckgo/duckduckgo-autofill#348
* tests: decouple 'login helpers' from navigating to separate tests by
@shakyShane in
duckduckgo/duckduckgo-autofill#350
* Couple more fixes by @GioSensation in
duckduckgo/duckduckgo-autofill#351
* fix: Typescript bug in tests + removed duplication within in-context
tests by @shakyShane in
duckduckgo/duckduckgo-autofill#352
* Testing updates by @shakyShane in
duckduckgo/duckduckgo-autofill#356
* Update password rules (2023-07-12) by @daxmobile in
duckduckgo/duckduckgo-autofill#357
* feat: email protection saving by @shakyShane in
duckduckgo/duckduckgo-autofill#355

## New Contributors
* @daxmobile made their first contribution in
duckduckgo/duckduckgo-autofill#341

**Full Changelog**:
duckduckgo/duckduckgo-autofill@7.2.0...8.0.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: shakyShane <shakyShane@users.noreply.github.com>
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.

2 participants