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

#18009 Repro: Nodata user can create dashboard subscription, but receives an error (#18014)

parent 10f40205
No related branches found
No related tags found
No related merge requests found
import { restore, popover } from "__support__/e2e/cypress";
describe.skip("issue 18009", () => {
beforeEach(() => {
restore();
cy.signInAsAdmin();
cy.request("DELETE", "http://localhost:80/email/all");
setUpEmail();
cy.signIn("nodata");
});
it("nodata user should be able to create and receive an email subscription without errors (metabase#18009)", () => {
cy.visit("/dashboard/1");
cy.icon("share").click();
cy.findByText("Dashboard subscriptions").click();
cy.findByText("Email it").click();
cy.findByPlaceholderText("Enter user names or email addresses").click();
popover()
.contains(/^No Data/)
.click();
// Click anywhere to close the popover that covers the "Send email now" button
cy.findByText("To:").click();
cy.button("Send email now").click();
cy.findByText("Email sent");
cy.request("GET", "http://localhost:80/email").then(({ body }) => {
expect(body[0].html).not.to.include(
"An error occurred while displaying this card.",
);
expect(body[0].html).to.include("37.65");
});
});
});
function setUpEmail() {
cy.request("PUT", "/api/setting", {
"email-smtp-host": "localhost",
"email-smtp-port": "25",
"email-smtp-username": "admin",
"email-smtp-password": "admin",
"email-smtp-security": "none",
"email-from-address": "mailer@metabase.test",
});
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment