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.hideOnboardingTour();
|
||||
cy.login();
|
||||
cy.ignoreResizeObserverLoop();
|
||||
// look for a dataset
|
||||
cy.visit("/");
|
||||
cy.wait(2000);
|
||||
|
@ -90,7 +90,6 @@ describe("Verify nested domains test functionalities", () => {
|
||||
cy.setIsThemeV2Enabled(false);
|
||||
cy.loginWithCredentials();
|
||||
cy.goToDomainList();
|
||||
cy.ignoreResizeObserverLoop();
|
||||
});
|
||||
|
||||
it("Verify Create a new domain", () => {
|
||||
|
@ -1,8 +1,4 @@
|
||||
describe("manage tags", () => {
|
||||
beforeEach(() => {
|
||||
cy.ignoreResizeObserverLoop();
|
||||
});
|
||||
|
||||
it("Manage Tags Page - Verify search bar placeholder", () => {
|
||||
cy.login();
|
||||
cy.visit("/tags");
|
||||
|
@ -9,7 +9,6 @@ const ingestion_source_name = `ingestion source ${number}`;
|
||||
describe("managing secrets for ingestion creation", () => {
|
||||
it("create a secret, create ingestion source using a secret, remove a secret", () => {
|
||||
// Navigate to the manage ingestion page → secrets
|
||||
cy.ignoreResizeObserverLoop();
|
||||
cy.loginWithCredentials();
|
||||
cy.goToIngestionPage();
|
||||
cy.clickOptionWithText("Secrets");
|
||||
|
@ -531,17 +531,22 @@ Cypress.Commands.add("setIsThemeV2Enabled", (isEnabled) => {
|
||||
res.body.data.appConfig.featureFlags.themeV2Default = 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", () => {
|
||||
const resizeObserverLoopErrRe = "ResizeObserver loop limit exceeded";
|
||||
cy.on("uncaught:exception", (err) => {
|
||||
if (err.message.includes(resizeObserverLoopErrRe)) {
|
||||
Cypress.on("uncaught:exception", (err) => {
|
||||
const resizeObserverLoopErrMessage = "ResizeObserver loop limit exceeded";
|
||||
|
||||
/* returning false here prevents Cypress from failing the test */
|
||||
if (err.message.includes(resizeObserverLoopErrMessage)) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user