Skip to content

Commit 99f7e6a

Browse files
authored
Merge pull request #3988 from nextcloud/backport/3972/stable26
[stable26] Conflict fixes
2 parents e6efe28 + 351cee2 commit 99f7e6a

20 files changed

+157
-64
lines changed

β€Žcypress/e2e/conflict.spec.jsβ€Ž

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,81 @@ describe('Open test.md in viewer', function() {
6060
.should('contain', 'cruel conflicting')
6161
cy.screenshot()
6262
})
63+
64+
it('resolves conflict using current editing session', function() {
65+
cy.openFile(fileName)
66+
67+
cy.log('Inspect editor')
68+
cy.getContent()
69+
.type('Hello you cruel conflicting world')
70+
cy.uploadFile('test.md', 'text/markdown')
71+
72+
cy.get('#viewer .modal-header button.header-close').click()
73+
cy.get('#viewer').should('not.exist')
74+
cy.openFile('test.md')
75+
cy.get('.text-editor .document-status .icon-error')
76+
getWrapper()
77+
.get('#read-only-editor h2')
78+
.should('contain', 'Hello world')
79+
getWrapper()
80+
.get('.text-editor__main h2')
81+
.should('contain', 'Hello world')
82+
getWrapper()
83+
.get('.text-editor__main')
84+
.should('contain', 'cruel conflicting')
85+
86+
cy.get('[data-cy="resolveThisVersion"]').click()
87+
88+
getWrapper()
89+
.get('#read-only-editor')
90+
.should('not.exist')
91+
92+
cy.get('[data-cy="resolveThisVersion"]')
93+
.should('not.exist')
94+
95+
cy.get('.text-editor__main h2')
96+
.should('contain', 'Hello world')
97+
cy.get('.text-editor__main')
98+
.should('contain', 'cruel conflicting')
99+
})
100+
101+
it('resolves conflict using server version', function() {
102+
cy.openFile(fileName)
103+
104+
cy.log('Inspect editor')
105+
cy.getContent()
106+
.type('Hello you cruel conflicting world')
107+
cy.uploadFile('test.md', 'text/markdown')
108+
109+
cy.get('#viewer .modal-header button.header-close').click()
110+
cy.get('#viewer').should('not.exist')
111+
cy.openFile('test.md')
112+
cy.get('.text-editor .document-status .icon-error')
113+
getWrapper()
114+
.get('#read-only-editor h2')
115+
.should('contain', 'Hello world')
116+
getWrapper()
117+
.get('.text-editor__main h2')
118+
.should('contain', 'Hello world')
119+
getWrapper()
120+
.get('.text-editor__main')
121+
.should('contain', 'cruel conflicting')
122+
123+
getWrapper()
124+
.get('[data-cy="resolveServerVersion"]')
125+
.click()
126+
127+
getWrapper()
128+
.get('#read-only-editor')
129+
.should('not.exist')
130+
cy.get('[data-cy="resolveThisVersion"]')
131+
.should('not.exist')
132+
cy.get('[data-cy="resolveServerVersion"]')
133+
.should('not.exist')
134+
135+
cy.get('.text-editor__main h2')
136+
.should('contain', 'Hello world')
137+
cy.get('.text-editor__main')
138+
.should('not.contain', 'cruel conflicting')
139+
})
63140
})

β€Žjs/editor.jsβ€Ž

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žjs/editor.js.mapβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žjs/files-modal.jsβ€Ž

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žjs/files-modal.js.mapβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žjs/text-editors.jsβ€Ž

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žjs/text-editors.js.mapβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žjs/text-files.jsβ€Ž

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žjs/text-files.js.mapβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žjs/text-public.jsβ€Ž

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)