Граф коммитов

320 Коммитов

Автор SHA1 Сообщение Дата
Ankita Shrivastava 6b0e150597
chore(functional): integrate html reporting with Playwright 2024-06-17 22:27:45 -04:00
Lisa Chan f05d73021b
fix(libs): Refactor Stripe Plan usage to Stripe Price 2024-06-13 14:23:35 -04:00
Katrina Anderson 9187cc3a49
fix(functional-tests): no timings found for error in ci run-playwright-tests job
Because:

* the `--split-by=timings` default type `file` and alternative type `name` are unsupported for the playwright junit xml file

This commit:

* adds the `--split-by=classname` option

Closes #FXA-9720
2024-05-31 14:19:02 -04:00
Katrina Anderson 853e75034f
refactor(functional-tests): distribute functional tests across workers evenly (part 2)
Because:

* we want to execute the functional tests in CI as fast as possible

This commit:

* matches parallelism to the number of cores for a resource_class (4 for large and 8 for xlarge)
* splits and refactors the misc/keyStretchingV2.spec module into:
  * key-stretching-v2/totp.spec.ts
  * key-stretching-v2/signinBlocked.spec.ts
* splits the oauth/oauthPermissions.spec.ts module into:
  * oauth/oauthPermissionsSignin.spec.ts
  * oauth/oauthPermissionsSignup.spec.ts
* splits part of the oauth/signin.spec.ts module into oauth/signinBlocked.spec.ts
* splits part of the react-conversion/oauthResetPassword.spec.ts module into:
  * react-conversion/oauthResetPasswordRecoveryKey.spec.ts
  * react-conversion/oauthResetPasswordScopeKey.spec.ts
  * react-conversion/oauthResetPasswordSyncMobile.spec.ts
* splits part of the react-conversion/signup.spec.ts module into react-conversion/oauthSignup.spec.ts
* splits part of the settings/changeEmail.spec.ts module into settings/changeEmailBlocked.spec.ts
* splits part of the settings/changePassword.spec.ts module into settings/changePasswordValidation.spec.ts
* splits part of the subscription-tests/coupons-ui-tests/coupon.spec.ts module into:
  * subscription-tests/coupons-ui-tests/couponExpired.spec.ts
  * subscription-tests/coupons-ui-tests/couponForeverDiscount.spec.ts
  * subscription-tests/coupons-ui-tests/couponInvalid.spec.ts
  * subscription-tests/coupons-ui-tests/couponOneTimeDiscount.spec.ts
* splits part of the subscription-tests/coupons-ui-tests/resubscription.spec.ts module into subscription-tests/coupons-ui-tests/paymentMode.spec.ts
* splits part of the syncV3/fxDesktopHandshake.spec.ts module into syncV3/fxDesktopHandshakeNonSync.spec.ts
* splits part of the syncV3/fxDesktopV3ForceAuth.spec.ts module into syncV3/fxDesktopV3ForceAuthUnregistered.spec.ts
* splits part of the syncV3/signIn.spec.ts module into syncV3/oauthSignIn.spec.ts
* fixes confirmResetPasswordHeading error in react-conversion/resetPassword.spec.ts

Closes #FXA-9699
2024-05-24 08:28:29 -04:00
Wil Clouser 02202e0f63
Upgrade docker builds to medium+
Because:
- Nightly builds are failing
2024-05-14 06:06:42 -07:00
Barry Chen 2a5a357189
chore(build): let chokidar poll 2024-05-10 10:00:39 -05:00
Wil Clouser 6e9d462a2c
Testing circleci config w/ circleci support 2024-05-10 06:02:28 -07:00
Wil Clouser 96446ce0b9
try version: previous 2024-05-08 13:10:13 -07:00
Wil Clouser 87fbf65e27
Revert "Update config.yml" 2024-05-08 12:00:02 -07:00
Wil Clouser 62a8666621
Update config.yml 2024-05-08 11:04:39 -07:00
Wil Clouser 0ebf7aa0e2
Revert "Disable NX_DAEMON when building the container" 2024-05-08 09:10:35 -07:00
Wil Clouser 137a84ba4f
Disable NX_DAEMON when building the container 2024-05-08 08:15:33 -07:00
Wil Clouser d38f23b7f1
Add `provision` back to docker building steps
We're not sure what was going on with 06c207480c but we think this is breaking stuff.
2024-04-30 15:17:43 -07:00
Vijay Budhram 0e00017b0d
fix(cache): Remove memcache service and references to it
feat(sync): Return estimated sync devices in recovery key exist route
2024-04-30 15:08:47 -04:00
dschom 06c207480c
task(ci): update functional test executor 2024-04-25 15:28:43 -07:00
dschom d7c703f2fa
task(auth): Have auth-server use cloud-tasks nx lib
Because:
- We want to use the `cloud-tasks` nx lib that introduced last sprint

