mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-14 19:14:39 -04:00
* Install Cypress * Fix npm vulnerabilities * scaffold cypress * ignore local tests * login page test * invoices tests * recurring invoices * payments tests * payment methods tests * update invoices & quotes * credits tests
38 lines
964 B
JavaScript
Vendored
38 lines
964 B
JavaScript
Vendored
describe('Credits', () => {
|
|
beforeEach(() => {
|
|
cy.clientLogin();
|
|
});
|
|
|
|
it('should show credits page', () => {
|
|
cy.visit('/client/credits');
|
|
cy.location().should(location => {
|
|
expect(location.pathname).to.eq('/client/credits');
|
|
});
|
|
});
|
|
|
|
it('should show credits text', () => {
|
|
cy.visit('/client/credits');
|
|
|
|
cy.get('body')
|
|
.find('h3')
|
|
.first()
|
|
.should('contain.text', 'Credits');
|
|
});
|
|
|
|
it('should have required table elements', () => {
|
|
cy.visit('/client/credits');
|
|
|
|
cy.get('body')
|
|
.find('table.credits-table > tbody > tr')
|
|
.first()
|
|
.find('a')
|
|
.first()
|
|
.should('contain.text', 'View')
|
|
.click()
|
|
.location()
|
|
.should(location => {
|
|
expect(location.pathname).to.eq('/client/credits/VolejRejNm');
|
|
});
|
|
});
|
|
});
|