forked from runbox/runbox7
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'castaway/1509_index_sync_modal' into castaway/1509_inde…
…x_sync_modal
- Loading branch information
Showing
34 changed files
with
930 additions
and
669 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,13 @@ | |
describe('Account access control', () => { | ||
function becomeSubaccount() { | ||
cy.intercept('/rest/v1/me', (req) => { | ||
req.reply((res) => { | ||
req.continue((res) => { | ||
const payload = JSON.parse(res.body); | ||
payload.result.owner = { | ||
uid: 666, | ||
username: '[email protected]', | ||
}; | ||
res.body = JSON.stringify(payload); | ||
res.send(JSON.stringify(payload)); | ||
}); | ||
}); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/// <reference types="cypress" /> | ||
|
||
describe('Profiles settings page', () => { | ||
|
||
const ALLOWED_DOMAINS = ['runbox.com', 'example.com']; | ||
|
||
it('lists currently existing profiles', () => { | ||
cy.intercept('GET', '/rest/v1/profiles').as('getProfiles'); | ||
cy.intercept('GET', '/rest/v1/aliases/limits').as('getAliasLimits'); | ||
cy.visit('/account/identities'); | ||
cy.wait('@getProfiles'); | ||
|
||
// 1 compose profile, 5 valid ones: | ||
cy.get('mat-card-content.profile-content').should('have.length', 6); | ||
}); | ||
|
||
it('can create new profiles', () => { | ||
cy.intercept('GET', '/rest/v1/profiles').as('getProfiles'); | ||
cy.intercept('GET', '/rest/v1/aliases/limits').as('getAliasLimits'); | ||
cy.visit('/account/identities'); | ||
cy.wait('@getAliasLimits'); | ||
|
||
cy.get('#add-identity').click(); | ||
|
||
// open dialog, fill in fields, submit | ||
cy.get('app-profiles-edit').should('be.visible'); | ||
cy.get('input[name="email"]').type('[email protected]'); | ||
cy.get('input[name="from"]').type('My Name'); | ||
cy.get('input[name="name"]').type('My Profile'); | ||
cy.get('textarea[name="signature"]').type('My Sig'); | ||
|
||
cy.intercept('POST', '/rest/v1/profile', { | ||
statusCode: 200, | ||
body: { | ||
status: 'success', | ||
result: {id: 1} | ||
} | ||
}).as('postProfile'); | ||
cy.get('button#save').click(); | ||
cy.wait('@postProfile'); | ||
|
||
cy.get('app-profiles-edit').should('not.exist'); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
import './commands' | ||
import './commands'; | ||
require('cypress-terminal-report/src/installLogsCollector')(); |
Oops, something went wrong.