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

feat(Mantine): support mantine 7 #6345

Open
wants to merge 70 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
13cbd1f
feat(mantine): mantine 7
glebtv Feb 21, 2024
51f4503
feat(inferencer): mantine 7
glebtv Feb 21, 2024
8cdbcb8
feat(ui-tests): mantine 7
glebtv Feb 21, 2024
41febc0
feat(live-previews): mantine 7
glebtv Feb 21, 2024
e06b1dd
feat(examples): mantine 7
glebtv Feb 21, 2024
f7b8900
fix(mantine): mantine select crashes when label is undefined
glebtv Feb 21, 2024
9aaa2d9
Merge branch 'master' into mantine7.v4
BatuhanW Feb 21, 2024
29349da
fix(mantine): fix e2e tests
glebtv Feb 22, 2024
fcee89d
chore: format files
BatuhanW Feb 26, 2024
c85e590
Merge branch 'master' into mantine7.v4
BatuhanW Feb 26, 2024
c67ad52
fix(mantine): restore accidentally removed class
glebtv Feb 26, 2024
9aba874
fix(inferencer): update test snapshots
glebtv Feb 26, 2024
7f16ddb
chore(mantine): remove unused types, remove ThemedLayout v1, remove c…
glebtv Feb 27, 2024
e152887
chore(mantine): add changeset, undo changes to package versions
glebtv Feb 27, 2024
e5e65a5
fix(mantine): better action button variant handling
glebtv Feb 27, 2024
00b4538
fix(mantine): move github banner to appshell footer
glebtv Feb 27, 2024
082517b
fix: restore refinedev/mantine version
glebtv Feb 27, 2024
cde6385
fix: examples/base-mantine remove unused filter
glebtv Feb 27, 2024
d2c8563
fix: remove commented code, better mantine test wrapper
glebtv Feb 27, 2024
451ad37
Merge branch 'master' into mantine7.v4
glebtv Feb 29, 2024
230c0a6
Merge branch 'master' into mantine7.v4
BatuhanW Feb 29, 2024
2a05017
fix(inferencer): add React import to mantine inferencer generated code
glebtv Feb 29, 2024
3221708
Merge branch 'master' into mantine7.v4
BatuhanW Feb 29, 2024
6afde2f
Merge branch 'master' into mantine7.v4
BatuhanW Mar 4, 2024
04e0f4b
chore(mantine): split changesets as per review
glebtv Mar 4, 2024
2d89b2f
chore(mantine): remove commented code
glebtv Mar 4, 2024
f7d75f7
chore(mantine): icon color should be primary
glebtv Mar 4, 2024
34480b7
fix(inferencer): filterDataOnExactSearchMatch is no longer available …
glebtv Mar 4, 2024
9260b67
Merge branch 'master' into mantine7.v4
BatuhanW Mar 7, 2024
1817134
Merge remote-tracking branch 'upstream/master' into mantine7-v2-1
glebtv Mar 28, 2024
f20d327
fix(mantine): try fix biome lint error
glebtv Mar 28, 2024
e0e99af
chore(mantine): update mantine version in docs
glebtv Mar 28, 2024
bacc65a
Merge remote-tracking branch 'upstream/releases/april' into mantine7.v4
glebtv Mar 29, 2024
77f7e9c
chore: try fix biome errors
glebtv Mar 29, 2024
515dc57
chore: fix versions after merge, fix mantine delete button tests
glebtv Mar 29, 2024
494fb07
Merge branch 'master' into mantine7.v4
alodela Sep 9, 2024
7fc8ffe
feat(mantine): mantine 7
alodela Sep 17, 2024
cdebb7e
chore(mantine): update packages version
alodela Sep 17, 2024
04b6720
Merge branch 'refinedev:master' into mantine7.v4
alodela Sep 17, 2024
ced22ca
Merge branch 'master' into mantine7.v4
alodela Sep 18, 2024
e460d33
fix(mantine): lint & build errors
alodela Sep 18, 2024
01c08f1
fix(mantine): update form types in examples
alodela Sep 18, 2024
6518830
Merge branch 'master' into mantine7.v4
alodela Sep 20, 2024
e8b46f4
Merge branch 'master' into mantine7.v4
BatuhanW Sep 24, 2024
3bd2870
Merge branch 'master' into mantine7.v4
alodela Oct 14, 2024
60e515a
Merge branch 'master' into mantine7.v4
alodela Oct 16, 2024
c2972c6
Merge branch 'master' into mantine7.v4
BatuhanW Oct 28, 2024
00be382
Merge branch 'master' into mantine7.v4
alodela Oct 31, 2024
0104168
Merge branch 'master' into mantine7.v4
alodela Oct 31, 2024
ba364b7
Merge branch 'master' into mantine7.v4
alodela Nov 2, 2024
65c68d4
Merge branch 'master' into mantine7.v4
alodela Nov 8, 2024
a688bd3
fix(mantine): fix action icon style
alodela Nov 9, 2024
10b36cf
Merge branch 'master' into mantine7.v4
alodela Nov 9, 2024
6e9c66a
Merge branch 'master' into mantine7.v4
alodela Nov 12, 2024
faf028d
Merge branch 'master' into mantine7.v4
alodela Nov 16, 2024
ceaf214
Merge branch 'master' into mantine7.v4
alodela Nov 24, 2024
a5365d2
fix(mantine): update snapshots
alodela Nov 24, 2024
a6eccbb
Merge branch 'master' into mantine7.v4
alodela Nov 28, 2024
935ce43
Merge branch 'main' into mantine7.v4
alodela Dec 4, 2024
58cf201
Merge branch 'main' into mantine7.v4
alodela Dec 12, 2024
2a9d078
Merge branch 'main' into mantine7.v4
alodela Dec 30, 2024
689f08c
Merge branch 'main' into mantine7.v4
alodela Jan 18, 2025
a53f76c
chore(mantine): update documentation
alodela Jan 19, 2025
e0de4e4
Merge branch 'main' into mantine7.v4
alodela Jan 21, 2025
e524a95
Merge branch 'main' into mantine7.v4
alodela Jan 26, 2025
3edd2d4
Merge branch 'main' into mantine7.v4
alodela Jan 29, 2025
1ee0029
Merge branch 'main' into mantine7.v4
alodela Feb 6, 2025
36fdc2b
Merge branch 'main' into mantine7.v4
alodela Feb 14, 2025
01332a4
Merge branch 'main' into mantine7.v4
alodela Feb 19, 2025
b493970
Merge branch 'main' into mantine7.v4
alodela Feb 22, 2025
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
Prev Previous commit
Next Next commit
chore: format files
BatuhanW committed Feb 26, 2024
commit fcee89d6a7764e23c6dd3ce0b1a461862931bd58
86 changes: 47 additions & 39 deletions cypress/support/commands/mantine/index.ts
Original file line number Diff line number Diff line change
@@ -1,59 +1,67 @@
export const getMantineNotification = () => {
return cy.get(".mantine-Notification-description");
return cy.get(".mantine-Notification-description");
};