This commit
- Updates account end points to use the nx lib
- Updates CI to include cloud-task emulator

(cherry picked from commit 7c0c70d2a4)
2024-03-27 16:16:18 -07:00
Valerie Pomerleau 9b820bde13
Revert "task(auth): Have auth-server use cloud-tasks nx lib " 2024-03-27 13:23:46 -07:00
dschom 7c0c70d2a4
task(auth): Have auth-server use cloud-tasks nx lib
Because:
- We want to use the `cloud-tasks` nx lib that introduced last sprint

This commit
- Updates account end points to use the nx lib
- Updates CI to include cloud-task emulator
2024-03-26 15:43:57 -07:00
Ben Bangert c28b061257
chore: update Node to LTS 20, TypeScript, tsconfig
Because:

* We want to update to Node 20 LTS.
* We want to target the JS output of Node 20.
* We want to use the latest TypeScript 5.4

This commit:

* Updates the Node version to 20 LTS.
* Updates the TypeScript version and related TS libs
  to 5.4.
* Updates tsconfig for the new Node 20 target.
2024-03-14 11:54:20 -07:00
Jon Buckley 92b0827f7f
Merge pull request #15844 from mozilla/upgrade-to-mysql-8-0-31
chore(mysql): Upgrade to MySQL 8.0.31
2024-03-05 14:21:41 -05:00
Reino Muhl 2df7ca494a
chore(nx): upgrade to nx 18
Because:

* Want to migrate Nx to latest

This commit:

* Migrate nx to 18 using nx cli migrate latest
* Readd a few dev dependancies back into packages/**/package.json
  * Behavior of `npx nx...` commands seems to have changed, resulting in
    multiple "command not found: <library>" errors, where <library>
    refers to libaries used in packages/**/package.json scripts, such as
    tailwindcss, tsc-alias, nx, etc.
* Updates nx cache location for Circle CI

Closes #FXA-8880
2024-02-12 09:01:00 -05:00
dschom 1d9b18b3fa
task(auth): Support V2 credential format
Because:
- We want to add support for up coming changes to key stretching in the auth server first
- We want to ensure all changes are backwards compatible

This Commit:
- Updates test to use approach for the client side stretch where:
   - Stretch uses 650k iterations
   - Client salt uses random value instead of user's original email
- Updates tests to run using both V1 and V2 credentials
- Updates database to support new  columns for housing V2 credentials
- Updates account models accordingly
- Adds statsd metrics to track use of v2 credentials
- Updates CI tests to run remote integration tests for V2 credentials
2024-01-17 09:16:57 -08:00
Jon Buckley 99c80e7837
chore(mysql): Follow latest patch release of MySQL 8.0 2024-01-08 15:17:22 -08:00
dschom 1e455ec9c8
task(ci): Remove redis dev password from source
Because:
- We are cleaning up stray password even those just used for dev

This Commit:
- Removes the dev password, fxa123, from source
2023-11-03 14:24:07 -07:00
Valerie Pomerleau d6c798d361
refactor(content): Remove deprecated recovery key creation flows
Because:

* We have turned on the new account recovery key creation flow to 100% and now want to remove the old unused settings and content-server (post_verify/account_recovery) flows

This commit:

* Remove feature flag set up for old vs new account recovery key flow
* Remove all code related to old PageAddRecoveryKey in fxa-settings
* Remove all code related to old post_verify/acccount_recovery in content-server
* Test fixes

Closes #FXA-7419
2023-10-24 10:11:07 -07:00
dschom 9066d41089
task(CI): Increase resource class that deploys storybooks
Because:
- Deploys were getting flaky, and hitting memory limits

This commit:
- Changes `build-and-deploy-storybooks` from medium plus to large.
2023-10-13 18:01:35 -07:00
dschom 9dc8f44332
bug(CI): Fix missing CSS in auth server storybooks
Because:
- Styling in auth server storybooks was off

This Commit:
- Adds the email css folders to workspace
- Adds the locales folders to workspaces
- Updates the log level for gcp export so we can see what is being published
- Has `mozilla-fxa/storybook-gcp-publisher` to only publish, we now build ourselves with an nx command.
2023-10-13 08:53:42 -07:00
Ankita Shrivastava 8051e36ff8
config(functional): remove content-server-remote steps for old tests 2023-10-05 14:23:37 -04:00
Ben Bangert 1924d154ec
chore(deps): bump faker, nx, and next
Because:

