Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for shared links when multi-tenancy is enabled #1128

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Feb 26, 2024

Description

Adding tests to go with corresponding PR in the security-dashboards-plugin repo: opensearch-project/security-dashboards-plugin#1804

These tests ensure that the security_tenant url param is added onto shared links - both shortened URLs and normal.

Issues Resolved

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Craig Perkins <cwperx@amazon.com>
@wbeckler
Copy link

wbeckler commented Feb 26, 2024

Rather than adding tests here, you can add tests inside your original feature PR and invoke the FT Repo as a test runner. See here for details: opensearch-project/OpenSearch-Dashboards#5526

@cwperks
Copy link
Member Author

cwperks commented Feb 27, 2024

@wbeckler Thank you for linking to the PR and having a sample to reference. I would like to use that eventually and have more cypress tests in the security repo, but I think there will be a little more work that needs to be done in OSD core first to run cypress tests with different plugins installed (such as the security plugin). I will look into what is required in OSD core to trigger the FTR repo to run w/ security and file an issue in the OSD core repo.

wdyt about keeping this PR in this repo until OSD core supports triggering tests w/ security?

import { switchTenantTo } from './switch_tenant';
import 'cypress-real-events/support';

Cypress.automation('remote:debugger:protocol', {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we in the cypress.json add:

    "browserPermissions": {
      "clipboard": "allow"
    }

That way other tests can just assume it can use the clipboard.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Member

@kavilla kavilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with both you and @wbeckler. Perhaps do you mind keeping track of the tests that you add in this repo in an issue within your repo. In that way, we will merge it here and then if there is ever a shift in the testing CI then you know which tests that can be targeted first.

Copy link
Member

@DarshitChanpura DarshitChanpura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants