Adding more tests to libraries

Fixed bug when switching libs
This commit is contained in:
jhouse
2020-02-12 15:32:46 +09:00
parent f898008069
commit c84ee5e409
3 changed files with 28 additions and 4 deletions

View File

@@ -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();

View File

@@ -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');
});
});

View File

@@ -5,7 +5,7 @@
"main": "/",
"dependencies": {},
"devDependencies": {
"cypress": "^4.0.0"
"cypress": "^4.0.1"
},
"scripts": {
"e2e": "cypress open"