* We want to keep up to date with the latest versions.

This commit:

* Updates the faker, nx, and next dependencies.
2023-09-26 19:26:14 -07:00
Dan Schomburg bcd5ad1c44
task(CI): Remove CI: false overrides
Because:
- We want to see if anything breaks
- Setting `CI: true` changes the behavior of tsc such that warnings result in a non-zero exit code

This Commit:
- Turns off overrides
2023-09-18 16:56:58 -07:00
Valerie Pomerleau f47ac31c2b
fix(content): Remove recovery key experimentation rules
Because:

* Experiment rollout to 100% of users was not working as expected
* We already have a feature flag that we can use to toggle the new flow on/off

This commit:

* Remove all code related to experiment rules for the new recovery key flow
* Keep feature flag for new flow
* Effectively rollout to 100% of traffic unless feature flag is turned off in an environment

Closes #FXA-8335
2023-09-15 11:07:08 -07:00
dschom 72b68f95bb
bug(ci): Fix broken stage/prod smoke tests
Because:
- In train-266 stage smoke tests failed because the auth-client build was missing
- The auth client used to be part of the docker image, but this changed now that we cache builds in nx.

This Commit:
- Builds auth client with nx prior to running smoke tests.
2023-08-30 17:10:51 -07:00
dschom 5f5700a5ed
task(ci): Fix train 266 issues
Because:
- Fixes projects param on integration tests in flows other than test_pull_request
- Defaults to large resource class for integration tests (for now)
2023-08-30 13:30:16 -07:00
dschom d96797ae6a
task(CI): Improve nx caching for CI pipelines
Because:
- Not all CI operations where taking advantage of NX caches

This Commit:
- Adjusts nx.json config to ensure correct caching behavior
- Adjusts nx.json config to ensure proper target chains. ie build is dependent on pre-build
- Uses nx to directly run integration tests
- Uses nx to directly run unit tests
- Phases out dependency on generated .list files
- Ensures 'start up' for services for functional tests is done with nx and uses nx caches.
- Creates nx tags to facilitate test commands
- Fixes linter errors encountered
- Updates docker images to nx for builds
- Updates nx ignore files
2023-08-29 11:19:54 -07:00
Ben Bangert 54f0c2e7a2
chore: update to TS to 5.2.2 and Node to 18.17.1
Because:

* We want to use the latest typescript features.

This commit:

* Updates to TypeScript 5.2.2.
* Updates to Node 18.17.1 as OOM would occur frequently with 18.14.
* Updates CI to use a large instance with increased memory for Node.
2023-08-28 14:47:29 -07:00
Reino Muhl 9c1afee646
feat(carts): refactor cart manager to match layers
Because:
- Refactor the Cart Manager to serve as higher level logic for the
  cart db model.

This commit:
- Removes service level logic.
- Adds common methods to be used by Cart Manager consumers.
- Adds checks for valid state by action and valid state transitions.
- Reverts playwright tests back to xlarge instance size

Closes FXA-8128
2023-08-15 18:03:36 -04:00
Barry Chen 00157e2d30
chore(ci): use large instances for functional tests 2023-08-10 16:13:26 -05:00
dschom 535498214a
task(many): Switch nx test target to be test-unit
Because:
- The CI already targets test-unit
- We want to draw a distinction between unit and integration tests.

This Commit:
- Renames "test" to "test-unit" in lib packages.
- Sets up CI to run integration tests on 'libs' folder packages
- Adds tags to nx projects in libs folder
2023-08-03 15:38:16 -07:00
Reino Muhl 432e3b8d2b
feat(shared): hide fluent warning msgs in tests
Because:

* Fluent warning messages are slowing down tests.

This commit:

* Updates to the latest @fluent/react version
* Adds a non-console.warn reportError to testing ReactLocalization
  instantiations.

Closes #FXA-7958
2023-08-01 20:08:50 -04:00
Valerie Pomerleau 747df5b722
fix(CircleCI): Increase playwright resource class to xlarge
Because:

* Resubscription tests were failing/flaking

This commit:

* Increase the playwright functional test resource class from large to xlarge.

Closes #
2023-07-19 15:16:49 -07:00
Ankita Shrivastava 22b4af980f
Merge pull request #15542 from mozilla/remove-old-tests
remove all the content-server tests from the config file
2023-07-19 12:33:26 -04:00
Ankita Shrivastava c447c543b4
remove all the content-server tests from the config file 2023-07-19 12:19:11 -04:00
Dan Schomburg 9ba5511aa8
Merge pull request #15524 from mozilla/FXA-7634
task(settings): Port oauth redirect logic to reset password flows
2023-07-18 13:52:36 -07:00
dschom b646df5721
task(settings): Port oauth redirect logic to reset password flows
Because:
- We want to enable password reset using our react app.

