diff --git a/.gitignore b/.gitignore index 0415a235..1654f566 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ /assets/sstvimages/* /assets/js/sections/custom.js /cypress/screenshots -/node_modules +/node_modules/ .idea/* .DS_Store sync.sh diff --git a/Dockerfile b/Dockerfile index 812b536a..cfaf7523 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,21 +24,5 @@ RUN apt-get update && apt-get install -y \ && docker-php-ext-install xml \ && a2enmod rewrite -# # Copy .env, config.php, and database.php into the docker image -# COPY .env ./ -# COPY install/config/config.php install/config/ -# COPY install/config/database.php install/config/ - -# # Add a script that reads the .env file and replaces the variables in the config.php and database.php files -# ADD script.sh ./ -# RUN chmod +x script.sh - -# # Run the script at build time -# RUN ./script.sh - -# # Create the application/config directory -# RUN mkdir -p application/config - - # Expose port 80 EXPOSE 80 \ No newline at end of file diff --git a/cypress/e2e/2-version-info.cy.js b/cypress/e2e/2-version-info.cy.js index e91b0187..ed3f2f74 100644 --- a/cypress/e2e/2-version-info.cy.js +++ b/cypress/e2e/2-version-info.cy.js @@ -1,18 +1,23 @@ describe("Version Info Modal", () => { beforeEach(() => { cy.login(); - cy.request( - "POST", - "http://localhost/index.php/user_options/enableVersionDialog" - ).wait(1000); }); it("should open after login", () => { - // check if the modal is visible + // Make sure the dialog is enabled + cy.request({ + method: "POST", + url: "http://localhost/index.php/user_options/enableVersionDialog", + }).wait(1000); cy.get(".modal-title").contains("Version Info").should("be.visible"); }); it("should close after clicking 'Close' button", () => { + // Make sure the dialog is enabled + cy.request({ + method: "POST", + url: "http://localhost/index.php/user_options/enableVersionDialog", + }).wait(1000); // check if the modal is visible cy.get(".modal-title").contains("Version Info").should("be.visible"); // click the 'Close' button @@ -28,10 +33,16 @@ describe("Version Info Modal", () => { .should("not.be.visible"); }); - it("should not show again after clicking 'Don't show again' button", () => { + it("should close after clicking 'Don't show again' button", () => { + // Make sure the dialog is enabled + cy.request({ + method: "POST", + url: "http://localhost/index.php/user_options/enableVersionDialog", + }).wait(1000); + // check if the modal is visible cy.get(".modal-title").contains("Version Info").should("be.visible"); - // click the 'Close' button + // click the "Don't show again" button cy.get("button") .contains("Don't show again") .should("be.visible") @@ -43,4 +54,9 @@ describe("Version Info Modal", () => { .contains("Version Info") .should("not.be.visible"); }); + + it("should not show the version info dialog after click 'Dont show again' button", () => { + // check if the modal is not visible + cy.get(".modal-title").should("not.exist"); + }); });