Skip to content
Merged
3 changes: 3 additions & 0 deletions packages/browser-tests/cypress/fixtures/test.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
date,underlying,name,exchange,symbol,fut_expiration_date,bid,ask,open,high,low,close,volume,open_interest,strike_multiplier,option_price_multiplier
2005-12-01T00:00:00.000000Z,AC,Denatured Fuel Ethanol Futures,CBOT,AC/05Z.CB,1134518400000,0.000000,0.000000,1.900000,1.900000,1.900000,1.900000,2,64,1.000000,1.000000
2005-12-01T00:00:00.000000Z,AC,Denatured Fuel Ethanol Futures,CBOT,AC/06F.CB,1137110400000,0.000000,0.000000,0.000000,1.865000,1.865000,1.865000,0,83,1.000000,1.000000
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@ describe("questdb import", () => {
it("display import panel", () => {
cy.getByDataHook("import-panel-button").click();
cy.getByDataHook("import-dropbox").should("be.visible");
cy.getByDataHook("import-browse-from-disk").should("be.visible");

cy.get('input[type="file"]').selectFile("cypress/fixtures/test.csv", { force: true });
cy.getByDataHook("import-table-column-schema").should("be.visible");
cy.getByDataHook("import-table-column-owner").should("not.exist");
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/// <reference types="cypress" />

describe("CSV import in enterprise", () => {
before(() => {
cy.loadConsoleWithAuth();
});

it("display import panel", () => {
cy.getByDataHook("import-panel-button").click();
cy.getByDataHook("import-dropbox").should("be.visible");
cy.getByDataHook("import-browse-from-disk").should("be.visible");

cy.get('input[type="file"]').selectFile("cypress/fixtures/test.csv", { force: true });
cy.getByDataHook("import-table-column-schema").should("be.visible");
cy.getByDataHook("import-table-column-owner").should("be.visible");
cy.contains("option", "admin").should("exist");
});
});
28 changes: 28 additions & 0 deletions packages/browser-tests/cypress/integration/enterprise/oidc.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,32 @@ describe("OIDC authentication", () => {
cy.getByDataHook("button-log-in").click()
cy.getEditor().should("be.visible");
});

it("display import panel", () => {
interceptAuthorizationCodeRequest(`${baseUrl}?code=abcdefgh`);
cy.getByDataHook("button-sso-login").click();
cy.wait("@authorizationCode");

interceptTokenRequest({
"access_token": "gslpJtzmmi6RwaPSx0dYGD4tEkom",
"refresh_token": "FUuAAqMp6LSTKmkUd5uZuodhiE4Kr6M7Eyv",
"id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6I",
"token_type": "Bearer",
"expires_in": 300
});
cy.wait("@tokens");
cy.getEditor().should("be.visible");

cy.getByDataHook("import-panel-button").click();
cy.getByDataHook("import-dropbox").should("be.visible");
cy.getByDataHook("import-browse-from-disk").should("be.visible");

cy.get('input[type="file"]').selectFile("cypress/fixtures/test.csv", { force: true });
cy.getByDataHook("import-table-column-schema").should("be.visible");
cy.getByDataHook("import-table-column-owner").should("be.visible");
cy.contains("option", "user1").should("not.exist");
cy.contains("option", "group1").should("exist");

cy.logout();
});
});
5 changes: 3 additions & 2 deletions packages/web-console/serve-dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const server = http.createServer((req, res) => {
res.statusCode = 403;
res.end();
return;
}
}
const { method } = req
const baseUrl = "http://" + req.headers.host + contextPath;
const reqUrl = new url.URL(req.url, baseUrl);
Expand All @@ -20,7 +20,8 @@ const server = http.createServer((req, res) => {
if (
reqPathName.startsWith("/exec") ||
reqPathName.startsWith("/settings") ||
reqPathName.startsWith("/warnings")
reqPathName.startsWith("/warnings") ||
reqPathName.startsWith("/chk")
) {
// proxy /exec requests to localhost:9000
const options = {
Expand Down
Loading