mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-28 07:18:03 +00:00
Adding cypress + example test (#476)
This commit is contained in:
26
frontend/src/components/TextInput.cy.tsx
Normal file
26
frontend/src/components/TextInput.cy.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import TextInput from "../components/TextInput";
|
||||
|
||||
describe("TextInput", () => {
|
||||
const label = "label";
|
||||
const placeholder = "some placeholder";
|
||||
|
||||
beforeEach(() => {
|
||||
cy.mount(
|
||||
<TextInput
|
||||
label={label}
|
||||
placeholder={placeholder}
|
||||
onChange={() => {
|
||||
return;
|
||||
}}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
it("contains correct label", () => {
|
||||
cy.get("label").should("contain", label);
|
||||
});
|
||||
|
||||
it("contains correct placeholder", () => {
|
||||
cy.get("input").should("have.attr", "placeholder", placeholder);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user