Skip to content

Commit 9b3878f

Browse files
authored
[OSD] Sanitize copied share-link before validating (#1209)
Signed-off-by: Miki <miki@amazon.com>
1 parent 1a04ae2 commit 9b3878f

File tree

1 file changed

+7
-1
lines changed
  • cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer

1 file changed

+7
-1
lines changed

cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/shared_links.spec.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ describe('shared links', () => {
5858
cy.getElementByTestId('shareTopNavButton').should('be.visible').click();
5959
cy.getElementByTestId('copyShareUrlButton')
6060
.invoke('attr', 'data-share-url')
61-
.should('eq', url)
61+
// Even though `CURRENT_TENANT.newTenant` is set to global, that could change and hence this test will remove
62+
// either of the tenants it sees.
63+
.should(
64+
'satisfy',
65+
(copied) =>
66+
copied.replace(/\?security_tenant=(global|private)/, '') === url
67+
)
6268
.then((url) => {
6369
cy.log(url);
6470
cy.request(url).its('status').should('eq', 200);

0 commit comments

Comments
 (0)