export const getMantinePopoverDeleteButton = () => {
return cy.get(".mantine-Popover-dropdown").contains(/delete/gi);
return cy.get(".mantine-Popover-dropdown").contains(/delete/gi);
};

export const getMantineFormItemError = ({
id,
id,
}: IGetChakraUIFormItemErrorParams) => {
return cy.get(`#${id}-error`);
return cy.get(`#${id}-error`);
};

export const getMantineLoadingOverlay = () => {
return cy.get(".mantine-LoadingOverlay-root");
return cy.get(".mantine-LoadingOverlay-root");
};

export const clearMantineSelect = (field: string) => {
cy.get(field).each(($elm) => {
cy.wrap($elm).invoke('val').then((text) => {
if (text) {
cy.get(field).click()
cy.get(".mantine-Popover-dropdown:visible .mantine-Select-option").contains(text as string).click();
}
})
})
}
cy.get(field).each(($elm) => {
cy.wrap($elm)
.invoke("val")
.then((text) => {
if (text) {
cy.get(field).click();
cy.get(".mantine-Popover-dropdown:visible .mantine-Select-option")
.contains(text as string)
.click();
}
});
});
};

export const fillMantineStatus = (status = "Published") => {
// Select option if it's not selected
cy.get('#status').each(($elm) => {
cy.wrap($elm).invoke('val').then((text) => {
if (status) {
if (text == status) {
} else {
cy.get("#status").click()
cy.get(".mantine-Popover-dropdown:visible .mantine-Select-option").contains(status).click();
}
} else {
cy.get("#status").click()
cy.get(".mantine-Popover-dropdown:visible .mantine-Select-option").first().click();
}
})
})
}
// Select option if it's not selected
cy.get("#status").each(($elm) => {
cy.wrap($elm)
.invoke("val")
.then((text) => {
if (status) {
if (text == status) {
} else {
cy.get("#status").click();
cy.get(".mantine-Popover-dropdown:visible .mantine-Select-option")
.contains(status)
.click();
}
} else {
cy.get("#status").click();
cy.get(".mantine-Popover-dropdown:visible .mantine-Select-option")
.first()
.click();
}
});
});
};

