forked from currents-dev/cypress-cloud
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f23104
commit efee1bd
Showing
26 changed files
with
5,209 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
root: true, | ||
// This tells ESLint to load the config from the package `eslint-config-custom` | ||
extends: ["custom"], | ||
settings: { | ||
next: { | ||
rootDir: ["apps/*/"], | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
.pnp | ||
.pnp.js | ||
.yarn | ||
|
||
# testing | ||
coverage | ||
|
||
# next.js | ||
.next/ | ||
out/ | ||
build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# turbo | ||
.turbo | ||
|
||
# Cypress test outputs | ||
**/cypress/videos/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: "node-modules" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,40 @@ | ||
# cypress-cloud | ||
# Cypress Cloud | ||
|
||
This is an official Yarn (Berry) starter turborepo. | ||
|
||
## What's inside? | ||
|
||
This turborepo uses [Yarn](https://yarnpkg.com/) as a package manager. It includes the following packages/apps: | ||
|
||
### Examples and Packages | ||
|
||
- `nextjs`: an example [Next.js](https://nextjs.org/) app with Currents Cypress Cloud setup | ||
- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) | ||
|
||
Each package/example is 100% [TypeScript](https://www.typescriptlang.org/). | ||
|
||
### Utilities | ||
|
||
This turborepo has some additional tools already setup for you: | ||
|
||
- [TypeScript](https://www.typescriptlang.org/) for static type checking | ||
- [ESLint](https://eslint.org/) for code linting | ||
- [Prettier](https://prettier.io) for code formatting | ||
|
||
### Build | ||
|
||
To build all apps and packages, run the following command: | ||
|
||
``` | ||
cd cypress-cloud | ||
yarn run build | ||
``` | ||
|
||
### Develop | ||
|
||
To develop all apps and packages, run the following command: | ||
|
||
``` | ||
cd cypress-cloud | ||
yarn run dev | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ["custom"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
## Getting Started | ||
|
||
First, run the development server: | ||
|
||
```bash | ||
yarn dev | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
||
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. | ||
|
||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. | ||
|
||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. | ||
|
||
## Learn More | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial. | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
|
||
## Deploy on Vercel | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js. | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const { defineConfig } = require("cypress"); | ||
const { loadEnvConfig } = require("@next/env"); | ||
|
||
function loadEnvVariables() { | ||
const projectDir = process.cwd(); | ||
loadEnvConfig(projectDir); | ||
} | ||
|
||
loadEnvVariables(); | ||
const projectId = process.env.CYPRESS_PROJECT_ID; | ||
|
||
module.exports = defineConfig({ | ||
projectId, | ||
e2e: { | ||
supportFile: false, | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { homeUrl } from "../../homeUrl"; | ||
|
||
describe("Navigation Again", () => { | ||
it("should navigate to the about page", () => { | ||
// Start from the index page | ||
cy.visit(homeUrl); | ||
|
||
// Find a link with an href attribute containing "about" and click it | ||
cy.get('a[href*="about"]').click(); | ||
|
||
// The new url should include "/about" | ||
cy.url().should("include", "/about"); | ||
|
||
// The new page should contain an h1 with "About page" | ||
cy.get("h1").contains("About Page"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { homeUrl } from "../../homeUrl"; | ||
|
||
describe("Navigation", () => { | ||
it("should navigate to the about page", () => { | ||
// Start from the index page | ||
cy.visit(homeUrl); | ||
|
||
// Find a link with an href attribute containing "about" and click it | ||
cy.get('a[href*="about"]').click(); | ||
|
||
// The new url should include "/about" | ||
cy.url().should("include", "/about"); | ||
|
||
// The new page should contain an h1 with "About page" | ||
cy.get("h1").contains("About Page"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const homeUrl = "http://localhost:3000"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { loadEnvConfig } from "@next/env"; | ||
|
||
export function loadEnvVariables() { | ||
const projectDir = process.cwd(); | ||
loadEnvConfig(projectDir); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
reactStrictMode: true, | ||
experimental: { | ||
transpilePackages: ["cypress-runner"], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "web", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"lint": "next lint" | ||
}, | ||
"dependencies": { | ||
"cypress-runner": "*", | ||
"next": "13.0.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.0.0", | ||
"@types/node": "^17.0.12", | ||
"@types/react": "^18.0.22", | ||
"@types/react-dom": "^18.0.7", | ||
"cypress": "^11.2.0", | ||
"eslint": "7.32.0", | ||
"eslint-config-custom": "*", | ||
"start-server-and-test": "^1.14.0", | ||
"tsconfig": "*", | ||
"typescript": "^4.5.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default function About() { | ||
return ( | ||
<div> | ||
<h1>About Page</h1> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Link from "next/link"; | ||
|
||
export default function Home() { | ||
return ( | ||
<nav> | ||
<Link href="/about">About</Link> | ||
</nav> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/tsconfig", | ||
"display": "Next.js", | ||
"compilerOptions": { | ||
"composite": false, | ||
"declaration": true, | ||
"declarationMap": true, | ||
"inlineSources": false, | ||
"moduleResolution": "node", | ||
"noUnusedLocals": false, | ||
"noUnusedParameters": false, | ||
"preserveWatchOutput": true, | ||
"target": "es5", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"noEmit": true, | ||
"incremental": true, | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve" | ||
}, | ||
"include": ["src", "next-env.d.ts"], | ||
"exclude": ["node_modules"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "@currents/cypress-cloud", | ||
"version": "1.0.0", | ||
"description": "", | ||
"private": true, | ||
"author": "", | ||
"license": "ISC", | ||
"workspaces": [ | ||
"examples/*", | ||
"packages/*" | ||
], | ||
"scripts": { | ||
"build": "turbo run build", | ||
"dev": "turbo run dev --parallel", | ||
"lint": "turbo run lint", | ||
"format": "prettier --write \"**/*.{ts,tsx,md}\"" | ||
}, | ||
"devDependencies": { | ||
"eslint-config-custom": "*", | ||
"prettier": "latest", | ||
"turbo": "latest" | ||
}, | ||
"engines": { | ||
"node": ">=14.0.0" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function run() { | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "cypress-runner", | ||
"version": "0.0.0", | ||
"main": "./index.ts", | ||
"types": "./index.ts", | ||
"license": "ISC", | ||
"scripts": { | ||
"lint": "TIMING=1 eslint \"**/*.ts*\"" | ||
}, | ||
"devDependencies": { | ||
"@types/babel__code-frame": "^7.0.3", | ||
"@types/getos": "^3.0.1", | ||
"@types/randomstring": "^1.1.8", | ||
"@types/stack-utils": "^2.0.1", | ||
"eslint": "^7.32.0", | ||
"eslint-config-custom": "*", | ||
"tsconfig": "*", | ||
"typescript": "^4.5.2" | ||
}, | ||
"dependencies": { | ||
"@babel/code-frame": "^7.18.6", | ||
"@cypress/commit-info": "^2.2.0", | ||
"axios": "^1.2.0", | ||
"colors": "^1.4.0", | ||
"getos": "^3.2.1", | ||
"image-size": "^1.0.2", | ||
"randomstring": "^1.2.3", | ||
"stack-utils": "^2.0.6" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"compilerOptions": { | ||
"composite": false, | ||
"declarationMap": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"inlineSources": false, | ||
"isolatedModules": true, | ||
"moduleResolution": "node", | ||
"noUnusedLocals": false, | ||
"noUnusedParameters": false, | ||
"preserveWatchOutput": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"outDir": "dist", | ||
"module": "commonjs", | ||
"target": "es2016", | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"esModuleInterop": true, | ||
"strictNullChecks": true, | ||
"resolveJsonModule": true | ||
}, | ||
"lib": ["es2016"], | ||
"exclude": ["node_modules", "./src/__tests__/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
extends: ["next", "turbo", "prettier"], | ||
rules: { | ||
"@next/next/no-html-link-for-pages": "off", | ||
"react/jsx-key": "off", | ||
}, | ||
}; |
Oops, something went wrong.