feat: v4.0.0 ()

Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
Co-authored-by: Mathieu COSYNS <64072917+Mathieu-COSYNS@users.noreply.github.com>
This commit is contained in:
Daniel Lautzenheiser
2024-01-03 15:14:09 -05:00
committed by GitHub
parent 682576ffc4
commit 799c7e6936
732 changed files with 48477 additions and 10886 deletions
.github/workflows
.gitignore.prettierignore.prettierrccypress.config.ts
cypress
README.mdcypress.d.ts
e2e
_old
editorial_workflow_spec_bitbucket_backend.jseditorial_workflow_spec_git-gateway_github_backend.jseditorial_workflow_spec_git-gateway_gitlab_backend.jseditorial_workflow_spec_github_backend_graphql.jseditorial_workflow_spec_github_backend_graphql_open_authoring.jseditorial_workflow_spec_github_backend_rest.jseditorial_workflow_spec_github_backend_rest_open_authoring.jseditorial_workflow_spec_gitlab_backend.jseditorial_workflow_spec_proxy_git_backend.jsfield_validations_spec.jsi18n_editorial_workflow_spec_test_backend.jsi18n_simple_workflow_spec_proxy_fs_backend.jsmarkdown_widget_backspace_spec.jsmarkdown_widget_code_block_spec.jsmarkdown_widget_enter_spec.jsmarkdown_widget_hotkeys_spec.jsmarkdown_widget_link_spec.jsmarkdown_widget_list_spec.jsmarkdown_widget_marks_spec.jsmarkdown_widget_quote_spec.jsmedia_library_spec_bitbucket_backend.jsmedia_library_spec_bitbucket_backend_large_media.jsmedia_library_spec_git-gateway_github_backend_large_media.jsmedia_library_spec_git-gateway_gitlab_backend_large_media.jsmedia_library_spec_github_backend_graphql.jsmedia_library_spec_github_backend_rest.jsmedia_library_spec_gitlab_backend.jsmedia_library_spec_proxy_git_backend.jsmedia_library_spec_test_backend.jssearch_suggestion_spec.jssimple_workflow_spec_bitbucket_backend.tssimple_workflow_spec_git-gateway_github_backend.jssimple_workflow_spec_git-gateway_gitlab_backend.jssimple_workflow_spec_github_backend_graphql.jssimple_workflow_spec_github_backend_rest.jssimple_workflow_spec_gitlab_backend.jssimple_workflow_spec_proxy_fs_backend.jssimple_workflow_spec_proxy_git_backend.js
common
editorial_workflow_test_backend.spec.tssimple_workflow_test_backend.spec.tsview_filters.spec.tsview_groups.spec.ts
fixtures/media
interface.ts
plugins
run.mjs
snapshots
media_library_spec_git-gateway_backend_large_media.js
media_library_spec_github_backend_graphql.js
media_library_spec_github_backend_rest.js
media_library_spec_test_backend.js
support
utils
lerna.jsonnx.jsonpackage.json
packages
app
core
.eslintrc.jsbabel.config.js
dev-test
backends
bitbucket
git-gateway
github
gitlab
proxy
_posts
2022-11-01-something
2022-11-01-test
2022-11-02-test
config.yml
test
config.ymldata.jsindex.htmlindex.js
jest.config.jspackage.json
src
__mocks__
__tests__
actions
backend.ts
backends
bootstrap.tsx
components
App.tsxErrorBoundary.cssErrorBoundary.tsxMainView.cssMainView.tsxNotFoundPage.tsx
collections
common
entry-editor
login
media-library
navbar
snackbar
theme
workflow
constants.ts
constants
formats
index.tsinterface.ts
lib
live
locales
reducers
styles
types
valueObjects
widgets
boolean
code
colorstring
datetime
file
image
keyvalue
list
map
markdown
number
object
relation
select
string
text
uuid
test
tsconfig.base.jsonwebpack.config.js
demo
docs
tools
tailwind.base.config.jstsconfig.jsonyarn.lock

@ -0,0 +1,50 @@
import {
login,
createPostAndExit,
goToWorkflow,
goToCollections,
updateWorkflowStatus,
publishWorkflowEntry,
assertPublishedEntry,
} from '../../utils/steps';
import { workflowStatus } from '../../utils/constants';
const versions = ['2.9.7', '2.10.24'];
export default function ({ entries, getUser }) {
versions.forEach(version => {
it(`migrate from ${version} to latest`, () => {
cy.task('switchToVersion', {
version,
});
cy.reload();
login({ user: getUser() });
createPostAndExit(entries[0]);
createPostAndExit(entries[1]);
createPostAndExit(entries[2]);
goToWorkflow();
updateWorkflowStatus(entries[2], workflowStatus.draft, workflowStatus.ready);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1500); // older versions of the CMS didn't wait fully for the update to be resolved
updateWorkflowStatus(entries[1], workflowStatus.draft, workflowStatus.ready);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1500); // older versions of the CMS didn't wait fully for the update to be resolved
updateWorkflowStatus(entries[0], workflowStatus.draft, workflowStatus.ready);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1500); // older versions of the CMS didn't wait fully for the update to be resolved
cy.task('switchToVersion', {
version: 'latest',
});
cy.reload();
// allow migration code to run for 5 minutes
publishWorkflowEntry(entries[2], 5 * 60 * 1000);
publishWorkflowEntry(entries[1]);
publishWorkflowEntry(entries[0]);
goToCollections();
assertPublishedEntry([entries[2], entries[1], entries[0]]);
});
});
}