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

[wip] feat: welcome typescript and cypress in docker #4237

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

skjnldsv
Copy link
Member

@skjnldsv skjnldsv commented Jun 2, 2023

Ongoing effort, some adjustments might be needed 😉

Please take over Text team! 🚀

@cypress
Copy link

cypress bot commented Jun 2, 2023

51 failed and 1 flaky tests on run #10778 ↗︎

51 35 0 24 Flakiness 1

Details:

[wip] feat: welcome typescript and cypress in docker
Project: Text Commit: 7cd1ae4b4f
Status: Errored Duration: 07:27 💡
Started: Jun 29, 2023 10:44 AM Ended: Jun 29, 2023 10:52 AM
Failed  share.cy.js • 2 failed tests

View Output Video

Test Artifacts
Open test.md in viewer > Shares a folder as a public read only link Output Screenshots
Open test.md in viewer > Share a file with download disabled shows an error Output Screenshots
Failed  attachments.cy.js • 8 failed tests

View Output Video

Test Artifacts
Test all attachment insertion methods > Insert an image file from Files Output Screenshots
Test all attachment insertion methods > Upload a local image file (table.png) Output Screenshots
Test all attachment insertion methods > Upload a local media file (file.txt.gz) Output Screenshots
Test all attachment insertion methods > Upload image files with the same name Output Screenshots
Test all attachment insertion methods > test if attachment files are in the attachment folder Output Screenshots
Test all attachment insertion methods > test if attachment folder is moved with the markdown file Output Screenshots
Test all attachment insertion methods > test if attachment folder is copied when copying a markdown file Output Screenshots
Test all attachment insertion methods > [share] check everything behaves correctly on the share target user side Output Screenshots
Failed  nodes/Links.cy.js • 7 failed tests

View Output Video

Test Artifacts
test link marks > link preview > shows a link preview Output Screenshots
test link marks > link preview > does not show a link preview for links within a paragraph Output Screenshots
test link marks > autolink > with protocol to files app and fileId Output Screenshots
test link marks > autolink > with protocol and fileId Output Screenshots
test link marks > autolink > without protocol Output Screenshots
test link marks > autolink > with protocol but without space Output Screenshots
... > Link website without selection Output Screenshots
Failed  workspace.cy.js • 3 failed tests

View Output Video

Test Artifacts
Workspace > relative folder links Output Screenshots
Workspace > localize > takes localized file name into account Output Screenshots
Workspace > localize > ignores localized file name in other language Output Screenshots
Failed  nodes/Mentions.cy.js • 3 failed tests

View Output Video

Test Artifacts
Test mentioning users > Type @ and see the user list Output Screenshots
Test mentioning users > Select a user will insert the mention Output Screenshots
Test mentioning users > Open a document with an existing mention and properly see the user bubble rendered Output Screenshots

The first 5 failed specs are shown, see all 14 specs in Cypress Cloud.

Flakiness  cypress/e2e/mobile.cy.js • 1 flaky test

View Output Video

Test Artifacts
Mobile actions > formatting modal help Output Screenshots

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@max-nextcloud
Copy link
Collaborator

Thanks a lot for looking into this @skjnldsv !


// Before the browser launches
// starting Nextcloud testing container
return startNextcloud(process.env.BRANCH)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have an option to still run this towards a local instance for easier debugging. And the currently used docker image doesn't come with arm architecture support.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we support arm officially?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends on what you mean with supporting, at least community has high demand with single board computers.

Also this would block developers on apple arm chips from running the tests in a reasonable time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least providing a way to just pass CYPRESS_baseUrl as an environment variable and then not setup docker would be nice, but I can look into that part :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I'm guessing the current behaviour also breaks on windows.
I think it's an interesting topic, but I don't think it's worth spending more time on it. 🙈

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Hephi2 had problems running the server tests on windows as well with WSL+Docker. Let's go for the manual URL approach then as a fallback/workaround which should be easy to add

await runExec(container, ['php', 'occ', 'config:system:set', 'force_language', '--value', 'en'], true)
await runExec(container, ['php', 'occ', 'config:system:set', 'default_locale', '--value', 'en_US'], true)
await runExec(container, ['php', 'occ', 'config:system:set', 'force_locale', '--value', 'en_US'], true)
await runExec(container, ['php', 'occ', 'config:system:set', 'enforce_theme', '--value', 'light'], true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally also have "memcache.local"=>"\OC\Memcache\APCu","hashing_default_password"=>true for faster runs

skjnldsv and others added 5 commits June 29, 2023 12:34
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants