Skip to content

Commit

Permalink
Merge pull request #2393 from fecgov/feature/1671
Browse files Browse the repository at this point in the history
feature/1671 - remove old debug login functionality
  • Loading branch information
toddlees authored Nov 21, 2024
2 parents 5162e26 + 46d4710 commit 6956294
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 454 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
DB_DOCKERFILE="Dockerfile-e2e" WORKER_DOCKERFILE="Worker_Dockerfile-e2e" API_DOCKERFILE="Dockerfile-e2e" FECFILE_TEST_DB_NAME="postgres" DJANGO_SECRET_KEY=${E2E_DJANGO_SECRET_KEY} DATABASE_URL=${E2E_DATABASE_URL} FEC_API=${E2E_FEC_API} FEC_API_KEY=${E2E_FEC_API_KEY} MOCK_EFO="True" docker-compose up --build -d
docker container run --network container:fecfile-api-proxy \
docker.io/jwilder/dockerize \
-wait http://localhost:8080/api/v1/user/login/authenticate \
-wait http://localhost:8080/api/v1/status/ \
-wait-retry-interval 2s \
-timeout 60s; \
working_directory: ~/project/fecfile-web-api
Expand Down
3 changes: 1 addition & 2 deletions front-end/cypress/e2e/pages/loginPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ function loginDotGovLogin() {
cy.intercept('POST', 'http://localhost:8080/api/v1/committees/*/activate/').as('ActivateCommittee');

cy.visit('/');
cy.get('#dropdownMenuButton').click();
cy.get('[data-test="login-dot-gov-login-button"]').click();
cy.get('#loginButton').click();
cy.wait('@GetLoggedIn');
cy.visit('/login/security-notice');
cy.get('.p-checkbox-box').click();
Expand Down
38 changes: 0 additions & 38 deletions front-end/src/app/login/debug-login/debug-login.component.html

This file was deleted.

20 changes: 0 additions & 20 deletions front-end/src/app/login/debug-login/debug-login.component.scss

This file was deleted.

76 changes: 0 additions & 76 deletions front-end/src/app/login/debug-login/debug-login.component.spec.ts

This file was deleted.

49 changes: 0 additions & 49 deletions front-end/src/app/login/debug-login/debug-login.component.ts

This file was deleted.

15 changes: 7 additions & 8 deletions front-end/src/app/login/login.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@ import { CommonModule, NgOptimizedImage } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { SharedModule } from 'app/shared/shared.module';
import { DebugLoginComponent } from './debug-login/debug-login.component';
import { SecurityNoticeComponent } from './security-notice/security-notice.component';
import { LoginComponent } from './login/login.component';
import { DividerModule } from 'primeng/divider';
import { CardModule } from 'primeng/card';
import { ButtonModule } from 'primeng/button';
import { CardModule } from 'primeng/card';
import { CheckboxModule } from 'primeng/checkbox';
import { LoginRoutingModule } from './login-routing.module';
import { DialogModule } from 'primeng/dialog';
import { DividerModule } from 'primeng/divider';
import { InputTextModule } from 'primeng/inputtext';
import { PasswordModule } from 'primeng/password';
import { DialogModule } from 'primeng/dialog';
import { LoginRoutingModule } from './login-routing.module';
import { LoginComponent } from './login/login.component';
import { SecurityNoticeComponent } from './security-notice/security-notice.component';

@NgModule({
declarations: [LoginComponent, DebugLoginComponent, SecurityNoticeComponent],
declarations: [LoginComponent, SecurityNoticeComponent],
imports: [
CommonModule,
FormsModule,
Expand Down
37 changes: 1 addition & 36 deletions front-end/src/app/login/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,9 @@ <h1 class="login-box-header header-productivity">Built to work anywhere.</h1>
</span>
</p>
<div class="button-container">
<button *ngIf="!this.localLoginAvailable" (click)="navigateToLoginDotGov()" class="login-button" type="button">
<button (click)="navigateToLoginDotGov()" class="login-button" type="button" id="loginButton">
Sign in with Login.gov
</button>
<div *ngIf="this.localLoginAvailable" class="dropdown d-inline-flex">
<button
class="btn btn-secondary dropdown-toggle login-button"
type="button"
id="dropdownMenuButton"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
Login
</button>
<div
[style.display]="isDropdownOpen ? 'block' : 'none'"
class="dropdown-menu"
aria-labelledby="dropdownMenuButton"
>
<button
class="dropdown-item"
(click)="navigateToLoginDotGov()"
type="button"
data-test="login-dot-gov-login-button"
>
Sign in with Login.gov
</button>
<button class="dropdown-item" (click)="showDebugLogin()" type="button" data-test="debug-login-button">
Debug Login
</button>
</div>
</div>
</div>
<div class="">
<a class="learn-more-link" href="https://www.login.gov/what-is-login/">Learn more about Login.gov</a>
Expand Down Expand Up @@ -81,9 +52,3 @@ <h1 class="login-box-header header-productivity">Built to work anywhere.</h1>
</div>
</div>
</div>

<p-dialog [(visible)]="isDebugOpen" [style]="{ width: '90%' }" header="Debug Login" [modal]="true">
<ng-template pTemplate="content">
<app-debug-login></app-debug-login>
</ng-template>
</p-dialog>
24 changes: 0 additions & 24 deletions front-end/src/app/login/login/login.component.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
.dropdown-menu {
top: 25px;
}

.dashboard-example-img {
width: 600px;
position: absolute;
max-height: calc(100vh - 350px);
overflow: hidden;
}

.login-box-header {
font-family: 'karla-bold', Sans-serif;
font-size: 32px;
Expand Down Expand Up @@ -43,10 +32,6 @@
.login-button {
color: #ffffff;
background-color: #112e51;
}

.login-button,
.signup-button {
border-radius: 4px;
display: inline-block;
font-family: 'karla', Sans-serif;
Expand All @@ -58,11 +43,6 @@
vertical-align: middle;
}

.signup-button {
background-color: #35bdbb;
color: #212121;
}

.learn-more-link {
font-family: 'karla-bold', Sans-serif;
font-size: 14px;
Expand All @@ -73,10 +53,6 @@
transition: color 0.1s linear;
}

.debug-login {
margin-right: 60px;
}

.login-page {
width: 100%;
max-width: 800px;
Expand Down
Loading

0 comments on commit 6956294

Please sign in to comment.