Skip to content

Commit

Permalink
Action Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed May 23, 2021
1 parent 5190ea0 commit a60167e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
19 changes: 19 additions & 0 deletions cypress/integration/actions.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
describe('Check actions', () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.visit('/edit');
cy.contains('Actions').click();
});
it('should update markdown code', () => {
cy.get('#markdown')
.invoke('val')
.then((oldText) => {
cy.get('#editor').click('bottom').type('{enter}C --> HistoryTest');
cy.get('#markdown')
.invoke('val')
.then((newText) => {
expect(oldText).to.not.eq(newText);
});
});
});
});
13 changes: 13 additions & 0 deletions cypress/integration/sampleDiagram.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
describe('Load sample diagrams', () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.visit('/edit');
});
it('should load new diagram clicked', () => {
cy.contains('Sample Diagrams').click();
cy.contains('Pie Chart').click();
cy.contains('pie title Pets adopted by volunteers');
cy.contains('Class Diagram').click();
cy.contains('classDiagram');
});
});

0 comments on commit a60167e

Please sign in to comment.