Updated events page to display all user bets.
This commit is contained in:
@ -1,31 +1,27 @@
|
||||
import { test } from '@playwright/test';
|
||||
|
||||
test('debug rewards page crash', async ({ page }) => {
|
||||
test('check event page with my other bets', async ({ page }) => {
|
||||
const errors: string[] = [];
|
||||
|
||||
page.on('console', msg => {
|
||||
if (msg.type() === 'error') {
|
||||
console.log('[error]', msg.text());
|
||||
errors.push(msg.text());
|
||||
}
|
||||
});
|
||||
|
||||
page.on('pageerror', error => {
|
||||
console.log('Page error:', error.message);
|
||||
errors.push(error.message);
|
||||
});
|
||||
|
||||
// Navigate to rewards page
|
||||
console.log('Navigating to /rewards...');
|
||||
await page.goto('/rewards', { waitUntil: 'domcontentloaded' });
|
||||
// Navigate to event detail
|
||||
await page.goto('/events/1', { waitUntil: 'networkidle' });
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
// Take screenshot
|
||||
await page.screenshot({ path: 'test-results/rewards-page.png', fullPage: true });
|
||||
await page.screenshot({ path: 'test-results/event-with-other-bets.png', fullPage: true });
|
||||
|
||||
// Check for content
|
||||
// Check for the "My Other Bets" section
|
||||
const myOtherBetsSection = await page.locator('text=My Other Bets').count();
|
||||
console.log('My Other Bets section found:', myOtherBetsSection > 0);
|
||||
|
||||
// Check body text
|
||||
const bodyText = await page.locator('body').innerText();
|
||||
console.log('Body text (first 500 chars):', bodyText.substring(0, 500));
|
||||
console.log('Has "My Other Bets":', bodyText.includes('My Other Bets'));
|
||||
|
||||
console.log('All errors:', errors);
|
||||
console.log('Page errors:', errors);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user