-
Notifications
You must be signed in to change notification settings - Fork 46
feat(signup): Angular version of signup page using existing backend. #1844
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
Closed
Closed
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
c999eaa
feat(signup): Angular version of signup page using existing backend.
gtandersen c1e26e3
fix(signup): Add missing license header.
gtandersen 493ada0
fix(signup): Correct signup file license headers for policy test
gtandersen 0bbad33
test(signup): Stabilize signup custom domain validation test.
gtandersen e4890d4
test(signup): Use real form submit in signup validation test.
gtandersen e62cba6
test(signup): Split signup Cypress tests into CI and deployed variants.
gtandersen 080d2ef
test(signup): Use local signup route in CI Cypress spec.
gtandersen 4fb8c9b
fix(signup): preserve signup route fallback changes
gtandersen 9b15b0b
fix(signup): Refine signup tooltip triggers and popover positioning.
gtandersen a438368
fix(signup): Add password visibility toggle to signup form.
gtandersen 03e68ac
style(signup): Improve signup domain guidance and enforce minimum pas…
gtandersen b6b2f24
test(signup): Align signup custom domain test with component validation.
gtandersen c63cce7
style(signup): Refactor signup styles to reuse shared rmm theme varia…
gtandersen 50fa93d
test(signup): Update tests with latest changes.
gtandersen e95f5d6
test(signup): Update signup Cypress expectations for revised text.
gtandersen 58f8e4d
fix(signup): Remove unused legacy signup fields from Angular form.
gtandersen 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 hidden or 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,100 @@ | ||
| // --------- BEGIN RUNBOX LICENSE --------- | ||
| // Copyright (C) 2016-2026 Runbox Solutions AS (runbox.com). | ||
| // | ||
| // This file is part of Runbox 7. | ||
| // | ||
| // Runbox 7 is free software: You can redistribute it and/or modify it | ||
| // under the terms of the GNU General Public License as published by the | ||
| // Free Software Foundation, either version 3 of the License, or (at your | ||
| // option) any later version. | ||
| // | ||
| // Runbox 7 is distributed in the hope that it will be useful, but | ||
| // WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| // General Public License for more details. | ||
| // | ||
| // You should have received a copy of the GNU General Public License | ||
| // along with Runbox 7. If not, see <https://www.gnu.org/licenses/>. | ||
| // ---------- END RUNBOX LICENSE ---------- | ||
|
|
||
| /// <reference types="cypress" /> | ||
|
|
||
| describe('Signup', () => { | ||
| beforeEach(() => { | ||
| cy.intercept('GET', '/signup?legacy=1&runbox7=1', { | ||
| statusCode: 200, | ||
| body: ` | ||
| <html> | ||
| <body> | ||
| <form name="signup" action="/mail/signup"> | ||
| <select name="runboxDomain"> | ||
| <option value="runbox.com">runbox.com</option> | ||
| <option value="runbox.no">runbox.no</option> | ||
| <option value="rbx.email">rbx.email</option> | ||
| </select> | ||
| <div class="h-captcha" data-sitekey="test-site-key"></div> | ||
| </form> | ||
| </body> | ||
| </html> | ||
| `, | ||
| headers: { | ||
| 'content-type': 'text/html', | ||
| }, | ||
| }).as('legacySignup'); | ||
|
|
||
| cy.intercept('GET', 'https://hcaptcha.com/1/api.js?render=explicit', { | ||
| statusCode: 200, | ||
| body: 'window.hcaptcha = { render: function() { return "test-widget"; } };', | ||
| headers: { | ||
| 'content-type': 'application/javascript', | ||
| }, | ||
| }).as('hcaptchaScript'); | ||
| }); | ||
|
|
||
| it('should render the Angular signup page in the local mock-backed environment', () => { | ||
| cy.visit('/signup?runbox7=1'); | ||
| cy.wait('@legacySignup'); | ||
| cy.wait('@hcaptchaScript'); | ||
|
|
||
| cy.location('pathname').should('eq', '/signup'); | ||
| cy.location('search').should('contain', 'runbox7=1'); | ||
| cy.contains('h1', 'Create a Runbox Account').should('exist'); | ||
| cy.get('form.signup-form').should('have.attr', 'action', '/mail/signup'); | ||
| cy.get('input[name="user"]').should('exist'); | ||
| cy.get('input[name="first_name"]').should('exist'); | ||
| cy.get('input[name="last_name"]').should('exist'); | ||
| cy.get('input[name="password"]').should('exist'); | ||
| cy.get('select[name="runboxDomain"]').find('option').should('have.length', 3); | ||
| cy.get('select[name="runboxDomain"]').find('option').then((options) => { | ||
| const domains = Array.from(options).map((option) => option.value); | ||
| expect(domains).to.include('runbox.com'); | ||
| expect(domains).to.include('rbx.email'); | ||
| }); | ||
| cy.get('div.captcha-host').should('exist'); | ||
| cy.contains('button.submit', 'Set up my Runbox account').should('exist'); | ||
| }); | ||
|
|
||
| it('should show the public trust and transparency content', () => { | ||
| cy.visit('/signup?runbox7=1'); | ||
| cy.wait('@legacySignup'); | ||
| cy.wait('@hcaptchaScript'); | ||
|
|
||
| cy.get('header.signup-header .brand img').should('be.visible'); | ||
| cy.get('header.signup-header .brand').should('not.contain', 'Runbox 7'); | ||
|
|
||
| cy.contains('.hero-panel h2', 'Privacy by Design').should('exist'); | ||
| cy.contains('.hero-panel h2', 'Hosted in Norway').should('exist'); | ||
| cy.contains('.hero-panel h2', 'Sustainable and secure').should('exist'); | ||
| cy.contains('.hero-panel h2', 'How the trial works').should('exist'); | ||
|
|
||
| cy.contains('.hero-panel', 'customer email content is private').should('exist'); | ||
| cy.contains('.form-section', 'default sender name recipients will see').should('exist'); | ||
|
|
||
| cy.get('.info-chip').should('have.length.at.least', 3); | ||
| cy.contains('.field-label, .field small', 'Existing email address').should('exist'); | ||
| cy.contains('.field-label, .field small', 'How did you hear about Runbox?').should('exist'); | ||
|
|
||
| cy.contains('.form-actions button.submit', 'Set up my Runbox account').should('exist'); | ||
| cy.contains('a', 'Use legacy signup page').should('not.exist'); | ||
| }); | ||
| }); |
This file contains hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
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.
I would suggest running this manually if wanting to test individual components, I don't think we need a list of them as commands
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.
OK, should I remove it?
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.
yes
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.
OK, removing.