Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #339 from serlo/update-readme-and-fix-cypress-tests
Browse files Browse the repository at this point in the history
Update readme and fix cypress tests
  • Loading branch information
LarsTheGlidingSquirrel authored Feb 20, 2024
2 parents e63cf30 + 4fc2087 commit 99d15ad
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 25 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ development. The most important ones are:
1. A mock of edu-sharing: Listens on port 8100 and launches & redirects to the
Serlo editor using LTI
2. The Serlo editor: Listens on port 3000
- `yarn docker:build` & `yarn docker:run`: Build and run the docker container.
Opening `localhost:3000` in the browser should show the Serlo editor.
- `yarn e2e:docker-build`: Build the docker container and run cypress e2e tests.
IMPORTANT: Uncomment test in `editor.cy.ts` first. Confirm this runs without
errors before merging into `main`. Cypress tests are temporarily disabled in
the Github workflows because they were flaky in the CI pipeline and kept
failing.
IMPORTANT: Uncomment test in `editor.cy.ts` first. Cypress tests are
temporarily disabled in the Github workflows because they were flaky in the CI
pipeline and kept failing.
- `yarn test`: Run all jest tests.
- `yarn lint`: Run all lints (eslint, prettier, ...).
- `yarn format`: Format all source code.
Expand All @@ -39,8 +40,8 @@ url to preview also the no-edit view.

Use repo
[https://github.com/serlo/serlo-edusharing-integration/](https://github.com/serlo/serlo-edusharing-integration/)
to test the integration with a full instance of edu-sharing instead of just a
mock.
to test the integration with a local instance of edu-sharing instead of just a
mock. However, this version of edu-sharing is pretty outdated at this point.

## Usage perspective

Expand Down Expand Up @@ -146,9 +147,11 @@ docker container works internally.
Merging changes into branch `main` triggers a new release under the tag `main`.
The `main` tag should only be used for development.

Pushing a git tag like `v1.2.3` (need to be in this form) to any branch triggers
a new release under the specified version tag. These releases can then be
consumed by edu-sharing. Remember to update the version in package.json as well.
Creating a git tag (`git tag -a v1.2.3 -m "Version 1.2.3"`) and pushing the tag
to any branch (`git push origin v1.2.3`) triggers a new release under the
specified version tag. It needs to be in the form `v[x].[y].[z]`. You can push
the tag to `main`. These releases can then be consumed by edu-sharing. Remember
to update the version in package.json as well.

Version numbering should follow
[Semantic Versioning](https://semver.org/lang/de/spec/v2.0.0.html).
Expand Down
17 changes: 3 additions & 14 deletions cypress/e2e/editor.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,6 @@
// cy.wait(6000)
// expectSavedVersionWithComment(null)
// })

// it('The editor does not save automatically when there are no changes', () => {
// openSerloEditorWithLTI()

// expectEditorOpenedSuccessfully()

// // Wait 8 seconds -> Autosave is set to be done all 5 seconds
// cy.wait(8000)
// cy.task('getSavedVersionsInEdusharing').then((savedVersions) => {
// expect(savedVersions).to.be.an('array').that.has.lengthOf(0)
// })
// })
// })

// it('Saved versions can be opened again', () => {
Expand Down Expand Up @@ -126,13 +114,14 @@

// embedEdusharingAsset()

// cy.contains('Inhalt von edu-sharing')
// cy.get('img[title="Testbild"]').should('be.visible')
// // cy.contains('Inhalt von edu-sharing')
// })

// function embedEdusharingAsset() {
// cy.get('.add-trigger').eq(1).click()
// cy.contains('Edu-sharing Inhalt').click()
// cy.get('[data-testid="edusharing-plugin-button"]:first').click()
// cy.get('[data-qa="plugin-edusharing-select-content-button"]:first').click()
// // TODO: Find a way around this wait
// cy.wait(6000)
// }
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/plugins/edusharing-asset/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function EdusharingAssetEditor({
<button
onClick={() => setModalIsOpen(true)}
className="mr-2 rounded-md border border-gray-500 px-1 text-sm transition-all hover:bg-editor-primary-200 focus-visible:bg-editor-primary-200"
data-qa="plugin-edusharing-bigger-button"
data-qa="plugin-edusharing-select-content-button"
>
Inhalt wählen
</button>
Expand All @@ -89,7 +89,7 @@ export function EdusharingAssetEditor({
}
}}
className="mr-2 rounded-md border border-gray-500 px-1 text-sm transition-all hover:bg-editor-primary-200 focus-visible:bg-editor-primary-200"
data-qa="plugin-edusharing-bigger-button"
data-qa="plugin-edusharing-change-size-button"
>
Größe verändern
</button>
Expand Down

0 comments on commit 99d15ad

Please sign in to comment.