test(ui-truncate-text): migrate old TruncateText tests#1851
Conversation
c230996 to
29990d2
Compare
|
|
|
||
| it('should preserve node structure', async () => { | ||
| cy.mount( | ||
| <div style={{ ...baseStyle, width: '200px' }} data-testid="container"> |
There was a problem hiding this comment.
data-testid is not used anywhere, so it might be removed
There was a problem hiding this comment.
data-testid removed from where it was not used, and i also modified the style overwrite methods
| expect(stage!.childNodes[1].nodeType).to.equal(1) | ||
| expect(stage!.childNodes[2].nodeType).to.equal(3) | ||
| expect(stage!.children.length).to.equal(2) | ||
| expect(stage!.nodeName).to.equal('P') |
There was a problem hiding this comment.
This p tag check is missing from the new test
There was a problem hiding this comment.
Thanks for the catch. P tag check added.
|
|
||
| cy.get('#stage').then(($stage) => { |
There was a problem hiding this comment.
Fontsize test might be needed too.
There was a problem hiding this comment.
not a bad idea but probably out of scope for this PR (unless there is an old fontsize test somewhere that I'm missing)
There was a problem hiding this comment.
I added a new test case to check the effect of the font size
balzss
left a comment
There was a problem hiding this comment.
please check Tamas' comments, I've added my input there too. Otherwise looks good
29990d2 to
da63280
Compare
da63280 to
546893f
Compare
No description provided.