17
describe("hello", () => {
20
Cypress.config("defaultCommandTimeout", 30000);
21
cy.loadApp("http://localhost:3000/");
22
cy.prepForElementSnapshots();
25
it("displays the welcome message on initial page load", () => {
26
cy.get(".element-container .stMarkdown h1").should(
28
"Welcome to Streamlit!"
31
cy.get(".appview-container").matchThemedSnapshots("welcome-streamlit");
34
it("renders the SidebarNav correctly", () => {
35
cy.prepForElementSnapshots();
37
cy.get("[data-testid='stSidebarNav']").matchThemedSnapshots(
38
"hello-mpa-sidebar-nav"
42
it("displays animation demo", () => {
43
cy.getIndexed('[data-testid="stSidebarNav"] a', 1)
46
cy.get(".element-container .stMarkdown h1").should(
52
cy.get(".stButton button").contains("Re-run");
54
cy.get(".appview-container").matchThemedSnapshots("animation-demo");
58
it("displays plotting demo", () => {
59
cy.getIndexed('[data-testid="stSidebarNav"] a', 2)
62
cy.get(".element-container .stMarkdown h1").should(
68
cy.get("[data-testid='stText']").contains("100% Complete");
70
cy.get(".element-container [data-testid='stArrowVegaLiteChart']")
72
.should("have.css", "height", "350px");
76
it("displays mapping demo", () => {
77
cy.getIndexed('[data-testid="stSidebarNav"] a', 3)
78
.click({ force: true })
80
cy.get(".element-container .stMarkdown h1").should(
85
cy.get(".element-container .stDeckGlJsonChart")
87
.should("have.css", "height", "500px");
92
cy.get(".appview-container").matchThemedSnapshots("mapping-demo");
96
it("displays dataframe demo", () => {
97
cy.getIndexed('[data-testid="stSidebarNav"] a', 4)
100
cy.get(".element-container .stMarkdown h1").should(
105
cy.get(".stMultiSelect").should("exist");
107
cy.get(".stDataFrame").should("exist");
109
cy.get(".element-container [data-testid='stArrowVegaLiteChart']")
111
.should("have.css", "height", "350px");
113
cy.get(".appview-container").matchThemedSnapshots("dataframe-demo");