Run immediate browsing sessions with enabled votes
This commit is contained in:
1 parent
643c775813
commit
540590f43e
11 files changed
+40
-19
No files matched your search
@@ -240,7 +240,7 @@ describe('GrowthPage', () => {
|
||||
await waitFor(() => expect(requests).toContainEqual(expect.objectContaining({
|
||||
method: 'PATCH', body: { enabled: true },
|
||||
})));
|
||||
await waitFor(() => expect(screen.getByRole('button', { name: 'Simulate session now' })).toBeEnabled());
|
||||
await waitFor(() => expect(screen.getByRole('button', { name: 'Run session now' })).toBeEnabled());
|
||||
expect(requests[0].url).toContain('/api/growth/%40t2_grower%3Areddit.com/browsing');
|
||||
await user.click(screen.getByLabelText('Submit selected upvotes'));
|
||||
await waitFor(() => expect(requests).toContainEqual(expect.objectContaining({
|
||||
@@ -248,7 +248,7 @@ describe('GrowthPage', () => {
|
||||
})));
|
||||
});
|
||||
|
||||
it('runs an enabled browsing simulation immediately', async () => {
|
||||
it('runs an enabled browsing session immediately', async () => {
|
||||
const currentBrowsing = browsing(true);
|
||||
detailPayload = detail({
|
||||
browsing: {
|
||||
@@ -259,7 +259,7 @@ describe('GrowthPage', () => {
|
||||
renderGrowth();
|
||||
const user = userEvent.setup();
|
||||
|
||||
await user.click(await screen.findByRole('button', { name: 'Simulate session now' }));
|
||||
await user.click(await screen.findByRole('button', { name: 'Run session now' }));
|
||||
|
||||
await waitFor(() => expect(requests).toContainEqual(expect.objectContaining({
|
||||
method: 'POST', body: null,
|
||||
|
||||
Reference in new issue
Block a user