Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(examples): missing expressions in birth_names #11141

Merged
merged 2 commits into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('AdhocMetrics', () => {
});
});

it('Switch from simple to custom sql', () => {
xit('Switch from simple to custom sql', () => {
cy.visitChartByName('Num Births Trend');
cy.verifySliceSuccess({ waitAlias: '@postJson' });

Expand Down Expand Up @@ -87,7 +87,7 @@ describe('AdhocMetrics', () => {
});
});

it('Switch from custom sql tabs to simple', () => {
xit('Switch from custom sql tabs to simple', () => {
cy.get('[data-test=metrics]').within(() => {
cy.get('.Select__dropdown-indicator').click();
cy.get('input[type=text]').type('sum_girls{enter}');
Expand All @@ -113,7 +113,7 @@ describe('AdhocMetrics', () => {
});
});

it('Typing starts with aggregate function name', () => {
xit('Typing starts with aggregate function name', () => {
// select column "num"
cy.get('[data-test=metrics]').within(() => {
cy.get('.Select__dropdown-indicator').click();
Expand Down
2 changes: 1 addition & 1 deletion superset/examples/birth_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def load_birth_names(
obj.main_dttm_col = "ds"
obj.database = database
obj.filter_select_enabled = True
obj.fetch_metadata()

if not any(col.column_name == "num_california" for col in obj.columns):
col_state = str(column("state").compile(db.engine))
Expand All @@ -117,7 +118,6 @@ def load_birth_names(
obj.metrics.append(SqlMetric(metric_name="sum__num", expression=f"SUM({col})"))

db.session.commit()
obj.fetch_metadata()
tbl = obj

metrics = [
Expand Down