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

Replace Rome with Biome #31

Merged
merged 3 commits into from
Dec 31, 2023
Merged
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
18 changes: 9 additions & 9 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["cypress-testing"]
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["cypress-testing"]
}
20 changes: 18 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
"typescript.tsdk": "node_modules/typescript/lib",
"editor.defaultFormatter": "biomejs.biome",

"editor.formatOnSave": true,
"prettier.enable": false,
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
36 changes: 18 additions & 18 deletions apps/cypress-testing/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { defineConfig } from "cypress";
export default defineConfig({
video: false,
component: {
viewportWidth: 1000,
viewportHeight: 500,
devServer: {
framework: "react",
bundler: "vite",
viteConfig: {
server: { fs: { strict: false } },
resolve:{
alias:{
'@' : "../../node_modules/react-trello-ts/src"
},
},
},
},
},
experimentalSourceRewriting: true,
video: false,
component: {
viewportWidth: 1000,
viewportHeight: 500,
devServer: {
framework: "react",
bundler: "vite",
viteConfig: {
server: { fs: { strict: false } },
resolve: {
alias: {
"@": "../../node_modules/react-trello-ts/src",
},
},
},
},
},
experimentalSourceRewriting: true,
});
128 changes: 64 additions & 64 deletions apps/cypress-testing/cypress/component/CardBehaviour.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,72 +57,72 @@ describe("Testing card behaviour", () => {
});

it("Can drag a card between lanes", () => {
cy.fixture("data.json").then((data) => {
cy.mount(<Board data={data} />);
cy.findCardByTitle("Buy milk").move({
deltaX: 300,
deltaY: 50,
force: true,
});
cy.get(".horizontal > :nth-child(1)")
.findByText("Buy milk")
.should("not.exist");
cy.get(".horizontal > :nth-child(2)")
.findByText("Buy milk")
.should("exist");
});
});
cy.fixture("data.json").then((data) => {
cy.mount(<Board data={data} />);
cy.findCardByTitle("Buy milk").move({
deltaX: 300,
deltaY: 50,
force: true,
});
cy.get(".horizontal > :nth-child(1)")
.findByText("Buy milk")
.should("not.exist");
cy.get(".horizontal > :nth-child(2)")
.findByText("Buy milk")
.should("exist");
});
});

it("Can drag a card between multiple lanes", () => {
cy.fixture("data.json").then((data) => {
cy.mount(<Board data={data} />);
cy.findCardByTitle("Buy milk").move({
deltaX: 300,
deltaY: 50,
force: true,
});
cy.get(".horizontal > :nth-child(1)")
.findByText("Buy milk")
.should("not.exist");
cy.get(".horizontal > :nth-child(2)")
.findByText("Buy milk")
.should("exist");
it("Can drag a card between multiple lanes", () => {
cy.fixture("data.json").then((data) => {
cy.mount(<Board data={data} />);
cy.findCardByTitle("Buy milk").move({
deltaX: 300,
deltaY: 50,
force: true,
});
cy.get(".horizontal > :nth-child(1)")
.findByText("Buy milk")
.should("not.exist");
cy.get(".horizontal > :nth-child(2)")
.findByText("Buy milk")
.should("exist");

cy.findCardByTitle("Buy milk").move({
deltaX: -300,
deltaY: -50,
force: true,
});
cy.get(".horizontal > :nth-child(1)")
.findByText("Buy milk")
.should("exist");
cy.get(".horizontal > :nth-child(2)")
.findByText("Buy milk")
.should("not.exist");
cy.findCardByTitle("Buy milk").move({
deltaX: -300,
deltaY: -50,
force: true,
});
cy.get(".horizontal > :nth-child(1)")
.findByText("Buy milk")
.should("exist");
cy.get(".horizontal > :nth-child(2)")
.findByText("Buy milk")
.should("not.exist");

cy.findCardByTitle("Buy milk").move({
deltaX: 550,
deltaY: -100,
force: true,
});
cy.get(".horizontal > :nth-child(1)")
.findByText("Buy milk")
.should("not.exist");
cy.get(".horizontal > :nth-child(3)")
.findByText("Buy milk")
.should("exist");
cy.findCardByTitle("Buy milk").move({
deltaX: 550,
deltaY: -100,
force: true,
});
cy.get(".horizontal > :nth-child(1)")
.findByText("Buy milk")
.should("not.exist");
cy.get(".horizontal > :nth-child(3)")
.findByText("Buy milk")
.should("exist");

cy.findCardByTitle("Buy milk").move({
deltaX: -550,
deltaY: 100,
force: true,
});
cy.get(".horizontal > :nth-child(1)")
.findByText("Buy milk")
.should("exist");
cy.get(".horizontal > :nth-child(3)")
.findByText("Buy milk")
.should("not.exist");
});
})
cy.findCardByTitle("Buy milk").move({
deltaX: -550,
deltaY: 100,
force: true,
});
cy.get(".horizontal > :nth-child(1)")
.findByText("Buy milk")
.should("exist");
cy.get(".horizontal > :nth-child(3)")
.findByText("Buy milk")
.should("not.exist");
});
});
});
43 changes: 20 additions & 23 deletions apps/cypress-testing/cypress/component/ComponentName.cy.tsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
import Board from "react-trello-ts";

describe("ComponentName.cy.ts", () => {
it("renders cards", () => {
cy.fixture("data.json").then((data) => {
cy.mount(<Board data={data} />);
cy.get(".horizontal")
.findAllByText("Planned Tasks")
.should("exist")
.should("have.length", 1);
cy.findCardByTitle("Buy milk");
cy.findCardByTitle("Dispose Garbage");
cy.findCardByTitle("Write Blog");
cy.findCardByTitle("Pay Rent");
cy.findCardByTitle("Clean House");
cy.findCardByTitle("Practice Meditation");
cy.findCardByTitle("Maintain Daily Journal");
cy.findCardByTitle("Morning Jog");
cy.findCardByTitle("Go Trekking");
cy.findCardByTitle("Go Jogging");
cy.findCardByTitle("Go Cycling");
});
});



it("renders cards", () => {
cy.fixture("data.json").then((data) => {
cy.mount(<Board data={data} />);
cy.get(".horizontal")
.findAllByText("Planned Tasks")
.should("exist")
.should("have.length", 1);
cy.findCardByTitle("Buy milk");
cy.findCardByTitle("Dispose Garbage");
cy.findCardByTitle("Write Blog");
cy.findCardByTitle("Pay Rent");
cy.findCardByTitle("Clean House");
cy.findCardByTitle("Practice Meditation");
cy.findCardByTitle("Maintain Daily Journal");
cy.findCardByTitle("Morning Jog");
cy.findCardByTitle("Go Trekking");
cy.findCardByTitle("Go Jogging");
cy.findCardByTitle("Go Cycling");
});
});
});

export {};
Loading