diff --git a/adminSiteServer/testPageRouter.tsx b/adminSiteServer/testPageRouter.tsx index 93199b4c70a..c63af0d0bb6 100644 --- a/adminSiteServer/testPageRouter.tsx +++ b/adminSiteServer/testPageRouter.tsx @@ -41,6 +41,7 @@ import { ColorSchemes, GrapherProgrammaticInterface, } from "@ourworldindata/grapher" +import { DATA_API_URL } from "../settings/clientSettings.js" const IS_LIVE = ADMIN_BASE_URL === "https://owid.cloud" const DEFAULT_COMPARISON_URL = "https://ourworldindata.org" @@ -803,6 +804,72 @@ getPlainRouteWithROTransaction( } ) +getPlainRouteWithROTransaction( + testPageRouter, + "/experiment", + async (req, res, trx) => { + const style = ` + + .row { + padding: 10px; + margin: 0; + border-bottom: 1px solid #ddd; + } + + .side-by-side { + display: flex; + align-items: center; + justify-content: space-around; + width: 100%; + } + + .side-by-side + .side-by-side { + margin-top: 64px; + } + +` + const script = ` + const grapher = new FetchingGrapher(); + const container = document.getElementById('graphers'); + const root = ReactDOM.createRoot(container); + const grapher1Props = { + configUrl: "https://ourworldindata.org/grapher/life-expectancy.config.json", + dataApiUrl: "${DATA_API_URL}" +}; + root.render( + React.createElement( + React.Fragment, + null, + React.createElement(FetchingGrapher, grapher1Props), + React.createElement(FetchingGrapher, grapher1Props) + ) + ); + ` + const html = ( + +
+ + + +