UserSyncInterface / verify_final_chat.mjs
AUXteam's picture
Upload folder using huggingface_hub
bd75c53 verified
import { chromium } from 'playwright';
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
try {
console.log('Navigating to the app...');
await page.goto('https://auxteam-usersyncinterface.hf.space');
// Wait for the app to load
await page.waitForSelector('text=Branding Content Testing', { timeout: 30000 });
console.log('App loaded successfully.');
// Check for "Focus Group" label
const focusGroupLabel = await page.isVisible('text=Focus Group');
console.log('Focus Group label visible:', focusGroupLabel);
// Go to Chat
console.log('Opening Chat...');
await page.click('text=Open Global Chat');
await page.waitForSelector('text=What would you like to simulate?', { timeout: 10000 });
// Check for variations
const linkedInVisible = await page.isVisible('text=LinkedIn Post');
console.log('LinkedIn Post variation visible:', linkedInVisible);
// Click LinkedIn Post
await page.click('text=LinkedIn Post');
// Check Help Me Craft button
const helpMeCraft = await page.isVisible('text=Help Me Craft');
console.log('Help Me Craft button visible:', helpMeCraft);
await page.screenshot({ path: 'verification/final_check_chat.png' });
console.log('Final check screenshot saved.');
} catch (error) {
console.error('Verification failed:', error);
} finally {
await browser.close();
}
})();