Skip to content

Commit a5d4bac

Browse files
chore: remove dev flag from new signup page (#1115)
1 parent 0e53da0 commit a5d4bac

File tree

4 files changed

+3
-35
lines changed

4 files changed

+3
-35
lines changed

app/controllers/new-signup.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ import apiRequest from '../utils/api-request';
1919
export default class NewSignupController extends Controller {
2020
@service toast;
2121

22-
queryParams = ['currentStep', 'dev', 'signupDev'];
22+
queryParams = ['currentStep', 'dev'];
2323

2424
@tracked dev;
25-
@tracked signupDev;
2625
@tracked isLoading = false;
2726
@tracked isButtonDisabled = true;
2827
@tracked error = '';
@@ -42,8 +41,7 @@ export default class NewSignupController extends Controller {
4241
};
4342

4443
get isDevMode() {
45-
// replace this signupDev with dev flag once new-signup page is not under dev flag
46-
return this.signupDev === 'true';
44+
return this.dev === 'true';
4745
}
4846

4947
async generateUsername(firstname, lastname) {

app/routes/new-signup.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@ import redirectAuth from '../utils/redirect-auth';
1010
export default class NewSignupRoute extends Route {
1111
@service toast;
1212
@service router;
13-
isDevMode = false;
14-
15-
beforeModel(transition) {
16-
if (transition?.to?.queryParams?.dev !== 'true') {
17-
this.router.transitionTo('/page-not-found');
18-
}
19-
this.isDevMode = true;
20-
}
2113

2214
async model() {
2315
try {

tests/unit/controllers/new-signup-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ module('Unit | Controller | new-signup', function (hooks) {
200200
});
201201

202202
test('signup catches error and shows correct error message (dev flag enabled)', async function (assert) {
203-
controller.signupDev = 'true'; // replace signupDev with dev once dev is removed from new-signup
203+
controller.dev = 'true';
204204
controller.signupDetails = {
205205
firstName: fakeUserData.first_name,
206206
lastName: fakeUserData.last_name,

tests/unit/routes/new-signup-test.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,6 @@ module('Unit | Route | new-signup', function (hooks) {
2222
this.clock.restore();
2323
});
2424

25-
test('redirects to 404 page if dev flag is not present', function (assert) {
26-
const transition = { to: { queryParams: { dev: 'false' } } };
27-
28-
this.route.beforeModel(transition);
29-
30-
assert.ok(
31-
this.route.router.transitionTo.calledOnceWith('/page-not-found'),
32-
'Redirected to /page-not-found when dev is not true',
33-
);
34-
});
35-
36-
test('allows new-signup page access when dev flag is true', function (assert) {
37-
const transition = { to: { queryParams: { dev: 'true' } } };
38-
39-
this.route.beforeModel(transition);
40-
41-
assert.ok(
42-
this.route.router.transitionTo.notCalled,
43-
'Signup page accessed when dev query param is true',
44-
);
45-
});
46-
4725
test('displays error in case of 401 response', async function (assert) {
4826
this.fetchStub.resolves(new Response(JSON.stringify({}), { status: 401 }));
4927
const result = await this.route.model();

0 commit comments

Comments
 (0)