Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
combine callout and upsell codemods to single function
- Loading branch information
Erica Norris
committed
Dec 18, 2020
1 parent
4f36c11
commit 32f7e13
Showing
11 changed files
with
78 additions
and
180 deletions.
There are no files selected for viewing
16 changes: 0 additions & 16 deletions
16
...__testfixtures__/callout-primary-secondary-action-replace-primary-secondary-link.input.js
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
..._testfixtures__/callout-primary-secondary-action-replace-primary-secondary-link.output.js
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
...ixtures__/callout-upsell-primary-secondary-action-replace-primary-secondary-link.input.js
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,24 @@ | ||
// @flow strict | ||
import React from 'react'; | ||
import { Box, Callout, Upsell } from 'gestalt'; | ||
|
||
export default function TestBox() { | ||
return ( | ||
<Box> | ||
<Callout | ||
message="Insert a clever info callout message here" | ||
iconAccessibilityLabel="info" | ||
primaryLink={{ href: 'pinterest.com', label: 'Visit Pinterest' }} | ||
secondaryLink={{ href: 'pinterest.com/help', label: 'Learn more' }} | ||
type="info" | ||
title="A Title" | ||
/> | ||
<Upsell | ||
message="Insert a clever upsell message here" | ||
primaryLink={{ href: 'pinterest.com', label: 'Visit Pinterest' }} | ||
secondaryLink={{ href: 'pinterest.com/help', label: 'Learn more' }} | ||
title="A Title" | ||
/> | ||
</Box> | ||
); | ||
} |
24 changes: 24 additions & 0 deletions
24
...xtures__/callout-upsell-primary-secondary-action-replace-primary-secondary-link.output.js
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,24 @@ | ||
// @flow strict | ||
import React from 'react'; | ||
import { Box, Callout, Upsell } from 'gestalt'; | ||
|
||
export default function TestBox() { | ||
return ( | ||
<Box> | ||
<Callout | ||
message="Insert a clever info callout message here" | ||
iconAccessibilityLabel="info" | ||
primaryAction={{ href: 'pinterest.com', label: 'Visit Pinterest' }} | ||
secondaryAction={{ href: 'pinterest.com/help', label: 'Learn more' }} | ||
type="info" | ||
title="A Title" | ||
/> | ||
<Upsell | ||
message="Insert a clever upsell message here" | ||
primaryAction={{ href: 'pinterest.com', label: 'Visit Pinterest' }} | ||
secondaryAction={{ href: 'pinterest.com/help', label: 'Learn more' }} | ||
title="A Title" | ||
/> | ||
</Box> | ||
); | ||
} |
14 changes: 0 additions & 14 deletions
14
.../__testfixtures__/upsell-primary-secondary-action-replace-primary-secondary-link.input.js
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
...__testfixtures__/upsell-primary-secondary-action-replace-primary-secondary-link.output.js
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
.../16.0.0/__tests__/callout-primary-secondary-action-replace-primary-secondary-link.test.js
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
.../__tests__/callout-upsell-primary-secondary-action-replace-primary-secondary-link.test.js
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,28 @@ | ||
import { defineTest } from 'jscodeshift/dist/testUtils.js'; | ||
|
||
jest.mock( | ||
'../callout-upsell-primary-secondary-action-replace-primary-secondary-link', | ||
() => { | ||
return Object.assign( | ||
jest.requireActual( | ||
'../callout-upsell-primary-secondary-action-replace-primary-secondary-link' | ||
), | ||
{ | ||
parser: 'flow', | ||
} | ||
); | ||
} | ||
); | ||
|
||
describe('callout-upsell-primary-secondary-action-replace-primary-secondary-link', () => { | ||
[ | ||
'callout-upsell-primary-secondary-action-replace-primary-secondary-link', | ||
].forEach((test) => { | ||
defineTest( | ||
__dirname, | ||
'callout-upsell-primary-secondary-action-replace-primary-secondary-link', | ||
{ quote: 'single' }, | ||
test | ||
); | ||
}); | ||
}); |
28 changes: 0 additions & 28 deletions
28
...s/16.0.0/__tests__/upsell-primary-secondary-action-replace-primary-secondary-link.test.js
This file was deleted.
Oops, something went wrong.
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
63 changes: 0 additions & 63 deletions
63
...gestalt-codemods/16.0.0/upsell-primary-secondary-action-replace-primary-secondary-link.js
This file was deleted.
Oops, something went wrong.