mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-19 06:38:04 +00:00
fix(cypress) Catch resizeObserverLoop globally and fix setThemeV2 (#13288)
This commit is contained in:
parent
169c982b4d
commit
fa531d70c8
@ -4,7 +4,6 @@ describe("auto-complete", () => {
|
|||||||
cy.skipIntroducePage();
|
cy.skipIntroducePage();
|
||||||
cy.hideOnboardingTour();
|
cy.hideOnboardingTour();
|
||||||
cy.login();
|
cy.login();
|
||||||
cy.ignoreResizeObserverLoop();
|
|
||||||
// look for a dataset
|
// look for a dataset
|
||||||
cy.visit("/");
|
cy.visit("/");
|
||||||
cy.wait(2000);
|
cy.wait(2000);
|
||||||
|
@ -90,7 +90,6 @@ describe("Verify nested domains test functionalities", () => {
|
|||||||
cy.setIsThemeV2Enabled(false);
|
cy.setIsThemeV2Enabled(false);
|
||||||
cy.loginWithCredentials();
|
cy.loginWithCredentials();
|
||||||
cy.goToDomainList();
|
cy.goToDomainList();
|
||||||
cy.ignoreResizeObserverLoop();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Verify Create a new domain", () => {
|
it("Verify Create a new domain", () => {
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
describe("manage tags", () => {
|
describe("manage tags", () => {
|
||||||
beforeEach(() => {
|
|
||||||
cy.ignoreResizeObserverLoop();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("Manage Tags Page - Verify search bar placeholder", () => {
|
it("Manage Tags Page - Verify search bar placeholder", () => {
|
||||||
cy.login();
|
cy.login();
|
||||||
cy.visit("/tags");
|
cy.visit("/tags");
|
||||||
|
@ -9,7 +9,6 @@ const ingestion_source_name = `ingestion source ${number}`;
|
|||||||
describe("managing secrets for ingestion creation", () => {
|
describe("managing secrets for ingestion creation", () => {
|
||||||
it("create a secret, create ingestion source using a secret, remove a secret", () => {
|
it("create a secret, create ingestion source using a secret, remove a secret", () => {
|
||||||
// Navigate to the manage ingestion page → secrets
|
// Navigate to the manage ingestion page → secrets
|
||||||
cy.ignoreResizeObserverLoop();
|
|
||||||
cy.loginWithCredentials();
|
cy.loginWithCredentials();
|
||||||
cy.goToIngestionPage();
|
cy.goToIngestionPage();
|
||||||
cy.clickOptionWithText("Secrets");
|
cy.clickOptionWithText("Secrets");
|
||||||
|
@ -531,17 +531,22 @@ Cypress.Commands.add("setIsThemeV2Enabled", (isEnabled) => {
|
|||||||
res.body.data.appConfig.featureFlags.themeV2Default = isEnabled;
|
res.body.data.appConfig.featureFlags.themeV2Default = isEnabled;
|
||||||
res.body.data.appConfig.featureFlags.showNavBarRedesign = isEnabled;
|
res.body.data.appConfig.featureFlags.showNavBarRedesign = isEnabled;
|
||||||
});
|
});
|
||||||
|
} else if (hasOperationName(req, "getMe")) {
|
||||||
|
req.alias = "gqlgetMeQuery";
|
||||||
|
req.on("response", (res) => {
|
||||||
|
res.body.data.me.corpUser.settings.appearance.showThemeV2 = isEnabled;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add("ignoreResizeObserverLoop", () => {
|
Cypress.on("uncaught:exception", (err) => {
|
||||||
const resizeObserverLoopErrRe = "ResizeObserver loop limit exceeded";
|
const resizeObserverLoopErrMessage = "ResizeObserver loop limit exceeded";
|
||||||
cy.on("uncaught:exception", (err) => {
|
|
||||||
if (err.message.includes(resizeObserverLoopErrRe)) {
|
/* returning false here prevents Cypress from failing the test */
|
||||||
return false;
|
if (err.message.includes(resizeObserverLoopErrMessage)) {
|
||||||
}
|
return false;
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user