export const fillMantineForm = () => {
cy.fixture("mock-post").then((mockPost) => {
cy.get("#title").clear().type(mockPost.title);
cy.get("#content textarea")
.clear({ force: true })
.type(mockPost.content, {
delay: 32,
});
cy.fillMantineStatus();
cy.get("#categoryId").click().type('{downArrow}{enter}', {force: true});
cy.fixture("mock-post").then((mockPost) => {
cy.get("#title").clear().type(mockPost.title);
cy.get("#content textarea").clear({ force: true }).type(mockPost.content, {
delay: 32,
});
cy.fillMantineStatus();
cy.get("#categoryId").click().type("{downArrow}{enter}", { force: true });
});
};
119 changes: 59 additions & 60 deletions cypress/support/e2e.ts
Original file line number Diff line number Diff line change
@@ -2,60 +2,60 @@
/// <reference types="./index.d.ts" />

import {
getAntdNotification,
setAntdSelect,
setAntdDropdown,
getAntdFormItemError,
getAntdLoadingOverlay,
getAntdPopoverDeleteButton,
getAntdColumnSorter,
getAntdFilterTrigger,
getAntdPaginationItem,
getTableRowExpandButton,
setAntdRangeDatePickerToToday,
fillAntdForm,
getAntdNotification,
setAntdSelect,
setAntdDropdown,
getAntdFormItemError,
getAntdLoadingOverlay,
getAntdPopoverDeleteButton,
getAntdColumnSorter,
getAntdFilterTrigger,
getAntdPaginationItem,
getTableRowExpandButton,
setAntdRangeDatePickerToToday,
fillAntdForm,
} from "./commands/antd";
import {
getChakraUIPopoverDeleteButton,
getChakraUIFormItemError,
getChakraUILoadingOverlay,
getChakraUINotification,
getChakraUIToast,
fillChakraUIForm,
getChakraUIPopoverDeleteButton,
getChakraUIFormItemError,
getChakraUILoadingOverlay,
getChakraUINotification,
getChakraUIToast,
fillChakraUIForm,
} from "./commands/chakra-ui";
import {
fillMantineForm,
getMantineFormItemError,
getMantineLoadingOverlay,
getMantineNotification,
getMantinePopoverDeleteButton,
fillMantineStatus,
clearMantineSelect,
fillMantineForm,
getMantineFormItemError,
getMantineLoadingOverlay,
getMantineNotification,
getMantinePopoverDeleteButton,
fillMantineStatus,
clearMantineSelect,
} from "./commands/mantine";
import {
getCreateButton,
getDeleteButton,
getEditButton,
getPageHeaderTitle,
getSaveButton,
getShowButton,
getCreateButton,
getDeleteButton,
getEditButton,
getPageHeaderTitle,
getSaveButton,
getShowButton,
} from "./commands/refine";
import { list, create, edit, show, resourceDelete } from "./commands/resource";
import { assertDocumentTitle } from "./commands/document-title-handler";

// add commands to the Cypress chain
import "./commands/intercepts";
import {
fillMaterialUIForm,
getMaterialUIColumnHeader,
getMaterialUIDeletePopoverButton,
getMaterialUIFormItemError,
getMaterialUILoadingCircular,
getMaterialUINotifications,
fillMaterialUIForm,
getMaterialUIColumnHeader,
getMaterialUIDeletePopoverButton,
getMaterialUIFormItemError,
getMaterialUILoadingCircular,
getMaterialUINotifications,
} from "./commands/material-ui";

Cypress.Keyboard.defaults({
keystrokeDelay: 0,
keystrokeDelay: 0,
});

Cypress.config("defaultCommandTimeout", 20000);
@@ -88,29 +88,29 @@ Cypress.Commands.add("getAntdFilterTrigger", getAntdFilterTrigger);
Cypress.Commands.add("getAntdPaginationItem", getAntdPaginationItem);
Cypress.Commands.add("getTableRowExpandButton", getTableRowExpandButton);
Cypress.Commands.add(
"setAntdRangeDatePickerToToday",
setAntdRangeDatePickerToToday,
"setAntdRangeDatePickerToToday",
setAntdRangeDatePickerToToday,
);

Cypress.Commands.add("fillChakraUIForm", fillChakraUIForm);
Cypress.Commands.add("getChakraUINotification", getChakraUINotification);
Cypress.Commands.add("getChakraUIToast", getChakraUIToast);
Cypress.Commands.add("getChakraUIFormItemError", getChakraUIFormItemError);
Cypress.Commands.add(
"getChakraUIPopoverDeleteButton",
getChakraUIPopoverDeleteButton,
"getChakraUIPopoverDeleteButton",
getChakraUIPopoverDeleteButton,
);
Cypress.Commands.add("getChakraUILoadingOverlay", getChakraUILoadingOverlay);

Cypress.Commands.add("getMaterialUINotification", getMaterialUINotifications);
Cypress.Commands.add(
"getMaterialUIDeletePopoverButton",
getMaterialUIDeletePopoverButton,
"getMaterialUIDeletePopoverButton",
getMaterialUIDeletePopoverButton,
);
Cypress.Commands.add("getMaterialUIFormItemError", getMaterialUIFormItemError);
Cypress.Commands.add(
"getMaterialUILoadingCircular",
getMaterialUILoadingCircular,
"getMaterialUILoadingCircular",
getMaterialUILoadingCircular,
);
Cypress.Commands.add("getMaterialUIColumnHeader", getMaterialUIColumnHeader);

@@ -119,32 +119,31 @@ Cypress.Commands.add("fillMantineStatus", fillMantineStatus);
Cypress.Commands.add("fillMantineForm", fillMantineForm);
Cypress.Commands.add("getMantineNotification", getMantineNotification);
Cypress.Commands.add(
"getMantinePopoverDeleteButton",
getMantinePopoverDeleteButton,
"getMantinePopoverDeleteButton",
getMantinePopoverDeleteButton,
);
Cypress.Commands.add("getMantineFormItemError", getMantineFormItemError);
Cypress.Commands.add("getMantineLoadingOverlay", getMantineLoadingOverlay);
Cypress.Commands.add("fillMaterialUIForm", fillMaterialUIForm);


/**
* Disable telemetry calls
*/
beforeEach(() => {
cy.intercept("https://telemetry.refine.dev/**", {
body: "Disabled telemetry to avoid unwanted entries in the database",
statusCode: 200,
}).as("telemetry");
cy.intercept("https://telemetry.refine.dev/**", {
body: "Disabled telemetry to avoid unwanted entries in the database",
statusCode: 200,
}).as("telemetry");
});

Cypress.on("uncaught:exception", (err) => {
if (err.message.includes("NEXT_REDIRECT")) {
return false;
}
if (err.message.includes("NEXT_REDIRECT")) {
return false;
}

if (err.message.includes("NEXT_NOT_FOUND")) {
return false;
}
if (err.message.includes("NEXT_NOT_FOUND")) {
return false;
}

return true;
return true;
});
Loading