Skip to content

Commit

Permalink
chore(tests): add EURN to quoteSummary, tests for #664
Browse files Browse the repository at this point in the history
  • Loading branch information
gadicc committed Sep 6, 2023
1 parent 23f2789 commit b9dfb4c
Show file tree
Hide file tree
Showing 31 changed files with 2,143 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/quoteSummary.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function itValidates(
"EREGL.IS", // null in incomeStatementHistory/operatingIncome, in some .IS (#517)
"THYAO.IS", // (#517)
"HISU-U.TO", // topHoldings: missing StockPosition, bondPosition (#639)
"EURN", // secFilings: missing some filing types (#664)
],
});

Expand Down
73 changes: 73 additions & 0 deletions tests/http/quoteSummary-all-EURN.json

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions tests/http/quoteSummary-assetProfile-EURN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"request": {
"url": "https://query2.finance.yahoo.com/v10/finance/quoteSummary/EURN?formatted=false&modules=assetProfile"
},
"response": {
"ok": true,
"status": 200,
"statusText": "OK",
"headers": {
"content-type": [
"application/json;charset=utf-8"
],
"vary": [
"Origin,Accept-Encoding"
],
"cache-control": [
"public, max-age=1, stale-while-revalidate=9"
],
"y-rid": [
"5j5c7r9ifgd62"
],
"x-yahoo-request-id": [
"5j5c7r9ifgd62"
],
"x-request-id": [
"5251c06f-5de1-4112-82c2-85b49d8cf699"
],
"content-encoding": [
"gzip"
],
"content-length": [
"990"
],
"x-envoy-upstream-service-time": [
"2"
],
"date": [
"Wed, 06 Sep 2023 08:13:53 GMT"
],
"server": [
"ATS"
],
"x-envoy-decorator-operation": [
"finance-company-fundamentals-api--mtls-production-ir2.finance-k8s.svc.yahoo.local:4080/*"
],
"age": [
"1"
],
"strict-transport-security": [
"max-age=31536000"
],
"referrer-policy": [
"no-referrer-when-downgrade"
],
"x-frame-options": [
"SAMEORIGIN"
],
"connection": [
"close"
],
"expect-ct": [
"max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\""
],
"x-xss-protection": [
"1; mode=block"
],
"x-content-type-options": [
"nosniff"
]
},
"body": "{\"quoteSummary\":{\"result\":[{\"assetProfile\":{\"address1\":\"Belgica Building\",\"address2\":\"De Gerlachekaai 20\",\"city\":\"Antwerp\",\"zip\":\"2000\",\"country\":\"Belgium\",\"phone\":\"32 3 247 44 11\",\"fax\":\"32 3 247 44 09\",\"website\":\"https://www.euronav.com\",\"industry\":\"Oil & Gas Midstream\",\"industryDisp\":\"Oil & Gas Midstream\",\"sector\":\"Energy\",\"sectorDisp\":\"Energy\",\"longBusinessSummary\":\"Euronav NV, together with its subsidiaries, engages in the transportation and storage of crude oil worldwide. The company offers floating, storage, and offloading (FSO) services. It also owns and operates a fleet of vessels. The company was incorporated in 2003 and is headquartered in Antwerp, Belgium.\",\"fullTimeEmployees\":2946,\"companyOfficers\":[{\"maxAge\":1,\"name\":\"Ms. Lieve Logghe\",\"age\":54,\"title\":\"Interim CEO, CFO & Member of the Management Board\",\"yearBorn\":1968,\"fiscalYear\":2022,\"totalPay\":{\"raw\":1676586,\"fmt\":\"1.68M\",\"longFmt\":\"1,676,586\"},\"exercisedValue\":{\"raw\":0,\"fmt\":null,\"longFmt\":\"0\"},\"unexercisedValue\":{\"raw\":0,\"fmt\":null,\"longFmt\":\"0\"}},{\"maxAge\":1,\"name\":\"Captain Alex Staring\",\"age\":57,\"title\":\"COO & Member of the Management Board\",\"yearBorn\":1965,\"fiscalYear\":2022,\"totalPay\":{\"raw\":1148861,\"fmt\":\"1.15M\",\"longFmt\":\"1,148,861\"},\"exercisedValue\":{\"raw\":0,\"fmt\":null,\"longFmt\":\"0\"},\"unexercisedValue\":{\"raw\":0,\"fmt\":null,\"longFmt\":\"0\"}},{\"maxAge\":1,\"name\":\"Mr. Brian Gallagher\",\"age\":52,\"title\":\"Head of Investor Relations, Research & Communications and Member of the Management Board\",\"yearBorn\":1970,\"fiscalYear\":2022,\"totalPay\":{\"raw\":418822,\"fmt\":\"418.82k\",\"longFmt\":\"418,822\"},\"exercisedValue\":{\"raw\":0,\"fmt\":null,\"longFmt\":\"0\"},\"unexercisedValue\":{\"raw\":0,\"fmt\":null,\"longFmt\":\"0\"}},{\"maxAge\":1,\"name\":\"Mr. Hugo De Stoop\",\"age\":49,\"title\":\"Sr. Advisor\",\"yearBorn\":1973,\"fiscalYear\":2022,\"totalPay\":{\"raw\":1387614,\"fmt\":\"1.39M\",\"longFmt\":\"1,387,614\"},\"exercisedValue\":{\"raw\":0,\"fmt\":null,\"longFmt\":\"0\"},\"unexercisedValue\":{\"raw\":0,\"fmt\":null,\"longFmt\":\"0\"}},{\"maxAge\":1,\"name\":\"Mr. Michail Malliaros\",\"age\":48,\"title\":\"GM of Euronav Ship Management Hellas & Member of Management Board\",\"yearBorn\":1974,\"exercisedValue\":{\"raw\":0,\"fmt\":null,\"longFmt\":\"0\"},\"unexercisedValue\":{\"raw\":0,\"fmt\":null,\"longFmt\":\"0\"}},{\"maxAge\":1,\"name\":\"Ms. Sofie Lemlijn\",\"age\":36,\"title\":\"Sr. Legal Counsel, Sec. Gen. & Member of Management Board\",\"yearBorn\":1986,\"exercisedValue\":{\"raw\":0,\"fmt\":null,\"longFmt\":\"0\"},\"unexercisedValue\":{\"raw\":0,\"fmt\":null,\"longFmt\":\"0\"}},{\"maxAge\":1,\"name\":\"Ms. Veronique Raes\",\"title\":\"Chief People Officer\",\"exercisedValue\":{\"raw\":0,\"fmt\":null,\"longFmt\":\"0\"},\"unexercisedValue\":{\"raw\":0,\"fmt\":null,\"longFmt\":\"0\"}},{\"maxAge\":1,\"name\":\"Mr. Rustin Edwards\",\"title\":\"Head of Fuel Oil procurement\",\"exercisedValue\":{\"raw\":0,\"fmt\":null,\"longFmt\":\"0\"},\"unexercisedValue\":{\"raw\":0,\"fmt\":null,\"longFmt\":\"0\"}}],\"compensationAsOfEpochDate\":1672444800,\"maxAge\":86400}}],\"error\":null}}"
}
}
73 changes: 73 additions & 0 deletions tests/http/quoteSummary-balanceSheetHistory-EURN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"request": {
"url": "https://query2.finance.yahoo.com/v10/finance/quoteSummary/EURN?formatted=false&modules=balanceSheetHistory"
},
"response": {
"ok": true,
"status": 200,
"statusText": "OK",
"headers": {
"content-type": [
"application/json;charset=utf-8"
],
"cache-control": [
"public, max-age=1, stale-while-revalidate=9"
],
"vary": [
"Origin,Accept-Encoding"
],
"y-rid": [
"0o5hcn9ifgd62"
],
"x-yahoo-request-id": [
"0o5hcn9ifgd62"
],
"x-request-id": [
"1b1da9c0-1518-498b-8772-e06e33e79825"
],
"content-encoding": [
"gzip"
],
"content-length": [
"1834"
],
"x-envoy-upstream-service-time": [
"2"
],
"date": [
"Wed, 06 Sep 2023 08:13:54 GMT"
],
"server": [
"ATS"
],
"x-envoy-decorator-operation": [
"finance-company-fundamentals-api--mtls-production-ir2.finance-k8s.svc.yahoo.local:4080/*"
],
"age": [
"0"
],
"strict-transport-security": [
"max-age=31536000"
],
"referrer-policy": [
"no-referrer-when-downgrade"
],
"x-frame-options": [
"SAMEORIGIN"
],
"connection": [
"close"
],
"expect-ct": [
"max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\""
],
"x-xss-protection": [
"1; mode=block"
],
"x-content-type-options": [
"nosniff"
]
},
"body": "{\"quoteSummary\":{\"result\":[{\"balanceSheetHistory\":{\"balanceSheetStatements\":[{\"maxAge\":1,\"endDate\":{\"raw\":1672444800,\"fmt\":\"2022-12-31\"},\"cash\":{\"raw\":179929000,\"fmt\":\"179.93M\",\"longFmt\":\"179,929,000\"},\"netReceivables\":{\"raw\":366518000,\"fmt\":\"366.52M\",\"longFmt\":\"366,518,000\"},\"inventory\":{\"raw\":41643000,\"fmt\":\"41.64M\",\"longFmt\":\"41,643,000\"},\"otherCurrentAssets\":{\"raw\":18459000,\"fmt\":\"18.46M\",\"longFmt\":\"18,459,000\"},\"totalCurrentAssets\":{\"raw\":606549000,\"fmt\":\"606.55M\",\"longFmt\":\"606,549,000\"},\"longTermInvestments\":{\"raw\":1331000,\"fmt\":\"1.33M\",\"longFmt\":\"1,331,000\"},\"propertyPlantEquipment\":{\"raw\":3308349000,\"fmt\":\"3.31B\",\"longFmt\":\"3,308,349,000\"},\"intangibleAssets\":{\"raw\":15746000,\"fmt\":\"15.75M\",\"longFmt\":\"15,746,000\"},\"otherAssets\":{\"raw\":36737000,\"fmt\":\"36.74M\",\"longFmt\":\"36,737,000\"},\"deferredLongTermAssetCharges\":{\"raw\":1403000,\"fmt\":\"1.4M\",\"longFmt\":\"1,403,000\"},\"totalAssets\":{\"raw\":3968712000,\"fmt\":\"3.97B\",\"longFmt\":\"3,968,712,000\"},\"accountsPayable\":{\"raw\":90020000,\"fmt\":\"90.02M\",\"longFmt\":\"90,020,000\"},\"shortLongTermDebt\":{\"raw\":108941000,\"fmt\":\"108.94M\",\"longFmt\":\"108,941,000\"},\"otherCurrentLiab\":{\"raw\":6222000,\"fmt\":\"6.22M\",\"longFmt\":\"6,222,000\"},\"longTermDebt\":{\"raw\":1492810000,\"fmt\":\"1.49B\",\"longFmt\":\"1,492,810,000\"},\"otherLiab\":{\"raw\":3084000,\"fmt\":\"3.08M\",\"longFmt\":\"3,084,000\"},\"totalCurrentLiabilities\":{\"raw\":293889000,\"fmt\":\"293.89M\",\"longFmt\":\"293,889,000\"},\"totalLiab\":{\"raw\":1795607000,\"fmt\":\"1.8B\",\"longFmt\":\"1,795,607,000\"},\"commonStock\":{\"raw\":239148000,\"fmt\":\"239.15M\",\"longFmt\":\"239,148,000\"},\"retainedEarnings\":{\"raw\":385616000,\"fmt\":\"385.62M\",\"longFmt\":\"385,616,000\"},\"treasuryStock\":{\"raw\":-129995000,\"fmt\":\"-130M\",\"longFmt\":\"-129,995,000\"},\"capitalSurplus\":{\"raw\":1678336000,\"fmt\":\"1.68B\",\"longFmt\":\"1,678,336,000\"},\"otherStockholderEquity\":{\"raw\":33029000,\"fmt\":\"33.03M\",\"longFmt\":\"33,029,000\"},\"totalStockholderEquity\":{\"raw\":2173105000,\"fmt\":\"2.17B\",\"longFmt\":\"2,173,105,000\"},\"netTangibleAssets\":{\"raw\":2157359000,\"fmt\":\"2.16B\",\"longFmt\":\"2,157,359,000\"}},{\"maxAge\":1,\"endDate\":{\"raw\":1640908800,\"fmt\":\"2021-12-31\"},\"cash\":{\"raw\":152528000,\"fmt\":\"152.53M\",\"longFmt\":\"152,528,000\"},\"netReceivables\":{\"raw\":214603000,\"fmt\":\"214.6M\",\"longFmt\":\"214,603,000\"},\"inventory\":{\"raw\":69035000,\"fmt\":\"69.03M\",\"longFmt\":\"69,035,000\"},\"otherCurrentAssets\":{\"raw\":23241000,\"fmt\":\"23.24M\",\"longFmt\":\"23,241,000\"},\"totalCurrentAssets\":{\"raw\":459407000,\"fmt\":\"459.41M\",\"longFmt\":\"459,407,000\"},\"longTermInvestments\":{\"raw\":72447000,\"fmt\":\"72.45M\",\"longFmt\":\"72,447,000\"},\"propertyPlantEquipment\":{\"raw\":3179299000,\"fmt\":\"3.18B\",\"longFmt\":\"3,179,299,000\"},\"intangibleAssets\":{\"raw\":186000,\"fmt\":\"186k\",\"longFmt\":\"186,000\"},\"otherAssets\":{\"raw\":57184000,\"fmt\":\"57.18M\",\"longFmt\":\"57,184,000\"},\"deferredLongTermAssetCharges\":{\"raw\":1546000,\"fmt\":\"1.55M\",\"longFmt\":\"1,546,000\"},\"totalAssets\":{\"raw\":3768523000,\"fmt\":\"3.77B\",\"longFmt\":\"3,768,523,000\"},\"accountsPayable\":{\"raw\":26012000,\"fmt\":\"26.01M\",\"longFmt\":\"26,012,000\"},\"shortLongTermDebt\":{\"raw\":96338000,\"fmt\":\"96.34M\",\"longFmt\":\"96,338,000\"},\"otherCurrentLiab\":{\"raw\":11778000,\"fmt\":\"11.78M\",\"longFmt\":\"11,778,000\"},\"longTermDebt\":{\"raw\":1461915000,\"fmt\":\"1.46B\",\"longFmt\":\"1,461,915,000\"},\"otherLiab\":{\"raw\":8234000,\"fmt\":\"8.23M\",\"longFmt\":\"8,234,000\"},\"totalCurrentLiabilities\":{\"raw\":321033000,\"fmt\":\"321.03M\",\"longFmt\":\"321,033,000\"},\"totalLiab\":{\"raw\":1807941000,\"fmt\":\"1.81B\",\"longFmt\":\"1,807,941,000\"},\"commonStock\":{\"raw\":239148000,\"fmt\":\"239.15M\",\"longFmt\":\"239,148,000\"},\"retainedEarnings\":{\"raw\":180140000,\"fmt\":\"180.14M\",\"longFmt\":\"180,140,000\"},\"treasuryStock\":{\"raw\":-161255000,\"fmt\":\"-161.25M\",\"longFmt\":\"-161,255,000\"},\"capitalSurplus\":{\"raw\":1702549000,\"fmt\":\"1.7B\",\"longFmt\":\"1,702,549,000\"},\"otherStockholderEquity\":{\"raw\":2849000,\"fmt\":\"2.85M\",\"longFmt\":\"2,849,000\"},\"totalStockholderEquity\":{\"raw\":1960582000,\"fmt\":\"1.96B\",\"longFmt\":\"1,960,582,000\"},\"netTangibleAssets\":{\"raw\":1960396000,\"fmt\":\"1.96B\",\"longFmt\":\"1,960,396,000\"}},{\"maxAge\":1,\"endDate\":{\"raw\":1609372800,\"fmt\":\"2020-12-31\"},\"cash\":{\"raw\":161478000,\"fmt\":\"161.48M\",\"longFmt\":\"161,478,000\"},\"netReceivables\":{\"raw\":192647000,\"fmt\":\"192.65M\",\"longFmt\":\"192,647,000\"},\"inventory\":{\"raw\":75780000,\"fmt\":\"75.78M\",\"longFmt\":\"75,780,000\"},\"otherCurrentAssets\":{\"raw\":21968000,\"fmt\":\"21.97M\",\"longFmt\":\"21,968,000\"},\"totalCurrentAssets\":{\"raw\":451873000,\"fmt\":\"451.87M\",\"longFmt\":\"451,873,000\"},\"longTermInvestments\":{\"raw\":51704000,\"fmt\":\"51.7M\",\"longFmt\":\"51,704,000\"},\"propertyPlantEquipment\":{\"raw\":3127091000,\"fmt\":\"3.13B\",\"longFmt\":\"3,127,091,000\"},\"intangibleAssets\":{\"raw\":161000,\"fmt\":\"161k\",\"longFmt\":\"161,000\"},\"otherAssets\":{\"raw\":56410000,\"fmt\":\"56.41M\",\"longFmt\":\"56,410,000\"},\"deferredLongTermAssetCharges\":{\"raw\":1357000,\"fmt\":\"1.36M\",\"longFmt\":\"1,357,000\"},\"totalAssets\":{\"raw\":3687239000,\"fmt\":\"3.69B\",\"longFmt\":\"3,687,239,000\"},\"accountsPayable\":{\"raw\":27226000,\"fmt\":\"27.23M\",\"longFmt\":\"27,226,000\"},\"shortLongTermDebt\":{\"raw\":20542000,\"fmt\":\"20.54M\",\"longFmt\":\"20,542,000\"},\"otherCurrentLiab\":{\"raw\":14651000,\"fmt\":\"14.65M\",\"longFmt\":\"14,651,000\"},\"longTermDebt\":{\"raw\":1141038000,\"fmt\":\"1.14B\",\"longFmt\":\"1,141,038,000\"},\"otherLiab\":{\"raw\":9649000,\"fmt\":\"9.65M\",\"longFmt\":\"9,649,000\"},\"totalCurrentLiabilities\":{\"raw\":203594000,\"fmt\":\"203.59M\",\"longFmt\":\"203,594,000\"},\"totalLiab\":{\"raw\":1375453000,\"fmt\":\"1.38B\",\"longFmt\":\"1,375,453,000\"},\"commonStock\":{\"raw\":239148000,\"fmt\":\"239.15M\",\"longFmt\":\"239,148,000\"},\"retainedEarnings\":{\"raw\":540714000,\"fmt\":\"540.71M\",\"longFmt\":\"540,714,000\"},\"treasuryStock\":{\"raw\":-170625000,\"fmt\":\"-170.62M\",\"longFmt\":\"-170,625,000\"},\"capitalSurplus\":{\"raw\":1702549000,\"fmt\":\"1.7B\",\"longFmt\":\"1,702,549,000\"},\"otherStockholderEquity\":{\"raw\":-6521000,\"fmt\":\"-6.52M\",\"longFmt\":\"-6,521,000\"},\"totalStockholderEquity\":{\"raw\":2311786000,\"fmt\":\"2.31B\",\"longFmt\":\"2,311,786,000\"},\"netTangibleAssets\":{\"raw\":2311625000,\"fmt\":\"2.31B\",\"longFmt\":\"2,311,625,000\"}},{\"maxAge\":1,\"endDate\":{\"raw\":1577750400,\"fmt\":\"2019-12-31\"},\"cash\":{\"raw\":296954000,\"fmt\":\"296.95M\",\"longFmt\":\"296,954,000\"},\"netReceivables\":{\"raw\":287461000,\"fmt\":\"287.46M\",\"longFmt\":\"287,461,000\"},\"inventory\":{\"raw\":183382000,\"fmt\":\"183.38M\",\"longFmt\":\"183,382,000\"},\"otherCurrentAssets\":{\"raw\":34452000,\"fmt\":\"34.45M\",\"longFmt\":\"34,452,000\"},\"totalCurrentAssets\":{\"raw\":802249000,\"fmt\":\"802.25M\",\"longFmt\":\"802,249,000\"},\"longTermInvestments\":{\"raw\":50323000,\"fmt\":\"50.32M\",\"longFmt\":\"50,323,000\"},\"propertyPlantEquipment\":{\"raw\":3238435000,\"fmt\":\"3.24B\",\"longFmt\":\"3,238,435,000\"},\"intangibleAssets\":{\"raw\":39000,\"fmt\":\"39k\",\"longFmt\":\"39,000\"},\"otherAssets\":{\"raw\":73797000,\"fmt\":\"73.8M\",\"longFmt\":\"73,797,000\"},\"deferredLongTermAssetCharges\":{\"raw\":2715000,\"fmt\":\"2.71M\",\"longFmt\":\"2,715,000\"},\"totalAssets\":{\"raw\":4164843000,\"fmt\":\"4.16B\",\"longFmt\":\"4,164,843,000\"},\"accountsPayable\":{\"raw\":22737000,\"fmt\":\"22.74M\",\"longFmt\":\"22,737,000\"},\"shortLongTermDebt\":{\"raw\":49705000,\"fmt\":\"49.7M\",\"longFmt\":\"49,705,000\"},\"otherCurrentLiab\":{\"raw\":18676000,\"fmt\":\"18.68M\",\"longFmt\":\"18,676,000\"},\"longTermDebt\":{\"raw\":1483888000,\"fmt\":\"1.48B\",\"longFmt\":\"1,483,888,000\"},\"otherLiab\":{\"raw\":9889000,\"fmt\":\"9.89M\",\"longFmt\":\"9,889,000\"},\"totalCurrentLiabilities\":{\"raw\":316050000,\"fmt\":\"316.05M\",\"longFmt\":\"316,050,000\"},\"totalLiab\":{\"raw\":1852988000,\"fmt\":\"1.85B\",\"longFmt\":\"1,852,988,000\"},\"commonStock\":{\"raw\":239148000,\"fmt\":\"239.15M\",\"longFmt\":\"239,148,000\"},\"retainedEarnings\":{\"raw\":420058000,\"fmt\":\"420.06M\",\"longFmt\":\"420,058,000\"},\"treasuryStock\":{\"raw\":-49900000,\"fmt\":\"-49.9M\",\"longFmt\":\"-49,900,000\"},\"capitalSurplus\":{\"raw\":1702549000,\"fmt\":\"1.7B\",\"longFmt\":\"1,702,549,000\"},\"otherStockholderEquity\":{\"raw\":-4284000,\"fmt\":\"-4.28M\",\"longFmt\":\"-4,284,000\"},\"totalStockholderEquity\":{\"raw\":2311855000,\"fmt\":\"2.31B\",\"longFmt\":\"2,311,855,000\"},\"netTangibleAssets\":{\"raw\":2311816000,\"fmt\":\"2.31B\",\"longFmt\":\"2,311,816,000\"}}],\"maxAge\":86400}}],\"error\":null}}"
}
}
Loading

0 comments on commit b9dfb4c

Please sign in to comment.