Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0df0419
commit 03ef37f
Showing
2 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
describe('Annotations', () => { | ||
it('add annotation flow works as expected', () => { | ||
cy.visit('/').wait(3000); | ||
|
||
cy.findByTestId('timeline-single').click(); | ||
|
||
cy.get('li[role=menuitem]').contains('Add annotation').click(); | ||
|
||
const content = 'this is annotation content'; | ||
let time; | ||
|
||
cy.get('form#annotation-form') | ||
.findByTestId('annotation_timestamp_input') | ||
.invoke('val') | ||
.then((sometext) => (time = sometext)); | ||
|
||
cy.get('form#annotation-form') | ||
.findByTestId('annotation_content_input') | ||
.type(content); | ||
|
||
cy.get('button[form=annotation-form]').click(); | ||
|
||
cy.findByTestId('annotation_mark_wrapper').click(); | ||
|
||
cy.get('form#annotation-form') | ||
.findByTestId('annotation_content_input') | ||
.should('have.value', content); | ||
|
||
cy.get('form#annotation-form') | ||
.findByTestId('annotation_timestamp_input') | ||
.invoke('val') | ||
.then((sometext2) => assert.isTrue(sometext2 === time)); | ||
|
||
cy.get('button[form=annotation-form]').contains('Close').click(); | ||
|
||
cy.get('form#annotation-form').should('not.exist'); | ||
}); | ||
}); |