This repository has been 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.
PLT-6451 Migrate installed_oauth_app.jsx to be pure and use Redux (#7190
) * Migrate installed_oauth_app.jsx to be pure and use Redux, add test * Fix behavior for the error case
- Loading branch information
Showing
8 changed files
with
294 additions
and
49 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
155 changes: 155 additions & 0 deletions
155
tests/components/integrations/__snapshots__/installed_oauth_app.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,155 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`components/integrations/InstalledOAuthApp should filter out OAuthApp 1`] = `null`; | ||
|
||
exports[`components/integrations/InstalledOAuthApp should match snapshot 1`] = ` | ||
<div | ||
className="backstage-list__item" | ||
> | ||
<div | ||
className="integration__icon integration-list__icon" | ||
> | ||
<img | ||
src="https://test.com/icon" | ||
/> | ||
</div> | ||
<div | ||
className="item-details" | ||
> | ||
<div | ||
className="item-details__row" | ||
> | ||
<span | ||
className="item-details__name" | ||
> | ||
testApp | ||
</span> | ||
</div> | ||
<div | ||
className="item-details__row" | ||
> | ||
<span | ||
className="item-details__description" | ||
> | ||
testing | ||
</span> | ||
</div> | ||
<div | ||
className="item-details__row" | ||
> | ||
<span | ||
className="item-details__url" | ||
> | ||
<FormattedHTMLMessage | ||
defaultMessage="Is Trusted: <strong>{isTrusted}</strong>" | ||
id="installed_oauth_apps.is_trusted" | ||
values={ | ||
Object { | ||
"isTrusted": "Yes", | ||
} | ||
} | ||
/> | ||
</span> | ||
</div> | ||
<div | ||
className="item-details__row" | ||
> | ||
<span | ||
className="item-details__token" | ||
> | ||
<FormattedHTMLMessage | ||
defaultMessage="Client ID: <strong>{clientId}</strong>" | ||
id="installed_integrations.client_id" | ||
values={ | ||
Object { | ||
"clientId": "facxd9wpzpbpfp8pad78xj75pr", | ||
} | ||
} | ||
/> | ||
</span> | ||
</div> | ||
<div | ||
className="item-details__row" | ||
> | ||
<span | ||
className="item-details__token" | ||
> | ||
<FormattedHTMLMessage | ||
defaultMessage="Client Secret: <strong>{clientSecret}</strong>" | ||
id="installed_integrations.client_secret" | ||
values={ | ||
Object { | ||
"clientSecret": "***************", | ||
} | ||
} | ||
/> | ||
</span> | ||
</div> | ||
<div | ||
className="item-details__row" | ||
> | ||
<span | ||
className="item-details__url" | ||
> | ||
<FormattedMessage | ||
defaultMessage="Callback URLs: {urls}" | ||
id="installed_integrations.callback_urls" | ||
values={ | ||
Object { | ||
"urls": "https://test.com/callback, https://test.com/callback2", | ||
} | ||
} | ||
/> | ||
</span> | ||
</div> | ||
<div | ||
className="item-details__row" | ||
> | ||
<span | ||
className="item-details__creation" | ||
> | ||
<FormattedMessage | ||
defaultMessage="Created by {creator} on {createAt, date, full}" | ||
id="installed_integrations.creation" | ||
values={ | ||
Object { | ||
"createAt": 1501365458934, | ||
"creator": "", | ||
} | ||
} | ||
/> | ||
</span> | ||
</div> | ||
</div> | ||
<div | ||
className="item-actions" | ||
> | ||
<a | ||
href="#" | ||
onClick={[Function]} | ||
> | ||
<FormattedMessage | ||
defaultMessage="Show Secret" | ||
id="installed_integrations.showSecret" | ||
values={Object {}} | ||
/> | ||
</a> | ||
- | ||
<a | ||
href="#" | ||
onClick={[Function]} | ||
> | ||
<FormattedMessage | ||
defaultMessage="Regenerate Secret" | ||
id="installed_integrations.regenSecret" | ||
values={Object {}} | ||
/> | ||
</a> | ||
- | ||
<DeleteIntegration | ||
messageId="installed_oauth_apps.delete.confirm" | ||
onDelete={[Function]} | ||
/> | ||
</div> | ||
</div> | ||
`; |
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
Oops, something went wrong.