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

Run cypress on circleci #4484

Merged
merged 40 commits into from Jul 25, 2023
Merged

Run cypress on circleci #4484

merged 40 commits into from Jul 25, 2023

Conversation

MarcelBolten
Copy link
Contributor

@MarcelBolten MarcelBolten commented Jul 24, 2023

Hi Nico,
I found a way to run cypress on circleci.
Cypress tests are changed a bit in order to work with the same data generated for unit tests. Mainly user names and passwords.
However, it would also possible to create a different set of test data for the cypress tests.

@NicolasCARPi
Copy link
Contributor

Hello Marcel,

Great! I like that this drops the dependency on cypress in package.json.

In step "Run Cypress e2e tests and extract artifacts", there is an error:
Error: No such container:path: elab-cypress:/e2e/tests/cypress/screenshots

It seems artifacts are not present.

As a side note: currently there are the fake data used in demo/dev, and then the fake data used in tests. I think it would make sense that these two become one. So the phpunit user would disappear, replaced by toto, tata and friends. So we have only one set of fake data that is always the same (modulo the Faker variations). Seems it would be easier to reason with, and would allow removing the populate.yml from tests folder. What do you think? Is this something you want to look into?

@MarcelBolten
Copy link
Contributor Author

In step "Run Cypress e2e tests and extract artifacts", there is an error: Error: No such container:path: elab-cypress:/e2e/tests/cypress/screenshots

This should be solved now. Folders will always be there but they might stay empty.

As a side note: currently there are the fake data used in demo/dev

Are you talking about src/tools/populate-config.yml.dist, or are you using a different one for demo/dev?

I think it would make sense that these two become one. So the phpunit user would disappear, replaced by toto, tata and friends. So we have only one set of fake data that is always the same (modulo the Faker variations). Seems it would be easier to reason with, and would allow removing the populate.yml from tests folder. What do you think?

I agree but that will affect many of the unit/api tests, right?

Is this something you want to look into?

Can we merge this PR first and than in a new one I will address the changes to merge the demo/dev and unit/api tests?

Copy link
Contributor

@NicolasCARPi NicolasCARPi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you!

@NicolasCARPi NicolasCARPi merged commit 6364f11 into hypernext Jul 25, 2023
9 checks passed
@NicolasCARPi NicolasCARPi deleted the marcel-cypress-on-circleci branch July 25, 2023 00:19
@NicolasCARPi
Copy link
Contributor

Are you talking about src/tools/populate-config.yml.dist

Yes.

I agree but that will affect many of the unit/api tests, right?

"Progress is impossible without change, and those who cannot change their minds cannot change anything." - George Bernard Shaw

NicolasCARPi added a commit that referenced this pull request Jul 25, 2023
* 'hypernext' of github.com:elabftw/elabftw:
  Run cypress on circleci (#4484)
NicolasCARPi added a commit that referenced this pull request Jul 25, 2023
* hypernext:
  next version is beta version
  fix issue with anonymous user could not use api calls
  some .eln related changes:
  Run cypress on circleci (#4484)
  fix anonymous login
  remove unused code
  improve sync between json editor and extra fields
  fix issue with extra fields not shown if ungrouped field deleted
  improve sync between extra fields and json editor. fix #4343
  add missing "saved" key for i18next
  add units to extra fields for numbers inputs
  add button to delete extra field
  update i18n french
NicolasCARPi added a commit that referenced this pull request Jul 26, 2023
* hypernext:
  update portuguese, brazilian flavor
  update portuguese
  update indonesian
  update chinese translations
  update german lang
  fix for recent eln changes
  only show bookings from the future in dashboard
  next version is beta version
  fix issue with anonymous user could not use api calls
  some .eln related changes:
  Run cypress on circleci (#4484)
  fix anonymous login
  remove unused code
  improve sync between json editor and extra fields
  fix issue with extra fields not shown if ungrouped field deleted
  improve sync between extra fields and json editor. fix #4343
  add missing "saved" key for i18next
  add units to extra fields for numbers inputs
  add button to delete extra field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants