Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jmelot committed Jan 24, 2024
1 parent 581e9eb commit 0cb39ca
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 14 deletions.
8 changes: 4 additions & 4 deletions web/gui-v2/src/components/ListView.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ describe("ListView", () => {
);

// Filter by Europe and verify that the count updates
expect(screen.getByText('Viewing 1760 companies')).toBeVisible();
expect(screen.getByText('Viewing 1779 companies')).toBeVisible();
const regionHeader = screen.getByRole('columnheader', { name: /country/i });
await user.click(getByRole(regionHeader, 'button'));
const menu = screen.getByRole('listbox');
await user.click(getByText(menu, 'China'));
expect(screen.getByText('Viewing 267 of 1760 companies')).toBeVisible();
expect(screen.getByText('Viewing 269 of 1779 companies')).toBeVisible();

// Reset the filters and verify that the count updates
await user.click(screen.getByRole('button', { name: /reset filters/i }));
expect(screen.getByText('Viewing 1760 companies')).toBeVisible();
expect(screen.getByText('Viewing 1779 companies')).toBeVisible();
}, 20000);


Expand All @@ -49,7 +49,7 @@ describe("ListView", () => {
await user.click(getByRole(companyHeader, 'combobox'));
const menu = screen.getByRole('listbox');
await user.click(getByText(menu, 'S&P 500'));
expect(screen.getByText('Viewing 499 of 1760 companies')).toBeVisible();
expect(screen.getByText('Viewing 503 of 1779 companies')).toBeVisible();
}, 20000);


Expand Down
129 changes: 126 additions & 3 deletions web/tests/test_data/alphabet_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@
"crunchbase_url": "https://www.crunchbase.com/organization/verily-2"
}
],
"grid": [
"grid.497059.6"
],
"linkedin": [
"https://www.linkedin.com/company/intrinsic",
"https://www.linkedin.com/company/alphabet-inc",
Expand Down Expand Up @@ -2429,6 +2426,132 @@
"ai_patents": 64
}
],
"ai_patents_grants_by_year": [
{
"priority_year": 1988,
"ai_patents": 1
},
{
"priority_year": 1991,
"ai_patents": 1
},
{
"priority_year": 1994,
"ai_patents": 6
},
{
"priority_year": 1995,
"ai_patents": 2
},
{
"priority_year": 1996,
"ai_patents": 7
},
{
"priority_year": 1997,
"ai_patents": 5
},
{
"priority_year": 1998,
"ai_patents": 5
},
{
"priority_year": 1999,
"ai_patents": 6
},
{
"priority_year": 2000,
"ai_patents": 5
},
{
"priority_year": 2001,
"ai_patents": 5
},
{
"priority_year": 2002,
"ai_patents": 5
},
{
"priority_year": 2003,
"ai_patents": 4
},
{
"priority_year": 2004,
"ai_patents": 9
},
{
"priority_year": 2005,
"ai_patents": 14
},
{
"priority_year": 2006,
"ai_patents": 12
},
{
"priority_year": 2007,
"ai_patents": 18
},
{
"priority_year": 2008,
"ai_patents": 15
},
{
"priority_year": 2009,
"ai_patents": 25
},
{
"priority_year": 2010,
"ai_patents": 56
},
{
"priority_year": 2011,
"ai_patents": 74
},
{
"priority_year": 2012,
"ai_patents": 89
},
{
"priority_year": 2013,
"ai_patents": 119
},
{
"priority_year": 2014,
"ai_patents": 91
},
{
"priority_year": 2015,
"ai_patents": 150
},
{
"priority_year": 2016,
"ai_patents": 251
},
{
"priority_year": 2017,
"ai_patents": 332
},
{
"priority_year": 2018,
"ai_patents": 264
},
{
"priority_year": 2019,
"ai_patents": 267
},
{
"priority_year": 2020,
"ai_patents": 133
},
{
"priority_year": 2021,
"ai_patents": 25
},
{
"priority_year": 2022,
"ai_patents": 2
}
],
"Physical_Sciences_and_Engineering_pats_by_year": [
{
"priority_year": 1995,
Expand Down
5 changes: 3 additions & 2 deletions web/tests/test_data/alphabet_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,10 @@
"table": null,
"total": 12.192163477671421
},
"ai_patent_applications": {
"ai_patents_grants": {
"counts": [],
"table": null,
"total": 42
"total": 1634
},
"all_patents": {
"counts": [
Expand Down
1 change: 0 additions & 1 deletion web/tests/test_data/hugging_face_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"crunchbase_url": "https://www.crunchbase.com/organization/hugging-face"
},
"child_crunchbase": [],
"grid": [],
"linkedin": [
"https://www.linkedin.com/company/huggingface"
],
Expand Down
9 changes: 5 additions & 4 deletions web/tests/test_data/hugging_face_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -402,17 +402,18 @@
0,
0
],
"total": 0.0,
"total": 0,
"table": null
},
"ai_patents_growth": {
"counts": [],
"table": null,
"total": 0.0
"total": 0
},
"ai_patent_applications": {
"ai_patents_grants": {
"counts": [],
"table": null,
"total": 42
"total": 0
},
"all_patents": {
"counts": [
Expand Down

0 comments on commit 0cb39ca

Please sign in to comment.