Skip to content
Open
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
2 changes: 1 addition & 1 deletion openmetadata-ui/src/main/resources/ui/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineConfig } from 'cypress';
import plugins from './cypress/plugins/index.js';

export default defineConfig({
projectId: 'a9yxci',
projectId: 'w6gjxd',
viewportWidth: 1240,
viewportHeight: 660,
watchForFileChanges: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@
* limitations under the License.
*/

import { descriptionBox, interceptURL, login, uuid, verifyResponseStatusCode } from "../../common/common";
import { LOGIN } from "../../constants/constants";
import { descriptionBox, interceptURL, uuid, verifyResponseStatusCode } from "../../common/common";

const roleName = `Role-test-${uuid()}`;
const userName = `Usercttest${uuid()}`;
const userEmail = `${userName}@gmail.com`;

describe("Test Add role and assign it to the user", () => {
beforeEach(() => {
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.login();

interceptURL('GET', '*api/v1/roles*', 'getRoles');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
* limitations under the License.
*/

import { addTeam, interceptURL, login, uuid, verifyResponseStatusCode, visitEntityDetailsPage } from '../../common/common';
import { LOGIN, SEARCH_ENTITY_TABLE } from '../../constants/constants';
import { addTeam, interceptURL, uuid, verifyResponseStatusCode, visitEntityDetailsPage } from '../../common/common';
import { SEARCH_ENTITY_TABLE } from '../../constants/constants';

const teamName = `team-group-test-${uuid()}`;
const TEAM_DETAILS = {
Expand All @@ -25,8 +25,7 @@ const TEAM_DETAILS = {

describe('Create a team and add that team as a owner of the entity', () => {
beforeEach(() => {
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.login();
});

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
* limitations under the License.
*/

import { login, visitEntityDetailsPage } from '../../common/common';
import { LOGIN, SEARCH_ENTITY_PIPELINE, SEARCH_ENTITY_TABLE, SEARCH_ENTITY_TOPIC } from '../../constants/constants';
import { visitEntityDetailsPage } from '../../common/common';
import { SEARCH_ENTITY_PIPELINE, SEARCH_ENTITY_TABLE, SEARCH_ENTITY_TOPIC } from '../../constants/constants';

const tableEntity = SEARCH_ENTITY_TABLE.table_1;
const topicEntity = SEARCH_ENTITY_TOPIC.topic_1;
Expand All @@ -29,8 +29,7 @@ const ENTITIES_LIST = [

describe('Entity Details Page', () => {
beforeEach(() => {
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.login();
});

ENTITIES_LIST.map((entity) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
*/

import { getCurrentLocaleDate, getFutureLocaleDateFromCurrentDate } from "../../../src/utils/TimeUtils";
import { descriptionBox, interceptURL, login, verifyResponseStatusCode, visitEntityDetailsPage } from "../../common/common";
import { ANNOUNCEMENT_ENTITIES, LOGIN } from "../../constants/constants";
import { descriptionBox, interceptURL, verifyResponseStatusCode, visitEntityDetailsPage } from "../../common/common";
import { ANNOUNCEMENT_ENTITIES } from "../../constants/constants";



describe("Entity Announcement", () => {
beforeEach(() => {
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.login();
});

const createAnnouncement = (title, startDate, endDate, description) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
* limitations under the License.
*/

import { interceptURL, login, verifyResponseStatusCode } from "../../common/common";
import { BASE_URL, LOGIN } from "../../constants/constants";
import { interceptURL, verifyResponseStatusCode } from "../../common/common";
import { BASE_URL } from "../../constants/constants";

describe("Logout User", () => {
beforeEach(() => {
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.login();
});

it("After login logout the user and invalidate the token", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
* limitations under the License.
*/

import { login, visitEntityDetailsPage } from '../../common/common';
import { LOGIN, SEARCH_ENTITY_TABLE } from '../../constants/constants';
import { visitEntityDetailsPage } from '../../common/common';
import { SEARCH_ENTITY_TABLE } from '../../constants/constants';

const TEAM_DETAILS = SEARCH_ENTITY_TABLE.table_1;
const userURL =
Expand All @@ -21,16 +21,8 @@ const teamURL =
'/api/v1/search/query?q=*%20AND%20teamType:Group&from=0&size=10&index=team_search_index';

describe('Test if the total count of users and teams is correctly displayed in the assign owner widget', () => {
before(() => {
cy.clearLocalStorageSnapshot();
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.saveLocalStorage('localstorage');
});
beforeEach(() => {
cy.log('Restoring local storage snapshot');
cy.restoreLocalStorage('localstorage');
cy.clickOnLogo();
cy.login();
});

it('Check total count of users and teams', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@
import { getExpiryDateTimeFromDate } from '../../../src/utils/TimeUtils.ts';
import {
descriptionBox,
interceptURL,
login,
uuid,
interceptURL, uuid,
verifyResponseStatusCode
} from '../../common/common';
import { DELETE_TERM, LOGIN } from '../../constants/constants';
import { DELETE_TERM } from '../../constants/constants';

const botName = `Bot-ct-test-${uuid()}`;
const botEmail = `${botName}@mail.com`;
Expand Down Expand Up @@ -73,8 +71,7 @@ const revokeToken = () => {

describe('Bots Page should work properly', () => {
beforeEach(() => {
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.login();
cy.get('[data-testid="appbar-item-settings"]')
.should('exist')
.should('be.visible')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
*/

import { getCurrentLocaleDate, getFutureLocaleDateFromCurrentDate } from '../../../src/utils/TimeUtils';
import { descriptionBox, interceptURL, login, verifyResponseStatusCode, visitEntityDetailsPage } from '../../common/common';
import { DELETE_ENTITY, DELETE_TERM, LOGIN } from '../../constants/constants';
import { descriptionBox, interceptURL, verifyResponseStatusCode, visitEntityDetailsPage } from '../../common/common';
import { DELETE_ENTITY, DELETE_TERM } from '../../constants/constants';

describe('Entity Details Page', () => {
beforeEach(() => {
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.login();
});

const deleteEntity = (value) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@

import {
descriptionBox,
interceptURL,
login,
toastNotification,
interceptURL, toastNotification,
verifyResponseStatusCode,
visitEntityDetailsPage
} from '../../common/common';
import {
DELETE_TERM,
LOGIN,
NEW_GLOSSARY,
DELETE_TERM, NEW_GLOSSARY,
NEW_GLOSSARY_TERMS,
SEARCH_ENTITY_TABLE
} from '../../constants/constants';
Expand Down Expand Up @@ -107,8 +103,7 @@ const goToAssetsTab = (term) => {

describe('Glossary page should work properly', () => {
beforeEach(() => {
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.login();

interceptURL('GET', '/api/v1/glossaryTerms*', 'getGlossaryTerms');
cy.get('[data-testid="governance"]')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { descriptionBox, interceptURL, login, uuid, verifyResponseStatusCode } from '../../common/common';
import { LOGIN } from '../../constants/constants';
import { descriptionBox, interceptURL, uuid, verifyResponseStatusCode } from '../../common/common';


const MSteamName = `MSTeam-ct-test-${uuid()}`;
Expand All @@ -20,8 +19,7 @@ const endpointURL = 'http://localhost:8585';

describe('MSTeams Page', () => {
beforeEach(() => {
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.login();

cy.get('[data-testid="appbar-item-settings"]')
.should('exist')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
* limitations under the License.
*/

import { descriptionBox, interceptURL, login, uuid, verifyResponseStatusCode } from '../../common/common';
import { LOGIN } from '../../constants/constants';
import { descriptionBox, interceptURL, uuid, verifyResponseStatusCode } from '../../common/common';

const roles = {
dataConsumer: 'Data Consumer',
Expand Down Expand Up @@ -91,8 +90,7 @@ const addRule = (rulename, ruleDescription, descriptionIndex) => {

describe('Policy page should work properly', () => {
beforeEach(() => {
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.login();
cy.intercept('GET', '*api/v1/policies*').as('getPolicies');

cy.get('[data-testid="appbar-item-settings"]').should('be.visible').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@

import {
descriptionBox,
interceptURL,
login,
uuid,
interceptURL, uuid,
verifyResponseStatusCode
} from '../../common/common';
import { LOGIN } from '../../constants/constants';

const roles = {
dataConsumer: 'Data Consumer',
Expand Down Expand Up @@ -58,8 +55,7 @@ const removePolicyFromRole = (policyName) => {

describe('Roles page should work properly', () => {
beforeEach(() => {
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.login();

interceptURL('GET', '*api/v1/roles*', 'getRoles');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
* limitations under the License.
*/

import { descriptionBox, interceptURL, login, verifyResponseStatusCode } from '../../common/common';
import { LOGIN, service } from '../../constants/constants';
import { descriptionBox, interceptURL, verifyResponseStatusCode } from '../../common/common';
import { service } from '../../constants/constants';

describe('Services page should work properly', () => {
beforeEach(() => {
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.login();
//redirecting to services page

cy.get('[data-testid="appbar-item-settings"]').should('be.visible').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { descriptionBox, interceptURL, login, uuid, verifyResponseStatusCode } from '../../common/common';
import { LOGIN } from '../../constants/constants';
import { descriptionBox, interceptURL, uuid, verifyResponseStatusCode } from '../../common/common';

const slackName = `Slack-ct-test-${uuid()}`;
const updatedDescription = 'This is updated slack description';
const endpointURL = 'http://localhost:8585';

describe('Slack Page', () => {
beforeEach(() => {
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.login();

cy.get('[data-testid="appbar-item-settings"]')
.should('exist')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
* limitations under the License.
*/

import { addNewTagToEntity, descriptionBox, interceptURL, login, verifyResponseStatusCode } from '../../common/common';
import { LOGIN, NEW_TAG, NEW_TAG_CATEGORY, SEARCH_ENTITY_TABLE } from '../../constants/constants';
import { addNewTagToEntity, descriptionBox, interceptURL, verifyResponseStatusCode } from '../../common/common';
import { NEW_TAG, NEW_TAG_CATEGORY, SEARCH_ENTITY_TABLE } from '../../constants/constants';

describe('Tags page should work', () => {
beforeEach(() => {
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.login();
interceptURL('GET', '/api/v1/tags*', 'getTags');

cy.get('[data-testid="governance"]')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ const adminEmail = `${adminName}@gmail.com`;

describe('Users flow should work properly', () => {
beforeEach(() => {
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.login();

cy.get('[data-testid="appbar-item-settings"]')
.should('exist')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { descriptionBox, interceptURL, login, uuid, verifyResponseStatusCode } from '../../common/common';
import { LOGIN } from '../../constants/constants';
import { descriptionBox, interceptURL, uuid, verifyResponseStatusCode } from '../../common/common';


const webhookName = `Webhook-ct-test-${uuid()}`;
Expand All @@ -20,8 +19,7 @@ const endpointURL = 'http://localhost:8585';

describe('Webooks Page', () => {
beforeEach(() => {
login(LOGIN.username, LOGIN.password);
cy.goToHomePage();
cy.login();

cy.get('[data-testid="appbar-item-settings"]')
.should('exist')
Expand Down