feat: add Playwright UI test for post-with-photo flow
This commit is contained in:
@@ -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');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user