diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index a77fb60..1e6bf03 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -3,7 +3,7 @@ version: '3.8' services: rainfall-db-dev: image: mariadb:latest - container_name: mariadb + container_name: rainfall-mariadb environment: MYSQL_ROOT_PASSWORD: rainfall-dev-db MYSQL_DATABASE: rainfall_dev diff --git a/rainfall-frontend/cypress/e2e/edit_site.cy.ts b/rainfall-frontend/cypress/e2e/edit_site.cy.ts index d53ef50..171c89c 100644 --- a/rainfall-frontend/cypress/e2e/edit_site.cy.ts +++ b/rainfall-frontend/cypress/e2e/edit_site.cy.ts @@ -83,6 +83,10 @@ describe('Edit Site test', () => { cy.get('#new-release-button').should('be.disabled'); }); + it('starts with the deploy button disabled', () => { + cy.get('#deploy-site-button').should('be.disabled'); + }); + describe('when a release is added', () => { beforeEach(() => { cy.intercept('POST', 'api/v1/release', { @@ -217,7 +221,7 @@ describe('Edit Site test', () => { cy.get('#preview-site-button').should('not.be.disabled'); }); - describe.only('when the preview button is clicked', () => { + describe('when the preview button is clicked', () => { let calledPreview = false; beforeEach(() => { cy.intercept('POST', 'api/v1/preview/06547ed8-206f-7d3d-8000-20ab423e0bb9', (req) => { @@ -247,6 +251,11 @@ describe('Edit Site test', () => { cy.wrap(calledPreview).should('eq', true); }); + it('enables the deploy button', () => { + cy.wait('@preview-site'); + cy.get('#deploy-site-button').should('not.be.disabled'); + }); + it('shows a loading message', () => { cy.get('.preview-load').find('.loader').should('be.visible'); cy.get('.preview-load').should('not.contain', 'Open preview in new window'); @@ -264,6 +273,14 @@ describe('Edit Site test', () => { .should('not.be.empty') .and('contain', '/preview'); }); + + it('has the right URL for the deploy ZIP link', () => { + cy.wait('@preview-site'); + cy.get('#deploy-zip-button') + .should('have.attr', 'href') + .should('not.be.empty') + .and('contain', '/zip'); + }); }); describe('and the delete button is successfully pressed for one of the files', () => { diff --git a/rainfall-frontend/src/components/DeployButton.vue b/rainfall-frontend/src/components/DeployButton.vue index b285d65..1f9522e 100644 --- a/rainfall-frontend/src/components/DeployButton.vue +++ b/rainfall-frontend/src/components/DeployButton.vue @@ -14,13 +14,18 @@ export default { mounted() { initFlowbite(); }, + methods: { + gotoFeedbackPage() { + this.$router.push('/feedback'); + }, + }, }; diff --git a/rainfall-frontend/src/views/FeedbackView.vue b/rainfall-frontend/src/views/FeedbackView.vue new file mode 100644 index 0000000..88fe900 --- /dev/null +++ b/rainfall-frontend/src/views/FeedbackView.vue @@ -0,0 +1,27 @@ + + +