diff --git a/.github/workflows/build-examples.yml b/.github/workflows/build-examples.yml
index 625797805093..8a2fb06b01a6 100644
--- a/.github/workflows/build-examples.yml
+++ b/.github/workflows/build-examples.yml
@@ -5,6 +5,7 @@ on:
paths:
- "packages/**"
- "examples/**"
+ - "cypress/e2e/**"
types:
- labeled
- synchronize
diff --git a/cypress/e2e/i18n-nextjs/all.cy.ts b/cypress/e2e/i18n-nextjs/all.cy.ts
new file mode 100644
index 000000000000..672c04eeaf17
--- /dev/null
+++ b/cypress/e2e/i18n-nextjs/all.cy.ts
@@ -0,0 +1,75 @@
+///
+///
+
+Cypress.on("uncaught:exception", () => {
+ return false;
+});
+
+describe("i18n-nextjs", () => {
+ beforeEach(() => {
+ cy.clearAllCookies();
+ cy.clearAllLocalStorage();
+ cy.clearAllSessionStorage();
+
+ cy.interceptGETBlogPosts();
+ cy.visit("/");
+ });
+
+ it("should change", () => {
+ cy.wait("@getBlogPosts");
+
+ // check the elements are in English which is the default language
+ cy.get(".ant-menu > .ant-menu-item")
+ .contains("Blog Posts")
+ .get(".ant-page-header-heading-left")
+ .contains("Posts")
+ .get(".refine-create-button")
+ .contains("Create")
+ .get(".ant-table-thead > tr > :nth-child(2)")
+ .contains("Title")
+ .get(".ant-table-thead > tr > :nth-child(3)")
+ .contains("Content")
+ .get(".ant-table-thead > tr > :nth-child(4)")
+ .contains("Category")
+ .get(".ant-table-thead > tr > :nth-child(5)")
+ .contains("Status")
+ .get(".ant-table-thead > tr > :nth-child(6)")
+ .contains("Created At")
+ .get(".ant-table-thead > tr > :nth-child(7)")
+ .contains("Actions");
+
+ // find the language button
+ cy.get(".ant-layout-header > .ant-btn")
+ // should contain English which is the default language
+ .contains("English")
+ // hover over the button to show the dropdown
+ .trigger("mouseover")
+ // click on the German language
+ .get(".ant-dropdown-menu-title-content")
+ .contains("German")
+ .click()
+ // should contain German
+ .get(".ant-layout-header > .ant-btn")
+ .contains("German");
+
+ // check the elements are translated
+ cy.get(".ant-menu > .ant-menu-item")
+ .contains("Einträge")
+ .get(".ant-page-header-heading-left")
+ .contains("Einträge")
+ .get(".refine-create-button")
+ .contains("Erstellen")
+ .get(".ant-table-thead > tr > :nth-child(2)")
+ .contains("Titel")
+ .get(".ant-table-thead > tr > :nth-child(3)")
+ .contains("Inhalh")
+ .get(".ant-table-thead > tr > :nth-child(4)")
+ .contains("Kategorie")
+ .get(".ant-table-thead > tr > :nth-child(5)")
+ .contains("Status")
+ .get(".ant-table-thead > tr > :nth-child(6)")
+ .contains("Erstellt am")
+ .get(".ant-table-thead > tr > :nth-child(7)")
+ .contains("Aktionen");
+ });
+});
diff --git a/cypress/e2e/i18n-react/all.cy.ts b/cypress/e2e/i18n-react/all.cy.ts
new file mode 100644
index 000000000000..6884cc50df55
--- /dev/null
+++ b/cypress/e2e/i18n-react/all.cy.ts
@@ -0,0 +1,63 @@
+///
+///
+
+Cypress.on("uncaught:exception", () => {
+ return false;
+});
+
+describe("i18n-react", () => {
+ beforeEach(() => {
+ cy.clearAllCookies();
+ cy.clearAllLocalStorage();
+ cy.clearAllSessionStorage();
+
+ cy.interceptGETPosts();
+ cy.visit("/");
+ });
+
+ it("should change", () => {
+ cy.wait("@getPosts");
+
+ // check the elements are in English which is the default language
+ cy.get(".ant-menu > .ant-menu-item")
+ .contains("Posts")
+ .get(".ant-page-header-heading-left")
+ .contains("Posts")
+ .get(".refine-create-button")
+ .contains("Create")
+ .get(".ant-table-thead > tr > :nth-child(2)")
+ .contains("Title")
+ .get(".ant-table-thead > tr > :nth-child(3)")
+ .contains("Category")
+ .get(".ant-table-thead > tr > :nth-child(4)")
+ .contains("Actions");
+
+ // find the language button
+ cy.get(".ant-layout-header > .ant-btn")
+ // should contain English which is the default language
+ .contains("English")
+ // hover over the button to show the dropdown
+ .trigger("mouseover")
+ // click on the German language
+ .get(".ant-dropdown-menu-title-content")
+ .contains("German")
+ .click()
+ // should contain German
+ .get(".ant-layout-header > .ant-btn")
+ .contains("German");
+
+ // check the elements are translated
+ cy.get(".ant-menu > .ant-menu-item")
+ .contains("Einträge")
+ .get(".ant-page-header-heading-left")
+ .contains("Einträge")
+ .get(".refine-create-button")
+ .contains("Erstellen")
+ .get(".ant-table-thead > tr > :nth-child(2)")
+ .contains("Titel")
+ .get(".ant-table-thead > tr > :nth-child(3)")
+ .contains("Kategorie")
+ .get(".ant-table-thead > tr > :nth-child(4)")
+ .contains("Aktionen");
+ });
+});