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

[5.1] com_privacy admin tests #42523

Closed
brianteeman opened this issue Dec 14, 2023 · 9 comments
Closed

[5.1] com_privacy admin tests #42523

brianteeman opened this issue Dec 14, 2023 · 9 comments

Comments

@brianteeman
Copy link
Contributor

Steps to reproduce the issue

run the e2e cypress tests for administrator->com_privacy->consent

Expected result

all tests pass

Actual result

most of the tests for sorting ascending and descending fail

System information (as much as possible)

php 8.1.3
joomla51branch

Additional comments

I suspect that the code to work out what value should = what result is wrong and that there is nothign wrong with the component just the test

@alikon
Copy link
Contributor

alikon commented Dec 17, 2023

something weird it's happening on cypress tests in general
that's from my local 4.4-dev

image

and still not the same result on drone 😵‍💫

@alikon
Copy link
Contributor

alikon commented Feb 24, 2024

it seems to be fixed now

@alikon
Copy link
Contributor

alikon commented Mar 3, 2024

Closing this issue now, has been resolved elsewhere
but feel free to reopen if needed.

@alikon alikon closed this as completed Mar 3, 2024
@brianteeman
Copy link
Contributor Author

no not resolved

@alikon
Copy link
Contributor

alikon commented Mar 3, 2024

i'm unable to reproduce nor drone

@alikon alikon reopened this Mar 3, 2024
@Hackwar Hackwar added the bug label Mar 26, 2024
@muhme
Copy link
Contributor

muhme commented Apr 24, 2024

@alikon from my local 4.4-dev the same five tests failed today as your result above:

  • can list by user_id in descending order
  • can list by consented in descending order
  • can list by consented in ascending order
  • can list by id in decending order
  • can list by id in ascending order

@brianteeman
Copy link
Contributor Author

yay - woohoo - i am not going mad

@muhme
Copy link
Contributor

muhme commented Apr 24, 2024

@alikon it looks like the tests are not stateless 😱 I compared can list by user_id in descending order with can list by user_id in ascending order and found out, if I test both alternately first run fails always and starting with second run it is green ✅ The reason looks to me like the sort order is selected and the table content is captured before the table has changed. And the selection order is saved.

Both test cases have to be adopted. My solution is a little bit complicated, perhaps you have a simpler one? For example, for ascending replace the one select-line with:

// first select a completely different option to always make a POST request for the next selection
cy.get('#list_fullordering').select('ID ascending');
// catch the next POST request
cy.intercept('POST', '**').as('anyPost');
// selecting ASC
cy.get('#list_fullordering').select('User ID ascending');
// wait for the POST request and the completion of the table
cy.wait('@anyPost');
// double check ASC is selected
cy.get('#list_fullordering').should('have.value', 'a.user_id ASC');

@alikon
Copy link
Contributor

alikon commented Apr 29, 2024

please test #43400

@alikon alikon closed this as completed Apr 29, 2024
laoneo pushed a commit that referenced this issue Apr 30, 2024
After discussion with Alikon the fix is simple 10 milliseconds waiting time
after changing sorting order. The five failures were reproducable in 4.4-dev
and ifixed and it is expected it works for 5.1 the same way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants