cypress -> Testing duplicate plex server

This commit is contained in:
jhouse
2020-02-07 15:53:22 +09:00
parent af56ed0029
commit 239fb63673

View File

@@ -281,6 +281,103 @@ describe('Hooks', function () {
cy.get('#plexDuplicateError')
.should('not.be.visible');
});
it('Save duplicate valid Plex Server', () => {
cy.get('#address')
.clear()
.type('174.58.64.67')
.should('have.value', '174.58.64.67');
cy.get('#port')
.clear()
.type('32400')
.should('have.value', '32400');
cy.get('#plexToken')
.clear()
.type('xPUCxLh4cTz8pcgorQQs')
.should('have.value', 'xPUCxLh4cTz8pcgorQQs');
cy.get('#addPlexServer')
.click();
cy.get('#plexSpinner')
.should('not.be.visible');
cy.get('#plexTestError')
.should('not.be.visible');
cy.get('#plexTestSuccess')
.should('not.be.visible');
cy.get('#plexSaveError')
.should('not.be.visible');
cy.get('#plexSaveSuccess')
.should('be.visible');
cy.get('#plexDeleteError')
.should('not.be.visible');
cy.get('#plexDeleteSuccess')
.should('not.be.visible');
cy.get('#plexDuplicateError')
.should('not.be.visible');
//Define card here
cy.get('.card-header')
.should('have.text', 'KnoxServer');
cy.get('.list-group > :nth-child(1)')
.should('have.text', 'Disney Classic Movies');
cy.get('.list-group > :nth-child(2)')
.should('have.text', 'Movies');
cy.get('#address')
.clear()
.type('174.58.64.67')
.should('have.value', '174.58.64.67');
cy.get('#port')
.clear()
.type('32400')
.should('have.value', '32400');
cy.get('#plexToken')
.clear()
.type('xPUCxLh4cTz8pcgorQQs')
.should('have.value', 'xPUCxLh4cTz8pcgorQQs');
cy.get('#addPlexServer')
.click();
cy.get('#plexSpinner')
.should('not.be.visible');
cy.get('#plexTestError')
.should('not.be.visible');
cy.get('#plexTestSuccess')
.should('not.be.visible');
cy.get('#plexSaveError')
.should('not.be.visible');
cy.get('#plexSaveSuccess')
.should('not.be.visible');
cy.get('#plexDeleteError')
.should('not.be.visible');
cy.get('#plexDeleteSuccess')
.should('not.be.visible');
cy.get('#plexDuplicateError')
.should('be.visible');
});
});