Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add console errors to smoke tests #705

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .playground/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import 'core-js';
// import 'core-js';
import React from 'react';
import ReactDOM from 'react-dom';

Expand Down
13 changes: 12 additions & 1 deletion browsers/browsers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import path from 'path';

import webdriver, { By } from 'selenium-webdriver';
import webdriver, { By, logging } from 'selenium-webdriver';

jest.setTimeout(30000);

Expand Down Expand Up @@ -60,6 +60,17 @@ describe('smoke tests', () => {
});

afterAll(async() => {
const entries = await driver.manage().logs().get(logging.Type.BROWSER);
const entries2 = await driver.manage().logs().get(logging.Type.CLIENT);
console.log('ERRRORS BROWSER', JSON.stringify(entries));
console.log('ERRRORS CLIENT', JSON.stringify(entries2));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aaaaaaaaagaaaaaiiiiinnnn thhhhhiiiiss. ccccccccouldddd beeeeee fffffffiiiiiixxxxxeddd :D

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol I'm trying to log the console errors from the webdriver on the browser tests. Any ideas? This doesn't log anything.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the logging API has not been implemented in the IE driver

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and since this will be sunsetted very soon I think we should not care that much


entries.forEach((entry) => {
if (entry.level.name === 'error') {
console.log('[%s] %s', entry.level.name, entry.message);
}
});

await driver.quit();
});

Expand Down
3 changes: 3 additions & 0 deletions src/components/chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ export class Chart extends React.Component<ChartProps, ChartState> {
this.chartContainerRef = createRef();
this.chartStageRef = createRef();

// eslint-disable-next-line no-console
console.error('this thing errored');

const id = props.id ?? uuid.v4();
const storeReducer = chartStoreReducer(id);
const enhancers = typeof window !== 'undefined' && (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
Expand Down