Porównaj commity

...

13 Commity

Autor SHA1 Wiadomość Data
Patrick Burns 253da3797c pause for the night on passing tests 2024-04-07 21:31:41 -05:00
Patrick Burns f619a6b702 add a step to check that the link station button works 2024-04-07 20:53:47 -05:00
Patrick Burns 6c06956e9a add station logbook create tests 2024-04-07 20:29:50 -05:00
Patrick Burns ec8f4b4e5d 3 second delay was too fast 2024-04-07 20:18:29 -05:00
Patrick Burns 485c21a1eb attempting to add some caching and speed up the delay 2024-04-07 20:16:12 -05:00
Patrick Burns 08c5e4420f testing if i need both dxcc calls 2024-04-07 20:08:43 -05:00
Patrick Burns ede0b201a5 attempt to add the permissions stuff to the script.sh before adding it to github actions 2024-04-07 20:04:08 -05:00
Patrick Burns e0af386cc5 add another request for dxcc 2024-04-07 19:58:37 -05:00
Patrick Burns 08d2ffaa3b add a short delay to let web connect to db 2024-04-07 19:49:57 -05:00
Patrick Burns a361d593e5 move it to github actions run step 2024-04-07 19:46:21 -05:00
Patrick Burns f65a8c1e12 still trying to populate dxcc_entities for the station creation tests 2024-04-07 19:39:19 -05:00
Patrick Burns 3d5169bbdd move request to the before on the station tests 2024-04-07 19:25:23 -05:00
Patrick Burns 155537e99c add request to populate dxcc_entities 2024-04-07 19:18:48 -05:00
3 zmienionych plików z 132 dodań i 5 usunięć

Wyświetl plik

@ -7,14 +7,39 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .env
run: cp .env.sample .env
- name: Build Docker services
run: docker-compose up -d
- name: Cache Cypress
uses: actions/cache@v2
with:
path: ~/.cache/Cypress
key: cypress-${{ hashFiles('package-lock.json') }}
restore-keys: |
cypress-
- name: Install Cypress
run: npm install cypress
- name: Cache .env
uses: actions/cache@v2
with:
path: .env
key: .env-${{ hashFiles('.env.sample') }}
restore-keys: |
.env-
- name: Setup .env
run: |
if [ ! -f .env ]; then
cp .env.sample .env
fi
- name: Build Docker services
run: docker-compose up -d
- name: Wait for services to start
run: sleep 5
- name: Populate dxcc_entities table
run: curl "http://localhost/index.php/update/dxcc"
- name: Run Cypress tests
run: npx cypress run

Wyświetl plik

@ -0,0 +1,83 @@
describe("Create station logbook", () => {
beforeEach(() => {
cy.login();
});
it("should load an empty list of station locations", () => {
// Navigate to the logbooks page
cy.visit("/index.php/logbooks");
// Check that the table is not present
cy.get("#station_logbooks_table").should("not.exist");
});
it("should have a button to create a new station location", () => {
// Navigate to the logbooks page
cy.visit("/index.php/logbooks");
// Check that the button is present
cy.get("a").contains("Create Station Logbook").should("exist").click();
cy.url().should("include", "/logbooks/create");
});
it("should create a new station location", () => {
// Navigate to the create logbook page
cy.visit("/index.php/logbooks/create");
// Define the station location name
const stationLogbookName = "Home QTH";
// Type the station location name into the input field
cy.get('input[name="stationLogbook_Name"]').type(stationLogbookName);
// Click the save button
cy.get('button[type="submit"]')
.contains("Create Station Logbook")
.click();
// Check if the station location was created successfully
cy.url().should("include", "/logbooks");
// // Check if the station location is present in the table
cy.get("#station_logbooks_table")
.contains(stationLogbookName)
.should("exist");
});
// it("should set as active station logbook when button clicked", () => {
// // Navigate to the logbooks page
// cy.visit("/index.php/logbooks");
// // Check that the button is present
// cy.get("a").contains("Set as Active Logbook").should("exist").click();
// // Check if the station was set to active
// cy.get("body")
// .contains("Active Logbook")
// .should("be.visible")
// .and("have.class", "badge text-bg-success");
// });
// it("should link to a station location from the edit logbook page", () => {
// // Navigate to the logbooks page
// cy.visit("/index.php/logbooks");
// // Click the edit button
// cy.get("i.fas.fa-edit").should("exist").click();
// // Ensure that the edit link navigates to the correct page
// cy.url().should("include", "/logbooks/edit");
// // Scroll to the bottom of the page
// cy.scrollTo("bottom");
// // Click the link location button
// cy.get("button").contains("Link Location").should("exist").click();
// // Make sure that our table now shows the linked station location
// cy.get("#station_logbooks_linked_table")
// .contains("Test Station Location")
// .should("exist");
// });
});

Wyświetl plik

@ -79,5 +79,24 @@ rm -rf /install
echo "Replacement complete."
# Set Permissions
chown -R root:www-data /var/www/html/application/config/
chown -R root:www-data /var/www/html/application/logs/
chown -R root:www-data /var/www/html/assets/qslcard/
chown -R root:www-data /var/www/html/backup/
chown -R root:www-data /var/www/html/updates/
chown -R root:www-data /var/www/html/uploads/
chown -R root:www-data /var/www/html/images/eqsl_card_images/
chown -R root:www-data /var/www/html/assets/json
chmod -R g+rw /var/www/html/application/config/
chmod -R g+rw /var/www/html/application/logs/
chmod -R g+rw /var/www/html/assets/qslcard/
chmod -R g+rw /var/www/html/backup/
chmod -R g+rw /var/www/html/updates/
chmod -R g+rw /var/www/html/uploads/
chmod -R g+rw /var/www/html/images/eqsl_card_images/
chmod -R g+rw /var/www/html/assets/json
# Start Apache in the foreground
exec apache2-foreground