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

tests: add E2E tests #86

Merged
merged 6 commits into from
Mar 12, 2024
Merged

tests: add E2E tests #86

merged 6 commits into from
Mar 12, 2024

Conversation

shvlv
Copy link
Contributor

@shvlv shvlv commented Mar 7, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Tests.

What is the current behavior? (You can also link to an open issue here)
No E2E tests.

What is the new behavior (if this is a feature change)?
E2E tests to prevent possible regressions for Inpsyde and InpsydeTemplates CS usage.
See - #85.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No.

Other information:

Base automatically changed from fix/templates-ruleset to development March 7, 2024 08:48
@shvlv shvlv requested a review from gmazzap March 7, 2024 08:48
Copy link
Contributor

@gmazzap gmazzap left a comment

Choose a reason for hiding this comment

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

Firts of all, thank you for this.

I'm not super-happy about the folders structure, I think it is not inline with current code.

The test-pakage is a fixture, after all. So it can go in the tests/fixture folder.

And the E2eTest.php file is a test case, so it can go in the tests/cases folder.

So we would have:

|_ tests/
    |_ cases/
        |_ e2e/
            |_ E2eTest.php
        |_ unit/
             |_ Helpers/
             FixturesTest.php
    |_ fixtures/
        |_ unit/
            |_ argument-type-declaration.php
            |_ disable-call-user-func.php
            |_ ...
        |_ e2e/
            |_ test-package/
    |_ src/
    |_ autoload.php
    |_ bootstrap.php

This requires a bit of adjustment for the paths uses right now, but I think it looks to me a better organization.

Alternatively:

|_ tests/
    |_ unit/
        cases/
            |_ Helpers/
             FixturesTest.php
        fixtures/
            |_ argument-type-declaration.php
            |_ disable-call-user-func.php
            |_ ...
    |_ e2e/
        |_ cases/
            |_ E2eTest.php
        |_ fixtures/
            |_ test-package/
    |_ src/
    |_ autoload.php
    |_ bootstrap.php

What do you think?

phpunit.xml.dist Outdated Show resolved Hide resolved
@shvlv
Copy link
Contributor Author

shvlv commented Mar 7, 2024

I like the second approach more. Does it look good to you?

@gmazzap gmazzap self-requested a review March 7, 2024 21:44
@shvlv shvlv requested review from gmazzap and tfrommen March 12, 2024 08:28
@shvlv shvlv merged commit c5fcc63 into development Mar 12, 2024
26 checks passed
@shvlv shvlv deleted the feat/e2e-tests branch March 12, 2024 10:24
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.

3 participants