This repository was archived by the owner on Mar 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* MM-20259 Revert react-intl upgrade * Fix type issues * Fix FullScreenModal snapshots * Fix snapshot for MenuItemToggleModalRedux * Address feedback * Update snapshots
- Loading branch information
Showing
190 changed files
with
2,931 additions
and
3,133 deletions.
There are no files selected for viewing
259 changes: 259 additions & 0 deletions
259
components/__snapshots__/formatted_markdown_message.test.jsx.snap
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 |
---|---|---|
@@ -0,0 +1,259 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`components/FormattedMarkdownMessage should backup to default 1`] = ` | ||
<IntlProvider | ||
locale="en" | ||
messages={ | ||
Object { | ||
"test.bar": "<b>hello</b> <script>var malicious = true;</script> world!", | ||
"test.foo": "**bold** *italic* [link](https://mattermost.com/) <br/> [link target blank](!https://mattermost.com/)", | ||
"test.vals": "*Hi* {petName}!", | ||
} | ||
} | ||
> | ||
<InjectIntl(FormattedMarkdownMessage) | ||
defaultMessage="testing default message" | ||
id="xxx" | ||
> | ||
<FormattedMarkdownMessage | ||
defaultMessage="testing default message" | ||
id="xxx" | ||
intl={ | ||
Object { | ||
"defaultFormats": Object {}, | ||
"defaultLocale": "en", | ||
"formatDate": [Function], | ||
"formatHTMLMessage": [Function], | ||
"formatMessage": [Function], | ||
"formatNumber": [Function], | ||
"formatPlural": [Function], | ||
"formatRelative": [Function], | ||
"formatTime": [Function], | ||
"formats": Object {}, | ||
"formatters": Object { | ||
"getDateTimeFormat": [Function], | ||
"getMessageFormat": [Function], | ||
"getNumberFormat": [Function], | ||
"getPluralFormat": [Function], | ||
"getRelativeFormat": [Function], | ||
}, | ||
"locale": "en", | ||
"messages": Object { | ||
"test.bar": "<b>hello</b> <script>var malicious = true;</script> world!", | ||
"test.foo": "**bold** *italic* [link](https://mattermost.com/) <br/> [link target blank](!https://mattermost.com/)", | ||
"test.vals": "*Hi* {petName}!", | ||
}, | ||
"now": [Function], | ||
"onError": [Function], | ||
"textComponent": "span", | ||
"timeZone": null, | ||
} | ||
} | ||
> | ||
<span | ||
dangerouslySetInnerHTML={ | ||
Object { | ||
"__html": "testing default message", | ||
} | ||
} | ||
/> | ||
</FormattedMarkdownMessage> | ||
</InjectIntl(FormattedMarkdownMessage)> | ||
</IntlProvider> | ||
`; | ||
|
||
exports[`components/FormattedMarkdownMessage should escape non-BR 1`] = ` | ||
<IntlProvider | ||
locale="en" | ||
messages={ | ||
Object { | ||
"test.bar": "<b>hello</b> <script>var malicious = true;</script> world!", | ||
"test.foo": "**bold** *italic* [link](https://mattermost.com/) <br/> [link target blank](!https://mattermost.com/)", | ||
"test.vals": "*Hi* {petName}!", | ||
} | ||
} | ||
> | ||
<InjectIntl(FormattedMarkdownMessage) | ||
defaultMessage="" | ||
id="test.bar" | ||
> | ||
<FormattedMarkdownMessage | ||
defaultMessage="" | ||
id="test.bar" | ||
intl={ | ||
Object { | ||
"defaultFormats": Object {}, | ||
"defaultLocale": "en", | ||
"formatDate": [Function], | ||
"formatHTMLMessage": [Function], | ||
"formatMessage": [Function], | ||
"formatNumber": [Function], | ||
"formatPlural": [Function], | ||
"formatRelative": [Function], | ||
"formatTime": [Function], | ||
"formats": Object {}, | ||
"formatters": Object { | ||
"getDateTimeFormat": [Function], | ||
"getMessageFormat": [Function], | ||
"getNumberFormat": [Function], | ||
"getPluralFormat": [Function], | ||
"getRelativeFormat": [Function], | ||
}, | ||
"locale": "en", | ||
"messages": Object { | ||
"test.bar": "<b>hello</b> <script>var malicious = true;</script> world!", | ||
"test.foo": "**bold** *italic* [link](https://mattermost.com/) <br/> [link target blank](!https://mattermost.com/)", | ||
"test.vals": "*Hi* {petName}!", | ||
}, | ||
"now": [Function], | ||
"onError": [Function], | ||
"textComponent": "span", | ||
"timeZone": null, | ||
} | ||
} | ||
> | ||
<span | ||
dangerouslySetInnerHTML={ | ||
Object { | ||
"__html": "<b>hello</b> <script>var malicious = true;</script> world!", | ||
} | ||
} | ||
/> | ||
</FormattedMarkdownMessage> | ||
</InjectIntl(FormattedMarkdownMessage)> | ||
</IntlProvider> | ||
`; | ||
|
||
exports[`components/FormattedMarkdownMessage should render message 1`] = ` | ||
<IntlProvider | ||
locale="en" | ||
messages={ | ||
Object { | ||
"test.bar": "<b>hello</b> <script>var malicious = true;</script> world!", | ||
"test.foo": "**bold** *italic* [link](https://mattermost.com/) <br/> [link target blank](!https://mattermost.com/)", | ||
"test.vals": "*Hi* {petName}!", | ||
} | ||
} | ||
> | ||
<InjectIntl(FormattedMarkdownMessage) | ||
defaultMessage="**bold** *italic* [link](https://mattermost.com/) <br/> [link target blank](!https://mattermost.com/)" | ||
id="test.foo" | ||
> | ||
<FormattedMarkdownMessage | ||
defaultMessage="**bold** *italic* [link](https://mattermost.com/) <br/> [link target blank](!https://mattermost.com/)" | ||
id="test.foo" | ||
intl={ | ||
Object { | ||
"defaultFormats": Object {}, | ||
"defaultLocale": "en", | ||
"formatDate": [Function], | ||
"formatHTMLMessage": [Function], | ||
"formatMessage": [Function], | ||
"formatNumber": [Function], | ||
"formatPlural": [Function], | ||
"formatRelative": [Function], | ||
"formatTime": [Function], | ||
"formats": Object {}, | ||
"formatters": Object { | ||
"getDateTimeFormat": [Function], | ||
"getMessageFormat": [Function], | ||
"getNumberFormat": [Function], | ||
"getPluralFormat": [Function], | ||
"getRelativeFormat": [Function], | ||
}, | ||
"locale": "en", | ||
"messages": Object { | ||
"test.bar": "<b>hello</b> <script>var malicious = true;</script> world!", | ||
"test.foo": "**bold** *italic* [link](https://mattermost.com/) <br/> [link target blank](!https://mattermost.com/)", | ||
"test.vals": "*Hi* {petName}!", | ||
}, | ||
"now": [Function], | ||
"onError": [Function], | ||
"textComponent": "span", | ||
"timeZone": null, | ||
} | ||
} | ||
> | ||
<span | ||
dangerouslySetInnerHTML={ | ||
Object { | ||
"__html": "<strong>bold</strong> <em>italic</em> <a href=\\"https://mattermost.com/\\">link</a> <br/> <a href=\\"https://mattermost.com/\\" rel=\\"noreferrer\\" target=\\"_blank\\">link target blank</a>", | ||
} | ||
} | ||
/> | ||
</FormattedMarkdownMessage> | ||
</InjectIntl(FormattedMarkdownMessage)> | ||
</IntlProvider> | ||
`; | ||
|
||
exports[`components/FormattedMarkdownMessage values should work 1`] = ` | ||
<IntlProvider | ||
locale="en" | ||
messages={ | ||
Object { | ||
"test.bar": "<b>hello</b> <script>var malicious = true;</script> world!", | ||
"test.foo": "**bold** *italic* [link](https://mattermost.com/) <br/> [link target blank](!https://mattermost.com/)", | ||
"test.vals": "*Hi* {petName}!", | ||
} | ||
} | ||
> | ||
<InjectIntl(FormattedMarkdownMessage) | ||
defaultMessage="*Hi* {petName}!" | ||
id="test.vals" | ||
values={ | ||
Object { | ||
"petName": "sweetie", | ||
} | ||
} | ||
> | ||
<FormattedMarkdownMessage | ||
defaultMessage="*Hi* {petName}!" | ||
id="test.vals" | ||
intl={ | ||
Object { | ||
"defaultFormats": Object {}, | ||
"defaultLocale": "en", | ||
"formatDate": [Function], | ||
"formatHTMLMessage": [Function], | ||
"formatMessage": [Function], | ||
"formatNumber": [Function], | ||
"formatPlural": [Function], | ||
"formatRelative": [Function], | ||
"formatTime": [Function], | ||
"formats": Object {}, | ||
"formatters": Object { | ||
"getDateTimeFormat": [Function], | ||
"getMessageFormat": [Function], | ||
"getNumberFormat": [Function], | ||
"getPluralFormat": [Function], | ||
"getRelativeFormat": [Function], | ||
}, | ||
"locale": "en", | ||
"messages": Object { | ||
"test.bar": "<b>hello</b> <script>var malicious = true;</script> world!", | ||
"test.foo": "**bold** *italic* [link](https://mattermost.com/) <br/> [link target blank](!https://mattermost.com/)", | ||
"test.vals": "*Hi* {petName}!", | ||
}, | ||
"now": [Function], | ||
"onError": [Function], | ||
"textComponent": "span", | ||
"timeZone": null, | ||
} | ||
} | ||
values={ | ||
Object { | ||
"petName": "sweetie", | ||
} | ||
} | ||
> | ||
<span | ||
dangerouslySetInnerHTML={ | ||
Object { | ||
"__html": "<em>Hi</em> sweetie!", | ||
} | ||
} | ||
/> | ||
</FormattedMarkdownMessage> | ||
</InjectIntl(FormattedMarkdownMessage)> | ||
</IntlProvider> | ||
`; |
Oops, something went wrong.