Add commenter targeting mode
This commit is contained in:
1 parent
0dfdda61fd
commit
e9a4c965ee
23 files changed
+374
-10
No files matched your search
@@ -179,6 +179,16 @@ describe('subreddits page', () => {
|
||||
});
|
||||
|
||||
describe('editing one subreddit', () => {
|
||||
it('can target qualifying commenters on an image subreddit', async () => {
|
||||
renderSubreddits();
|
||||
const dialog = await openEditor('sleepy');
|
||||
const user = userEvent.setup();
|
||||
await user.selectOptions(within(dialog).getByRole('combobox', { name: 'Recipient' }), 'comment-author');
|
||||
await user.click(within(dialog).getByRole('button', { name: 'Save subreddit' }));
|
||||
await waitFor(() => expect(saved).toHaveLength(1));
|
||||
expect(saved[0].find((item: any) => item.name === 'sleepy').targetingMode).toBe('comment-author');
|
||||
});
|
||||
|
||||
it('previews the share the chosen weight will actually produce', async () => {
|
||||
renderSubreddits();
|
||||
const dialog = await openEditor('casualconversation');
|
||||
@@ -597,4 +607,3 @@ describe('subreddits page', () => {
|
||||
expect(await findRows()).toHaveLength(3);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user