diff --git a/.env b/.env new file mode 100644 index 0000000..3db986a --- /dev/null +++ b/.env @@ -0,0 +1 @@ +NEXT_PUBLIC_SAMPLE_GITHUB_REPO=https://github.com/DiggidyDev/dockerignore-validator/tree/main diff --git a/cypress/e2e/validate.cy.ts b/cypress/e2e/validate.cy.ts index 0819f80..41d11d7 100644 --- a/cypress/e2e/validate.cy.ts +++ b/cypress/e2e/validate.cy.ts @@ -19,9 +19,11 @@ describe("Homepage", () => { .should("exist") .and("have.text", "Files"); - cy.get("[data-cy=options] > input[name=showIgnored]") - .should("exist") - .and("be.checked"); + cy.get("[data-cy=options] > input[name=showIgnored]").should( + "not.exist" + ); + + cy.get("[data-cy=toggle-options]").should("exist").and("be.enabled"); cy.get("[data-cy=validate-button]").should("exist").and("be.enabled"); @@ -86,6 +88,9 @@ describe("Homepage", () => { expectedIgnoredOutput ); + cy.get("[data-cy=toggle-options]").click(); + cy.get("[data-cy=toggle-options]").should("have.text", "Hide Options"); + cy.get("[data-cy=options] > input[name=showIgnored]").uncheck(); cy.get("[data-cy=result-output] > label").should( "have.text", diff --git a/src/app/components/Button/Button.cy.tsx b/src/app/components/Button/Button.cy.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/app/components/Button/Button.tsx b/src/app/components/Button/Button.tsx new file mode 100644 index 0000000..d2aa031 --- /dev/null +++ b/src/app/components/Button/Button.tsx @@ -0,0 +1,14 @@ +import { ButtonHTMLAttributes } from "react"; + +interface ButtonProps extends ButtonHTMLAttributes {} + +export function Button({ children, className, ...props }: ButtonProps) { + return ( + + ); +} diff --git a/src/app/components/TextArea/TextArea.tsx b/src/app/components/TextArea/TextArea.tsx index e256172..3758eaf 100644 --- a/src/app/components/TextArea/TextArea.tsx +++ b/src/app/components/TextArea/TextArea.tsx @@ -67,7 +67,7 @@ function StyledTextArea({ className = "", ...props }: StyledTextAreaProps) { return (