add tmux sessions
This commit is contained in:
@@ -1,6 +1,29 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
// Path to the test file that gets created during the test
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const TEST_FILE_PATH = path.resolve(__dirname, '../../server/test-opencode.md');
|
||||
|
||||
test.describe('OpenCode File Workflow', () => {
|
||||
// Clean up any leftover test file before each test
|
||||
test.beforeEach(async () => {
|
||||
if (fs.existsSync(TEST_FILE_PATH)) {
|
||||
fs.unlinkSync(TEST_FILE_PATH);
|
||||
console.log('[Setup] Cleaned up leftover test file:', TEST_FILE_PATH);
|
||||
}
|
||||
});
|
||||
|
||||
// Clean up test file after each test (even on failure)
|
||||
test.afterEach(async () => {
|
||||
if (fs.existsSync(TEST_FILE_PATH)) {
|
||||
fs.unlinkSync(TEST_FILE_PATH);
|
||||
console.log('[Teardown] Cleaned up test file:', TEST_FILE_PATH);
|
||||
}
|
||||
});
|
||||
|
||||
test('create, read, and delete file without permission prompts', async ({ page }) => {
|
||||
// Increase timeout for this test since it involves multiple AI interactions
|
||||
test.setTimeout(180000);
|
||||
|
||||
Reference in New Issue
Block a user