Fixes for cypress tests

This commit is contained in:
Benjamin Beganović 2020-06-30 14:53:30 +02:00
parent b28ec2ace2
commit 314b62f0bb
9 changed files with 12 additions and 20 deletions

View File

@ -1,4 +1,4 @@
{
"video": false,
"baseUrl": "http://ninja.test:8000/"
"baseUrl": "http://invoiceninja.wip/"
}

View File

@ -14,7 +14,7 @@ describe('Credits', () => {
cy.visit('/client/credits');
cy.get('body')
.find('h3')
.find('span')
.first()
.should('contain.text', 'Credits');
});

View File

@ -14,7 +14,7 @@ context('Invoices', () => {
cy.visit('/client/invoices');
cy.get('body')
.find('h3')
.find('span')
.first()
.should('contain.text', 'Invoices');
});

View File

@ -39,7 +39,7 @@ context('Login', () => {
.click();
cy.location().should(location => {
expect(location.pathname).to.eq(
'/client/dashboard'
'/client/invoices'
);
});
});

View File

@ -14,20 +14,11 @@ context('Payment methods', () => {
cy.visit('/client/payment_methods');
cy.get('body')
.find('h3')
.find('span')
.first()
.should('contain.text', 'Payment Method');
});
it('should show add payment method button', () => {
cy.visit('/client/payment_methods');
cy.get('body')
.find('a.button.button-primary')
.first()
.should('contain.text', 'Add Payment Method');
});
it('should have per page options dropdown', () => {
cy.visit('/client/payment_methods');

View File

@ -14,7 +14,7 @@ context('Payments', () => {
cy.visit('/client/payments');
cy.get('body')
.find('h3')
.find('span')
.first()
.should('contain.text', 'Payments');
});

View File

@ -14,7 +14,7 @@ describe('Quotes', () => {
cy.visit('/client/quotes');
cy.get('body')
.find('h3')
.find('span')
.first()
.should('contain.text', 'Quotes');
});

View File

@ -16,7 +16,7 @@ context('Recurring invoices', () => {
it('should show reucrring invoices text', () => {
cy.visit('/client/recurring_invoices');
cy.get('h3')
cy.get('span')
.first()
.should('contain.text', 'Recurring Invoices');
});

View File

@ -8,13 +8,15 @@
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"test": "cypress run"
"test": "cypress run",
"test:gui": "cypress open"
},
"devDependencies": {
"@babel/compat-data": "7.9.0",
"@babel/plugin-proposal-class-properties": "^7.10.1",
"laravel-mix-purgecss": "^5.0.0-rc.1",
"vue-template-compiler": "^2.6.11"
"vue-template-compiler": "^2.6.11",
"cypress": "^4.6.0",
},
"dependencies": {
"@tailwindcss/ui": "^0.1.3",
@ -22,7 +24,6 @@
"card-js": "^1.0.13",
"card-validator": "^6.2.0",
"cross-env": "^7.0",
"cypress": "^4.6.0",
"jsignature": "^2.1.3",
"laravel-mix": "^5.0.1",
"lodash": "^4.17.13",