Spaces:
Running
Running
File size: 1,460 Bytes
bd75c53 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
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();
}
})();
|