Fix System test com_privacy consent (#42523) (#43400)

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.
This commit is contained in:
Heiko Lübbe 2024-04-30 10:20:31 +02:00 committed by GitHub
parent 19a8f56414
commit 301bdf2b28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 28 additions and 0 deletions

View File

@ -201,6 +201,8 @@ describe('Test in backend that privacy consent component', () => {
cy.get('tbody > tr > :nth-child(4)').should('contain', 'test user');
cy.get('table').find('tr').should('have.length', 4);
cy.get('#list_fullordering').select('Status ascending');
// wait for the table to be updated with the new sort order
cy.wait(10);
cy.get('tbody > :nth-child(1) > :nth-child(7)').should('contain', 'invalidated consent user');
cy.get('tbody > :nth-child(2) > :nth-child(7)').should('contain', 'obsolete consent user');
cy.get('tbody > :nth-child(3) > :nth-child(7)').should('contain', 'valid consent user');
@ -218,6 +220,8 @@ describe('Test in backend that privacy consent component', () => {
cy.get('tbody > tr > :nth-child(4)').should('contain', 'test user');
cy.get('table').find('tr').should('have.length', 4);
cy.get('#list_fullordering').select('Status descending');
// wait for the table to be updated with the new sort order
cy.wait(10);
cy.get('tbody > :nth-child(1) > :nth-child(7)').should('contain', 'valid consent user');
cy.get('tbody > :nth-child(2) > :nth-child(7)').should('contain', 'obsolete consent user');
cy.get('tbody > :nth-child(3) > :nth-child(7)').should('contain', 'invalidated consent user');
@ -238,6 +242,8 @@ describe('Test in backend that privacy consent component', () => {
cy.visit('/administrator/index.php?option=com_privacy&view=consents');
cy.get('table').find('tr').should('have.length', 4);
cy.get('#list_fullordering').select('Username ascending');
// wait for the table to be updated with the new sort order
cy.wait(10);
cy.get('tbody > :nth-child(1) > :nth-child(4)').should('contain', 'a test user');
cy.get('tbody > :nth-child(2) > :nth-child(4)').should('contain', 'b test user');
cy.get('tbody > :nth-child(3) > :nth-child(4)').should('contain', 'c test user');
@ -258,6 +264,8 @@ describe('Test in backend that privacy consent component', () => {
cy.visit('/administrator/index.php?option=com_privacy&view=consents');
cy.get('table').find('tr').should('have.length', 4);
cy.get('#list_fullordering').select('Username descending');
// wait for the table to be updated with the new sort order
cy.wait(10);
cy.get('tbody > :nth-child(1) > :nth-child(4)').should('contain', 'c test user');
cy.get('tbody > :nth-child(2) > :nth-child(4)').should('contain', 'b test user');
cy.get('tbody > :nth-child(3) > :nth-child(4)').should('contain', 'a test user');
@ -278,6 +286,8 @@ describe('Test in backend that privacy consent component', () => {
cy.visit('/administrator/index.php?option=com_privacy&view=consents');
cy.get('table').find('tr').should('have.length', 4);
cy.get('#list_fullordering').select('Name descending');
// wait for the table to be updated with the new sort order
cy.wait(10);
cy.get('tbody > :nth-child(1) > th').should('contain', 'c test user');
cy.get('tbody > :nth-child(2) > th').should('contain', 'b test user');
cy.get('tbody > :nth-child(3) > th').should('contain', 'a test user');
@ -298,6 +308,8 @@ describe('Test in backend that privacy consent component', () => {
cy.visit('/administrator/index.php?option=com_privacy&view=consents');
cy.get('table').find('tr').should('have.length', 4);
cy.get('#list_fullordering').select('Name ascending');
// wait for the table to be updated with the new sort order
cy.wait(10);
cy.get('tbody > :nth-child(1) > th').should('contain', 'a test user');
cy.get('tbody > :nth-child(2) > th').should('contain', 'b test user');
cy.get('tbody > :nth-child(3) > th').should('contain', 'c test user');
@ -319,6 +331,8 @@ describe('Test in backend that privacy consent component', () => {
cy.get('table').find('tr').should('have.length', 4);
cy.get('#list_fullordering').select('User ID ascending');
// wait for the table to be updated with the new sort order
cy.wait(10);
const cellData = [];
@ -360,6 +374,8 @@ describe('Test in backend that privacy consent component', () => {
cy.visit('/administrator/index.php?option=com_privacy&view=consents');
cy.get('table').find('tr').should('have.length', 4);
cy.get('#list_fullordering').select('User ID descending');
// wait for the table to be updated with the new sort order
cy.wait(10);
const cellData = [];
@ -394,6 +410,8 @@ describe('Test in backend that privacy consent component', () => {
cy.visit('/administrator/index.php?option=com_privacy&view=consents');
cy.get('table').find('tr').should('have.length', 4);
cy.get('#list_fullordering').select('Subject ascending');
// wait for the table to be updated with the new sort order
cy.wait(10);
cy.get('tbody > :nth-child(1) > :nth-child(6)').should('contain', 'a test subject');
cy.get('tbody > :nth-child(2) > :nth-child(6)').should('contain', 'b test subject');
cy.get('tbody > :nth-child(3) > :nth-child(6)').should('contain', 'c test subject');
@ -410,6 +428,8 @@ describe('Test in backend that privacy consent component', () => {
cy.visit('/administrator/index.php?option=com_privacy&view=consents');
cy.get('table').find('tr').should('have.length', 4);
cy.get('#list_fullordering').select('Subject descending');
// wait for the table to be updated with the new sort order
cy.wait(10);
cy.get('tbody > :nth-child(1) > :nth-child(6)').should('contain', 'c test subject');
cy.get('tbody > :nth-child(2) > :nth-child(6)').should('contain', 'b test subject');
cy.get('tbody > :nth-child(3) > :nth-child(6)').should('contain', 'a test subject');
@ -427,6 +447,8 @@ describe('Test in backend that privacy consent component', () => {
cy.get('table').find('tr').should('have.length', 4);
cy.get('#list_fullordering').select('Consented descending');
// wait for the table to be updated with the new sort order
cy.wait(10);
const cellData = [];
@ -463,6 +485,8 @@ describe('Test in backend that privacy consent component', () => {
cy.get('table').find('tr').should('have.length', 4);
cy.get('#list_fullordering').select('Consented ascending');
// wait for the table to be updated with the new sort order
cy.wait(10);
const cellData = [];
@ -500,6 +524,8 @@ describe('Test in backend that privacy consent component', () => {
cy.get('tbody > tr > :nth-child(4)').should('contain', 'test user');
cy.get('table').find('tr').should('have.length', 4);
cy.get('#list_fullordering').select('ID descending');
// wait for the table to be updated with the new sort order
cy.wait(10);
const cellData = [];
@ -537,6 +563,8 @@ describe('Test in backend that privacy consent component', () => {
cy.get('table').find('tr').should('have.length', 4);
cy.get('#list_fullordering').select('ID ascending');
// wait for the table to be updated with the new sort order
cy.wait(10);
const cellData = [];
for (let i = 1; i < 4; i += 1) {
cy.get(`tbody > :nth-child(${i}) > :nth-child(9)`)