-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(www): send form feedback from new contact view via Sentry (#1733)
* Send new feedback to Sentry. * Fix error reporter attribute. * Update `source` to `accessKeySource`. * Add test cases for the contact view. * Disable `contactViewFeatureFlag`. * Fix `ContactView` storybook by mocking the error reporter with a console logger. * Use spread instead of casting to `unknown`. * Move success and error handling of contact view to `AppRoot` component. * Move error reporter to `www/shared/` instead of `infrastructure/`. * Put error reporter back into `TODO.spec.ts` now that it's back under `www/`. * Fix `ContactView` tests. * Reset `contactViewFeatureFlag` value.
- Loading branch information
Showing
13 changed files
with
108 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,29 +35,29 @@ describe('SupportForm', () => { | |
it('shows correct fields for the client variant', async () => { | ||
const el = await fixture(html` <support-form variant="client"></support-form> `); | ||
|
||
expect(el.shadowRoot!.querySelector('mwc-textfield[name="source"]')).not.toBeNull(); | ||
expect(el.shadowRoot!.querySelector('mwc-textfield[name="accessKeySource"]')).not.toBeNull(); | ||
expect(el.shadowRoot!.querySelector('mwc-select[name="cloudProvider"]')).toBeNull(); | ||
}); | ||
|
||
it('shows correct fields for the manager variant', async () => { | ||
const el = await fixture(html` <support-form variant="manager"></support-form> `); | ||
|
||
expect(el.shadowRoot!.querySelector('mwc-textfield[name="source"]')).toBeNull(); | ||
expect(el.shadowRoot!.querySelector('mwc-textfield[name="accessKeySource"]')).toBeNull(); | ||
expect(el.shadowRoot!.querySelector('mwc-select[name="cloudProvider"]')).not.toBeNull(); | ||
}); | ||
|
||
it('sets fields with provided form values', async () => { | ||
const values: FormValues = { | ||
email: '[email protected]', | ||
source: 'a friend', | ||
accessKeySource: 'a friend', | ||
subject: 'Test Subject', | ||
description: 'Test Description', | ||
}; | ||
const el = await fixture(html` <support-form .values=${values}></support-form> `); | ||
|
||
const emailInput: TextField = el.shadowRoot!.querySelector('mwc-textfield[name="email"')!; | ||
expect(emailInput.value).toBe('[email protected]'); | ||
const accessKeySourceInput: TextField = el.shadowRoot!.querySelector('mwc-textfield[name="source"')!; | ||
const accessKeySourceInput: TextField = el.shadowRoot!.querySelector('mwc-textfield[name="accessKeySource"')!; | ||
expect(accessKeySourceInput.value).toBe('a friend'); | ||
const subjectInput: TextField = el.shadowRoot!.querySelector('mwc-textfield[name="subject"')!; | ||
expect(subjectInput.value).toBe('Test Subject'); | ||
|
@@ -91,7 +91,7 @@ describe('SupportForm', () => { | |
|
||
const emailInput: TextField = el.shadowRoot!.querySelector('mwc-textfield[name="email"')!; | ||
await setValue(emailInput, '[email protected]'); | ||
const accessKeySourceInput: TextField = el.shadowRoot!.querySelector('mwc-textfield[name="source"')!; | ||
const accessKeySourceInput: TextField = el.shadowRoot!.querySelector('mwc-textfield[name="accessKeySource"')!; | ||
await setValue(accessKeySourceInput, 'From a friend'); | ||
const subjectInput: TextField = el.shadowRoot!.querySelector('mwc-textfield[name="subject"')!; | ||
await setValue(subjectInput, 'Test Subject'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,7 @@ export const CompleteForm = ({ | |
email: '[email protected]', | ||
subject: 'My Test Subject', | ||
description: 'My Test Description', | ||
source: 'a friend', | ||
accessKeySource: 'a friend', | ||
cloudProvider: 'digitalocean', | ||
}; | ||
return html` | ||
|