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

test(cypress): upgrade cypress to v10 and migrate to ts #991

Merged
merged 31 commits into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6d6cb2f
chore(package): update cypress
seaerchin Jul 21, 2022
6062f37
chore(cypress): removed unused plugins index file
seaerchin Jul 21, 2022
8b2036d
chore(cypress): ran automatic migration tool
seaerchin Jul 21, 2022
6daee50
chore(cypress.config): update cypress config
seaerchin Jul 21, 2022
47d6ca3
chore(cypress): add support for component testing
seaerchin Jul 21, 2022
7e81303
chore(editpage): migrate to ts
seaerchin Jul 21, 2022
b4141d7
refactor(cypress commands): shift to ts
seaerchin Jul 21, 2022
5920eff
chore(waitfordom): remove waitfordom and related files
seaerchin Jul 21, 2022
12d1db8
refactor(files.spec): migrate to ts
seaerchin Jul 21, 2022
2941e95
refactor(folders): migrate to ts
seaerchin Jul 21, 2022
24c99b6
refactor(homepage.spec): migrate to ts
seaerchin Jul 21, 2022
ea2a172
refactor(images.spec): migrate to ts
seaerchin Jul 21, 2022
8e40a36
refactor(move.spec): migrate to ts
seaerchin Jul 21, 2022
5e22843
chore(support/index.d.ts): remove outdated function declartation
seaerchin Jul 21, 2022
83fabf4
refactor(resourceacategory): migrate to ts
seaerchin Jul 21, 2022
afbe38f
refactor(resources.spec): migrate to ts
seaerchin Jul 21, 2022
2e98804
refactor(settings.spec): migrate custom commands to own file and migr…
seaerchin Jul 21, 2022
1975277
feat(cypress.config): shift to transpiling ts
seaerchin Jul 21, 2022
651fb4c
refactor(cypress): migrate remaining specs from js to ts and add allo…
seaerchin Jul 21, 2022
1d65946
docs(cypress/support): shift JSDocs for commands to index.d.ts so TS …
seaerchin Jul 21, 2022
e2a3899
refactor(legacy): shift utils to utils/ and renamed it legacy to avoi…
seaerchin Aug 1, 2022
5f0cba2
build(cypress/tsconfig): update cypress tsconfig to point to the base…
seaerchin Aug 1, 2022
6cb88f5
chore(cypress/e2e): shorten imports
seaerchin Aug 1, 2022
030fe2e
chore(toasts): change to ts from jsx
seaerchin Aug 1, 2022
da35f19
chore(utils): split some util functions into scoped file
seaerchin Aug 1, 2022
439ec09
chore(utils/index): add index
seaerchin Aug 1, 2022
f92768e
fix(api): change import to avoid dep cycle
seaerchin Aug 1, 2022
a052cac
fix(leftnavgeneration): change export to deslugifyDirectory
seaerchin Aug 1, 2022
672db3e
fix(validators): fixed deps cycle
seaerchin Aug 1, 2022
575f14e
fix(jest.config): specify setup files to enable mockign for testdecoder
seaerchin Aug 1, 2022
261fc5f
fix(context-menu): update context menu styling to fix UI breakage (#998)
seaerchin Aug 15, 2022
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
5 changes: 5 additions & 0 deletions .github/workflows/ci-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ jobs:
USERNAME: ${{secrets.USERNAME}}
PERSONAL_ACCESS_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}}
E2E_COMMIT_HASH: ${{secrets.E2E_COMMIT_HASH}}
# overwrite commit message sent to Dashboard
COMMIT_INFO_MESSAGE: ${{github.event.pull_request.title}}
# re-enable PR comment bot
COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha}}

steps:
- uses: actions/checkout@v2
- name: Use Node.js
Expand Down
34 changes: 34 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { defineConfig } from "cypress"

export default defineConfig({
chromeWebSecurity: false,
viewportHeight: 768,
viewportWidth: 1366,
projectId: "nxbty1",

// NOTE: Cypress keeps 50 tests in memory by default;
// Unfortunately, this leads to OOM issues occasionally.
// This has been reduced to 5 to help with the OOM issues.
// Refer here: https://docs.cypress.io/guides/references/configuration#Global for details.
numTestsKeptInMemory: 5,

e2e: {
specPattern: "cypress/e2e/**/*.{js,jsx,ts,tsx}",
setupNodeEvents: (on, config) => {
// NOTE: Disabling as cypress docs give this form
// Refer here: https://docs.cypress.io/api/plugins/configuration-api#Usage
// eslint-disable-next-line no-param-reassign
config.baseUrl = process.env.CYPRESS_BASEURL || ""

// IMPORTANT return the updated config object
return config
},
},

component: {
devServer: {
framework: "create-react-app",
bundler: "webpack",
},
},
})
6 changes: 0 additions & 6 deletions cypress.json

This file was deleted.

Loading