This commit:
- Ports over oauth reset password for react
- Updates Playwright tests accordingly
    - Ports over playwright tests covering typical reset password flows
    - Adds playwright test for PKCE reset password case
    - Adds playwright test for TOTP reset password case
    - Adds playwright test for account recovery code reset password case
    - Adds playwright test for account recovery code & TOTP reset password case
- Enables oauth redirect logic, and removed short circuit operation in router.js -> showReactApp that would prevent oauth routes from rendering.
- Applied oauth redirect logic to:
   - CompleteResetPassword page
   - AccountRecoveryResetPassword
- Fixes issues with displaying service name in:
    - ResetPasswordWithRecoveryKeyVerified
    - ResetPasswordVerified,
- Fixes issues with rendering story book state
- Fixed issues found in hooks:
    - Switched CreateReliers and CreateIntegration to useReliers and useIntegration. These accessed context so it turns out they really should be hooks.
    - Made these hooks return singletons, which fixed a bunch of ‘ghost’ rerenders.
- Fixed an intermittent race condition in url-query-data.ts and added an option to ‘synchronize’ a data store.
- Updated logic in RelierFactory.initOuathReliers to ensure all the relying party information needed for password reset could be resolved.
- Fixed call to account.resetPassword on ResetPassword page, so proper options were sent to auth so state would be reflected in email link.
- Added support for handling resume tokens. Resume tokens on base64 encoded in the resume field in the query string. The logic for parsing these tokens wasn’t present yet.
- Updated the integration factory to pass in a relier authClient. These were needed to handle the integration logic.
- Ported scoped keys logic.
- Clean up in tests:
    - Moved commonly used function, getReactFeatureFlagUrl to a util file.
    - Removes incorrect usages of act blocks in favor of 'findBy' calls
    - Wraps events in 'act' block that require it thereby fixing 'act' warnings
    - Mocks console.warn to silence data provider output
    - Test fxa-settings:test-integration output is now 100% percent clean, with no more warnings!
2023-07-18 13:25:41 -07:00
Meghan Sardesai 2598733ed9
feat(payments): update PlanUpgradeDetails content
Because:

* We need to show the customer what is owed and when (i.e. proration) on checkout.

This commit:

* Updates PlanUpgradeDetails component and invoice preview to include proration amount.
* Adds a helper function to formats for only plan intervals.
* Shows updated content when useStripeImmediatelyInvoice flag is set to true.
* Updates tests and stories when aforementioned flag is set to true, where applicable.

Closes FXA-6878
2023-07-18 13:49:22 -04:00
dschom df7897920d
task(gql-api): Allowlist graphql queries
Because:
- We want to lock down our gql queries as part of good security practices.

This Commit:
- Creates task that extracts existing gql queries from our code
- Applies middleware that checks a allowlist of extracted queries.
- Creates a 403 if the query is not in the allowlist
- Makes all gql parsable by extraction utility. The extraction utility doesn't support string placeholders. e.g. gql` Account { ${ACCOUNT_FIELDS} }`
- Moves all the gql in the admin server into .ts files. Again for consistency and extraction utility support.
- Cleans up some config references at startup
- Adds nx config for extraction & copy tasks
2023-07-18 05:54:28 -07:00
Valerie Pomerleau 597aa98d7d
test(functional-tests): Update functional tests for new recovery key flow
Because:

* We need to update the playwright tests to support the new account recovery key flow

This commit:

* Update recoveryKey page model
* Update misc, password and recoveryKey functional tests with feature flagging

Closes #FXA-7250
2023-05-24 08:08:59 -07:00
Dan Schomburg b9f3f51331
Merge pull request #15197 from mozilla/config-smoke-test-urls
task(CI): Make smoke test URLs configurable
2023-05-23 17:56:49 -07:00
dschom 46496b5b27
task(CI): Make smoke test URLs configurable
Because:
- We want to try running smoke tests against a new environment

This Commit:
- Adds pipeline parameters for configuring standard domains
- Transfers pipeline parameters to a set of standard envs
- Updates playwright tests to use these envs
- Updates functional content server tests to use these envs
2023-05-23 17:14:30 -07:00
Julian Poyourow 565ebb89c9
chore(build): initial nx implementation
Because:

* We want to introduce nx to the repository

This commit:

* Adds nx with working builds

Closes: FXA-7341

Co-authored-by: dschom <dschomburg@mozilla.com>
2023-05-23 08:37:47 -07:00