Skip to content

Commit

Permalink
Revert "increase flaky test timeout"
Browse files Browse the repository at this point in the history
This reverts commit 3cbc2fa.
  • Loading branch information
dario-piotrowicz committed Jul 30, 2024
1 parent 2139f1f commit fd8cc89
Showing 1 changed file with 29 additions and 38 deletions.
67 changes: 29 additions & 38 deletions pages-e2e/features/appServerActions/server-actions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,33 @@ import { describe, test } from 'vitest';
import { getAssertVisible } from '@features-utils/getAssertVisible';

describe('server-actions', () => {
test(
'simple forms using a local KV binding can read and write a value',
async () => {
const page = await BROWSER.newPage();
const assertVisible = getAssertVisible(page);

await page.goto(`${DEPLOYMENT_URL}/server-actions/simple-kv-form`);

await assertVisible('h1', {
hasText: 'Server Actions - Simple KV Form',
});

// let's always clear the value in case it is already set
// (for example if this run is a retry run)
const clearBtn = await assertVisible(
'button[data-test-id="clear-value"]',
);
await clearBtn.click();

await assertVisible('[data-test-id="kv-value-info"]', {
hasText: 'No value is set for the key',
});

const input = await assertVisible('[data-test-id="form-input"]');
await input.type('This is a test value!');

const submitBtn = await assertVisible(
'button[data-test-id="form-submit"]',
);
await submitBtn.click();

await assertVisible('[data-test-id="kv-value-info"]', {
hasText: `The key's value is "This is a test value!"`,
});
// Note: in CI this test is taking longer than expected, so let's temporarily increase the timeout
},
{ timeout: 15_000 },
);
test('simple forms using a local KV binding can read and write a value', async () => {
const page = await BROWSER.newPage();
const assertVisible = getAssertVisible(page);

await page.goto(`${DEPLOYMENT_URL}/server-actions/simple-kv-form`);

await assertVisible('h1', {
hasText: 'Server Actions - Simple KV Form',
});

// let's always clear the value in case it is already set
// (for example if this run is a retry run)
const clearBtn = await assertVisible('button[data-test-id="clear-value"]');
await clearBtn.click();

await assertVisible('[data-test-id="kv-value-info"]', {
hasText: 'No value is set for the key',
});

const input = await assertVisible('[data-test-id="form-input"]');
await input.type('This is a test value!');

const submitBtn = await assertVisible('button[data-test-id="form-submit"]');
await submitBtn.click();

await assertVisible('[data-test-id="kv-value-info"]', {
hasText: `The key's value is "This is a test value!"`,
});
});
});

0 comments on commit fd8cc89

Please sign in to comment.