Skip to content
Snippets Groups Projects
Commit f4ddeb6e authored by Atte Keinänen's avatar Atte Keinänen
Browse files

Add stubs for mode actions and drills

parent aa0a5d99
Branches
Tags
No related merge requests found
Showing
with 55 additions and 29 deletions
describe("CommonMetricsAction", () => {
it("should produce correct query results for various inputs", () => {
// Would be nice to run an integration test here to make sure that the resulting MBQL is valid and runnable
pending();
})
})
describe("CountByTimeAction", () => {
it("should produce correct query results for various inputs", () => {
// Would be nice to run an integration test here to make sure that the resulting MBQL is valid and runnable
pending();
})
})
describe("CountByColumnDrill", () => {
it("should produce correct query results for various inputs", () => {
// Would be nice to run an integration test here to make sure that the resulting MBQL is valid and runnable
pending();
})
})
/* @flow weak */
import { DATABASE_ID, ORDERS_TABLE_ID, metadata } from "metabase/__support__/sample_dataset_fixture";
import Question from "metabase-lib/lib/Question";
import { login, startServer, stopServer } from "metabase/__support__/integrated_tests";
describe("PivotByCategoryDrill", () => {
beforeAll(async () => {
await startServer();
await login();
})
it("should return a result for Order count pivoted by Subtotal", async () => {
// NOTE: Using the fixture metadata for now because trying to load the metadata involves a lot of Redux magic
const question = Question.create({ databaseId: DATABASE_ID, tableId: ORDERS_TABLE_ID, metadata })
.query()
.addAggregation(["count"])
.question()
const pivotedQuestion = question.pivot(["field-id", 4], [])
const results = await pivotedQuestion.getResults()
expect(results[0]).toBeDefined();
})
afterAll(async () => {
await stopServer();
})
});
describe("QuickFilterDrill", () => {
it("should return correct operators for various inputs", () => {
// This could also be in a separate unit test file
pending();
})
it("should produce correct query results for various inputs", () => {
// Would be nice to run an integration test here to make sure that the resulting MBQL is valid and runnable
pending();
})
})
\ No newline at end of file
describe("SortAction drill", () => {
it("should return correct sort options for various inputs", () => {
pending();
})
it("should produce correct query results for various inputs", () => {
// Would be nice to run an integration test here to make sure that the resulting MBQL is valid and runnable
pending();
})
})
\ No newline at end of file
describe("SummarizeColumnByTimeDrill", () => {
it("should produce correct query results for various inputs", () => {
// Would be nice to run an integration test here to make sure that the resulting MBQL is valid and runnable
pending();
})
})
describe("SummarizeColumnDrill", () => {
it("should produce correct query results for various inputs", () => {
// Would be nice to run an integration test here to make sure that the resulting MBQL is valid and runnable
pending();
})
})
describe("TimeseriesPivotDrill", () => {
it("should produce correct query results for various inputs", () => {
// Would be nice to run an integration test here to make sure that the resulting MBQL is valid and runnable
pending();
})
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment