mirror of
https://github.com/documize/community.git
synced 2025-08-09 07:25:23 +02:00
Fix broken tests
This commit is contained in:
parent
7955da433c
commit
ad119eeb48
2 changed files with 3 additions and 4 deletions
|
@ -124,7 +124,6 @@ export default function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.post('/public/authenticate', (schema, request) => {
|
this.post('/public/authenticate', (schema, request) => {
|
||||||
debugger;
|
|
||||||
let authorization = request.requestHeaders.Authorization;
|
let authorization = request.requestHeaders.Authorization;
|
||||||
let expectedAuthorization = "Basic OmJyaXpkaWdpdGFsQGdtYWlsLmNvbTp6aW55YW5kbzEyMw==";
|
let expectedAuthorization = "Basic OmJyaXpkaWdpdGFsQGdtYWlsLmNvbTp6aW55YW5kbzEyMw==";
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ test('visiting / when not authenticated and with { allowAnonymousAccess: true }
|
||||||
andThen(function () {
|
andThen(function () {
|
||||||
assert.equal(find('.login').length, 1, 'Login button is displayed');
|
assert.equal(find('.login').length, 1, 'Login button is displayed');
|
||||||
assert.equal(find('.documents-list .document').length, 2, '2 document displayed');
|
assert.equal(find('.documents-list .document').length, 2, '2 document displayed');
|
||||||
assert.equal(currentURL(), '/s/VzMygEw_3WrtFzto/test', 'Dashboard and public spaces are displayed without being signed in');
|
assert.equal(currentURL(), '/s/VzMuyEw_3WqiafcG/my-project', 'Dashboard and public spaces are displayed without being signed in');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -22,13 +22,13 @@ test('visiting / when authenticated and with { allowAnonymousAccess: true } take
|
||||||
|
|
||||||
andThen(function () {
|
andThen(function () {
|
||||||
assert.equal(find('.login').length, 1, 'Login button is displayed');
|
assert.equal(find('.login').length, 1, 'Login button is displayed');
|
||||||
assert.equal(currentURL(), '/s/VzMygEw_3WrtFzto/test', 'Dashboard displayed without being signed in');
|
assert.equal(currentURL(), '/s/VzMuyEw_3WqiafcG/my-project', 'Dashboard displayed without being signed in');
|
||||||
});
|
});
|
||||||
|
|
||||||
userLogin();
|
userLogin();
|
||||||
|
|
||||||
andThen(function () {
|
andThen(function () {
|
||||||
assert.equal(find('.login').length, 0, 'Login button is not displayed');
|
assert.equal(find('.login').length, 0, 'Login button is not displayed');
|
||||||
assert.equal(currentURL(), '/s/VzMygEw_3WrtFzto/test', 'Dashboard is displayed after user is signed in');
|
assert.equal(currentURL(), '/s/VzMuyEw_3WqiafcG/my-project', 'Dashboard is displayed after user is signed in');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue