()
| 285 | await expect(page.locator('#error-action-home-btn')).toBeVisible(); |
| 286 | await expect(page.locator('#error-action-report')).toBeVisible(); |
| 287 | |
| 288 | if (hasSearch) { |
| 289 | await expect(page.locator('#error-action-search-btn')).toBeVisible(); |
| 290 | } else { |
| 291 | await expect(page.locator('#error-action-search-btn')).toHaveCount(0); |
| 292 | } |
| 293 | } |
| 294 | |
| 295 | export async function resetUserData() { |
| 296 | const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file |
| 297 | const __dirname = path.dirname(__filename); |
| 298 | const projectRootDir = path.resolve(__dirname, '../..'); |
| 299 | |
| 300 | try { |
| 301 | const cmd = `make dev_fake_data -o build -o is_local_migration_ready LOAD_FAKE_DATA_FLAGS='-scope=user -reset'`; |
| 302 | |
| 303 | console.log(`Executing command: ${cmd} in ${projectRootDir}`); |
| 304 | execSync(cmd, {cwd: projectRootDir, stdio: 'inherit'}); |
| 305 | |
| 306 | console.log('Reset command finished successfully.'); |
| 307 | } catch (error) { |
| 308 | console.error('Error reset command (make dev_fake_data):', error); |
no test coverage detected