-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔒 Added uuid verification to member endpoints not requiring a session
ref https://linear.app/tryghost/issue/ENG-1364 ref https://linear.app/tryghost/issue/ENG-1464 - credits to https://github.com/1337Nerd - added a hashed value to endpoints that do not require a member sign in in order to verify the source of the link and resulting request - added redirect to sign in page when trying to access newsletter management
- Loading branch information
1 parent
beb70e9
commit dac2561
Showing
32 changed files
with
1,027 additions
and
290 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import {getMemberData, getSiteData} from '../../utils/fixtures-generator'; | ||
import {render} from '../../utils/test-utils'; | ||
import FeedbackPage from './FeedbackPage'; | ||
|
||
const setup = (overrides) => { | ||
const {mockOnActionFn, ...utils} = render( | ||
<FeedbackPage />, | ||
{ | ||
overrideContext: { | ||
...overrides | ||
} | ||
} | ||
); | ||
return { | ||
mockOnActionFn, | ||
...utils | ||
}; | ||
}; | ||
|
||
describe('FeedbackPage', () => { | ||
const siteData = getSiteData(); | ||
const posts = siteData.posts; | ||
const member = getMemberData(); | ||
|
||
// we need the API to actually test the component, so the bulk of tests will be in the FeedbackFlow file | ||
test('renders', () => { | ||
// mock what the larger app would process and set | ||
const pageData = { | ||
uuid: member.uuid, | ||
key: 'key', | ||
postId: posts[0].id, | ||
score: 1 | ||
}; | ||
const {getByTestId} = setup({pageData}); | ||
|
||
const loaderIcon = getByTestId('loaderIcon'); | ||
|
||
expect(loaderIcon).toBeInTheDocument(); | ||
}); | ||
}); |
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
Oops, something went wrong.