Skip to content
Snippets Groups Projects
Unverified Commit 3197b9d3 authored by Nemanja Glumac's avatar Nemanja Glumac Committed by GitHub
Browse files

#14494 Repro: "Done" button should be disabled prior to selecting Slack channel (#14544)

parent 29fef2c4
No related branches found
No related tags found
No related merge requests found
......@@ -97,6 +97,51 @@ describe("scenarios > dashboard > subscriptions", () => {
cy.findByText(/^Emailed monthly on the first (?!null)/);
});
});
describe("with Slack set up", () => {
beforeEach(() => {
// Stubbing the response in advance (Cypress will intercept it when we navigate to "Dashboard subscriptions")
cy.server();
cy.route("GET", "/api/pulse/form_input", {
channels: {
email: {
type: "email",
name: "Email",
allows_recipients: false,
recipients: ["user", "email"],
schedules: ["daily", "weekly", "monthly"],
configured: false,
},
slack: {
type: "slack",
name: "Slack",
allows_recipients: true,
schedules: ["hourly", "daily", "weekly", "monthly"],
fields: [
{
name: "channel",
type: "select",
displayName: "Post to",
options: ["#work", "#play"],
required: true,
},
],
configured: true,
},
},
});
openDashboardSubscriptions();
});
it("should not enable 'Done' button before channel is selected (metabase#14494)", () => {
cy.findByText("Send it to Slack").click();
cy.findByText("Send this dashboard to Slack");
cy.findAllByRole("button", { name: "Done" }).should("be.disabled");
cy.findByText("Pick a user or channel...").click();
cy.findByText("#work").click();
cy.findAllByRole("button", { name: "Done" }).should("not.be.disabled");
});
});
});
// Helper functions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment