mirror of
https://github.com/JasonHHouse/gaps.git
synced 2026-02-09 04:08:41 -06:00
Adding more tests to libraries
Fixed bug when switching libs
This commit is contained in:
@@ -15,7 +15,7 @@ export function getMoviesForTable(url, movieContainer, noMovieContainer, moviesT
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
success: function (result) {
|
||||
if (result.code = 40) {
|
||||
if (result.code === 40) {
|
||||
movieContainer.show(100);
|
||||
noMovieContainer.css({'display': 'none'});
|
||||
moviesTable.rows.add(result.extras).draw();
|
||||
|
||||
@@ -13,9 +13,15 @@ describe('Find owned movies', function () {
|
||||
cy.get('.card-body > .btn')
|
||||
.click();
|
||||
|
||||
cy.get(':nth-child(1) > .sorting_1 > .card > .row > .col-md-10 > .card-body > .card-title')
|
||||
.should('have.text', '101 Dalmatians II Patch\'s London Adventure (2003)');
|
||||
cy.get('label > input')
|
||||
.clear()
|
||||
.type('101 Dalmatians');
|
||||
|
||||
cy.get('.col-md-10 > .card-body > .card-title')
|
||||
.should('have.text', '101 Dalmatians II Patch\'s London Adventure (2003)');
|
||||
});
|
||||
|
||||
it('Refresh Disney Movies', () => {
|
||||
cy.get('#dropdownMenuLink')
|
||||
.click();
|
||||
|
||||
@@ -27,5 +33,23 @@ describe('Find owned movies', function () {
|
||||
|
||||
cy.get('[data-key="2"]')
|
||||
.click();
|
||||
|
||||
cy.get('label > input')
|
||||
.clear()
|
||||
.type('101 Dalmatians');
|
||||
|
||||
cy.get('.col-md-10 > .card-body > .card-title')
|
||||
.should('have.text', '101 Dalmatians II Patch\'s London Adventure (2003)');
|
||||
});
|
||||
|
||||
it('Regular Movies Empty', () => {
|
||||
cy.get('#dropdownMenuLink')
|
||||
.click();
|
||||
|
||||
cy.get('[data-key="1"]')
|
||||
.click();
|
||||
|
||||
cy.get('.card-body > .btn')
|
||||
.should('be.visible');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"main": "/",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"cypress": "^4.0.0"
|
||||
"cypress": "^4.0.1"
|
||||
},
|
||||
"scripts": {
|
||||
"e2e": "cypress open"
|
||||
|
||||
Reference in New Issue
Block a user