Skip to content

Commit 8b07632

Browse files
authored
e2e fix (#948)
- **adjust password mismatch test** - **rm debug component** - **rm dbg logging**
2 parents e9a182e + 4e3a312 commit 8b07632

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

packages/common-ui/src/components/auth/UserLoginAndRegistrationContainer.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,11 @@ const closeResetDialog = () => {
138138
};
139139
140140
const handleSignupSuccess = (payload: { username: string }) => {
141-
console.log('[UserLoginAndRegistrationContainer] Received signup-success:', payload);
142141
// Close the registration dialog
143142
regDialog.value = false;
144143
145144
// Call the callback prop if provided (preferred method)
146145
if (props.onSignupSuccess) {
147-
console.log('[UserLoginAndRegistrationContainer] Calling onSignupSuccess callback');
148146
props.onSignupSuccess(payload);
149147
}
150148

packages/common-ui/src/components/auth/UserRegistration.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,10 @@ Author: ${this.author}
191191
return;
192192
}
193193
194-
console.log('[UserRegistration] About to call createAccount for:', this.username);
195194
this.user
196195
.createAccount(this.username, this.password)
197196
.then(async (resp: any) => {
198-
console.log('[UserRegistration] .then() called, resp:', resp);
199197
if (resp.status === Status.ok) {
200-
console.log('[UserRegistration] resp.status === Status.ok, proceeding...');
201198
// Account created successfully via PouchDB
202199
this.authStore.loginAndRegistration.loggedIn = true;
203200
this.authStore.loginAndRegistration.init = false;
@@ -231,7 +228,6 @@ Author: ${this.author}
231228
// Emit signup success event for parent to handle
232229
// Use the username we just created rather than calling getCurrentUser() again
233230
// which can fail if the auth state hasn't fully synchronized
234-
console.log('[UserRegistration] Emitting signup-success event for:', this.username);
235231
236232
// Call callback prop if provided (preferred method)
237233
if (this.onSignupSuccess) {

packages/platform-ui/cypress/e2e/user-registration.cy.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ describe('User Registration', () => {
5454
cy.get('input[name="password"]').type(password);
5555
cy.get('input[name="retypedPassword"]').type(differentPassword);
5656

57-
// Submit the form
58-
cy.contains('button', 'Create Account').click();
59-
60-
// Assert that we're still on the registration page
61-
cy.url().should('not.include', `/u/${username}`);
57+
// Assert that the Create Account button is disabled due to password mismatch
58+
cy.contains('button', 'Create Account').should('be.disabled');
6259

6360
// Assert that an error message about password mismatch is displayed
6461
cy.contains('Passwords do not match').should('be.visible');
62+
63+
// Assert that we're still on the registration page
64+
cy.url().should('not.include', `/u/${username}`);
6565
});
6666

6767
it('should not render Signup form if logged in', () => {

packages/platform-ui/src/App.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
<SkMouseTrapToolTip hotkey="m" command="Toggle Menu" highlight-effect="none" position="right">
4545
<v-app-bar-nav-icon @click.stop="toggleDrawer"></v-app-bar-nav-icon>
4646
</SkMouseTrapToolTip>
47-
<v-chip color="red" class="mr-2">TESTING123</v-chip>
4847
<v-spacer></v-spacer>
4948
<user-login-and-registration-container
5049
:show-registration="isRegistrationEnabled()"
@@ -112,7 +111,6 @@ const rail = ref(false);
112111
const ready = ref(false);
113112
114113
const handleSignupSuccess = ({ username }: { username: string }) => {
115-
console.log('Signup successful, redirecting to:', `/u/${username}/new`);
116114
router.push(`/u/${username}/new`);
117115
};
118116

0 commit comments

Comments
 (0)