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

Make e2e tests to run from branch #1351

Closed
igoychev opened this issue Feb 16, 2023 · 3 comments
Closed

Make e2e tests to run from branch #1351

igoychev opened this issue Feb 16, 2023 · 3 comments
Assignees
Labels
template: bug type: bug Something isn't working

Comments

@igoychev
Copy link
Contributor

Which area(s) of Podkrepi.bg are affected? (leave empty if unsure)

TypeScript

Describe the Bug

Currently the e2e tests for a new branch are run from a newly built master instead from the new branch which contains the new code.

To Reproduce

  1. Make a deliberate error in code so that the tests fail on localhost
  2. Publish it as a new branch
  3. See how tests will pass when "run tests" label is added

Expected Behavior

We need the tests on a branch to run from the branch itself, because there might be new tests adapted for the new code.

Which browser are you using? (if relevant)

No response

@igoychev igoychev added type: bug Something isn't working template: bug labels Feb 16, 2023
@dimitur2204
Copy link
Contributor

dimitur2204 commented Feb 18, 2023

@igoychev
I am not sure that this is the case, because I was recently making new e2e tests on #1336 and this run for example has 24 tests (https://github.com/podkrepi-bg/frontend/actions/runs/4157716833/jobs/7192414709).

This is the latest run from master (https://github.com/podkrepi-bg/frontend/actions/runs/4203735250/jobs/7293506065) and it has 23, meaning the one on the branch does actually run from the tests on the branch.

Where did you observe that?

@igoychev
Copy link
Contributor Author

igoychev commented Feb 19, 2023

We saw the problem with these PRs:
After changing the english translations of donation and fees here: #1331 the tests passed, but then when merged in master, the tests started to fail.
So I had to fix them in a separate PR: #1345 where although fixed the tests executed by the workflow were still failing in the new branch, so I had to force the merge to master. Then in the master they passed well.

@imilchev
Copy link
Contributor

The problem was caused because we were checking out the master branch instead of the PR commit. I fixed that for both the frontend and the api repos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
template: bug type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants