Skip to content

Conversation

@jrafanie
Copy link
Member

Sporadically, I was noticing the GET below happening during the teardown of the test:
"/api/tenants?filter[]=name=&expand=resources"

It turns out we have a form validation for the name field that gets a list of tenant names on form load to prevent the user from providing a duplicate name. For the edit tenant form, we ALSO have an API tenant data request that occurs BEFORE the tenant form loads. Because of this, we need to wait on the single form validation API request for the add form and for the edit form, we need to wait for the load API request first, then, the same validation API request.

This should fix the following issue that was happening sporadically locally and in CI:

    Validate Child Tenant operations: Add, Edit, Add Project, Manage Quotas
      Validate Add child tenant function
        ✖(Attempt 1 of 10) Validate Add child tenant form elements
        ✖(Attempt 2 of 10) Validate Add child tenant form elements
        ✖(Attempt 3 of 10) Validate Add child tenant form elements
        ✖(Attempt 4 of 10) Validate Add child tenant form elements
        ✖(Attempt 5 of 10) Validate Add child tenant form elements
        ✖(Attempt 6 of 10) Validate Add child tenant form elements
        ✖(Attempt 7 of 10) Validate Add child tenant form elements
        ✖(Attempt 8 of 10) Validate Add child tenant form elements
        ✖(Attempt 9 of 10) Validate Add child tenant form elements
        ✖(Attempt 10 of 10) "before each" hook for "Validate Add child tenant form elements"
        ✖ "before each" hook for "Validate Add child tenant form elements" (30358ms)

  6 passing (4m)
  1 failing

  1) Automate Tenant form operations: Settings > Application Settings > Access Control > Tenants
       Validate Child Tenant operations: Add, Edit, Add Project, Manage Quotas
         Validate Add child tenant function
           "before each" hook for "Validate Add child tenant form elements":
     CypressError: `cy.visit()` failed trying to load:

http://localhost:3000/

We attempted to make an http request to this URL but the request failed without a response.

We received this error at the network level:

  > Error: ESOCKETTIMEDOUT

Seen in https://github.com/ManageIQ/manageiq-ui-classic/actions/runs/19341780911/job/55331768728

Sporadically, I was noticing the GET below happening during the teardown
of the test:
"/api/tenants?filter[]=name=&expand=resources"

It turns out we have a form validation for the name field that gets a list of
tenant names on form load to prevent the user from providing a duplicate name.
For the edit tenant form, we ALSO have an API tenant data request that occurs BEFORE
the tenant form loads.  Because of this, we need to wait on the single form
validation API request for the add form and for the edit form, we need to wait
for the load API request first, then, the same validation API request.

This should fix the following issue that was happening sporadically locally and
in CI:

```
    Validate Child Tenant operations: Add, Edit, Add Project, Manage Quotas
      Validate Add child tenant function
        ✖(Attempt 1 of 10) Validate Add child tenant form elements
        ✖(Attempt 2 of 10) Validate Add child tenant form elements
        ✖(Attempt 3 of 10) Validate Add child tenant form elements
        ✖(Attempt 4 of 10) Validate Add child tenant form elements
        ✖(Attempt 5 of 10) Validate Add child tenant form elements
        ✖(Attempt 6 of 10) Validate Add child tenant form elements
        ✖(Attempt 7 of 10) Validate Add child tenant form elements
        ✖(Attempt 8 of 10) Validate Add child tenant form elements
        ✖(Attempt 9 of 10) Validate Add child tenant form elements
        ✖(Attempt 10 of 10) "before each" hook for "Validate Add child tenant form elements"
        ✖ "before each" hook for "Validate Add child tenant form elements" (30358ms)

  6 passing (4m)
  1 failing

  1) Automate Tenant form operations: Settings > Application Settings > Access Control > Tenants
       Validate Child Tenant operations: Add, Edit, Add Project, Manage Quotas
         Validate Add child tenant function
           "before each" hook for "Validate Add child tenant form elements":
     CypressError: `cy.visit()` failed trying to load:

http://localhost:3000/

We attempted to make an http request to this URL but the request failed without a response.

We received this error at the network level:

  > Error: ESOCKETTIMEDOUT
```
@Fryguy
Copy link
Member

Fryguy commented Nov 19, 2025

cc @asirvadAbrahamVarghese

@Fryguy Fryguy self-assigned this Nov 19, 2025
@Fryguy Fryguy added test and removed test labels Nov 19, 2025
@Fryguy Fryguy merged commit 22ded37 into ManageIQ:master Nov 19, 2025
19 checks passed
@jrafanie jrafanie deleted the fix-tenant-cypress-missing-intercept-waits branch November 19, 2025 19:12
@Fryguy
Copy link
Member

Fryguy commented Nov 20, 2025

Backported to spassky in commit 8aed2b5.

commit 8aed2b5099a95e27b20a562abcf982ec9a267941
Author: Jason Frey <[email protected]>
Date:   Wed Nov 19 14:07:56 2025 -0500

    Merge pull request #9733 from jrafanie/fix-tenant-cypress-missing-intercept-waits
    
    Fix bug where a GET triggered by a test, is processed after the test
    
    (cherry picked from commit 22ded37511093a03751214d83373ca5022b78aab)

Fryguy added a commit that referenced this pull request Nov 20, 2025
…ercept-waits

Fix bug where a GET triggered by a test, is processed after the test

(cherry picked from commit 22ded37)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants