-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #401 from hasgeek/membership
Adds Organization admin and Project crew memberships, with Project participant Proposal memberships pending.
- Loading branch information
Showing
172 changed files
with
4,323 additions
and
1,108 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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
all: | ||
cd funnel/assets; make | ||
|
||
build: | ||
cd funnel/assets; make assetsonly |
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,5 @@ | ||
{ | ||
"title": "testcypressproject", | ||
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit", | ||
"logo_url": "https://images.hasgeek.com/embed/file/fa971c8b503941de9f6ef5c53af02be7" | ||
} |
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,20 @@ | ||
describe('Profile', function() { | ||
const owner = require('../fixtures/user.json').owner; | ||
const profile = require('../fixtures/profile.json'); | ||
|
||
it('Create a new profile', function() { | ||
cy.login('/organizations', owner.username, owner.password); | ||
|
||
cy.get('a') | ||
.contains('new organization') | ||
.click(); | ||
cy.location('pathname').should('contain', '/new'); | ||
|
||
cy.get('#title').type(profile.title); | ||
cy.get('#name').type(profile.title); | ||
cy.get('#is_public_profile').click(); | ||
cy.get('button') | ||
.contains('Next') | ||
.click(); | ||
}); | ||
}); |
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,52 @@ | ||
describe('Adding crew to profile', function() { | ||
const owner = require('../fixtures/user.json').owner; | ||
const admin = require('../fixtures/user.json').admin; | ||
const profile = require('../fixtures/profile.json'); | ||
|
||
Cypress.on('uncaught:exception', (err, runnable) => { | ||
return false; | ||
}); | ||
|
||
it('Add new member to profile and edit roles', function() { | ||
cy.server(); | ||
cy.route('**/edit').as('edit-form'); | ||
cy.route('POST', '**/edit').as('edit-member'); | ||
cy.route('GET', '**/delete').as('delete-form'); | ||
cy.route('POST', '**/delete').as('delete-member'); | ||
|
||
cy.login('/' + profile.title, owner.username, owner.password); | ||
cy.get('a[data-cy-btn="profile-crew"]').click(); | ||
|
||
cy.add_member(admin.username, 'owner'); | ||
|
||
cy.get('[data-cy="member"]') | ||
.contains(admin.username) | ||
.click(); | ||
cy.wait('@edit-form'); | ||
cy.get('button[data-cy-btn="revoke"]').click(); | ||
cy.wait('@delete-form'); | ||
cy.get('button') | ||
.contains('Delete') | ||
.click(); | ||
cy.wait('@delete-member'); | ||
cy.get('[data-cy="member"]') | ||
.contains(admin.username) | ||
.should('not.exist'); | ||
|
||
cy.add_member(admin.username, 'owner'); | ||
cy.get('[data-cy="member"]') | ||
.contains(admin.username) | ||
.click(); | ||
cy.wait('@edit-form'); | ||
cy.get('#is_owner-0').click(); | ||
cy.get('button') | ||
.contains('Edit membership') | ||
.click(); | ||
cy.wait('@edit-member'); | ||
cy.get('[data-cy="member"]') | ||
.contains(admin.username) | ||
.parents('.user-box') | ||
.find('[data-cy="role"]') | ||
.contains('Admin'); | ||
}); | ||
}); |
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,29 @@ | ||
describe('Profile admin roles', function() { | ||
const owner = require('../fixtures/user.json').owner; | ||
const admin = require('../fixtures/user.json').admin; | ||
const profile = require('../fixtures/profile.json'); | ||
|
||
it('Check roles of profile admins', function() { | ||
cy.login('/' + profile.title, admin.username, admin.password); | ||
|
||
cy.get('a[data-cy-btn="edit-details"]').click(); | ||
cy.get('#field-description') | ||
.find('.CodeMirror textarea') | ||
.type(profile.description, { force: true }); | ||
cy.get('#logo_url').type(profile.logo_url); | ||
cy.get('button') | ||
.contains('Save changes') | ||
.click(); | ||
|
||
cy.get('a[data-cy-btn="profile-crew"]').click(); | ||
cy.get('button[data-cy-btn="add-member"]').should('not.exist'); | ||
cy.get('[data-cy="member"]') | ||
.contains(admin.username) | ||
.click(); | ||
cy.get('#member-form', { timeout: 10000 }).should('not.be.visible'); | ||
cy.get('[data-cy="member"]') | ||
.contains(owner.username) | ||
.click(); | ||
cy.get('#member-form', { timeout: 10000 }).should('not.be.visible'); | ||
}); | ||
}); |
3 changes: 2 additions & 1 deletion
3
...s/cypress/integration/01_createproject.js → ...s/cypress/integration/03_createProject.js
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,31 @@ | ||
describe('Adding crew', function() { | ||
const owner = require('../fixtures/user.json').owner; | ||
const admin = require('../fixtures/user.json').admin; | ||
const concierge = require('../fixtures/user.json').concierge; | ||
const usher = require('../fixtures/user.json').usher; | ||
const editor = require('../fixtures/user.json').editor; | ||
const profile = require('../fixtures/profile.json'); | ||
const project = require('../fixtures/project.json'); | ||
|
||
Cypress.on('uncaught:exception', (err, runnable) => { | ||
return false; | ||
}); | ||
|
||
it('Add crew to project', function() { | ||
cy.login('/' + profile.title, admin.username, admin.password); | ||
cy.get('[data-cy-project="' + project.title + '"]') | ||
.first() | ||
.click(); | ||
cy.location('pathname').should('contain', project.url); | ||
cy.get('a[data-cy-navbar="crew"]').click(); | ||
cy.get('[data-cy="member"]') | ||
.contains(admin.username) | ||
.parents('.user-box') | ||
.find('[data-cy="role"]') | ||
.contains('Editor'); | ||
|
||
cy.add_member(concierge.username, 'concierge'); | ||
cy.add_member(usher.username, 'usher'); | ||
cy.add_member(editor.username, 'editor'); | ||
}); | ||
}); |
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,33 @@ | ||
describe('Verify roles of editor', function() { | ||
const editor = require('../fixtures/user.json').editor; | ||
const profile = require('../fixtures/profile.json'); | ||
const project = require('../fixtures/project.json'); | ||
|
||
it('Access available for editor in project settings', function() { | ||
// Failing now - project in draft state is not visible to editor | ||
// cy.login('/' + profile.title +, editor.username, editor.password); | ||
// cy.get('[data-cy-project="' + project.title + '"]') | ||
// .first() | ||
// .click(); | ||
|
||
cy.login( | ||
'/' + profile.title + '/' + project.url, | ||
editor.username, | ||
editor.password | ||
); | ||
cy.location('pathname').should('contain', project.url); | ||
cy.get('a[data-cy-navbar="settings"]').click(); | ||
cy.location('pathname').should('contain', 'settings'); | ||
cy.get('a[data-cy="edit"]').should('exist'); | ||
cy.get('a[data-cy="add-livestream"]').should('exist'); | ||
cy.get('a[data-cy="manage-venues"]').should('exist'); | ||
cy.get('a[data-cy="add-cfp"]').should('exist'); | ||
cy.get('a[data-cy="edit-schedule"]').should('exist'); | ||
cy.get('a[data-cy="manage-labels"]').should('exist'); | ||
cy.get('a[data-cy="setup-events"]').should('not.exist'); | ||
cy.get('a[data-cy="scan-checkin"]').should('not.exist'); | ||
cy.get('a[data-cy="download-csv"]').should('exist'); | ||
cy.get('a[data-cy="download-json"]').should('exist'); | ||
cy.get('a[data-cy="download-schedule-json"]').should('exist'); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
18 changes: 13 additions & 5 deletions
18
.../cypress/integration/02_publishproject.js → .../cypress/integration/06_publishProject.js
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
9 changes: 5 additions & 4 deletions
9
...ets/cypress/integration/03_managevenue.js → ...ets/cypress/integration/07_manageVenue.js
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
9 changes: 5 additions & 4 deletions
9
...l/assets/cypress/integration/04_addCFP.js → ...l/assets/cypress/integration/08_addCFP.js
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
File renamed without changes.
3 changes: 2 additions & 1 deletion
3
...ets/cypress/integration/07_addProposal.js → ...ets/cypress/integration/11_addProposal.js
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
5 changes: 3 additions & 2 deletions
5
...cypress/integration/09_confirmProposal.js → ...cypress/integration/12_confirmProposal.js
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
5 changes: 3 additions & 2 deletions
5
...s/cypress/integration/11_addLivestream.js → ...s/cypress/integration/13_addLivestream.js
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
Oops, something went wrong.