aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.44k stars 2.13k forks source link

Allow for @aws-amplify/notifications configure to set an endpoint #11371

Open ioanabrooks opened 1 year ago

ioanabrooks commented 1 year ago

Describe the feature you'd like to request

For testing purposes (mocking) it would be great if the Notifications pinpoint endpoint could be customizable through amplify.configure, the same way Auth allows configuration of Cognito endpoint.

Describe the solution you'd like

I would like the Auth.configure(); method to be able to take in the pinpoint endpoint param the same way Auth does e,g:

Amplify.configure({
  ...awsconfig,
  Auth: { endpoint: 'http://127.0.0.1:9091/' },
  Notifications: { endpoint: 'http://127.0.0.1:9091/' },
});

Describe alternatives you've considered

For web platforms, testing with Cypress allows for intercepting network calls, but for React Native testing with Detox that is not supported.

Additional context

No response

Is this something that you'd be interested in working on?

cwomack commented 1 year ago

@ioanabrooks, thanks for opening this issue. There doesn't appear to currently be a feature with Pinpoint and Push Notifications to hit an endpoint locally at this time. As such, I've marked this as a feature request and will review this with the team internally and provide updates on this issue when we have them!