Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- **πŸ’Ύ Open format:** Files are saved as [Markdown](https://en.wikipedia.org/wiki/Markdown), so you can edit them from any other text app too.
- **✊ Strong foundation:** We use [🐈 tiptap](https://tiptap.scrumpy.io) which is based on [πŸ¦‰ ProseMirror](https://prosemirror.net) – huge thanks to them!
]]></description>
<version>7.0.0-dev.2</version>
<version>7.0.0-dev.3</version>
<licence>agpl</licence>
<author mail="[email protected]">Julius HΓ€rtl</author>
<namespace>Text</namespace>
Expand Down
32 changes: 8 additions & 24 deletions cypress/e2e/nodes/Table.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,6 @@ describe('table plugin', () => {
cy.getContent().should('not.contain', 'content')
})

it('Enter creates newline and navigates', () => {
cy.getActionEntry('table').click()

cy.getContent().find('table tr').should('have.length', 3)

cy.getContent().type('first{Enter}row')
cy.getContent().type('{Enter}{Enter}second row')
cy.getContent().type('{Enter}{Enter}third row')
cy.getContent().type('{Enter}{Enter}forth row')

// Added a row
cy.getContent().find('table tr').should('have.length', 4)

// First cell now contains a hard break
cy.getContent()
.find('table tr:first-child th:first-child br')
.should('exist')
})

it('Table column alignment', () => {
cy.getActionEntry('table').click()

Expand Down Expand Up @@ -111,7 +92,12 @@ describe('table plugin', () => {
.should('have.length', 2)
.each((td) => cy.wrap(td).should('have.css', 'text-align', 'center'))

cy.getContent().type('1{enter}{enter}2{enter}{enter}3{enter}{enter}new 4')
// Fill first cell in existing rows
cy.getContent().type('1{downArrow}2{downArrow}3{downArrow}')

// Add row and fill first cell
cy.getContent().find('.table-wrapper .table-add-row').click()
cy.getContent().find('table tr:last-child td:first-child').type('4')

// Test after the row was added
cy.getContent()
Expand All @@ -121,20 +107,18 @@ describe('table plugin', () => {
})

it('Creates table and add multilines', function () {
const multilinesContent = 'Line 1\nLine 2\nLine 3'

cy.getActionEntry('table').click()
cy.getContent()
.find('table:nth-of-type(1) tr:nth-child(2) td:nth-child(1)')
.click()

cy.getContent().type(multilinesContent)
cy.getContent().type('Line 1\nLine 2\nLine 3')

cy.getContent()
.find('table:nth-of-type(1) tr:nth-child(2) td:nth-child(1) .content')
.then(($el) => {
expect($el.get(0).innerHTML).to.equal(
multilinesContent.replace(/\n/g, '<br>'),
'<p dir="ltr">Line 1</p><p dir="ltr">Line 2</p><p dir="ltr">Line 3</p>',
)
})
})
Expand Down
5 changes: 3 additions & 2 deletions lib/Migration/ResetSessionsBeforeYjs.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;

class ResetSessionsBeforeYjs implements IRepairStep {
readonly class ResetSessionsBeforeYjs implements IRepairStep {
public function __construct(
private IAppConfig $config,
private DocumentService $documentService,
Expand All @@ -29,7 +29,8 @@ public function getName(): string {
public function run(IOutput $output): void {
$appVersion = $this->config->getValueString('text', 'installed_version');

if (!$appVersion || version_compare($appVersion, '7.0.0-dev.2') !== -1) {
// Run only if installed version ($appVersion) is lower than specified
if (!$appVersion || version_compare($appVersion, '7.0.0-dev.3') !== -1) {
return;
}

Expand Down
Loading
Loading