update test nad a few other minor updates

pull/3066/head
Patrick Burns 2024-04-07 14:04:11 -05:00
rodzic 238f1e66fa
commit a0a12c776c
3 zmienionych plików z 24 dodań i 24 usunięć

2
.gitignore vendored
Wyświetl plik

@ -14,7 +14,7 @@
/assets/sstvimages/*
/assets/js/sections/custom.js
/cypress/screenshots
/node_modules
/node_modules/
.idea/*
.DS_Store
sync.sh

Wyświetl plik

@ -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

Wyświetl plik

@ -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");
});
});