-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
3 changed files
with
143 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/// <reference types="Cypress" /> | ||
|
||
// test suite | ||
describe('Astar page', () => { | ||
beforeEach(()=>{ | ||
cy.visit('https://jxr98.github.io/AlgoVisualizer/') | ||
cy.get('#graphNav > .nav-link').click(); | ||
cy.get(':nth-child(4) > .dropdown-item').click(); | ||
}) | ||
|
||
/* ==== Test Created with Cypress Studio ==== */ | ||
it('no obstacle search', function() { | ||
/* ==== Generated with Cypress Studio ==== */ | ||
cy.get('#srcX').clear('0'); | ||
cy.get('#srcX').type('0'); | ||
cy.get('#srcY').clear('0'); | ||
cy.get('#srcY').type('0'); | ||
cy.get('#dstX').clear('7'); | ||
cy.get('#dstX').type('7'); | ||
cy.get('#dstY').clear('7'); | ||
cy.get('#dstY').type('7'); | ||
cy.get('#start-button').click(); | ||
/* ==== End Cypress Studio ==== */ | ||
}); | ||
|
||
/* ==== Test Created with Cypress Studio ==== */ | ||
it('error input', function() { | ||
/* ==== Generated with Cypress Studio ==== */ | ||
cy.get('#start-button').click(); | ||
cy.get('#srcXFeedback').should('have.text', 'Empty input'); | ||
cy.get('#dstXFeedback').should('have.text', 'Empty input'); | ||
cy.get('#srcYFeedback').should('have.text', 'Empty input'); | ||
cy.get('#dstYFeedback').should('have.text', 'Empty input'); | ||
cy.get('#srcX').clear('-4'); | ||
cy.get('#srcX').type('-4'); | ||
cy.get('#start-button').click(); | ||
cy.get('#srcY').clear('-6'); | ||
cy.get('#srcY').type('-6'); | ||
cy.get('#start-button').click(); | ||
cy.get('#srcXFeedback').should('have.text', 'invalid x value'); | ||
cy.get('#srcYFeedback').should('have.text', 'invalid y value'); | ||
/* ==== End Cypress Studio ==== */ | ||
}); | ||
|
||
/* ==== Test Created with Cypress Studio ==== */ | ||
it('input on obstacle', function() { | ||
/* ==== Generated with Cypress Studio ==== */ | ||
cy.get('#c0').click(); | ||
cy.get('#srcX').clear('0'); | ||
cy.get('#srcX').type('0'); | ||
cy.get('#srcY').clear('0'); | ||
cy.get('#srcY').type('0'); | ||
cy.get('#start-button').click(); | ||
cy.get('#srcXFeedback').should('have.text', 'coordinate occupied by obstacle'); | ||
/* ==== End Cypress Studio ==== */ | ||
}); | ||
}) | ||
|
||
|
||
|
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,51 @@ | ||
/// <reference types="Cypress" /> | ||
|
||
// test suite | ||
describe('heap page', () => { | ||
beforeEach(()=>{ | ||
cy.visit('https://jxr98.github.io/AlgoVisualizer/') | ||
cy.get('#treeNav > .nav-link').click(); | ||
cy.get('#treeNav > .dropdown-menu > li > .dropdown-item').click(); | ||
}) | ||
|
||
|
||
it('maxheap', function() { | ||
/* ==== Generated with Cypress Studio ==== */ | ||
cy.get('#message-box').click(); | ||
cy.get('#create-tree > h2').click(); | ||
cy.get('#max-heap').click(); | ||
/* ==== End Cypress Studio ==== */ | ||
/* ==== Generated with Cypress Studio ==== */ | ||
cy.get('#message-box').click(); | ||
cy.get('#create-tree > h2').click(); | ||
cy.get('#max-heap').click(); | ||
/* ==== End Cypress Studio ==== */ | ||
}); | ||
|
||
/* ==== Test Created with Cypress Studio ==== */ | ||
it('empty input', function() { | ||
/* ==== Generated with Cypress Studio ==== */ | ||
cy.get('#max-heap').click(); | ||
cy.get('#logPanel').should('have.value', '// Logs:\nplease check input data'); | ||
/* ==== End Cypress Studio ==== */ | ||
}); | ||
|
||
/* ==== Test Created with Cypress Studio ==== */ | ||
it('bad input', function() { | ||
/* ==== Generated with Cypress Studio ==== */ | ||
cy.get('#message-box').click(); | ||
cy.get('#min-heap').click(); | ||
cy.get('#logPanel').should('have.value', '// Logs:\nplease check input data'); | ||
/* ==== End Cypress Studio ==== */ | ||
}); | ||
|
||
/* ==== Test Created with Cypress Studio ==== */ | ||
it('reset', function() { | ||
/* ==== Generated with Cypress Studio ==== */ | ||
cy.get('#reset-button').click(); | ||
/* ==== End Cypress Studio ==== */ | ||
}); | ||
}) | ||
|
||
|
||
|
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,32 @@ | ||
/// <reference types="Cypress" /> | ||
|
||
// test suite | ||
describe('sort page', () => { | ||
beforeEach(()=>{ | ||
cy.visit('https://jxr98.github.io/AlgoVisualizer/') | ||
cy.get('#sortingNav > .nav-link').click(); | ||
cy.get('#sortingNav > .dropdown-menu > li > .dropdown-item').click(); | ||
}) | ||
|
||
/* ==== Test Created with Cypress Studio ==== */ | ||
it('speed ctrl', function() { | ||
/* ==== Generated with Cypress Studio ==== */ | ||
cy.get('#speedCtrl').click(); | ||
cy.get('#speedDisplay').should('have.text', '300ms'); | ||
/* ==== End Cypress Studio ==== */ | ||
}); | ||
|
||
/* ==== Test Created with Cypress Studio ==== */ | ||
it('error input', function() { | ||
/* ==== Generated with Cypress Studio ==== */ | ||
cy.get('#insertionSortArrayInput').clear('-'); | ||
cy.get('#insertionSortArrayInput').type('-'); | ||
cy.get('#panelsStayOpen-collapseOne > .accordion-body > h2').click(); | ||
cy.get('#insertionSortArrayInputFeedback').should('have.text', '\n comma delimited integers only\n '); | ||
/* ==== End Cypress Studio ==== */ | ||
}); | ||
|
||
}) | ||
|
||
|
||
|