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

[feature/cypress12] Update security and security-dashboards-plugin tests to run with Cypress12 #800

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ if (Cypress.env('SECURITY_ENABLED') && Cypress.env('AGGREGATION_VIEW')) {
// start a server so that server responses can be mocked via fixtures
// in all of the below test cases
before(() => {
cy.server();
cy.createTenant(tenantName, tenantDescription);

cy.createIndexPattern('index-pattern1', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const tenantName = 'test';
if (Cypress.env('SECURITY_ENABLED')) {
describe('Multi Tenancy Default Tenant Tests: ', () => {
before(() => {
cy.server();
cy.createTenant(tenantName, tenantDescription);
cy.changeDefaultTenant({
multitenancy_enabled: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ import { TENANTS_MANAGE_PATH } from '../../../utils/dashboards/constants';

if (Cypress.env('SECURITY_ENABLED')) {
describe('Multi Tenancy Tests: ', () => {
before(() => {
cy.server();
});
it('Test Dashboards tenancy features should not be accessible ', () => {
// This test is to ensure tenancy related features are not accessible when opensearch_security.multitenancy.enabled is disabled in the opensearchdashboard.yaml
cy.visit(TENANTS_MANAGE_PATH);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const tenantName = 'test';
if (Cypress.env('SECURITY_ENABLED')) {
describe('Multi Tenancy Tests: ', () => {
before(() => {
cy.server();
cy.createTenant(tenantName, tenantDescription);
cy.createIndexPattern(
'index-pattern1',
Expand Down
6 changes: 0 additions & 6 deletions cypress/e2e/plugins/security/audit_log.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import {

if (Cypress.env('SECURITY_ENABLED')) {
describe('Audit logs page', () => {
// start a server so that server responses can be mocked via fixtures
// in all of the below test cases
before(() => {
cy.server();
});

it('should load Audit logs page properly', () => {
cy.mockAuditLogsAction(
SEC_AUDIT_FIXTURES_PATH + '/audit_info_response.json',
Expand Down
6 changes: 0 additions & 6 deletions cypress/e2e/plugins/security/auth.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import {

if (Cypress.env('SECURITY_ENABLED')) {
describe('Authc and Authz page', () => {
// start a server so that server responses can be mocked via fixtures
// in all of the below test cases
before(() => {
cy.server();
});

it('authentication and authorization section should exist', () => {
cy.mockAuthAction(SEC_FIXTURES_BASE_PATH + '/auth_response.json', () => {
cy.visit(SEC_UI_AUTH_PATH);
Expand Down
6 changes: 0 additions & 6 deletions cypress/e2e/plugins/security/get_started.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import {

if (Cypress.env('SECURITY_ENABLED')) {
describe('Home(Get Started) page', () => {
// start a server so that server responses can be mocked via fixtures
// in all of the below test cases
before(() => {
cy.server();
});

it('should load Home page properly', () => {
cy.visit(BASE_SEC_UI_PATH);

Expand Down
6 changes: 0 additions & 6 deletions cypress/e2e/plugins/security/internalusers.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ import {

if (Cypress.env('SECURITY_ENABLED')) {
describe('Internal users page', () => {
// start a server so that server responses can be mocked via fixtures
// in all of the below test cases
before(() => {
cy.server();
});

it('should load internal users page properly', () => {
cy.mockInternalUsersAction(
SEC_INTERNALUSERS_FIXTURES_PATH + '/internalusers_info_response.json',
Expand Down
6 changes: 0 additions & 6 deletions cypress/e2e/plugins/security/permissions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import {

if (Cypress.env('SECURITY_ENABLED')) {
describe('Permissions page', () => {
// start a server so that server responses can be mocked via fixtures
// in all of the below test cases
before(() => {
cy.server();
});

it('should load Permissions page properly', () => {
cy.mockPermissionsAction(
SEC_PERMISSIONS_FIXTURES_PATH + '/actiongroups_response.json',
Expand Down
6 changes: 0 additions & 6 deletions cypress/e2e/plugins/security/roles.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ import {

if (Cypress.env('SECURITY_ENABLED')) {
describe('Roles page', () => {
// start a server so that server responses can be mocked via fixtures
// in all of the below test cases
before(() => {
cy.server();
});

it('should load Roles page properly', () => {
cy.mockRolesAction(
SEC_ROLES_FIXTURES_PATH + '/roles_response.json',
Expand Down
6 changes: 0 additions & 6 deletions cypress/e2e/plugins/security/tenants.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import {

if (Cypress.env('SECURITY_ENABLED')) {
describe('Tenants page', () => {
// start a server so that server responses can be mocked via fixtures
// in all of the below test cases
before(() => {
cy.server();
});

it('should load Tenants page properly', () => {
cy.mockTenantsAction(
SEC_TENANTS_FIXTURES_PATH + '/tenants_info_response.json',
Expand Down
Loading