Fix test, cleanup 🛁
This commit is contained in:
parent
61161407b6
commit
0694471270
|
|
@ -7,7 +7,7 @@ describe('Change Password Page', () => {
|
||||||
const validationOldWrongMsg = 'Die Eingabe ist falsch';
|
const validationOldWrongMsg = 'Die Eingabe ist falsch';
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
// cy.clearCookies();
|
cy.clearCookies();
|
||||||
cy.visit('/me/profile');
|
cy.visit('/me/profile');
|
||||||
cy.login('rahel.cueni', 'test');
|
cy.login('rahel.cueni', 'test');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,6 @@ router.beforeEach((to, from, next) => {
|
||||||
} else {
|
} else {
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
// todo handle public pages for user
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/* eslint-disable no-new */
|
/* eslint-disable no-new */
|
||||||
|
|
|
||||||
|
|
@ -14,3 +14,4 @@ MIGRATION_MODULES = DisableMigrations()
|
||||||
# Email Settings
|
# Email Settings
|
||||||
SENDGRID_API_KEY = ""
|
SENDGRID_API_KEY = ""
|
||||||
EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
|
EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
|
||||||
|
LOGIN_REDIRECT_URL = '/accounts/login/'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
//@import "materialize/materialize";
|
|
||||||
|
|
||||||
$white: #fff;
|
$white: #fff;
|
||||||
|
|
||||||
$grey-1: #F7F7F7;
|
$grey-1: #F7F7F7;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from django.test import TestCase, Client
|
from django.test import TestCase, Client
|
||||||
|
from django.test.utils import override_settings
|
||||||
|
|
||||||
|
from core import settings
|
||||||
from core.factories import UserFactory
|
from core.factories import UserFactory
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -17,7 +19,8 @@ class ApiAccessTestCase(TestCase):
|
||||||
def test_graphqlEndpoint_shouldNotBeAccessibleWithoutLogin(self):
|
def test_graphqlEndpoint_shouldNotBeAccessibleWithoutLogin(self):
|
||||||
c = Client()
|
c = Client()
|
||||||
response = c.post('/api/graphql/', data=self.query, content_type='application/json')
|
response = c.post('/api/graphql/', data=self.query, content_type='application/json')
|
||||||
self.assertRedirects(response, '/login?next=/api/graphql/')
|
self.assertEqual(response.status_code, 302)
|
||||||
|
self.assertEqual(response.url, '/login?next=/api/graphql/')
|
||||||
|
|
||||||
def test_graphqlEndpoint_shouldBeAccessibleWithLogin(self):
|
def test_graphqlEndpoint_shouldBeAccessibleWithLogin(self):
|
||||||
user = UserFactory(username='admin')
|
user = UserFactory(username='admin')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue