Skip to content

Commit

Permalink
[OSD] Sanitize copied share-link before validating (opensearch-projec…
Browse files Browse the repository at this point in the history
…t#1209)

Signed-off-by: Miki <[email protected]>
  • Loading branch information
AMoo-Miki authored and LDrago27 committed May 3, 2024
1 parent 0922fd5 commit df5c92b
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ describe('shared links', () => {
cy.getElementByTestId('shareTopNavButton').should('be.visible').click();
cy.getElementByTestId('copyShareUrlButton')
.invoke('attr', 'data-share-url')
.should('eq', url)
// Even though `CURRENT_TENANT.newTenant` is set to global, that could change and hence this test will remove
// either of the tenants it sees.
.should(
'satisfy',
(copied) =>
copied.replace(/\?security_tenant=(global|private)/, '') === url
)
.then((url) => {
cy.log(url);
cy.request(url).its('status').should('eq', 200);
Expand Down

0 comments on commit df5c92b

Please sign in to comment.