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

refactor: move to office.vue component #3600

Merged
merged 5 commits into from
Apr 23, 2024
Merged

refactor: move to office.vue component #3600

merged 5 commits into from
Apr 23, 2024

Conversation

elzody
Copy link
Contributor

@elzody elzody commented Apr 15, 2024

Summary

Removes document.js which contains legacy code and is difficult to maintain, replacing it with the Office.vue component.

This will help complete #3557

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits

@elzody elzody added enhancement New feature or request 2. developing Work in progress technical debt labels Apr 15, 2024
@elzody elzody requested a review from juliusknorr April 15, 2024 17:40
@elzody elzody self-assigned this Apr 15, 2024
@juliusknorr
Copy link
Member

The failure of direct.spec.js is expected as the full document.js was removed. This and federated editing are two other leftover cases where it is in use which are probably a bit more tricky to migrate. Let's maybe chat tomorrow about those, i need to think a bit about how we can move those over as well

@elzody elzody force-pushed the refactor-to-office-vue branch 2 times, most recently from 18d3ec7 to 408ca33 Compare April 18, 2024 18:35
Signed-off-by: Elizabeth Danzberger <[email protected]>
Signed-off-by: Elizabeth Danzberger <[email protected]>
Signed-off-by: Elizabeth Danzberger <[email protected]>
Signed-off-by: Elizabeth Danzberger <[email protected]>
@juliusknorr
Copy link
Member

@elzody I pushed a small revert for Cypress.config to Cypress.env in

We use an environment variable to pass in the collabora url for CI and therefore it was failing with just using the cypress config option:
http://github.com/nextcloud/richdocuments/blob/main/.github/workflows/cypress.yml#L17

Then the failure of the settings test also caused a failure on the other one as the collabora url has no longer been properly set

For adjusting URLs on local runs I usually just use:

CYPRESS_baseUrl=https://nextcloud.local/index.php CYPRESS_collaboraUrl=https://collabora.local npx cypress run --e2e --spec cypress/e2e/share-internal.spec.js

Comment on lines +56 to +64
cy.get('@postMessage', { timeout: 20000 }).should(spy => {
const calls = spy.getCalls()
const findMatchingCall = calls.find(call => call.args[0].indexOf('"MessageId":"App_LoadingStatus"') !== -1)
if (!findMatchingCall) {
return expect(findMatchingCall).to.not.be.undefined
}
const object = JSON.parse(findMatchingCall.args[0])
expect(object.Values).to.have.property('Status', 'Initialized')
})
Copy link
Member

Choose a reason for hiding this comment

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

We might want to move this into a cypress command that can be reused in the future. So we can assert post messages in other tests as wel. For now fine to just keep it as it is i think.

@elzody
Copy link
Contributor Author

elzody commented Apr 23, 2024

/backport to stable29

@elzody elzody merged commit fa2b1a4 into main Apr 23, 2024
55 checks passed
@delete-merged-branch delete-merged-branch bot deleted the refactor-to-office-vue branch April 23, 2024 13:02
@elzody
Copy link
Contributor Author

elzody commented Apr 23, 2024

/backport to stable28

@elzody
Copy link
Contributor Author

elzody commented Apr 23, 2024

/backport to stable27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress enhancement New feature or request technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor to use office.vue component
2 participants