mirror of
https://github.com/JasonHHouse/gaps.git
synced 2026-02-09 12:18:51 -06:00
cypress -> tests for /libraries
This commit is contained in:
@@ -53,10 +53,7 @@
|
||||
|
||||
<div class="dropdown show">
|
||||
<a aria-expanded="false" aria-haspopup="true" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"
|
||||
href="#"
|
||||
id="dropdownMenuLink" role="button">
|
||||
Libraries
|
||||
</a>
|
||||
href="#" id="dropdownMenuLink" role="button">Libraries</a>
|
||||
|
||||
<div aria-labelledby="dropdownMenuLink" class="dropdown-menu">
|
||||
<div th:each="instance : ${plexServers}" th:remove="tag">
|
||||
|
||||
38
cypress/integration/libraries/empty.js
Normal file
38
cypress/integration/libraries/empty.js
Normal file
@@ -0,0 +1,38 @@
|
||||
let appHasStarted;
|
||||
|
||||
function spyOnAddEventListener(win) {
|
||||
// win = window object in our application
|
||||
const addListener = win.EventTarget.prototype.addEventListener
|
||||
win.EventTarget.prototype.addEventListener = function (name) {
|
||||
if (name === 'change') {
|
||||
// web app added an event listener to the input box -
|
||||
// that means the web application has started
|
||||
appHasStarted = true
|
||||
// restore the original event listener
|
||||
win.EventTarget.prototype.addEventListener = addListener
|
||||
}
|
||||
return addListener.apply(this, arguments)
|
||||
}
|
||||
}
|
||||
|
||||
describe('Not Searched Yet Library Tests', function () {
|
||||
it('Clean configuration page load', () => {
|
||||
cy.visit('/libraries', {onBeforeLoad: spyOnAddEventListener});
|
||||
|
||||
//Switch to contains
|
||||
/*cy.get('#libraryTitle')
|
||||
.should('have.text', 'KnoxServer - Movies');*/
|
||||
|
||||
cy.get('#dropdownMenuLink')
|
||||
.should('have.text', 'Libraries');
|
||||
|
||||
cy.get('[data-key="1"]')
|
||||
.should('have.text', 'KnoxServer - Movies');
|
||||
|
||||
cy.get('[data-key="2"]')
|
||||
.should('have.text', 'KnoxServer - Disney Classic Movies');
|
||||
|
||||
cy.get('.card-img-top')
|
||||
.should('be.visible');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user