mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #16995 from overleaf/jpa-fix-server-ce-e2e
[server-ce] fix e2e tests GitOrigin-RevId: 95a9edd44a50254ac9f680368cf8e10bbf827d69
This commit is contained in:
parent
4c0c341fe1
commit
1b0c4215b8
5 changed files with 35 additions and 13 deletions
|
@ -5,4 +5,9 @@ test-e2e:
|
||||||
docker compose -f docker-compose.yml run --rm e2e
|
docker compose -f docker-compose.yml run --rm e2e
|
||||||
docker compose down -v -t 0
|
docker compose down -v -t 0
|
||||||
|
|
||||||
.PHONY: test-e2e
|
test-e2e-open:
|
||||||
|
docker compose down -v -t 0
|
||||||
|
docker compose -f docker-compose.yml run --rm e2e-open
|
||||||
|
docker compose down -v -t 0
|
||||||
|
|
||||||
|
.PHONY: test-e2e test-e2e-open
|
||||||
|
|
|
@ -63,7 +63,7 @@ describe('Project creation and compilation', function () {
|
||||||
cy.findByText('Create').click()
|
cy.findByText('Create').click()
|
||||||
})
|
})
|
||||||
// FIXME: should be aria-labeled or data-test-id
|
// FIXME: should be aria-labeled or data-test-id
|
||||||
cy.get('.file-tree').within(() => {
|
cy.get('.file-tree').first().within(() => {
|
||||||
cy.findByText('frog.jpg').click()
|
cy.findByText('frog.jpg').click()
|
||||||
})
|
})
|
||||||
cy.findByText('Another project')
|
cy.findByText('Another project')
|
||||||
|
@ -100,9 +100,7 @@ describe('Project creation and compilation', function () {
|
||||||
cy.findByText('Share').click()
|
cy.findByText('Share').click()
|
||||||
cy.findByRole('dialog').within(() => {
|
cy.findByRole('dialog').within(() => {
|
||||||
cy.get('input').type('collaborator@example.com,')
|
cy.get('input').type('collaborator@example.com,')
|
||||||
// FIXME: Open an issue for this.
|
cy.findByText('Share').click({ force: true })
|
||||||
cy.get('button[type="submit"]').click({ force: true })
|
|
||||||
cy.get('button[type="submit"]').click({ force: true })
|
|
||||||
})
|
})
|
||||||
|
|
||||||
cy.visit('/project')
|
cy.visit('/project')
|
||||||
|
@ -123,7 +121,7 @@ describe('Project creation and compilation', function () {
|
||||||
cy.url().should('include', targetProjectId)
|
cy.url().should('include', targetProjectId)
|
||||||
})
|
})
|
||||||
|
|
||||||
cy.get('.file-tree').within(() => {
|
cy.get('.file-tree').first().within(() => {
|
||||||
cy.findByText('frog.jpg').click()
|
cy.findByText('frog.jpg').click()
|
||||||
})
|
})
|
||||||
cy.findByText('Another project')
|
cy.findByText('Another project')
|
||||||
|
|
|
@ -9,7 +9,7 @@ services:
|
||||||
redis:
|
redis:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 127.0.0.2:80:80
|
||||||
links:
|
links:
|
||||||
- mongo
|
- mongo
|
||||||
- redis
|
- redis
|
||||||
|
@ -50,7 +50,7 @@ services:
|
||||||
- 6379
|
- 6379
|
||||||
|
|
||||||
e2e:
|
e2e:
|
||||||
image: cypress/included:13.3.0
|
image: cypress/included:13.3.3
|
||||||
links:
|
links:
|
||||||
- sharelatex
|
- sharelatex
|
||||||
working_dir: /e2e
|
working_dir: /e2e
|
||||||
|
@ -62,3 +62,22 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
sharelatex:
|
sharelatex:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
|
e2e-open:
|
||||||
|
image: cypress/included:13.3.3
|
||||||
|
entrypoint: npm
|
||||||
|
command: run cypress:open
|
||||||
|
links:
|
||||||
|
- sharelatex
|
||||||
|
working_dir: /e2e
|
||||||
|
volumes:
|
||||||
|
- ./:/e2e
|
||||||
|
- /tmp/.X11-unix:/tmp/.X11-unix
|
||||||
|
user: "${DOCKER_USER:-1000:1000}"
|
||||||
|
environment:
|
||||||
|
CYPRESS_BASE_URL: http://sharelatex
|
||||||
|
SPEC_PATTERN: '**/*.spec.{js,jsx,ts,tsx}'
|
||||||
|
DISPLAY: ${DISPLAY:-:0}
|
||||||
|
depends_on:
|
||||||
|
sharelatex:
|
||||||
|
condition: service_healthy
|
||||||
|
|
8
server-ce/test/package-lock.json
generated
8
server-ce/test/package-lock.json
generated
|
@ -7,7 +7,7 @@
|
||||||
"name": "@overleaf/server-ce/test",
|
"name": "@overleaf/server-ce/test",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@testing-library/cypress": "^10.0.1",
|
"@testing-library/cypress": "^10.0.1",
|
||||||
"cypress": "13.3.0",
|
"cypress": "13.3.3",
|
||||||
"typescript": "^5.0.4"
|
"typescript": "^5.0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -713,9 +713,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/cypress": {
|
"node_modules/cypress": {
|
||||||
"version": "13.3.0",
|
"version": "13.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/cypress/-/cypress-13.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/cypress/-/cypress-13.3.3.tgz",
|
||||||
"integrity": "sha512-mpI8qcTwLGiA4zEQvTC/U1xGUezVV4V8HQCOYjlEOrVmU1etVvxOjkCXHGwrlYdZU/EPmUiWfsO3yt1o+Q2bgw==",
|
"integrity": "sha512-mbdkojHhKB1xbrj7CrKWHi22uFx9P9vQFiR0sYDZZoK99OMp9/ZYN55TO5pjbXmV7xvCJ4JwBoADXjOJK8aCJw==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@cypress/request": "^3.0.0",
|
"@cypress/request": "^3.0.0",
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@testing-library/cypress": "^10.0.1",
|
"@testing-library/cypress": "^10.0.1",
|
||||||
"cypress": "13.3.0",
|
"cypress": "13.3.3",
|
||||||
"typescript": "^5.0.4"
|
"typescript": "^5.0.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue