update tests to include Selected (x) in variable multi select boxes

This commit is contained in:
oscarkilhed 2024-09-13 16:06:18 +02:00 committed by renovate[bot]
parent 1641570c3e
commit ad6cd55301
3 changed files with 35 additions and 12 deletions

View File

@ -22,7 +22,9 @@ describe('Variables - Load options from Url', () => {
cy.get('input').click();
});
e2e.components.Select.option().parent().should('have.length', 9);
e2e.components.Select.option().parent().should('have.length', 10);
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('A').should('be.visible');
@ -37,7 +39,9 @@ describe('Variables - Load options from Url', () => {
cy.get('input').click();
});
e2e.components.Select.option().parent().should('have.length', 9);
e2e.components.Select.option().parent().should('have.length', 10);
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AA').should('be.visible');
@ -52,7 +56,9 @@ describe('Variables - Load options from Url', () => {
cy.get('input').click();
});
e2e.components.Select.option().parent().should('have.length', 9);
e2e.components.Select.option().parent().should('have.length', 10);
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AAA').should('be.visible');
@ -75,7 +81,9 @@ describe('Variables - Load options from Url', () => {
cy.get('input').click();
});
e2e.components.Select.option().parent().should('have.length', 9);
e2e.components.Select.option().parent().should('have.length', 10);
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('A').should('be.visible');
@ -90,7 +98,9 @@ describe('Variables - Load options from Url', () => {
cy.get('input').click();
});
e2e.components.Select.option().parent().should('have.length', 9);
e2e.components.Select.option().parent().should('have.length', 10);
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BA').should('be.visible');
@ -105,7 +115,9 @@ describe('Variables - Load options from Url', () => {
cy.get('input').click();
});
e2e.components.Select.option().parent().should('have.length', 9);
e2e.components.Select.option().parent().should('have.length', 10);
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BBA').should('be.visible');
@ -139,7 +151,9 @@ describe('Variables - Load options from Url', () => {
cy.get('input').click();
});
e2e.components.Select.option().parent().should('have.length', 9);
e2e.components.Select.option().parent().should('have.length', 10);
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('A').should('be.visible');

View File

@ -175,7 +175,10 @@ describe('Variables - Query - Add variable', () => {
cy.get('input').click();
});
e2e.components.Select.option().should('have.length', 2);
e2e.components.Select.option().should('have.length', 3);
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
e2e.components.Select.option().contains('All');
e2e.components.Select.option().contains('C');
});

View File

@ -19,6 +19,7 @@ describe('Variables - Set options from ui', () => {
});
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('A').should('be.visible').click();
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('B').should('be.visible').click();
cy.get('body').click();
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('B').scrollIntoView().should('be.visible');
@ -31,7 +32,9 @@ describe('Variables - Set options from ui', () => {
cy.get('input').click();
});
e2e.components.Select.option().parent().should('have.length', 9);
e2e.components.Select.option().parent().should('have.length', 10);
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BA').should('be.visible');
@ -72,6 +75,9 @@ describe('Variables - Set options from ui', () => {
cy.get('input').click();
});
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('B').should('be.visible').click();
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (2)');
cy.get('body').click();
cy.wait('@query');
@ -102,7 +108,7 @@ describe('Variables - Set options from ui', () => {
cy.get('input').click();
});
e2e.components.Select.option().should('have.length', 9);
e2e.components.Select.option().should('have.length', 10);
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AAA').should('be.visible');
@ -142,7 +148,7 @@ describe('Variables - Set options from ui', () => {
cy.get('input').click();
});
e2e.components.Select.option().should('have.length', 9);
e2e.components.Select.option().should('have.length', 10);
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BA').should('be.visible');
@ -156,7 +162,7 @@ describe('Variables - Set options from ui', () => {
.within(() => {
cy.get('input').click();
});
e2e.components.Select.option().should('have.length', 9);
e2e.components.Select.option().should('have.length', 10);
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BBA').should('be.visible');
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BBB').should('be.visible');