feat: add Playwright UI test for post-with-photo flow

This commit is contained in:
2026-06-18 20:35:17 +02:00
parent 1fa8ff954d
commit 545e3f5ba0
7 changed files with 139 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
const fs = require('fs');
const path = require('path');
module.exports = async function globalSetup() {
const envFile = path.join(__dirname, '../.env');
if (fs.existsSync(envFile)) {
fs.readFileSync(envFile, 'utf-8').split(/\r?\n/).forEach(line => {
const m = line.match(/^([A-Za-z_][A-Za-z0-9_]*)=(.*)$/);
if (m && !process.env[m[1]]) {
process.env[m[1]] = m[2].trim().replace(/^(['"])(.*)\1$/, '$2');
}
});
}
};