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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ smoke-test/spark-smoke-test/__pycache__/
**/cypress/videos
**/cypress/screenshots
**/cypress/node_modules
# cypress env var file for local dev
**/cypress.env.json

# Metadata Ingestion Generated
metadata-ingestion/generated/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// eslint-disable-next-line global-require
const { defineConfig } = require("cypress");
import { defineConfig } from "cypress";

module.exports = defineConfig({
export default defineConfig({
chromeWebSecurity: false,
viewportHeight: 960,
viewportWidth: 1536,
Expand All @@ -13,11 +12,11 @@ module.exports = defineConfig({
},
video: false,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
// eslint-disable-next-line global-require
return require("./cypress/plugins/index")(on, config);
async setupNodeEvents(on, config) {
const { default: setupPlugins } = await import(
"./cypress/plugins/index.js"
);
return setupPlugins(on, config);
},
baseUrl: "http://localhost:9002/",
specPattern: "cypress/e2e/**/*.{js,jsx,ts,tsx}",
Expand Down
2 changes: 1 addition & 1 deletion smoke-test/tests/cypress/cypress/e2e/browse/browseV2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { aliasQuery, hasOperationName } from "../utils";
import { aliasQuery, hasOperationName } from "../support/utils";

describe("search", () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { aliasQuery, hasOperationName } from "../utils";
import { aliasQuery, hasOperationName } from "../support/utils";

describe("attribute list adding tags and terms", () => {
let businessAttributeEntityEnabled;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { aliasQuery, hasOperationName } from "../utils";
import { aliasQuery, hasOperationName } from "../support/utils";

describe("businessAttribute", () => {
let businessAttributeEntityEnabled;
Expand Down
2 changes: 1 addition & 1 deletion smoke-test/tests/cypress/cypress/e2e/home/home.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { aliasQuery, hasOperationName } from "../utils";
import { aliasQuery, hasOperationName } from "../support/utils";

describe("home", () => {
let businessAttributeEntityEnabled;
Expand Down
23 changes: 23 additions & 0 deletions smoke-test/tests/cypress/cypress/e2e/homeV2/v2_home.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import "../../support/commands"; // This import makes the commands available and clickable
import { homePage } from "../../support/pages/HomePage";

describe("Home Page V2", () => {
beforeEach(() => {
cy.setIsThemeV2Enabled(true);
cy.skipIntroducePage();
cy.on("uncaught:exception", (err) => {
// Prevent Cypress from failing the test on uncaught exceptions
return false;
});
});

it("should display all required elements on the home page", () => {
cy.login();

homePage
.visit()
.shouldHaveSvgContent()
.shouldHaveContentContainer()
.shouldHaveNavigationMenu();
});
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getTimestampMillisNumDaysAgo } from "../../support/commands";
import { getTimestampMillisNumDaysAgo } from "../../support/utils";

const JAN_1_2021_TIMESTAMP = 1609553357755;
const JAN_1_2022_TIMESTAMP = 1641089357755;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { aliasQuery } from "../utils";
import { aliasQuery } from "../support/utils";

const DATASET_ENTITY_TYPE = "dataset";
const DATASET_URN =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getTimestampMillisNumDaysAgo } from "../../support/commands";
import { getTimestampMillisNumDaysAgo } from "../../support/utils";

const DATASET_ENTITY_TYPE = "dataset";
const TASKS_ENTITY_TYPE = "tasks";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getTimestampMillisNumDaysAgo } from "../../support/commands";
import { getTimestampMillisNumDaysAgo } from "../../support/utils";

const JAN_1_2021_TIMESTAMP = 1609553357755;
const JAN_1_2022_TIMESTAMP = 1641089357755;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { aliasQuery } from "../utils";
import { aliasQuery } from "../support/utils";

const DATASET_ENTITY_TYPE = "dataset";
const DATASET_URN =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getTimestampMillisNumDaysAgo } from "../../support/commands";
import { getTimestampMillisNumDaysAgo } from "../../support/utils";

const DATASET_ENTITY_TYPE = "dataset";
const TASKS_ENTITY_TYPE = "tasks";
Expand Down
2 changes: 1 addition & 1 deletion smoke-test/tests/cypress/cypress/e2e/mutations/domains.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { aliasQuery, hasOperationName } from "../utils";
import { aliasQuery, hasOperationName } from "../support/utils";

const test_domain_id = Math.floor(Math.random() * 100000);
const test_domain = `CypressDomainTest ${test_domain_id}`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { aliasQuery, hasOperationName } from "../utils";
import { aliasQuery, hasOperationName } from "../support/utils";

describe("mutations", () => {
let businessAttributeEntityEnabled;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { aliasQuery, hasOperationName } from "../utils";
import { aliasQuery, hasOperationName } from "../support/utils";

describe("search", () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { aliasQuery, hasOperationName } from "../utils";
import { aliasQuery, hasOperationName } from "../support/utils";

const test_id = Math.floor(Math.random() * 100000);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { aliasQuery, hasOperationName } from "../utils";
import { aliasQuery, hasOperationName } from "../support/utils";

const test_id = Math.floor(Math.random() * 100000);

Expand Down
7 changes: 7 additions & 0 deletions smoke-test/tests/cypress/cypress/e2e/utils.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { GraphQLRequest } from "../support/types";

export function hasOperationName(
req: GraphQLRequest,
operationName: string,
): boolean;
export function aliasQuery(req: GraphQLRequest, operationName: string): void;
13 changes: 0 additions & 13 deletions smoke-test/tests/cypress/cypress/e2e/utils.js

This file was deleted.

25 changes: 0 additions & 25 deletions smoke-test/tests/cypress/cypress/plugins/index.js

This file was deleted.

10 changes: 10 additions & 0 deletions smoke-test/tests/cypress/cypress/plugins/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from "cypress";
import timestamps from "cypress-timestamps/plugin";

export default (
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions,
) => {
timestamps(on);
return config;
};
Loading
Loading