Skip to content

Commit

Permalink
Update e2e.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ochafik committed Dec 23, 2024
1 parent ae3b3bf commit f0c1b4c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const url = isProd ? 'http://localhost:3000/dist/' : 'http://localhost:4000';
describe('e2e', () => {
test('should load the page', async () => {
const messages = [];
page.on('console', (msg) => messages.push({type: msg.type(), text: msg.text()}));
page.on('console', (msg) => messages.push({type: msg.type(), text: msg.text(), stack: msg.stackTrace(), location: msg.location()}));
page.goto(url);
await page.waitForSelector('model-viewer');

Expand All @@ -17,7 +17,11 @@ describe('e2e', () => {

console.log('Messages:', JSON.stringify(messages, null, 2));

const errors = messages.filter(msg => msg.type === 'error');
const errors = messages.filter(msg =>
msg.type === 'error' &&
!(msg.text.includes('404')
&& msg.stack.some(s =>
s.url.indexOf('fonts/InterVariable.woff') >= 0)));
expect(errors).toHaveLength(0);

const successMessage = messages.filter(msg => msg.type === 'debug' && msg.text === 'stderr: Top level object is a list of objects:');
Expand Down

0 comments on commit f0c1b4c

Please sign in to comment.