-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "What brings you to FF?" to sign-up form #2378
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7ca49a8
Add new question to the sign up form
joepavitt bbdcf90
Update styling & "learning node-red" > "educational use"
joepavitt 83cdabd
Include field into PH person identification
joepavitt 35adb3a
Only show question if PH enabled
joepavitt 6ba4570
Include E2E tests for registration form showing relevant parts based …
joepavitt 7e16c8c
Update forge-ui-components dependency to 0.6.4
joepavitt 1a1c6c7
update package lock
joepavitt 0c2d524
update package lock
joepavitt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,128 @@ | ||
describe('FlowForge - Sign Up Page', () => { | ||
it('should present the relevant default fields', () => { | ||
cy.intercept('GET', '/api/*/settings').as('getUserSettings') | ||
cy.visit('/account/create') | ||
cy.wait('@getUserSettings') | ||
|
||
cy.get('[data-form="signup-username"]').should('be.visible') | ||
cy.get('[data-form="signup-fullname"]').should('be.visible') | ||
cy.get('[data-form="signup-email"]').should('be.visible') | ||
cy.get('[data-form="signup-password"]').should('be.visible') | ||
|
||
cy.get('[data-form="signup-join-reason"]').should('not.exist') | ||
cy.get('[data-form="signup-accept-tcs"]').should('not.exist') | ||
}) | ||
|
||
it('should present the option to accept the T&Cs if user settings are set accordingly', () => { | ||
const EXAMPLE_TCS_URL = 'https://example.com/terms-and-conditions' | ||
|
||
cy.intercept('GET', '/api/*/settings', (req) => { | ||
req.continue((res) => { | ||
res.body['user:tcs-required'] = true | ||
res.body['user:tcs-url'] = EXAMPLE_TCS_URL | ||
}) | ||
}).as('getUserSettings') | ||
cy.visit('/account/create') | ||
cy.wait('@getUserSettings') | ||
|
||
cy.get('[data-form="signup-accept-tcs"]').should('be.visible') | ||
cy.get('[data-form="signup-accept-tcs"] a').should('have.attr', 'href', EXAMPLE_TCS_URL) | ||
}) | ||
|
||
it('should present the "What brings you to FlowForge" question if configured', () => { | ||
Cypress.on('window:before:load', win => { | ||
win.posthog = { | ||
onFeatureFlags: () => {}, | ||
capture: () => {}, | ||
identify: () => {} | ||
} | ||
}) | ||
|
||
cy.intercept('GET', '/api/*/settings').as('getUserSettings') | ||
cy.visit('/account/create') | ||
cy.wait('@getUserSettings') | ||
|
||
cy.get('[data-form="signup-join-reason"]').should('be.visible') | ||
}) | ||
|
||
// it('requires a password', () => { | ||
// cy.visit('/') | ||
// cy.get('div[label=username] input').should('be.visible') | ||
// cy.get('div[label=password] input').should('not.exist') | ||
// // fill out username | ||
// cy.get('div[label=username] input').type('wrongusername') | ||
// // click "login" | ||
// cy.get('[data-action="login"]').click() | ||
// // should prompt for password as well | ||
// cy.get('div[label=username] input').should('be.visible') | ||
// cy.get('div[label=password] input').should('be.visible') | ||
// // click "login" | ||
// cy.get('[data-action="login"]').click() | ||
// // should report password is required | ||
// cy.get('div[label=password]').should('have.class', 'ff-input--error') | ||
// cy.get('[data-el="errors-password"]').should('be.visible') | ||
// // check where we are | ||
// cy.url().should('not.include', '/applications') | ||
// }) | ||
|
||
// it('prevents a user logging in with incorrect credentials', () => { | ||
// cy.visit('/') | ||
// cy.get('div[label=username] input').should('be.visible') | ||
// cy.get('div[label=password] input').should('not.exist') | ||
// // fill out username | ||
// cy.get('div[label=username] input').type('wrongusername') | ||
// // click "login" | ||
// cy.get('[data-action="login"]').click() | ||
// // should prompt for password as well | ||
// cy.get('div[label=username] input').should('be.visible') | ||
// cy.get('div[label=password] input').should('be.visible') | ||
// // fill out username | ||
// cy.get('div[label=password] input').type('wrongpassword') | ||
// // click "login" | ||
// cy.get('[data-action="login"]').click() | ||
// // display "Login Failed" | ||
// cy.get('[data-el="errors-general"]').should('be.visible') | ||
// // check where we are | ||
// cy.url().should('not.include', '/applications') | ||
// }) | ||
|
||
// it('allows a user to login', () => { | ||
// cy.visit('/') | ||
// cy.get('div[label=username] input').should('be.visible') | ||
// cy.get('div[label=password] input').should('not.exist') | ||
// // fill out username | ||
// cy.get('div[label=username] input').type('alice') | ||
// // click "login" | ||
// cy.get('[data-action="login"]').click() | ||
// // should prompt for password as well | ||
// cy.get('div[label=username] input').should('be.visible') | ||
// cy.get('div[label=password] input').should('be.visible') | ||
// // fill out pasword | ||
// cy.get('div[label=password] input').type('aaPassword') | ||
// // click "login" | ||
// cy.get('[data-action="login"]').click() | ||
// // check where we are | ||
// cy.url().should('include', '/applications') | ||
// }) | ||
// it('prevent long password', () => { | ||
// cy.visit('') | ||
// // fill out credentials | ||
// cy.get('div[label=username] input').type('alice') | ||
// cy.get('[data-action="login"]').click() | ||
// // should prompt for password as well | ||
// cy.get('div[label=username] input').should('be.visible') | ||
// cy.get('div[label=password] input').should('be.visible') | ||
// let passwd = '' | ||
// for (let i = 0; i < 1030; i++) { | ||
// passwd += 'x' | ||
// } | ||
// cy.get('div[label=password] input').type(passwd, { delay: 0.1 }) | ||
// // click "login" | ||
// cy.get('[data-action="login"]').click() | ||
// // should have error | ||
// cy.get('div[label=password]').should('have.class', 'ff-input--error') | ||
// cy.get('[data-el="errors-password"]').should('be.visible') | ||
// // check where we are | ||
// cy.url().should('not.include', '/applications') | ||
// }) | ||
}) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line breaks sign-up for instances without posthog, as
join_reason
is never set to anything so the sign-up button is never enabled.