-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: support ESM packages * chore: fix unit tests * chore: fix e2e tests * chore: README
- Loading branch information
Showing
47 changed files
with
11,215 additions
and
79 deletions.
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
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,50 @@ | ||
name: e2e-config-esm-cjs | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
e2e-config-esm-cjs: | ||
if: "!contains(toJSON(github.event.commits.*.message), '[skip ci]')" | ||
runs-on: ubuntu-latest | ||
env: | ||
DEBUG: currents:* | ||
|
||
services: | ||
director: | ||
image: agoldis/sorry-cypress-director | ||
ports: | ||
- 1234:1234 | ||
|
||
strategy: | ||
matrix: | ||
node-version: ["18"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Link monorepo packages | ||
run: npm install | ||
|
||
- name: config-esm-cjs | ||
working-directory: ./e2e/config-esm-cjs | ||
env: | ||
CURRENTS_API_URL: http://localhost:1234 | ||
run: > | ||
npx cypress-cloud run | ||
--record | ||
--parallel | ||
--key some-key | ||
--browser chrome | ||
--tag smoke,linux | ||
--spec "./cypress/e2e/*.spec.js" | ||
--ci-build-id "${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}}" |
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,50 @@ | ||
name: e2e-config-esm-js | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
e2e-config-esm-js: | ||
if: "!contains(toJSON(github.event.commits.*.message), '[skip ci]')" | ||
runs-on: ubuntu-latest | ||
env: | ||
DEBUG: currents:* | ||
|
||
services: | ||
director: | ||
image: agoldis/sorry-cypress-director | ||
ports: | ||
- 1234:1234 | ||
|
||
strategy: | ||
matrix: | ||
node-version: ["18"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Link monorepo packages | ||
run: npm install | ||
|
||
- name: config-esm-js | ||
working-directory: ./e2e/config-esm-js | ||
env: | ||
CURRENTS_API_URL: http://localhost:1234 | ||
run: > | ||
npx cypress-cloud run | ||
--record | ||
--parallel | ||
--key some-key | ||
--browser chrome | ||
--tag smoke,linux | ||
--spec "./cypress/e2e/*.spec.js" | ||
--ci-build-id "${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}}" |
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,50 @@ | ||
name: e2e-config-esm-mjs | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
e2e-config-esm-mjs: | ||
if: "!contains(toJSON(github.event.commits.*.message), '[skip ci]')" | ||
runs-on: ubuntu-latest | ||
env: | ||
DEBUG: currents:* | ||
|
||
services: | ||
director: | ||
image: agoldis/sorry-cypress-director | ||
ports: | ||
- 1234:1234 | ||
|
||
strategy: | ||
matrix: | ||
node-version: ["18"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Link monorepo packages | ||
run: npm install | ||
|
||
- name: config-esm-mjs | ||
working-directory: ./e2e/config-esm-mjs | ||
env: | ||
CURRENTS_API_URL: http://localhost:1234 | ||
run: > | ||
npx cypress-cloud run | ||
--record | ||
--parallel | ||
--key some-key | ||
--browser chrome | ||
--tag smoke,linux | ||
--spec "./cypress/e2e/*.spec.js" | ||
--ci-build-id "${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}}" |
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,50 @@ | ||
name: e2e-config-noesm-js | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
e2e-config-noesm-js: | ||
if: "!contains(toJSON(github.event.commits.*.message), '[skip ci]')" | ||
runs-on: ubuntu-latest | ||
env: | ||
DEBUG: currents:* | ||
|
||
services: | ||
director: | ||
image: agoldis/sorry-cypress-director | ||
ports: | ||
- 1234:1234 | ||
|
||
strategy: | ||
matrix: | ||
node-version: ["18"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Link monorepo packages | ||
run: npm install | ||
|
||
- name: config-noesm-js | ||
working-directory: ./e2e/config-noesm-js | ||
env: | ||
CURRENTS_API_URL: http://localhost:1234 | ||
run: > | ||
npx cypress-cloud run | ||
--record | ||
--parallel | ||
--key some-key | ||
--browser chrome | ||
--tag smoke,linux | ||
--spec "./cypress/e2e/*.spec.js" | ||
--ci-build-id "${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}}" |
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,12 @@ | ||
module.exports = { | ||
e2e: { | ||
batchSize: 3, // how many specs to send in one batch | ||
}, | ||
component: { | ||
batchSize: 5, // how many specs to send in one batch | ||
}, | ||
projectId: !!(process.env.GITHUB_ACTION || process.env.CIRCLE_BRANCH) | ||
? "Ij0RfK" | ||
: "1OPP8c", | ||
// cloudServiceUrl: "http://localhost:1234", | ||
}; |
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 @@ | ||
import grepPlugin from "@cypress/grep/src/plugin"; | ||
import { defineConfig } from "cypress"; | ||
import currents from "cypress-cloud/plugin"; | ||
import terminalPlugin from "cypress-terminal-report/src/installLogsPrinter"; | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
baseUrl: "https://todomvc.com/examples/vanillajs", | ||
videoUploadOnPasses: false, | ||
supportFile: "cypress/support/e2e.js", | ||
specPattern: "cypress/*/**/*.spec.js", | ||
setupNodeEvents(on, config) { | ||
grepPlugin(config); | ||
terminalPlugin(on); | ||
return currents(on, config); | ||
}, | ||
}, | ||
|
||
component: { | ||
specPattern: ["pages/__tests__/*.spec.tsx"], | ||
setupNodeEvents(on, config) { | ||
return currents(on, config); | ||
}, | ||
devServer: { | ||
framework: "next", | ||
bundler: "webpack", | ||
}, | ||
}, | ||
}); |
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 @@ | ||
// type definitions for Cypress object "cy" | ||
/// <reference types="cypress" /> | ||
|
||
describe("TodoMVC", function () { | ||
// a very simple example helpful during presentations | ||
it("adds 2 todos", function () { | ||
cy.get(".new-todo").type("learn testing{enter}").type("be cool{enter}"); | ||
cy.get(".todo-list li").should("have.length", 2); | ||
}); | ||
}); |
Oops, something went wrong.