Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft projects musn't be publicly accessible #259

Merged
merged 11 commits into from
Oct 6, 2023

Conversation

lutangar
Copy link
Contributor

@lutangar lutangar commented Sep 26, 2023

Fix #220

Most of this PR is quite off topic but since e2e tests weren't launched in a while, I had to carry out some refactoring :

  • use existing environment variables in cypress instead of hard coded credentials
  • leverage Cypress session mechanism to cache authentication requests
  • fix some tests which could failed when run in parallel (by enforcing tests isolations).

Hopefully it won't happens again since e2e tests are now run in CI.

Forbid access to draft projects from any users except owner & admin.

@lutangar lutangar self-assigned this Sep 26, 2023
@lutangar lutangar marked this pull request as ready for review September 26, 2023 08:50
apps/backend-e2e/src/e2e/auth.cy.ts Show resolved Hide resolved
apps/backend-e2e/src/e2e/auth.cy.ts Outdated Show resolved Hide resolved
apps/backend-e2e/src/e2e/auth.cy.ts Outdated Show resolved Hide resolved
apps/backend-e2e/src/e2e/auth.cy.ts Show resolved Hide resolved
apps/backend-e2e/src/e2e/auth.cy.ts Outdated Show resolved Hide resolved
apps/backend-e2e/src/e2e/auth.cy.ts Show resolved Hide resolved
apps/backend-e2e/src/e2e/auth.cy.ts Show resolved Hide resolved
apps/backend-e2e/src/e2e/project.cy.ts Show resolved Hide resolved
@lutangar
Copy link
Contributor Author

lutangar commented Sep 26, 2023

@bastiendmt raised interesting concerns about the way our tests are written and I'd like to spend some more time rewriting them.
We should at least open an issue on the matter!
@aangelot would you consider giving such an issue a priority ?

@aangelot
Copy link
Contributor

@bastiendmt thank you very much for the reviews

@lutangar so far the goal is to have a usable tool. Secondly, we must respond to issues specific to Industry Map. Then we can focus on testing (and Kepler migration), so that would be November or something. Unless you tell me it's just an hour or it's an emergency.

lutangar and others added 9 commits October 3, 2023 16:56
fix(project): forbid requesting a draft project

fix(project): fix project guard
...fetching projects was returning a 500...
Co-authored-by: Bastien Dumont <[email protected]>

Update apps/backend-e2e/src/e2e/auth.cy.ts

Co-authored-by: Bastien Dumont <[email protected]>

Update apps/backend-e2e/src/e2e/auth.cy.ts

Co-authored-by: Bastien Dumont <[email protected]>
@lutangar lutangar force-pushed the draft-project-publicly-accessible branch from 84c7742 to 0525eb6 Compare October 4, 2023 12:07
chore(ci): test

chore(ci): fix credentials

chore(ci): run background idomitc way

chore(ci): specify container

chore(ci): map to host

chore(ci): setup users

chore(ci): add & use wait-on

chore(ci): run wait on sequentially

chore(ci): run wait on sin server step

chore(env): fix in ci

chore(env): simplify
@lutangar lutangar merged commit d074059 into dev Oct 6, 2023
2 checks passed
@lutangar lutangar deleted the draft-project-publicly-accessible branch October 6, 2023 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Draft maps must not be accessible if not connected
3 participants