Skip to content

Commit

Permalink
Fix System test com_privacy consent (#42523) (#43400)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
muhme committed Apr 30, 2024
1 parent 19a8f56 commit 301bdf2
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
Expand All @@ -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');
Expand All @@ -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');
Expand All @@ -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');
Expand All @@ -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');
Expand All @@ -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 = [];

Expand Down Expand Up @@ -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 = [];

Expand Down Expand Up @@ -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');
Expand All @@ -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');
Expand All @@ -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 = [];

Expand Down Expand Up @@ -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 = [];

Expand Down Expand Up @@ -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 = [];

Expand Down Expand Up @@ -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)`)
Expand Down

0 comments on commit 301bdf2

Please sign in to comment.