Skip to content

refactor: rewriting some e2e tests #213

New issue

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

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

Already on GitHub? # to your account

Merged
merged 21 commits into from
May 19, 2025
Merged

Conversation

EduardoJM
Copy link
Member

@EduardoJM EduardoJM commented Dec 23, 2024

The fundamental of this PR is:

  1. We have some things: ArrayField widget and Inlines that works exactly same and we have a lot of duplicated test code.
  2. We have the widget with various common things with ArrayField widget and Inline that have a lot of duplicated test code too.

The concept of this refactor is:

  1. Create some test helper and mixins classes to run some common test-case's for each of this.
  2. Make various tests inside a one test function to reduce the quantity of new browser/page opened.
  3. Remove UI Regression tests for now.
  4. Fix any found behaviour mistake.
  5. Turn the test code more semantic and readable.

Relation to the Issues:
closes #208
closes #207

Other informations:


Removed major and minor version comparsion in some tests, like bellow code. The Django 4.2 is, now, the minimum supported version:

major, minor, _, _, _ = django.VERSION
if major < 4 or minor < 2:
    # Theme toggle is added in django 4.2
    # https://docs.djangoproject.com/en/4.2/releases/4.2/#django-contrib-admin
    return

As we removed some font tags, because we dropped support for old django (with different font names), various snapshots for UI Regression Tests are regenerated due diference into fonts.

@EduardoJM EduardoJM added this to the 1.1.0 milestone Apr 28, 2025
@EduardoJM EduardoJM merged commit 7cb87d7 into main May 19, 2025
15 checks passed
@EduardoJM EduardoJM deleted the refactor/unify-some-e2e-tests branch May 19, 2025 11:24
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor library e2e tests to reduce the quantity of test-cases fix broken ui regression tests
1 participant