Skip to content

Commit

Permalink
Test change
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed May 23, 2024
1 parent e3cb5d4 commit 018cc7f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/actions/setup-opensearch-dashboards/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ runs:
if: ${{ runner.os == 'Linux' }}
shell: bash
run: |
rm ./OpenSearch-Dashboards/plugins/security-admin-dashboards-plugin/opensearch_dashboards.json
cat << 'EOT' > ./OpenSearch-Dashboards/plugins/security-admin-dashboards-plugin/opensearch_dashboards.json
rm ./OpenSearch-Dashboards/plugins/security-dashboards-plugin/opensearch_dashboards.json
cat << 'EOT' > ./OpenSearch-Dashboards/plugins/security-dashboards-plugin/opensearch_dashboards.json
{
"id": "securityAdminDashboards",
"version": "3.0.0.0",
Expand Down
4 changes: 2 additions & 2 deletions common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* permissions and limitations under the License.
*/

export const PLUGIN_ID = 'opensearchDashboardsSecurityAdmin';
export const PLUGIN_NAME = 'security-admin-dashboards-plugin';
export const PLUGIN_ID = 'opensearchDashboardsSecurity';
export const PLUGIN_NAME = 'security-dashboards-plugin';

export const APP_ID_LOGIN = 'login';
export const APP_ID_CUSTOMERROR = 'customerror';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Multi-datasources disabled', () => {

it('Checks Get Started Tab', () => {
// Remote cluster purge cache
cy.visit(`http://localhost:5601/app/security-admin-dashboards-plugin#/getstarted`);
cy.visit(`http://localhost:5601/app/security-dashboards-plugin#/getstarted`);

cy.contains('h1', 'Get started');
cy.get('[data-test-subj="dataSourceSelectableButton"]').should('not.exist');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('Multi-datasources enabled', () => {
it('Checks Get Started Tab', () => {
// Remote cluster purge cache
cy.visit(
`http://localhost:5601/app/security-admin-dashboards-plugin${externalDataSourceUrl}#/getstarted`
`http://localhost:5601/app/security-dashboards-plugin${externalDataSourceUrl}#/getstarted`
);

cy.contains('h1', 'Get started');
Expand All @@ -106,9 +106,7 @@ describe('Multi-datasources enabled', () => {
});

it('Checks Auth Tab', () => {
cy.visit(
`http://localhost:5601/app/security-admin-dashboards-plugin${externalDataSourceUrl}#/auth`
);
cy.visit(`http://localhost:5601/app/security-dashboards-plugin${externalDataSourceUrl}#/auth`);

cy.get('.panel-header-count').first().invoke('text').should('contain', '(1)');
});
Expand All @@ -127,7 +125,7 @@ describe('Multi-datasources enabled', () => {
},
}).then(() => {
cy.visit(
`http://localhost:5601/app/security-admin-dashboards-plugin${externalDataSourceUrl}#/users`
`http://localhost:5601/app/security-dashboards-plugin${externalDataSourceUrl}#/users`
);

cy.get('[data-test-subj="tableHeaderCell_username_0"]').click();
Expand All @@ -147,7 +145,7 @@ describe('Multi-datasources enabled', () => {
},
}).then(() => {
cy.visit(
`http://localhost:5601/app/security-admin-dashboards-plugin${externalDataSourceUrl}#/permissions`
`http://localhost:5601/app/security-dashboards-plugin${externalDataSourceUrl}#/permissions`
);

// Permission exists on the remote data source
Expand All @@ -158,9 +156,7 @@ describe('Multi-datasources enabled', () => {

it('Checks Tenancy Tab', () => {
// Datasource is locked to local cluster for tenancy tab
cy.visit(
`http://localhost:5601/app/security-admin-dashboards-plugin${localDataSourceUrl}#/tenants`
);
cy.visit(`http://localhost:5601/app/security-dashboards-plugin${localDataSourceUrl}#/tenants`);

cy.contains('h1', 'Dashboards multi-tenancy');
cy.get('[data-test-subj="dataSourceViewButton"]').should('contain', 'Local cluster');
Expand All @@ -169,7 +165,7 @@ describe('Multi-datasources enabled', () => {
it('Checks Service Accounts Tab', () => {
// Datasource is locked to local cluster for service accounts tab
cy.visit(
`http://localhost:5601/app/security-admin-dashboards-plugin${localDataSourceUrl}#/serviceAccounts`
`http://localhost:5601/app/security-dashboards-plugin${localDataSourceUrl}#/serviceAccounts`
);

cy.get('[data-test-subj="dataSourceViewButton"]').should('contain', 'Local cluster');
Expand Down Expand Up @@ -211,7 +207,7 @@ describe('Multi-datasources enabled', () => {
},
}).then(() => {
cy.visit(
`http://localhost:5601/app/security-admin-dashboards-plugin${externalDataSourceUrl}#/auditLogging`
`http://localhost:5601/app/security-dashboards-plugin${externalDataSourceUrl}#/auditLogging`
);
cy.get('[class="euiSwitch__label"]').should('contain', 'Disabled');
});
Expand All @@ -231,7 +227,7 @@ describe('Multi-datasources enabled', () => {
},
}).then(() => {
cy.visit(
`http://localhost:5601/app/security-admin-dashboards-plugin${externalDataSourceUrl}#/roles`
`http://localhost:5601/app/security-dashboards-plugin${externalDataSourceUrl}#/roles`
);

cy.get('[data-test-subj="dataSourceSelectableButton"]').should('contain', '9202');
Expand Down
2 changes: 1 addition & 1 deletion test/cypress/e2e/oidc/oidc_auth_test.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('Log in via OIDC', () => {
});

it('Login to Dashboard with Hash', () => {
const urlWithHash = `http://localhost:5601${basePath}/app/security-admin-dashboards-plugin#/getstarted`;
const urlWithHash = `http://localhost:5601${basePath}/app/security-dashboards-plugin#/getstarted`;

cy.visit(urlWithHash, {
failOnStatusCode: false,
Expand Down
2 changes: 1 addition & 1 deletion test/cypress/e2e/saml/saml_auth_test.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe('Log in via SAML', () => {
localStorage.setItem('opendistro::security::tenant::saved', '"__user__"');
localStorage.setItem('home:newThemeModal:show', 'false');

const urlWithHash = `http://localhost:5601${basePath}/app/security-admin-dashboards-plugin#/getstarted`;
const urlWithHash = `http://localhost:5601${basePath}/app/security-dashboards-plugin#/getstarted`;

cy.visit(urlWithHash, {
failOnStatusCode: false,
Expand Down

0 comments on commit 018cc7f

Please sign in to comment.