DataLinks: Encode variable params for data link URLs (#46100)

This commit is contained in:
kay delaney
2022-03-04 17:05:56 +00:00
committed by GitHub
parent 9aa4bde7fc
commit b47f5433d7
3 changed files with 72 additions and 5 deletions
@@ -34,7 +34,7 @@ e2e.scenario({
expect(links).to.have.length.greaterThan(13);
for (let index = 0; index < links.length; index++) {
expect(Cypress.$(links[index]).attr('href')).contains(`var-custom=${variableValue}`);
expect(Cypress.$(links[index]).attr('href')).contains(`var-custom=${encodeURI(variableValue)}`);
}
});
};
@@ -44,6 +44,14 @@ e2e.scenario({
// verify all links, should have All value
verifyLinks('All');
// Data links should percent encode var values
e2e()
.get('[aria-label="Data link"]')
.should('exist')
.and((link) => {
expect(link.attr('href')).contains(encodeURI('test%25value'));
});
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('All').should('be.visible').click();
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('p2').should('be.visible').click();