Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- index.html +1 -1
- package-lock.json +45 -0
- package.json +1 -0
- verify_final_chat.mjs +44 -0
index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8" />
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
-
<title>
|
| 8 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
<style>
|
| 10 |
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
|
|
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8" />
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
+
<title>Branding Content Testing</title>
|
| 8 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
<style>
|
| 10 |
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
package-lock.json
CHANGED
|
@@ -12,6 +12,7 @@
|
|
| 12 |
"@huggingface/hub": "^2.10.1",
|
| 13 |
"express": "^5.2.1",
|
| 14 |
"lucide-react": "^0.555.0",
|
|
|
|
| 15 |
"plotly.js": "2.30.0",
|
| 16 |
"react": "^19.2.0",
|
| 17 |
"react-dom": "^19.2.0",
|
|
@@ -4889,6 +4890,50 @@
|
|
| 4889 |
"node": ">=10"
|
| 4890 |
}
|
| 4891 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4892 |
"node_modules/plotly.js": {
|
| 4893 |
"version": "2.30.0",
|
| 4894 |
"resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-2.30.0.tgz",
|
|
|
|
| 12 |
"@huggingface/hub": "^2.10.1",
|
| 13 |
"express": "^5.2.1",
|
| 14 |
"lucide-react": "^0.555.0",
|
| 15 |
+
"playwright": "^1.58.2",
|
| 16 |
"plotly.js": "2.30.0",
|
| 17 |
"react": "^19.2.0",
|
| 18 |
"react-dom": "^19.2.0",
|
|
|
|
| 4890 |
"node": ">=10"
|
| 4891 |
}
|
| 4892 |
},
|
| 4893 |
+
"node_modules/playwright": {
|
| 4894 |
+
"version": "1.58.2",
|
| 4895 |
+
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.58.2.tgz",
|
| 4896 |
+
"integrity": "sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A==",
|
| 4897 |
+
"license": "Apache-2.0",
|
| 4898 |
+
"dependencies": {
|
| 4899 |
+
"playwright-core": "1.58.2"
|
| 4900 |
+
},
|
| 4901 |
+
"bin": {
|
| 4902 |
+
"playwright": "cli.js"
|
| 4903 |
+
},
|
| 4904 |
+
"engines": {
|
| 4905 |
+
"node": ">=18"
|
| 4906 |
+
},
|
| 4907 |
+
"optionalDependencies": {
|
| 4908 |
+
"fsevents": "2.3.2"
|
| 4909 |
+
}
|
| 4910 |
+
},
|
| 4911 |
+
"node_modules/playwright-core": {
|
| 4912 |
+
"version": "1.58.2",
|
| 4913 |
+
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.58.2.tgz",
|
| 4914 |
+
"integrity": "sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==",
|
| 4915 |
+
"license": "Apache-2.0",
|
| 4916 |
+
"bin": {
|
| 4917 |
+
"playwright-core": "cli.js"
|
| 4918 |
+
},
|
| 4919 |
+
"engines": {
|
| 4920 |
+
"node": ">=18"
|
| 4921 |
+
}
|
| 4922 |
+
},
|
| 4923 |
+
"node_modules/playwright/node_modules/fsevents": {
|
| 4924 |
+
"version": "2.3.2",
|
| 4925 |
+
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
|
| 4926 |
+
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
|
| 4927 |
+
"hasInstallScript": true,
|
| 4928 |
+
"license": "MIT",
|
| 4929 |
+
"optional": true,
|
| 4930 |
+
"os": [
|
| 4931 |
+
"darwin"
|
| 4932 |
+
],
|
| 4933 |
+
"engines": {
|
| 4934 |
+
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
| 4935 |
+
}
|
| 4936 |
+
},
|
| 4937 |
"node_modules/plotly.js": {
|
| 4938 |
"version": "2.30.0",
|
| 4939 |
"resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-2.30.0.tgz",
|
package.json
CHANGED
|
@@ -13,6 +13,7 @@
|
|
| 13 |
"@huggingface/hub": "^2.10.1",
|
| 14 |
"express": "^5.2.1",
|
| 15 |
"lucide-react": "^0.555.0",
|
|
|
|
| 16 |
"plotly.js": "2.30.0",
|
| 17 |
"react": "^19.2.0",
|
| 18 |
"react-dom": "^19.2.0",
|
|
|
|
| 13 |
"@huggingface/hub": "^2.10.1",
|
| 14 |
"express": "^5.2.1",
|
| 15 |
"lucide-react": "^0.555.0",
|
| 16 |
+
"playwright": "^1.58.2",
|
| 17 |
"plotly.js": "2.30.0",
|
| 18 |
"react": "^19.2.0",
|
| 19 |
"react-dom": "^19.2.0",
|
verify_final_chat.mjs
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import { chromium } from 'playwright';
|
| 3 |
+
|
| 4 |
+
(async () => {
|
| 5 |
+
const browser = await chromium.launch();
|
| 6 |
+
const page = await browser.newPage();
|
| 7 |
+
|
| 8 |
+
try {
|
| 9 |
+
console.log('Navigating to the app...');
|
| 10 |
+
await page.goto('https://auxteam-usersyncinterface.hf.space');
|
| 11 |
+
|
| 12 |
+
// Wait for the app to load
|
| 13 |
+
await page.waitForSelector('text=Branding Content Testing', { timeout: 30000 });
|
| 14 |
+
console.log('App loaded successfully.');
|
| 15 |
+
|
| 16 |
+
// Check for "Focus Group" label
|
| 17 |
+
const focusGroupLabel = await page.isVisible('text=Focus Group');
|
| 18 |
+
console.log('Focus Group label visible:', focusGroupLabel);
|
| 19 |
+
|
| 20 |
+
// Go to Chat
|
| 21 |
+
console.log('Opening Chat...');
|
| 22 |
+
await page.click('text=Open Global Chat');
|
| 23 |
+
await page.waitForSelector('text=What would you like to simulate?', { timeout: 10000 });
|
| 24 |
+
|
| 25 |
+
// Check for variations
|
| 26 |
+
const linkedInVisible = await page.isVisible('text=LinkedIn Post');
|
| 27 |
+
console.log('LinkedIn Post variation visible:', linkedInVisible);
|
| 28 |
+
|
| 29 |
+
// Click LinkedIn Post
|
| 30 |
+
await page.click('text=LinkedIn Post');
|
| 31 |
+
|
| 32 |
+
// Check Help Me Craft button
|
| 33 |
+
const helpMeCraft = await page.isVisible('text=Help Me Craft');
|
| 34 |
+
console.log('Help Me Craft button visible:', helpMeCraft);
|
| 35 |
+
|
| 36 |
+
await page.screenshot({ path: 'verification/final_check_chat.png' });
|
| 37 |
+
console.log('Final check screenshot saved.');
|
| 38 |
+
|
| 39 |
+
} catch (error) {
|
| 40 |
+
console.error('Verification failed:', error);
|
| 41 |
+
} finally {
|
| 42 |
+
await browser.close();
|
| 43 |
+
}
|
| 44 |
+
})();
|