From 0b5c40f41c852ed7978909dd1b78491c1abcc0d3 Mon Sep 17 00:00:00 2001 From: Al Crowley Date: Mon, 22 Nov 2021 15:57:22 -0500 Subject: [PATCH 1/7] Adding sample circleci config.yml --- .circleci/config.yml | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000000..ae37b03572 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,47 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. +# See: https://circleci.com/docs/2.0/configuration-reference +version: 2.1 + +# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects. +# See: https://circleci.com/docs/2.0/orb-intro/ +orbs: + # The python orb contains a set of prepackaged CircleCI configuration you can use repeatedly in your configuration files + # Orb commands and jobs help you with common scripting around a language/tool + # so you dont have to copy and paste it everywhere. + # See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/python + python: circleci/python@1.2 + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/2.0/configuration-reference/#jobs +jobs: + build-and-test: # This is the name of the job, feel free to change it to better match what you're trying to do! + # These next lines defines a Docker executors: https://circleci.com/docs/2.0/executor-types/ + # You can specify an image from Dockerhub or use one of the convenience images from CircleCI's Developer Hub + # A list of available CircleCI Docker convenience images are available here: https://circleci.com/developer/images/image/cimg/python + # The executor is the environment in which the steps below will be executed - below will use a python 3.8 container + # Change the version below to your required version of python + docker: + - image: cimg/python:3.6 + # Checkout the code as the first step. This is a dedicated CircleCI step. + # The python orb's install-packages step will install the dependencies from a Pipfile via Pipenv by default. + # Here we're making sure we use just use the system-wide pip. By default it uses the project root's requirements.txt. + # Then run your tests! + # CircleCI will report the results back to your VCS provider. + steps: + - checkout + - python/install-packages: + pkg-manager: pip + app-dir: ~/project/django-backend/ # If you're requirements.txt isn't in the root directory. + # pip-dependency-file: test-requirements.txt # if you have a different name for your requirements file, maybe one that combines your runtime and test requirements. + - run: + name: Run tests + # This assumes pytest is installed via the install-package step above + command: python manage.py test + +# Invoke jobs via workflows +# See: https://circleci.com/docs/2.0/configuration-reference/#workflows +workflows: + sample: # This is the name of the workflow, feel free to change it to better match your workflow. + # Inside the workflow, you define the jobs you want to run. + jobs: + - build-and-test From 1a5badd0f16ae61d5b350c3b76c7f2a7c93bbec3 Mon Sep 17 00:00:00 2001 From: Matt Travers Date: Wed, 3 Nov 2021 15:50:47 -0400 Subject: [PATCH 2/7] Docker editable development changes * Modify docker-compose.yml to attach source directories as volumes in the docker containers * Modify the Angular docker to wait till execution time to install packages and serve the app * Added a proxy server so that the API and Web will both be served from a single port on localhost * Setup the DB config to be passed into the API via environment variables --- README.md | 14 ++++-- db/Dockerfile | 11 +++++ django-backend/Dockerfile | 4 +- django-backend/Dockerfile-live | 15 ++++++ .../fecfiler/authentication/login.py | 3 +- .../core/transactions_chk_csv_duplicates.py | 10 ++-- .../core/transactions_validate_csv.py | 10 ++-- django-backend/fecfiler/core/views.py | 2 +- django-backend/fecfiler/settings.py | 37 ++++++--------- django-backend/wait_for_db.py | 16 +++++-- docker-compose.yml | 47 +++++++++++++++---- front-end/Dockerfile | 2 +- front-end/Dockerfile-live | 11 +++++ front-end/package.json | 7 +-- front-end/server/server.js | 2 +- front-end/src/assets/data/appConfig.json | 2 +- .../src/environments/environment.local.ts | 2 +- front-end/src/environments/environment.ts | 6 +-- protractor/src/e2e/config.js | 2 +- proxy/Dockerfile | 6 +++ proxy/default.conf | 16 +++++++ proxy/includes/proxy.conf | 8 ++++ 22 files changed, 170 insertions(+), 63 deletions(-) create mode 100644 db/Dockerfile create mode 100644 django-backend/Dockerfile-live create mode 100644 front-end/Dockerfile-live create mode 100644 proxy/Dockerfile create mode 100644 proxy/default.conf create mode 100644 proxy/includes/proxy.conf diff --git a/README.md b/README.md index 4698f1480e..03b99d6d24 100644 --- a/README.md +++ b/README.md @@ -58,9 +58,17 @@ when running docker-compose you will need to be in the root directory of the pro # Build the application ` docker-compose build ` # Run the containers after being built -`docker-compose up -d` -Alternatively if you have made changes to the application and need to push the changes to a container -` docker-compose up --build -d` will build the containers then start them. +`docker-compose up --build` + +You should set the following environment variables in the shell where you are running 'docker-compose up'. +Proper values for the development variables are shown here as an example +``` +export FECFILE_DB_HOST=db +export FECFILE_DB_USERNAME=postgres +export FECFILE_DB_PASSWORD=postgres +export FECFILE_DB_NAME=postgres +``` + # Shut down the containers ` docker-compose down ` # see all running containers diff --git a/db/Dockerfile b/db/Dockerfile new file mode 100644 index 0000000000..487f33dd46 --- /dev/null +++ b/db/Dockerfile @@ -0,0 +1,11 @@ +FROM postgres:10 + +ENV POSTGRES_USER: postgres +ENV POSTGRES_NAME: postgres +ENV POSTGRES_PASSWORD: postgres + +# Load scripts to run at container initialization. They are run in alphabetical order. +COPY initdb.sql /docker-entrypoint-initdb.d/1.sql +COPY fecfile-frontend-dev.sql.gz /docker-entrypoint-initdb.d/2.sql.gz + +EXPOSE 5432 diff --git a/django-backend/Dockerfile b/django-backend/Dockerfile index 8d53aa69e1..f053473ebc 100644 --- a/django-backend/Dockerfile +++ b/django-backend/Dockerfile @@ -1,5 +1,5 @@ FROM python:3.7 -ENV PYTHONUNBUFFERED 1 +ENV PYTHONUNBUFFERED=1 RUN mkdir /opt/nxg_fec WORKDIR /opt/nxg_fec @@ -12,4 +12,4 @@ RUN useradd nxgu --no-create-home --home /opt/nxg_fec && chown -R nxgu:nxgu /opt user nxgu EXPOSE 8080 -ENTRYPOINT ["sh", "-c", "python wait_for_db.py && gunicorn --bind 0.0.0.0:8080 fecfiler.wsgi -w 10 -t 200"] +ENTRYPOINT ["sh", "-c", "python wait_for_db.py && gunicorn --bind 0.0.0.0:8080 fecfiler.wsgi -w 10 -t 200 --reload"] diff --git a/django-backend/Dockerfile-live b/django-backend/Dockerfile-live new file mode 100644 index 0000000000..a6ec0c7551 --- /dev/null +++ b/django-backend/Dockerfile-live @@ -0,0 +1,15 @@ +FROM python:3.7 +ENV PYTHONUNBUFFERED=1 + +RUN mkdir /opt/nxg_fec +WORKDIR /opt/nxg_fec +ADD requirements.txt /opt/nxg_fec/ +RUN pip3 install -r requirements.txt + +RUN mv /etc/localtime /etc/localtime.backup && ln -s /usr/share/zoneinfo/EST5EDT /etc/localtime + +RUN useradd nxgu --no-create-home --home /opt/nxg_fec && chown -R nxgu:nxgu /opt/nxg_fec +user nxgu + +EXPOSE 8080 +ENTRYPOINT ["sh", "-c", "pip3 install -r requirements.txt && python wait_for_db.py && gunicorn --bind 0.0.0.0:8080 fecfiler.wsgi -w 10 -t 200 --reload"] diff --git a/django-backend/fecfiler/authentication/login.py b/django-backend/fecfiler/authentication/login.py index 968495e9ff..e319004f2a 100644 --- a/django-backend/fecfiler/authentication/login.py +++ b/django-backend/fecfiler/authentication/login.py @@ -136,7 +136,8 @@ def verify_login(request): username = user_list["username"] key = user_list["secret_key"] - unix_time = user_list["code_time"] + # unix_time = user_list["code_time"] + unix_time = "code_time" in user_list and user_list["code_time"] otp_class = TOTPVerification(username) token_val = otp_class.verify_token(key, unix_time) diff --git a/django-backend/fecfiler/core/transactions_chk_csv_duplicates.py b/django-backend/fecfiler/core/transactions_chk_csv_duplicates.py index 30ac498bbb..a898038154 100644 --- a/django-backend/fecfiler/core/transactions_chk_csv_duplicates.py +++ b/django-backend/fecfiler/core/transactions_chk_csv_duplicates.py @@ -17,11 +17,11 @@ def addapt_numpy_int64(numpy_int64): register_adapter(numpy.int64, addapt_numpy_int64) -PG_HOST = os.getenv('DB_HOST') -PG_PORT = os.getenv('DB_PORT') -PG_DATABASE = os.getenv('DB_NAME') -PG_USER = os.getenv('DB_USERNAME') -PG_PASSWORD = os.getenv('DB_PASSWORD') +PG_HOST = os.getenv('FECFILE_DB_HOST', 'localhost') +PG_PORT = os.getenv('FECFILE_DB_PORT', 5432) +PG_DATABASE = os.getenv('FECFILE_DB_NAME', 'postgres') +PG_USER = os.getenv('FECFILE_DB_USERNAME', 'postgres') +PG_PASSWORD = os.getenv('FECFILE_DB_PASSWORD', 'postgres') SQS_QUEUE_NAME = os.getenv('SQS_QUEUE_NAME') # diff --git a/django-backend/fecfiler/core/transactions_validate_csv.py b/django-backend/fecfiler/core/transactions_validate_csv.py index 35e8f3de70..c70093b503 100644 --- a/django-backend/fecfiler/core/transactions_validate_csv.py +++ b/django-backend/fecfiler/core/transactions_validate_csv.py @@ -22,11 +22,11 @@ from django.db import connection # Postgres Database Settings - local -PG_HOST = os.getenv('DB_HOST') -PG_PORT = os.getenv('DB_PORT') -PG_DATABASE = os.getenv('DB_NAME') -PG_USER = os.getenv('DB_USERNAME') -PG_PASSWORD = os.getenv('DB_PASSWORD') +PG_HOST = os.getenv('FECFILE_DB_HOST', 'localhost') +PG_PORT = os.getenv('FECFILE_DB_PORT', '5432') +PG_DATABASE = os.getenv('FECFILE_DB_NAME', 'postgres') +PG_USER = os.getenv('FECFILE_DB_USERNAME', 'postgres') +PG_PASSWORD = os.getenv('FECFILE_DB_PASSWORD', 'postgres') SQS_QUEUE_NAME = os.getenv('SQS_QUEUE_NAME') # diff --git a/django-backend/fecfiler/core/views.py b/django-backend/fecfiler/core/views.py index 3eac2158c4..d443e373ac 100644 --- a/django-backend/fecfiler/core/views.py +++ b/django-backend/fecfiler/core/views.py @@ -1960,7 +1960,7 @@ def reposit_f99_data(cmte_id, report_id): os.environ.get("BACKEND_DB_NAME"), os.environ.get("BACKEND_DB_USER"), os.environ.get("BACKEND_DB_HOST"), - os.environ.get("BACKEND_DB_PASSWORD"), + os.environ.get("BACKEND_FECFILE_DB_PASSWORD"), ) ) # conn.close() diff --git a/django-backend/fecfiler/settings.py b/django-backend/fecfiler/settings.py index f9a1a34363..441dd688b9 100644 --- a/django-backend/fecfiler/settings.py +++ b/django-backend/fecfiler/settings.py @@ -15,13 +15,19 @@ from corsheaders.defaults import default_headers import logging + +CORS_ALLOWED_ORIGINS = [ + "http://localhost:4200", + "http://localhost", +] + # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ -DEBUG = os.environ.get('DEBUG', False) +DEBUG = os.environ.get('DEBUG', True) TEMPLATE_DEBUG = DEBUG CSRF_TRUSTED_ORIGINS = ['localhost',os.environ.get('FRONTEND_URL', 'api')] @@ -39,7 +45,7 @@ LOGIN_TIMEOUT_TIME = 15 LOGIN_MAX_RETRY = 3 -REGISTER_USER_URL = os.environ.get('REGISTER_USER_URL', "http://dev-fecfile.efdev.fec.gov/#/register?register_token=") +REGISTER_USER_URL = os.environ.get('REGISTER_USER_URL', "http://localhost/#/register?register_token=") OTP_MAX_RETRY = 20 OTP_DIGIT = 6 OTP_TIME_EXPIRY = 300 @@ -141,27 +147,13 @@ DATABASES = { - # 'default': { - # 'ENGINE': 'django.db.backends.sqlite3', - # 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), - # } - - #'default': { - # 'ENGINE': 'django.db.backends.postgresql_psycopg2', - # 'NAME': 'postgres', - # 'USER': 'postgres', - # 'PASSWORD': 'postgres', - # 'HOST': 'localhost', - # 'PORT': '5432', - #} - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': os.environ.get('DB_NAME', 'postgres'), - 'USER': os.environ.get('DB_USERNAME', 'postgres'), - 'PASSWORD': os.environ.get('DB_PASSWORD', 'postgres'), - 'HOST': os.environ.get('DB_HOST', '127.0.0.1'), - 'PORT': os.environ.get('DB_PORT', '5432') + 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'NAME': os.environ.get('FECFILE_DB_NAME', 'postgres'), + 'USER': os.environ.get('FECFILE_DB_USER', 'postgres'), + 'PASSWORD': os.environ.get('FECFILE_DB_PASSWORD', 'postgres'), + 'HOST': os.environ.get('FECFILE_DB_HOST', 'localhost'), + 'PORT': '5432', } } @@ -345,7 +337,6 @@ }, } } - #if DEBUG: # make all loggers use the console. for logger in LOGGING['loggers']: diff --git a/django-backend/wait_for_db.py b/django-backend/wait_for_db.py index a50a335d45..0d0c4058e5 100644 --- a/django-backend/wait_for_db.py +++ b/django-backend/wait_for_db.py @@ -6,13 +6,21 @@ @retry def postgres_test(): try: + + print("testing connection with dbname={} user={} host={} password={} connect_timeout=3000". + format( + os.environ.get('FECFILE_DB_NAME'), + os.environ.get('FECFILE_DB_USERNAME'), + os.environ.get('FECFILE_DB_HOST'), + os.environ.get('FECFILE_DB_PASSWORD'))) + conn = psycopg2.connect( 'dbname={} user={} host={} password={} connect_timeout=3000'. format( - os.environ.get('DB_NAME'), - os.environ.get('DB_USERNAME'), - os.environ.get('DB_HOST'), - os.environ.get('DB_PASSWORD'))) + os.environ.get('FECFILE_DB_NAME'), + os.environ.get('FECFILE_DB_USERNAME'), + os.environ.get('FECFILE_DB_HOST'), + os.environ.get('FECFILE_DB_PASSWORD'))) conn.close() return True except ImportError: diff --git a/docker-compose.yml b/docker-compose.yml index 26fb91e265..c5f8913260 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,31 +2,62 @@ version: '3' services: db: - image: postgres:10 + build: + context: './db' + dockerfile: Dockerfile + image: fecfile-db + container_name: fecfile-db restart: always environment: POSTGRES_USER: postgres POSTGRES_NAME: postgres POSTGRES_PASSWORD: postgres ports: - - "5432:5432" + - 5432:5432 + api: - env_file: ../local.env - build: './django-backend' - image: fecnxg + # env_file: ../local.env + build: + context: './django-backend' + dockerfile: Dockerfile-live + # command: python manage.py runserver 0.0.0.0:8080 + image: fecfile-api + container_name: fecfile-api volumes: - ./django-backend:/opt/nxg_fec ports: - - "8080:8080" + - 8080:8080 depends_on: - db + environment: + - FECFILE_DB_HOST + - FECFILE_DB_USERNAME + - FECFILE_DB_PASSWORD + - FECFILE_DB_NAME + web: build: context: './front-end' - dockerfile: Dockerfile + dockerfile: Dockerfile-live + image: fecfile-web + container_name: fecfile-web restart: always + volumes: +# - ./django-frontend:/opt/nxg_fec + - ./front-end:/usr/src/app ports: - - "80:80" + - 8081:80 depends_on: - api + proxy: + build: + context: './proxy' + dockerfile: Dockerfile + image: fecfile-proxy + container_name: fecfile-proxy + restart: always + volumes: + - ./proxy/log:/var/log/nginx + ports: + - 80:80 diff --git a/front-end/Dockerfile b/front-end/Dockerfile index c7c97cce98..0794206692 100644 --- a/front-end/Dockerfile +++ b/front-end/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /usr/src/app # add `/usr/src/app/node_modules/.bin` to $PATH ENV PATH /usr/src/app/node_modules/.bin:$PATH -RUN npm install -g npm to update +# RUN npm install -g npm to update # install and cache app dependencies COPY package.json /usr/src/app/package.json diff --git a/front-end/Dockerfile-live b/front-end/Dockerfile-live new file mode 100644 index 0000000000..8628965e5b --- /dev/null +++ b/front-end/Dockerfile-live @@ -0,0 +1,11 @@ +# base image +FROM node:10 as builder + +RUN mkdir /usr/src/app +WORKDIR /usr/src/app + +# add `/usr/src/app/node_modules/.bin` to $PATH +ENV PATH /usr/src/app/node_modules/.bin:$PATH + +CMD ["npm", "run", "start-docker"] + diff --git a/front-end/package.json b/front-end/package.json index 66f4d30abf..ef3f91ee9e 100644 --- a/front-end/package.json +++ b/front-end/package.json @@ -4,6 +4,7 @@ "scripts": { "ng": "ng", "start": "ng serve", + "start-docker": "npm install ; node --max_old_space_size=3072 ./node_modules/@angular/cli/bin/ng serve --port 80 --host 0.0.0.0 --configuration=local", "local": "ng serve --configuration=local", "local_memory": "node --max_old_space_size=3072 ./node_modules/@angular/cli/bin/ng serve --configuration=local", "local_aot": "ng serve --configuration=local --aot", @@ -62,12 +63,13 @@ "devDependencies": { "@angular-builders/custom-webpack": "^7.5.2", "@angular-devkit/build-angular": "^0.13.10", - "@angular/cli": "~6.0.8", + "@angular/cli": "^6.0.8", "@angular/compiler-cli": "^6.0.3", "@angular/language-service": "^6.0.3", "@types/jasmine": "~2.8.6", "@types/jasminewd2": "~2.0.3", "@types/node": "12.12.6", + "angular-password-strength-meter": "~2.0.0", "codelyzer": "~4.2.1", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", @@ -82,10 +84,9 @@ "ts-node": "~5.0.1", "tslint": "~5.9.1", "typescript": ">=2.7.0 <2.8.0", - "angular-password-strength-meter": "~2.0.0", "zxcvbn": "~4.4.2" }, "browser": { "crypto": false } -} \ No newline at end of file +} diff --git a/front-end/server/server.js b/front-end/server/server.js index a4fd521766..2afc875236 100644 --- a/front-end/server/server.js +++ b/front-end/server/server.js @@ -10,7 +10,7 @@ const db = jsonServer.router('./server/db.json'); server.use(bodyParser.urlencoded({extended: true})); server.use(bodyParser.json()); -server.use(cors()); +// server.use(cors()); /** * Use this function for a route if you need to do some server side processing. diff --git a/front-end/src/assets/data/appConfig.json b/front-end/src/assets/data/appConfig.json index b6229a733f..bc78fb42d6 100644 --- a/front-end/src/assets/data/appConfig.json +++ b/front-end/src/assets/data/appConfig.json @@ -1,4 +1,4 @@ { - "apiUrl": "http://localhost:8080/api/v1", + "apiUrl": "http://localhost/api/v1", "dcfConverterApiUrl": "https://dev-efile-api.efdev.fec.gov/dcf_converter/v1" } diff --git a/front-end/src/environments/environment.local.ts b/front-end/src/environments/environment.local.ts index b4801d43dc..1f62315329 100644 --- a/front-end/src/environments/environment.local.ts +++ b/front-end/src/environments/environment.local.ts @@ -1,7 +1,7 @@ export const environment = { production: false, name: 'local', - apiUrl: 'http://localhost:8080/api/v1', + apiUrl: 'http://localhost/api/v1', appTitle: 'FECfile', validateSuccess: 'All required fields have passed validation.', awsRegion: 'us-east-1', diff --git a/front-end/src/environments/environment.ts b/front-end/src/environments/environment.ts index f900361d8b..1e2af5fa63 100644 --- a/front-end/src/environments/environment.ts +++ b/front-end/src/environments/environment.ts @@ -5,13 +5,13 @@ export const environment = { production: false, name: 'development', - apiUrl: 'http://35.172.199.97/api/v1', + apiUrl: 'http://localhost/api/v1', appTitle: 'FECfile', validateSuccess: 'All required fields have passed validation.', awsRegion: 'us-east-1', awsIdentityPoolId: 'us-east-1:f0f414b2-8e9f-4488-9cc1-34a5918a1a1d', - ACCESS_KEY: process.env.ACCESS_KEY, - SECRET_KEY: process.env.SECRET_KEY, + ACCESS_KEY: _process.env.ACCESS_KEY, + SECRET_KEY: _process.env.SECRET_KEY, dcfConverterApiUrl: 'https://dev-efile-api.efdev.fec.gov/dcf_converter/v1' }; diff --git a/protractor/src/e2e/config.js b/protractor/src/e2e/config.js index c5b91113b4..d5c36e6d01 100644 --- a/protractor/src/e2e/config.js +++ b/protractor/src/e2e/config.js @@ -7,7 +7,7 @@ exports.config = { framework: 'jasmine2', directConnect: true, // this runs selenium server on the fly and it has faster execution + parallel execution efficiently //and tests are more stable with local server started instead of directConnection. - baseUrl: 'http://dev-fecfile.efdev.fec.gov/', + baseUrl: 'http://localhost/', capabilities: { browserName: 'chrome', shardTestFiles: false, diff --git a/proxy/Dockerfile b/proxy/Dockerfile new file mode 100644 index 0000000000..4aee0847d9 --- /dev/null +++ b/proxy/Dockerfile @@ -0,0 +1,6 @@ +FROM nginx + +COPY ./default.conf /etc/nginx/conf.d/default.conf + +COPY ./includes/ /etc/nginx/includes/ + diff --git a/proxy/default.conf b/proxy/default.conf new file mode 100644 index 0000000000..64d9a850d1 --- /dev/null +++ b/proxy/default.conf @@ -0,0 +1,16 @@ +# web service1 config. +server { + listen 80; + + location / { + include /etc/nginx/includes/proxy.conf; + proxy_pass http://web/; + } + + location /api { + include /etc/nginx/includes/proxy.conf; + proxy_pass http://api:8080; + } +} + + diff --git a/proxy/includes/proxy.conf b/proxy/includes/proxy.conf new file mode 100644 index 0000000000..c02c5ac5ab --- /dev/null +++ b/proxy/includes/proxy.conf @@ -0,0 +1,8 @@ +proxy_set_header Host $host; +proxy_set_header X-Real-IP $remote_addr; +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +proxy_set_header X-Forwarded-Proto $scheme; +proxy_buffering off; +proxy_request_buffering off; +proxy_http_version 1.1; +proxy_intercept_errors on; \ No newline at end of file From 93fe8e74ab659d30fd6262d5c9b9b8223a75e1ce Mon Sep 17 00:00:00 2001 From: Al Crowley Date: Tue, 9 Nov 2021 16:32:08 -0500 Subject: [PATCH 3/7] adding some build and cloud foundry deploy scripts for testing * draft cf-deploy.sh script * setup deployment manifests * set directories where we need to save nginx config files --- cf-deploy.sh | 20 +++++ .../front-end-nginx-config/buildpack.yml | 3 + .../front-end-nginx-config/manifest.yml | 6 ++ .../front-end-nginx-config/mime.types | 78 +++++++++++++++++++ .../front-end-nginx-config/nginx.conf | 24 ++++++ front-end/Dockerfile-cf-build | 9 +++ 6 files changed, 140 insertions(+) create mode 100755 cf-deploy.sh create mode 100644 deploy-config/front-end-nginx-config/buildpack.yml create mode 100644 deploy-config/front-end-nginx-config/manifest.yml create mode 100644 deploy-config/front-end-nginx-config/mime.types create mode 100644 deploy-config/front-end-nginx-config/nginx.conf create mode 100644 front-end/Dockerfile-cf-build diff --git a/cf-deploy.sh b/cf-deploy.sh new file mode 100755 index 0000000000..82b3f166c7 --- /dev/null +++ b/cf-deploy.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# magic StackOverflow one liner to get the dirname where the script lives +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" + +cd ${SCRIPT_DIR}/front-end + +#clean enverything up so we get a fresh build +rm -rf dist node_modules + +#create the docker we will use to perform the build +docker build -t fecfile-web-cf-build -f Dockerfile-cf-build . + +#build the app +docker run -v ${SCRIPT_DIR}/front-end/:/usr/src/app fecfile-web-cf-build sh -c 'cd /usr/src/app/ && npm install && node --max_old_space_size=4000 ./node_modules/\@angular/cli/bin/ng build' + +#copy all the nginx and cloud foundry files into the Angualr dist dir +cp ${SCRIPT_DIR}/deploy-config/front-end-nginx-config/* ${SCRIPT_DIR}/front-end/dist +cd ${SCRIPT_DIR}/front-end/dist +cf push diff --git a/deploy-config/front-end-nginx-config/buildpack.yml b/deploy-config/front-end-nginx-config/buildpack.yml new file mode 100644 index 0000000000..3400849e01 --- /dev/null +++ b/deploy-config/front-end-nginx-config/buildpack.yml @@ -0,0 +1,3 @@ +--- +nginx: + version: mainline diff --git a/deploy-config/front-end-nginx-config/manifest.yml b/deploy-config/front-end-nginx-config/manifest.yml new file mode 100644 index 0000000000..1555a61f65 --- /dev/null +++ b/deploy-config/front-end-nginx-config/manifest.yml @@ -0,0 +1,6 @@ +applications: + - name: fecfile-online-frontend + instances: 1 + memory: 256M + buildpack: paketo-buildpacks/nginx + diff --git a/deploy-config/front-end-nginx-config/mime.types b/deploy-config/front-end-nginx-config/mime.types new file mode 100644 index 0000000000..bc0d7f2c53 --- /dev/null +++ b/deploy-config/front-end-nginx-config/mime.types @@ -0,0 +1,78 @@ +types { + text/html html htm shtml; + text/css css; + text/xml xml; + image/gif gif; + image/jpeg jpeg jpg; + application/x-javascript js; + application/atom+xml atom; + application/rss+xml rss; + font/ttf ttf; + font/woff woff; + font/woff2 woff2; + text/mathml mml; + text/plain txt; + text/vnd.sun.j2me.app-descriptor jad; + text/vnd.wap.wml wml; + text/x-component htc; + text/cache-manifest manifest; + image/png png; + image/tiff tif tiff; + image/vnd.wap.wbmp wbmp; + image/x-icon ico; + image/x-jng jng; + image/x-ms-bmp bmp; + image/svg+xml svg svgz; + image/webp webp; + application/java-archive jar war ear; + application/mac-binhex40 hqx; + application/msword doc; + application/pdf pdf; + application/postscript ps eps ai; + application/rtf rtf; + application/vnd.ms-excel xls; + application/vnd.ms-powerpoint ppt; + application/vnd.wap.wmlc wmlc; + application/vnd.google-earth.kml+xml kml; + application/vnd.google-earth.kmz kmz; + application/x-7z-compressed 7z; + application/x-cocoa cco; + application/x-java-archive-diff jardiff; + application/x-java-jnlp-file jnlp; + application/x-makeself run; + application/x-perl pl pm; + application/x-pilot prc pdb; + application/x-rar-compressed rar; + application/x-redhat-package-manager rpm; + application/x-sea sea; + application/x-shockwave-flash swf; + application/x-stuffit sit; + application/x-tcl tcl tk; + application/x-x509-ca-cert der pem crt; + application/x-xpinstall xpi; + application/xhtml+xml xhtml; + application/zip zip; + application/octet-stream bin exe dll; + application/octet-stream deb; + application/octet-stream dmg; + application/octet-stream eot; + application/octet-stream iso img; + application/octet-stream msi msp msm; + application/json json; + audio/midi mid midi kar; + audio/mpeg mp3; + audio/ogg ogg; + audio/x-m4a m4a; + audio/x-realaudio ra; + video/3gpp 3gpp 3gp; + video/mp4 mp4; + video/mpeg mpeg mpg; + video/quicktime mov; + video/webm webm; + video/x-flv flv; + video/x-m4v m4v; + video/x-mng mng; + video/x-ms-asf asx asf; + video/x-ms-wmv wmv; + video/x-msvideo avi; +} diff --git a/deploy-config/front-end-nginx-config/nginx.conf b/deploy-config/front-end-nginx-config/nginx.conf new file mode 100644 index 0000000000..7010690aad --- /dev/null +++ b/deploy-config/front-end-nginx-config/nginx.conf @@ -0,0 +1,24 @@ +worker_processes 1; +daemon off; + +error_log stderr; +events { worker_connections 1024; } + +http { + charset utf-8; + log_format cloudfoundry 'NginxLog "$request" $status $body_bytes_sent'; + access_log /dev/stdout cloudfoundry; + default_type application/octet-stream; + include mime.types; + sendfile on; + + tcp_nopush on; + keepalive_timeout 30; + port_in_redirect off; # Ensure that redirects don't include the internal container PORT - 8080 + + server { + listen {{port}}; + root fec-eFilling; + index index.html index.htm Default.htm; + } +} diff --git a/front-end/Dockerfile-cf-build b/front-end/Dockerfile-cf-build new file mode 100644 index 0000000000..f724fc0282 --- /dev/null +++ b/front-end/Dockerfile-cf-build @@ -0,0 +1,9 @@ +# base image +FROM node:10 as builder + +RUN mkdir /usr/src/app +WORKDIR /usr/src/app + +# add `/usr/src/app/node_modules/.bin` to $PATH +ENV PATH /usr/src/app/node_modules/.bin:$PATH + From 79b1b01a9eeac8d5ab7d8d4a4cd452d10ea6e48a Mon Sep 17 00:00:00 2001 From: Al Crowley Date: Mon, 22 Nov 2021 12:25:31 -0500 Subject: [PATCH 4/7] Improvements to the development Docker/compose setup * Adding eslint * Added lint target in package.json * Reorganized the dockerfiles * created a lint.sh script * Adding support for encrypted DB backups --- cf-deploy.sh | 2 +- db/Dockerfile | 15 +- django-backend/wait_for_db.py | 2 +- docker-compose.yml | 7 +- front-end/.eslintrc.json | 23 ++++ .../Dockerfile-lint} | 4 +- front-end/{ => build-scripts}/Dockerfile-live | 0 front-end/build-scripts/lint.sh | 16 +++ front-end/package.json | 8 +- front-end/tslint.json | 130 ------------------ 10 files changed, 65 insertions(+), 142 deletions(-) create mode 100644 front-end/.eslintrc.json rename front-end/{Dockerfile-cf-build => build-scripts/Dockerfile-lint} (75%) rename front-end/{ => build-scripts}/Dockerfile-live (100%) create mode 100755 front-end/build-scripts/lint.sh delete mode 100644 front-end/tslint.json diff --git a/cf-deploy.sh b/cf-deploy.sh index 82b3f166c7..4b0376d3a4 100755 --- a/cf-deploy.sh +++ b/cf-deploy.sh @@ -9,7 +9,7 @@ cd ${SCRIPT_DIR}/front-end rm -rf dist node_modules #create the docker we will use to perform the build -docker build -t fecfile-web-cf-build -f Dockerfile-cf-build . +docker build -t fecfile-web-cf-build -f build-scripts/Dockerfile-cf-build . #build the app docker run -v ${SCRIPT_DIR}/front-end/:/usr/src/app fecfile-web-cf-build sh -c 'cd /usr/src/app/ && npm install && node --max_old_space_size=4000 ./node_modules/\@angular/cli/bin/ng build' diff --git a/db/Dockerfile b/db/Dockerfile index 487f33dd46..a8638e9f25 100644 --- a/db/Dockerfile +++ b/db/Dockerfile @@ -1,11 +1,16 @@ FROM postgres:10 -ENV POSTGRES_USER: postgres -ENV POSTGRES_NAME: postgres -ENV POSTGRES_PASSWORD: postgres +ENV POSTGRES_USER=postgres +ENV POSTGRES_NAME=postgres +ENV POSTGRES_PASSWORD=postgres +ARG ENCRYPTION_PASSWORD + # Load scripts to run at container initialization. They are run in alphabetical order. -COPY initdb.sql /docker-entrypoint-initdb.d/1.sql -COPY fecfile-frontend-dev.sql.gz /docker-entrypoint-initdb.d/2.sql.gz +COPY initdb.sql.gpg /tmp/initdb.sql.gpg +RUN gpg --batch --output /docker-entrypoint-initdb.d/1.sql --passphrase $ENCRYPTION_PASSWORD --decrypt /tmp/initdb.sql.gpg + +COPY fecfile-frontend-dev.sql.gz.gpg /tmp/fecfile-frontend-dev.sql.gz.gpg +RUN gpg --batch --output /docker-entrypoint-initdb.d/2.sql.gz --passphrase $ENCRYPTION_PASSWORD --decrypt /tmp/fecfile-frontend-dev.sql.gz.gpg EXPOSE 5432 diff --git a/django-backend/wait_for_db.py b/django-backend/wait_for_db.py index 0d0c4058e5..c6606074ad 100644 --- a/django-backend/wait_for_db.py +++ b/django-backend/wait_for_db.py @@ -3,7 +3,7 @@ from retrying import retry -@retry +@retry(wait_fixed=2000) def postgres_test(): try: diff --git a/docker-compose.yml b/docker-compose.yml index c5f8913260..3cdae4fca0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,8 @@ services: build: context: './db' dockerfile: Dockerfile + args: + ENCRYPTION_PASSWORD: ${ENCRYPTION_PASSWORD} image: fecfile-db container_name: fecfile-db restart: always @@ -12,6 +14,7 @@ services: POSTGRES_USER: postgres POSTGRES_NAME: postgres POSTGRES_PASSWORD: postgres + ports: - 5432:5432 @@ -19,7 +22,7 @@ services: # env_file: ../local.env build: context: './django-backend' - dockerfile: Dockerfile-live + dockerfile: './Dockerfile-live' # command: python manage.py runserver 0.0.0.0:8080 image: fecfile-api container_name: fecfile-api @@ -38,7 +41,7 @@ services: web: build: context: './front-end' - dockerfile: Dockerfile-live + dockerfile: './build-scripts/Dockerfile-live' image: fecfile-web container_name: fecfile-web restart: always diff --git a/front-end/.eslintrc.json b/front-end/.eslintrc.json new file mode 100644 index 0000000000..3aa1271d3e --- /dev/null +++ b/front-end/.eslintrc.json @@ -0,0 +1,23 @@ +{ + "env": { + "browser": true, + "es6": true + }, + "extends": [ + "google" + ], + "globals": { + "Atomics": "readonly", + "SharedArrayBuffer": "readonly" + }, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module" + }, + "plugins": [ + "@typescript-eslint" + ], + "rules": { + } +} \ No newline at end of file diff --git a/front-end/Dockerfile-cf-build b/front-end/build-scripts/Dockerfile-lint similarity index 75% rename from front-end/Dockerfile-cf-build rename to front-end/build-scripts/Dockerfile-lint index f724fc0282..48d0b52745 100644 --- a/front-end/Dockerfile-cf-build +++ b/front-end/build-scripts/Dockerfile-lint @@ -1,9 +1,11 @@ # base image -FROM node:10 as builder +FROM node:16 as builder RUN mkdir /usr/src/app WORKDIR /usr/src/app +RUN npm install -g eslint + # add `/usr/src/app/node_modules/.bin` to $PATH ENV PATH /usr/src/app/node_modules/.bin:$PATH diff --git a/front-end/Dockerfile-live b/front-end/build-scripts/Dockerfile-live similarity index 100% rename from front-end/Dockerfile-live rename to front-end/build-scripts/Dockerfile-live diff --git a/front-end/build-scripts/lint.sh b/front-end/build-scripts/lint.sh new file mode 100755 index 0000000000..65c813f271 --- /dev/null +++ b/front-end/build-scripts/lint.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# you should run this from the +# magic StackOverflow one liner to get the dirname where the script lives +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" + + +rm -rf docker-build-tmp +mkdir -p docker-build-tmp +cp build-scripts/Dockerfile-lint docker-build-tmp/Dockerfile-lint +cd docker-build-tmp +docker build -t fecfile-lint -f Dockerfile-lint . +rm -rf docker-build-tmp +echo run +docker run -v ${SCRIPT_DIR}/:/usr/src/app fecfile-lint sh -c 'cd /usr/src/app && eslint "src/**" || echo BAD NEWS: LINT ERRORS FOUND' + diff --git a/front-end/package.json b/front-end/package.json index ef3f91ee9e..fa34f51cd6 100644 --- a/front-end/package.json +++ b/front-end/package.json @@ -12,9 +12,9 @@ "build": "ng build", "build-local": "ng build --configuration=local", "test": "ng test", - "lint": "ng lint", "e2e": "ng e2e", - "json-server": "nodemon ./server/server.js" + "json-server": "nodemon ./server/server.js", + "lint": "sh ./build-scripts/lint.sh" }, "private": true, "dependencies": { @@ -69,8 +69,12 @@ "@types/jasmine": "~2.8.6", "@types/jasminewd2": "~2.0.3", "@types/node": "12.12.6", + "@typescript-eslint/eslint-plugin": "^5.4.0", + "@typescript-eslint/parser": "^5.4.0", "angular-password-strength-meter": "~2.0.0", "codelyzer": "~4.2.1", + "eslint": "^8.3.0", + "eslint-config-google": "^0.14.0", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "jwt-decode": "^2.2.0", diff --git a/front-end/tslint.json b/front-end/tslint.json deleted file mode 100644 index 3ea984c776..0000000000 --- a/front-end/tslint.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "rulesDirectory": [ - "node_modules/codelyzer" - ], - "rules": { - "arrow-return-shorthand": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "deprecation": { - "severity": "warn" - }, - "eofline": true, - "forin": true, - "import-blacklist": [ - true, - "rxjs/Rx" - ], - "import-spacing": true, - "indent": [ - true, - "spaces" - ], - "interface-over-type-literal": true, - "label-position": true, - "max-line-length": [ - true, - 140 - ], - "member-access": false, - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-arg": true, - "no-bitwise": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-super": true, - "no-empty": false, - "no-empty-interface": true, - "no-eval": true, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "no-misused-new": true, - "no-non-null-assertion": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unnecessary-initializer": true, - "no-unused-expression": true, - "no-use-before-declare": true, - "no-var-keyword": true, - "object-literal-sort-keys": false, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "prefer-const": true, - "quotemark": [ - true, - "single" - ], - "radix": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "unified-signatures": true, - "variable-name": false, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ], - "no-output-on-prefix": true, - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": true, - "no-input-rename": true, - "no-output-rename": true, - "use-life-cycle-interface": true, - "use-pipe-transform-interface": true, - "component-class-suffix": true, - "directive-class-suffix": true - } -} From ffacfef1c7d334366e6e7ac019a36c2bf932698d Mon Sep 17 00:00:00 2001 From: Al Crowley Date: Tue, 30 Nov 2021 09:35:43 -0500 Subject: [PATCH 5/7] CircleCI build changes * Explicitally set requirements.txt Python dependencies in CircleCI build * set python version to 3.7 * separate jobs for python and angular code * setup eslint --- .circleci/config.yml | 53 +++++++++++++++++++++++++++++++++++----- front-end/.eslintrc.json | 3 +-- front-end/package.json | 2 +- 3 files changed, 49 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ae37b03572..ab8ada2716 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,14 +14,14 @@ orbs: # Define a job to be invoked later in a workflow. # See: https://circleci.com/docs/2.0/configuration-reference/#jobs jobs: - build-and-test: # This is the name of the job, feel free to change it to better match what you're trying to do! + build-and-test-python: # This is the name of the job, feel free to change it to better match what you're trying to do! # These next lines defines a Docker executors: https://circleci.com/docs/2.0/executor-types/ # You can specify an image from Dockerhub or use one of the convenience images from CircleCI's Developer Hub # A list of available CircleCI Docker convenience images are available here: https://circleci.com/developer/images/image/cimg/python # The executor is the environment in which the steps below will be executed - below will use a python 3.8 container # Change the version below to your required version of python docker: - - image: cimg/python:3.6 + - image: cimg/python:3.7 # Checkout the code as the first step. This is a dedicated CircleCI step. # The python orb's install-packages step will install the dependencies from a Pipfile via Pipenv by default. # Here we're making sure we use just use the system-wide pip. By default it uses the project root's requirements.txt. @@ -29,19 +29,60 @@ jobs: # CircleCI will report the results back to your VCS provider. steps: - checkout + - python/install-packages: pkg-manager: pip - app-dir: ~/project/django-backend/ # If you're requirements.txt isn't in the root directory. - # pip-dependency-file: test-requirements.txt # if you have a different name for your requirements file, maybe one that combines your runtime and test requirements. + app-dir: ~/project/django-backend/ + pip-dependency-file: requirements.txt - run: name: Run tests # This assumes pytest is installed via the install-package step above command: python manage.py test + working_directory: ~/project/django-backend/ + build-and-test-angular: # This is the name of the job, feel free to change it to better match what you're trying to do! + # These next lines defines a Docker executors: https://circleci.com/docs/2.0/executor-types/ + # You can specify an image from Dockerhub or use one of the convenience images from CircleCI's Developer Hub + # A list of available CircleCI Docker convenience images are available here: https://circleci.com/developer/images/image/cimg/python + # The executor is the environment in which the steps below will be executed - below will use a python 3.8 container + # Change the version below to your required version of python + docker: + #- image: cimg/node:10.23.2 + - image: cimg/node:16.12.0 + # Checkout the code as the first step. This is a dedicated CircleCI step. + # The python orb's install-packages step will install the dependencies from a Pipfile via Pipenv by default. + # Here we're making sure we use just use the system-wide pip. By default it uses the project root's requirements.txt. + # Then run your tests! + # CircleCI will report the results back to your VCS provider. + steps: + - checkout +# - run: +# name: npm install +# command: npm install +# working_directory: ~/project/front-end/ + + - run: + name: intall eslint eslint-config-google + command: npm install eslint @typescript-eslint/parser + working_directory: ~/project/front-end/ + + - run: + command: ls ~/project/front-end/node_modules/ || echo not found + + - run: + name: run linter version + command: ./node_modules/.bin/eslint --version + working_directory: ~/project/front-end/ + + - run: + name: run linter + command: ./node_modules/.bin/eslint "src/**" + working_directory: ~/project/front-end/ # Invoke jobs via workflows # See: https://circleci.com/docs/2.0/configuration-reference/#workflows workflows: - sample: # This is the name of the workflow, feel free to change it to better match your workflow. + test: # This is the name of the workflow, feel free to change it to better match your workflow. # Inside the workflow, you define the jobs you want to run. jobs: - - build-and-test + - build-and-test-python + - build-and-test-angular diff --git a/front-end/.eslintrc.json b/front-end/.eslintrc.json index 3aa1271d3e..737378dc18 100644 --- a/front-end/.eslintrc.json +++ b/front-end/.eslintrc.json @@ -4,7 +4,6 @@ "es6": true }, "extends": [ - "google" ], "globals": { "Atomics": "readonly", @@ -20,4 +19,4 @@ ], "rules": { } -} \ No newline at end of file +} diff --git a/front-end/package.json b/front-end/package.json index fa34f51cd6..350d9622e3 100644 --- a/front-end/package.json +++ b/front-end/package.json @@ -73,7 +73,7 @@ "@typescript-eslint/parser": "^5.4.0", "angular-password-strength-meter": "~2.0.0", "codelyzer": "~4.2.1", - "eslint": "^8.3.0", + "eslint": "^6.8.0", "eslint-config-google": "^0.14.0", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", From d8130438f33b3a62fc379d94fb3e485fc5d3f606 Mon Sep 17 00:00:00 2001 From: Al Crowley Date: Thu, 2 Dec 2021 12:03:52 -0500 Subject: [PATCH 6/7] Updated db Dockerfile to support encrypted or unencrypted data files --- db/Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/db/Dockerfile b/db/Dockerfile index a8638e9f25..429d8cac85 100644 --- a/db/Dockerfile +++ b/db/Dockerfile @@ -7,10 +7,12 @@ ARG ENCRYPTION_PASSWORD # Load scripts to run at container initialization. They are run in alphabetical order. -COPY initdb.sql.gpg /tmp/initdb.sql.gpg -RUN gpg --batch --output /docker-entrypoint-initdb.d/1.sql --passphrase $ENCRYPTION_PASSWORD --decrypt /tmp/initdb.sql.gpg +COPY initdb.sql* /tmp/ +RUN if [ -f "/tmp/initdb.sql.gpg" ]; then gpg --batch --output /docker-entrypoint-initdb.d/1.sql --passphrase $ENCRYPTION_PASSWORD --decrypt /tmp/initdb.sql.gpg; fi +RUN if [ -f "/tmp/initdb.sql" ]; then cp /tmp/initdb.sql /docker-entrypoint-initdb.d/1.sql; fi -COPY fecfile-frontend-dev.sql.gz.gpg /tmp/fecfile-frontend-dev.sql.gz.gpg -RUN gpg --batch --output /docker-entrypoint-initdb.d/2.sql.gz --passphrase $ENCRYPTION_PASSWORD --decrypt /tmp/fecfile-frontend-dev.sql.gz.gpg +COPY fecfile-frontend-dev.sql.gz* /tmp/ +RUN if [ -f "/tmp/fecfile-frontend-dev.sql.gz.gpg" ]; then gpg --batch --output /docker-entrypoint-initdb.d/2.sql.gz --passphrase $ENCRYPTION_PASSWORD --decrypt /tmp/fecfile-frontend-dev.sql.gz.gpg; fi +RUN if [ -f "/tmp/fecfile-frontend-dev.sql.gz" ]; then cp /tmp/fecfile-frontend-dev.sql.gz /docker-entrypoint-initdb.d/2.sql.gz; fi EXPOSE 5432 From c72b2cd982795482bad4f9b89b6ac4fdc3ce3674 Mon Sep 17 00:00:00 2001 From: Al Crowley Date: Thu, 2 Dec 2021 14:08:26 -0500 Subject: [PATCH 7/7] Update the front-end to Angular 11 (#2) * Angular 7 upgrade * Broken Angular 8 upgrade * Fixes for Angular 8 upgrade * fix for Angular 8 - temp fix for AWS keys in environment * Angular 9 upgrade * After the auto-upgrade for Angular 10 * Modify scss paths to work with Angular 10 build * Angular 11 upgrade --- front-end/angular.json | 44 ++++++++++--- front-end/package.json | 66 ++++++++++--------- .../src/{browserslist => .browserslistrc} | 0 .../src/app/account/account.component.spec.ts | 4 +- front-end/src/app/account/account.service.ts | 1 - .../manage-user/manage-user.component.spec.ts | 4 +- .../app-layout/app-layout.component.spec.ts | 4 +- .../confirm-two-factor.component.spec.ts | 4 +- .../consent-modal.component.spec.ts | 4 +- .../create-password.component.spec.ts | 4 +- .../login/login.component.spec.ts | 4 +- .../personal-key.component.spec.ts | 4 +- .../register/register.component.spec.ts | 4 +- .../two-factor-login.component.spec.ts | 4 +- front-end/src/app/app.module.ts | 5 +- front-end/src/app/app.routes.ts | 15 +++-- .../addnew/addnew_contacts.component.spec.ts | 4 +- .../contact-details-modal.component.spec.ts | 4 +- .../contacts-table.component.ts | 2 +- .../filter/contacts-filter.component.spec.ts | 4 +- .../contributors.component.spec.ts | 4 +- .../app/dashboard/dashboard.component.spec.ts | 4 +- .../f1m-affiliation.component.spec.ts | 4 +- .../f1m-candidates-table.component.spec.ts | 4 +- .../f1m-preview/f1m-preview.component.spec.ts | 4 +- .../f1m-qualification.component.spec.ts | 4 +- .../f1m-type/f1m-type.component.spec.ts | 4 +- .../app/f1m-module/f1m/f1m.component.spec.ts | 4 +- .../forms/form-24/f24/f24.component.spec.ts | 4 +- .../form-entry/form-entry.component.spec.ts | 4 +- .../cash-on-hand.component.spec.ts | 4 +- .../forms/form-3x/f3x/f3x.component.spec.ts | 4 +- .../financial-summary.component.spec.ts | 4 +- .../individual-receipt/abstract-schedule.ts | 3 +- .../individual-receipt.component.spec.ts | 4 +- .../report-type-sidebar.component.spec.ts | 4 +- .../report-type/report-type.component.spec.ts | 4 +- .../report-type/report-type.component.ts | 2 +- .../sched-h1/sched-h1.component.spec.ts | 4 +- .../sched-h5/sched-h5.component.spec.ts | 4 +- .../sched-h6/sched-h6.component.spec.ts | 4 +- .../transaction-sidebar.component.spec.ts | 4 +- .../transaction-type.component.spec.ts | 4 +- .../forms/form-99/f99/f99.component.spec.ts | 4 +- .../form-99/reason/reason.component.spec.ts | 4 +- .../forms/form-99/type/type.component.spec.ts | 4 +- .../src/app/forms/forms.component.spec.ts | 4 +- .../endorser-summary.component.spec.ts | 4 +- .../endorser/endorser.component.spec.ts | 4 +- .../app/forms/sched-c/loan.component.spec.ts | 4 +- .../loanpayment/loanpayment.component.spec.ts | 4 +- .../forms/sched-c1/sched-c1.component.spec.ts | 4 +- .../debt-summary.component.spec.ts | 4 +- .../sched-f-core.component.spec.ts | 4 +- .../forms/sched-f/sched-f.component.spec.ts | 4 +- .../forms/sched-h1/sched-h1.component.spec.ts | 4 +- .../forms/sched-h2/sched-h2.component.spec.ts | 4 +- .../forms/sched-h3/sched-h3.component.scss | 10 +-- .../forms/sched-h3/sched-h3.component.spec.ts | 4 +- .../forms/sched-h4/sched-h4.component.spec.ts | 4 +- .../forms/sched-h5/sched-h5.component.spec.ts | 4 +- .../forms/sched-h6/sched-h6.component.spec.ts | 4 +- .../forms/sched-l/sched-l.component.spec.ts | 4 +- .../transaction-categories.component.spec.ts | 4 +- .../transactions-filter.component.spec.ts | 4 +- .../f24-link-modal.component.spec.ts | 4 +- front-end/src/app/help/help.component.spec.ts | 4 +- .../cancel-import-confirm.component.scss | 3 +- .../cancel-import-confirm.component.spec.ts | 4 +- .../clean-contacts.component.spec.ts | 4 +- .../duplicate-contacts.component.spec.ts | 4 +- .../error-contacts-field.component.spec.ts | 4 +- .../error-contacts.component.spec.ts | 4 +- .../configure-contacts.component.spec.ts | 4 +- .../import-contacts.component.spec.ts | 4 +- .../import-done-contacts.component.spec.ts | 4 +- .../import-how-to.component.spec.ts | 4 +- .../progress-bar.component.spec.ts | 4 +- .../review-upload.component.spec.ts | 4 +- .../upload-contacts.component.spec.ts | 4 +- .../import-fecfile-success.component.spec.ts | 4 +- .../import-fecfile.component.spec.ts | 4 +- .../import-transactions.component.spec.ts | 4 +- .../import-trx-clean-info.component.spec.ts | 4 +- .../import-trx-clean.component.spec.ts | 4 +- .../import-trx-done.component.spec.ts | 4 +- .../import-trx-file-select.component.spec.ts | 4 +- .../import-trx-how-to.component.spec.ts | 4 +- .../import-trx-review.component.spec.ts | 4 +- .../upload-complete-message.component.spec.ts | 4 +- .../import-trx-sidebar.component.spec.ts | 4 +- .../import-trx-start.component.spec.ts | 4 +- .../import-trx-upload.component.spec.ts | 4 +- .../reset-selector.component.spec.ts | 4 +- .../user-info/user-info.component.spec.ts | 4 +- .../src/app/profile/profile.component.spec.ts | 4 +- .../reportdetails.component.spec.ts | 4 +- .../reportheader.component.spec.ts | 4 +- .../src/app/reports/reports.component.spec.ts | 4 +- front-end/src/app/reports/reports.service.ts | 2 +- .../reportsidebar.component.spec.ts | 4 +- .../app/settings/settings.component.spec.ts | 4 +- .../confirm-modal.component.spec.ts | 4 +- .../partials/header/header.component.spec.ts | 4 +- .../input-modal/input-modal.component.spec.ts | 4 +- .../preview/preview.component.spec.ts | 4 +- .../sidebar/sidebar.component.spec.ts | 4 +- .../sign-and-submit.component.spec.ts | 4 +- .../partials/sign/sign.component.spec.ts | 4 +- .../shared/partials/sign/sign.component.ts | 2 +- .../spinner/spinner.component.spec.ts | 4 +- .../partials/steps/steps.component.spec.ts | 4 +- .../partials/submit/submit.component.spec.ts | 4 +- .../validate/validate.component.spec.ts | 4 +- .../src/app/shared/scss/_modal-standard.scss | 2 +- .../services/DialogService/dialog.service.ts | 3 +- .../services/FormsService/forms.service.ts | 2 +- .../SessionService/session.service.ts | 2 +- .../two-factor-guard.guard.spec.ts | 2 +- .../tools-create-backup.component.spec.ts | 4 +- .../tools-export-names.component.spec.ts | 4 +- .../tools-import-names.component.spec.ts | 4 +- ...ools-import-transactions.component.spec.ts | 4 +- .../tools-merge-names.component.spec.ts | 4 +- .../src/app/tools/tools.component.spec.ts | 4 +- .../src/app/users/users.component.spec.ts | 4 +- .../src/environments/environment.local.ts | 4 +- front-end/src/environments/environment.ts | 4 +- front-end/src/polyfills.ts | 26 ++------ front-end/src/styles.scss | 3 +- front-end/src/tsconfig.app.json | 12 ++-- front-end/src/tsconfig.spec.json | 1 - front-end/tsconfig.json | 5 +- front-end/tslint.json | 8 +++ 134 files changed, 347 insertions(+), 314 deletions(-) rename front-end/src/{browserslist => .browserslistrc} (100%) create mode 100644 front-end/tslint.json diff --git a/front-end/angular.json b/front-end/angular.json index 2bfc4dfaf1..5fc46c84dc 100644 --- a/front-end/angular.json +++ b/front-end/angular.json @@ -11,11 +11,9 @@ "schematics": {}, "architect": { "build": { - "builder": "@angular-builders/custom-webpack:browser", + "builder": "@angular-devkit/build-angular:browser", "options": { - "customWebpackConfig": { - "path": "./extra-webpack.config.js" - }, + "aot": true, "outputPath": "dist/fec-eFilling", "index": "src/index.html", "main": "src/main.ts", @@ -34,6 +32,12 @@ }, "configurations": { "production": { + "budgets": [ + { + "type": "anyComponentStyle", + "maximumWarning": "6kb" + } + ], "fileReplacements": [ { "replace": "src/environments/environment.ts", @@ -43,7 +47,6 @@ "optimization": true, "outputHashing": "all", "sourceMap": false, - "extractCss": true, "namedChunks": false, "aot": true, "extractLicenses": true, @@ -51,6 +54,12 @@ "buildOptimizer": true }, "awsdev": { + "budgets": [ + { + "type": "anyComponentStyle", + "maximumWarning": "6kb" + } + ], "fileReplacements": [ { "replace": "src/environments/environment.ts", @@ -60,7 +69,6 @@ "optimization": true, "outputHashing": "all", "sourceMap": false, - "extractCss": true, "namedChunks": false, "aot": false, "extractLicenses": true, @@ -68,6 +76,12 @@ "buildOptimizer": false }, "awsuat": { + "budgets": [ + { + "type": "anyComponentStyle", + "maximumWarning": "6kb" + } + ], "fileReplacements": [ { "replace": "src/environments/environment.ts", @@ -77,7 +91,6 @@ "optimization": true, "outputHashing": "all", "sourceMap": false, - "extractCss": true, "namedChunks": false, "aot": false, "extractLicenses": true, @@ -85,6 +98,12 @@ "buildOptimizer": false }, "awsqa": { + "budgets": [ + { + "type": "anyComponentStyle", + "maximumWarning": "6kb" + } + ], "fileReplacements": [ { "replace": "src/environments/environment.ts", @@ -94,7 +113,6 @@ "optimization": true, "outputHashing": "all", "sourceMap": false, - "extractCss": true, "namedChunks": false, "aot": false, "extractLicenses": true, @@ -102,6 +120,12 @@ "buildOptimizer": false }, "local": { + "budgets": [ + { + "type": "anyComponentStyle", + "maximumWarning": "6kb" + } + ], "fileReplacements": [ { "replace": "src/environments/environment.ts", @@ -112,7 +136,7 @@ } }, "serve": { - "builder": "@angular-builders/dev-server:generic", + "builder": "@angular-devkit/build-angular:dev-server", "options": { "browserTarget": "fec-eFilling:build" }, @@ -193,7 +217,7 @@ "defaultProject": "fec-eFilling", "schematics": { "@schematics/angular:component": { - "styleext": "scss" + "style": "scss" } } } \ No newline at end of file diff --git a/front-end/package.json b/front-end/package.json index 350d9622e3..25bf390203 100644 --- a/front-end/package.json +++ b/front-end/package.json @@ -19,16 +19,17 @@ "private": true, "dependencies": { "@angular-builders/dev-server": "^7.1.1", - "@angular/animations": "^6.0.3", - "@angular/common": "^6.0.3", - "@angular/compiler": "^6.0.3", - "@angular/core": "^6.0.3", - "@angular/forms": "^6.0.3", - "@angular/http": "^6.0.3", - "@angular/platform-browser": "^6.0.3", - "@angular/platform-browser-dynamic": "^6.0.3", - "@angular/router": "^6.0.3", - "@fortawesome/fontawesome-free": "^5.6.1", + "@angular-devkit/build-angular": "~0.1102.15", + "@angular/animations": "^11.2.14", + "@angular/common": "^11.2.14", + "@angular/compiler": "^11.2.14", + "@angular/core": "^11.2.14", + "@angular/forms": "^11.2.14", + "@angular/localize": "^11.2.14", + "@angular/platform-browser": "^11.2.14", + "@angular/platform-browser-dynamic": "^11.2.14", + "@angular/router": "^11.2.14", + "@fortawesome/fontawesome-free": "^5.15.4", "@kolkov/angular-editor": "^0.11.2", "@ng-bootstrap/ng-bootstrap": "^4.1.0", "@ng-select/ng-select": "^2.15.2", @@ -47,47 +48,48 @@ "json-server": "^0.14.0", "jsonwebtoken": "^8.3.0", "libphonenumber-js": "^1.7.52", - "ngx-bootstrap": "^3.0.1", - "ngx-cookie-service": "^1.0.10", + "ngx-bootstrap": "^4.3.0", + "ngx-cookie-service": "^12.0.3", "ngx-editor": "^3.3.0", "ngx-pagination": "^3.2.1", "ngx-pipes": "^2.5.0", "popper.js": "^1.14.4", "quill": "^1.3.6", - "rxjs": "6.3.3", + "rxjs": "6.6.7", "rxjs-compat": "^6.3.2", - "web-animations-js": "^2.3.1", + "tslib": "^2.0.0", + "web-animations-js": "^2.3.2", "xlsx": "^0.15.5", - "zone.js": "^0.8.26" + "zone.js": "~0.10.2" }, "devDependencies": { "@angular-builders/custom-webpack": "^7.5.2", - "@angular-devkit/build-angular": "^0.13.10", - "@angular/cli": "^6.0.8", - "@angular/compiler-cli": "^6.0.3", - "@angular/language-service": "^6.0.3", - "@types/jasmine": "~2.8.6", + "@angular-devkit/build-angular": "~0.1102.13", + "@angular/cli": "^11.2.15", + "@angular/compiler-cli": "^11.2.14", + "@angular/language-service": "^11.2.14", + "@types/jasmine": "~3.6.0", "@types/jasminewd2": "~2.0.3", - "@types/node": "12.12.6", + "@types/node": "^12.11.1", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", "angular-password-strength-meter": "~2.0.0", - "codelyzer": "~4.2.1", + "codelyzer": "^6.0.0", "eslint": "^6.8.0", "eslint-config-google": "^0.14.0", - "jasmine-core": "~2.99.1", - "jasmine-spec-reporter": "~4.2.1", + "jasmine-core": "~3.6.0", + "jasmine-spec-reporter": "~5.0.0", "jwt-decode": "^2.2.0", - "karma": "~1.7.1", - "karma-chrome-launcher": "~2.2.0", - "karma-coverage-istanbul-reporter": "~2.0.0", - "karma-jasmine": "~1.1.1", - "karma-jasmine-html-reporter": "^0.2.2", + "karma": "~6.3.9", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage-istanbul-reporter": "~3.0.2", + "karma-jasmine": "~4.0.0", + "karma-jasmine-html-reporter": "^1.5.0", "nodemon": "^1.18.4", - "protractor": "^5.4.1", + "protractor": "~7.0.0", "ts-node": "~5.0.1", - "tslint": "~5.9.1", - "typescript": ">=2.7.0 <2.8.0", + "tslint": "~6.1.0", + "typescript": "4.0.8", "zxcvbn": "~4.4.2" }, "browser": { diff --git a/front-end/src/browserslist b/front-end/src/.browserslistrc similarity index 100% rename from front-end/src/browserslist rename to front-end/src/.browserslistrc diff --git a/front-end/src/app/account/account.component.spec.ts b/front-end/src/app/account/account.component.spec.ts index 140216daab..173d0b823c 100644 --- a/front-end/src/app/account/account.component.spec.ts +++ b/front-end/src/app/account/account.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { AccountComponent } from './account.component'; @@ -6,7 +6,7 @@ describe('AccountComponent', () => { let component: AccountComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ AccountComponent ] }) diff --git a/front-end/src/app/account/account.service.ts b/front-end/src/app/account/account.service.ts index e82226819b..ed7f01930f 100644 --- a/front-end/src/app/account/account.service.ts +++ b/front-end/src/app/account/account.service.ts @@ -1,5 +1,4 @@ import {Injectable, ChangeDetectionStrategy } from '@angular/core'; -import {Http, Response} from '@angular/http'; import {IAccount} from './account'; import {Observable} from 'rxjs/Observable'; import 'rxjs/add/operator/map'; diff --git a/front-end/src/app/admin/manage-user/manage-user.component.spec.ts b/front-end/src/app/admin/manage-user/manage-user.component.spec.ts index f8fe3a73d0..5f65c6461e 100644 --- a/front-end/src/app/admin/manage-user/manage-user.component.spec.ts +++ b/front-end/src/app/admin/manage-user/manage-user.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ManageUserComponent } from './manage-user.component'; @@ -6,7 +6,7 @@ describe('ManageUserComponent', () => { let component: ManageUserComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ManageUserComponent ] }) diff --git a/front-end/src/app/app-layout/app-layout.component.spec.ts b/front-end/src/app/app-layout/app-layout.component.spec.ts index bdafbdfcb7..ddf9acdb57 100644 --- a/front-end/src/app/app-layout/app-layout.component.spec.ts +++ b/front-end/src/app/app-layout/app-layout.component.spec.ts @@ -1,5 +1,5 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { CookieService } from 'ngx-cookie-service'; import { RouterTestingModule } from '@angular/router/testing'; @@ -11,7 +11,7 @@ describe('AppLayoutComponent', () => { let component: AppLayoutComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ RouterTestingModule, diff --git a/front-end/src/app/app-main-login/confirm-two-factor/confirm-two-factor.component.spec.ts b/front-end/src/app/app-main-login/confirm-two-factor/confirm-two-factor.component.spec.ts index 1b31006ba2..883eeaeea2 100644 --- a/front-end/src/app/app-main-login/confirm-two-factor/confirm-two-factor.component.spec.ts +++ b/front-end/src/app/app-main-login/confirm-two-factor/confirm-two-factor.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ConfirmTwoFactorComponent } from './confirm-two-factor.component'; @@ -6,7 +6,7 @@ describe('ConfirmTwoFactorComponent', () => { let component: ConfirmTwoFactorComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ConfirmTwoFactorComponent ] }) diff --git a/front-end/src/app/app-main-login/consent-modal/consent-modal.component.spec.ts b/front-end/src/app/app-main-login/consent-modal/consent-modal.component.spec.ts index dabed848b7..69ce39ddaa 100644 --- a/front-end/src/app/app-main-login/consent-modal/consent-modal.component.spec.ts +++ b/front-end/src/app/app-main-login/consent-modal/consent-modal.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ConsentModalComponent } from './consent-modal.component'; @@ -6,7 +6,7 @@ describe('ConsentModalComponent', () => { let component: ConsentModalComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ConsentModalComponent ] }) diff --git a/front-end/src/app/app-main-login/create-password/create-password.component.spec.ts b/front-end/src/app/app-main-login/create-password/create-password.component.spec.ts index 3bc9233dde..e7aeb1b54e 100644 --- a/front-end/src/app/app-main-login/create-password/create-password.component.spec.ts +++ b/front-end/src/app/app-main-login/create-password/create-password.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { CreatePasswordComponent } from './create-password.component'; @@ -6,7 +6,7 @@ describe('CreatePasswordComponent', () => { let component: CreatePasswordComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ CreatePasswordComponent ] }) diff --git a/front-end/src/app/app-main-login/login/login.component.spec.ts b/front-end/src/app/app-main-login/login/login.component.spec.ts index 0bd7597ffe..5e57039cf4 100644 --- a/front-end/src/app/app-main-login/login/login.component.spec.ts +++ b/front-end/src/app/app-main-login/login/login.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; @@ -37,7 +37,7 @@ describe('LoginComponent', () => { let apiService: MockApiService; let httpMock: HttpTestingController; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ FormsModule, diff --git a/front-end/src/app/app-main-login/personal-key/personal-key.component.spec.ts b/front-end/src/app/app-main-login/personal-key/personal-key.component.spec.ts index ea1c7912b4..6615ba2bd0 100644 --- a/front-end/src/app/app-main-login/personal-key/personal-key.component.spec.ts +++ b/front-end/src/app/app-main-login/personal-key/personal-key.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { PersonalKeyComponent } from './personal-key.component'; @@ -6,7 +6,7 @@ describe('PersonalKeyComponent', () => { let component: PersonalKeyComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ PersonalKeyComponent ] }) diff --git a/front-end/src/app/app-main-login/register/register.component.spec.ts b/front-end/src/app/app-main-login/register/register.component.spec.ts index 6c19551bf9..74d3eddbae 100644 --- a/front-end/src/app/app-main-login/register/register.component.spec.ts +++ b/front-end/src/app/app-main-login/register/register.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { RegisterComponent } from './register.component'; @@ -6,7 +6,7 @@ describe('RegisterComponent', () => { let component: RegisterComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ RegisterComponent ] }) diff --git a/front-end/src/app/app-main-login/two-factor-login/two-factor-login.component.spec.ts b/front-end/src/app/app-main-login/two-factor-login/two-factor-login.component.spec.ts index d32ec46f35..f1a73d9ae6 100644 --- a/front-end/src/app/app-main-login/two-factor-login/two-factor-login.component.spec.ts +++ b/front-end/src/app/app-main-login/two-factor-login/two-factor-login.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TwoFactorLoginComponent } from './two-factor-login.component'; @@ -6,7 +6,7 @@ describe('TwoFactorLoginComponent', () => { let component: TwoFactorLoginComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ TwoFactorLoginComponent ] }) diff --git a/front-end/src/app/app.module.ts b/front-end/src/app/app.module.ts index a72ed48f72..c4242fc9a2 100644 --- a/front-end/src/app/app.module.ts +++ b/front-end/src/app/app.module.ts @@ -1,7 +1,8 @@ import { DatePipe, DecimalPipe } from '@angular/common'; import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; import { APP_INITIALIZER, CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; -import { HttpModule } from '@angular/http'; +// Angular 8 migration +// import { HttpModule } from '@angular/http'; import { BrowserModule } from '@angular/platform-browser'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { AngularEditorModule } from '@kolkov/angular-editor'; @@ -220,7 +221,7 @@ const appInitializerFn = (appConfig: AppConfigService) => { // FormsModule, // ReactiveFormsModule, HttpClientModule, - HttpModule, + // HttpModule, NoopAnimationsModule, routing, AngularFileUploaderModule, diff --git a/front-end/src/app/app.routes.ts b/front-end/src/app/app.routes.ts index 1914be0ac5..36695b0a7b 100644 --- a/front-end/src/app/app.routes.ts +++ b/front-end/src/app/app.routes.ts @@ -113,25 +113,25 @@ export const AppRoutes: Routes = [ { path: 'contacts', component: ContactsComponent, pathMatch: 'full', canActivate: [CanActivateGuard] }, { path: 'forms/form/1M', - loadChildren: 'src/app/f1m-module/f1m/f1m.module#F1mModule' + loadChildren: () => import('src/app/f1m-module/f1m/f1m.module').then(m => m.F1mModule) }, { path: 'import-contacts', - loadChildren: 'src/app/import-contacts-module/import-contacts.module#ImportContactsModule', + loadChildren: () => import('src/app/import-contacts-module/import-contacts.module').then(m => m.ImportContactsModule), data: { role: [Roles.CommitteeAdmin, Roles.BackupCommitteeAdmin, Roles.Admin, Roles.Editor] } }, { path: 'import-fecfile', - loadChildren: 'src/app/import-fecfile-module/import-fecfile.module#ImportFecFile1Module', + loadChildren: () => import('src/app/import-fecfile-module/import-fecfile.module').then(m => m.ImportFecFile1Module), data: { role: [Roles.CommitteeAdmin, Roles.BackupCommitteeAdmin, Roles.Admin, Roles.Editor, Roles.Reviewer] } }, { path: 'import-transactions', - loadChildren: 'src/app/import-transactions-module/import-transactions.module#ImportTransactionsModule', + loadChildren: () => import('src/app/import-transactions-module/import-transactions.module').then(m => m.ImportTransactionsModule), data: { role: [Roles.CommitteeAdmin, Roles.BackupCommitteeAdmin, Roles.Admin, Roles.Editor] } @@ -226,7 +226,8 @@ export const AppRoutes: Routes = [ ]; export const routing = RouterModule.forRoot(AppRoutes, { - useHash: true, - enableTracing: false, - onSameUrlNavigation: 'reload' + useHash: true, + enableTracing: false, + onSameUrlNavigation: 'reload', + relativeLinkResolution: 'legacy' }); diff --git a/front-end/src/app/contacts/addnew/addnew_contacts.component.spec.ts b/front-end/src/app/contacts/addnew/addnew_contacts.component.spec.ts index 479aae34c8..c282fc8da0 100644 --- a/front-end/src/app/contacts/addnew/addnew_contacts.component.spec.ts +++ b/front-end/src/app/contacts/addnew/addnew_contacts.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { IndividualReceiptComponent } from './addnew_contacts.component'; @@ -6,7 +6,7 @@ describe('IndividualReceiptComponent', () => { let component: IndividualReceiptComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ IndividualReceiptComponent ] }) diff --git a/front-end/src/app/contacts/contact-details-modal/contact-details-modal.component.spec.ts b/front-end/src/app/contacts/contact-details-modal/contact-details-modal.component.spec.ts index 27f00bcece..b5e94a1e1b 100644 --- a/front-end/src/app/contacts/contact-details-modal/contact-details-modal.component.spec.ts +++ b/front-end/src/app/contacts/contact-details-modal/contact-details-modal.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ContactDetailsModalComponent } from './contact-details-modal.component'; @@ -6,7 +6,7 @@ describe('ContactDetailsModalComponent', () => { let component: ContactDetailsModalComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ContactDetailsModalComponent ] }) diff --git a/front-end/src/app/contacts/contacts-table/contacts-table.component.ts b/front-end/src/app/contacts/contacts-table/contacts-table.component.ts index b39bea0a65..5d68f9ad8c 100644 --- a/front-end/src/app/contacts/contacts-table/contacts-table.component.ts +++ b/front-end/src/app/contacts/contacts-table/contacts-table.component.ts @@ -23,7 +23,7 @@ import { InputDialogService } from '../../shared/service/InputDialogService/inpu import { ExportService } from 'src/app/shared/services/ExportService/export.service'; import * as FileSaver from 'file-saver'; import * as XLSX from 'xlsx'; -import { forEach } from '@angular/router/src/utils/collection'; +// import { forEach } from '@angular/router/src/utils/collection'; import { ContactLogModel } from '../model/contactLog.model'; @Component({ diff --git a/front-end/src/app/contacts/filter/contacts-filter.component.spec.ts b/front-end/src/app/contacts/filter/contacts-filter.component.spec.ts index fcc7226908..9ee460d736 100644 --- a/front-end/src/app/contacts/filter/contacts-filter.component.spec.ts +++ b/front-end/src/app/contacts/filter/contacts-filter.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ContactsFilterComponent } from './contacts-filter.component'; @@ -7,7 +7,7 @@ describe('ContactsFilterSidbarComponent', () => { let component: ContactsFilterComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ContactsFilterComponent ] }) diff --git a/front-end/src/app/contributors/contributors.component.spec.ts b/front-end/src/app/contributors/contributors.component.spec.ts index 693ef9d6df..6819e2da74 100644 --- a/front-end/src/app/contributors/contributors.component.spec.ts +++ b/front-end/src/app/contributors/contributors.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ContributorsComponent } from './contributors.component'; @@ -6,7 +6,7 @@ describe('ContributorsComponent', () => { let component: ContributorsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ContributorsComponent ] }) diff --git a/front-end/src/app/dashboard/dashboard.component.spec.ts b/front-end/src/app/dashboard/dashboard.component.spec.ts index d12fc0436e..73ef4242fc 100644 --- a/front-end/src/app/dashboard/dashboard.component.spec.ts +++ b/front-end/src/app/dashboard/dashboard.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { CookieService } from 'ngx-cookie-service'; @@ -37,7 +37,7 @@ describe('DashboardComponent', () => { let component: DashboardComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ HttpClientTestingModule, diff --git a/front-end/src/app/f1m-module/f1m-affiliation/f1m-affiliation/f1m-affiliation.component.spec.ts b/front-end/src/app/f1m-module/f1m-affiliation/f1m-affiliation/f1m-affiliation.component.spec.ts index 62b6db8553..3bfac02548 100644 --- a/front-end/src/app/f1m-module/f1m-affiliation/f1m-affiliation/f1m-affiliation.component.spec.ts +++ b/front-end/src/app/f1m-module/f1m-affiliation/f1m-affiliation/f1m-affiliation.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { F1mAffiliationComponent } from './f1m-affiliation.component'; @@ -6,7 +6,7 @@ describe('F1mAffiliationComponent', () => { let component: F1mAffiliationComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ F1mAffiliationComponent ] }) diff --git a/front-end/src/app/f1m-module/f1m-candidates-table/f1m-candidates-table/f1m-candidates-table.component.spec.ts b/front-end/src/app/f1m-module/f1m-candidates-table/f1m-candidates-table/f1m-candidates-table.component.spec.ts index 7bd9ed7340..652427444d 100644 --- a/front-end/src/app/f1m-module/f1m-candidates-table/f1m-candidates-table/f1m-candidates-table.component.spec.ts +++ b/front-end/src/app/f1m-module/f1m-candidates-table/f1m-candidates-table/f1m-candidates-table.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { F1mCandidatesTableComponent } from './f1m-candidates-table.component'; @@ -6,7 +6,7 @@ describe('F1mCandidatesTableComponent', () => { let component: F1mCandidatesTableComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ F1mCandidatesTableComponent ] }) diff --git a/front-end/src/app/f1m-module/f1m-preview/f1m-preview/f1m-preview.component.spec.ts b/front-end/src/app/f1m-module/f1m-preview/f1m-preview/f1m-preview.component.spec.ts index 2b650435a7..3841aa6c65 100644 --- a/front-end/src/app/f1m-module/f1m-preview/f1m-preview/f1m-preview.component.spec.ts +++ b/front-end/src/app/f1m-module/f1m-preview/f1m-preview/f1m-preview.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { F1mPreviewComponent } from './f1m-preview.component'; @@ -6,7 +6,7 @@ describe('F1mPreviewComponent', () => { let component: F1mPreviewComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ F1mPreviewComponent ] }) diff --git a/front-end/src/app/f1m-module/f1m-qualification/f1m-qualification/f1m-qualification.component.spec.ts b/front-end/src/app/f1m-module/f1m-qualification/f1m-qualification/f1m-qualification.component.spec.ts index 2689720de9..0fad28ea17 100644 --- a/front-end/src/app/f1m-module/f1m-qualification/f1m-qualification/f1m-qualification.component.spec.ts +++ b/front-end/src/app/f1m-module/f1m-qualification/f1m-qualification/f1m-qualification.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { F1mQualificationComponent } from './f1m-qualification.component'; @@ -6,7 +6,7 @@ describe('F1mQualificationComponent', () => { let component: F1mQualificationComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ F1mQualificationComponent ] }) diff --git a/front-end/src/app/f1m-module/f1m-type/f1m-type/f1m-type.component.spec.ts b/front-end/src/app/f1m-module/f1m-type/f1m-type/f1m-type.component.spec.ts index 71f32c6787..39e4f70db0 100644 --- a/front-end/src/app/f1m-module/f1m-type/f1m-type/f1m-type.component.spec.ts +++ b/front-end/src/app/f1m-module/f1m-type/f1m-type/f1m-type.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { F1mTypeComponent } from './f1m-type.component'; @@ -6,7 +6,7 @@ describe('F1mTypeComponent', () => { let component: F1mTypeComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ F1mTypeComponent ] }) diff --git a/front-end/src/app/f1m-module/f1m/f1m.component.spec.ts b/front-end/src/app/f1m-module/f1m/f1m.component.spec.ts index cc00fc5aed..2e1fdc0e57 100644 --- a/front-end/src/app/f1m-module/f1m/f1m.component.spec.ts +++ b/front-end/src/app/f1m-module/f1m/f1m.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { F1mComponent } from './f1m.component'; @@ -6,7 +6,7 @@ describe('F1mComponent', () => { let component: F1mComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ F1mComponent ] }) diff --git a/front-end/src/app/forms/form-24/f24/f24.component.spec.ts b/front-end/src/app/forms/form-24/f24/f24.component.spec.ts index 069aa8c436..33b2349911 100644 --- a/front-end/src/app/forms/form-24/f24/f24.component.spec.ts +++ b/front-end/src/app/forms/form-24/f24/f24.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { F24Component } from './f24.component'; @@ -6,7 +6,7 @@ describe('F24Component', () => { let component: F24Component; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ F24Component ] }) diff --git a/front-end/src/app/forms/form-3l/f3l/form-entry/form-entry.component.spec.ts b/front-end/src/app/forms/form-3l/f3l/form-entry/form-entry.component.spec.ts index c944462e39..debc46c255 100644 --- a/front-end/src/app/forms/form-3l/f3l/form-entry/form-entry.component.spec.ts +++ b/front-end/src/app/forms/form-3l/f3l/form-entry/form-entry.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { FormEntryComponent } from './form-entry.component'; @@ -6,7 +6,7 @@ describe('FormEntryComponent', () => { let component: FormEntryComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ FormEntryComponent ] }) diff --git a/front-end/src/app/forms/form-3x/cash-on-hand/cash-on-hand.component.spec.ts b/front-end/src/app/forms/form-3x/cash-on-hand/cash-on-hand.component.spec.ts index 7e8232268a..8469071498 100644 --- a/front-end/src/app/forms/form-3x/cash-on-hand/cash-on-hand.component.spec.ts +++ b/front-end/src/app/forms/form-3x/cash-on-hand/cash-on-hand.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { CashOnHandComponent } from './cash-on-hand.component'; @@ -6,7 +6,7 @@ describe('CashOnHandComponent', () => { let component: CashOnHandComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ CashOnHandComponent ] }) diff --git a/front-end/src/app/forms/form-3x/f3x/f3x.component.spec.ts b/front-end/src/app/forms/form-3x/f3x/f3x.component.spec.ts index 7ce724084d..7f54fc4615 100644 --- a/front-end/src/app/forms/form-3x/f3x/f3x.component.spec.ts +++ b/front-end/src/app/forms/form-3x/f3x/f3x.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { F3xComponent } from './f3x.component'; @@ -6,7 +6,7 @@ describe('F3xComponent', () => { let component: F3xComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ F3xComponent ] }) diff --git a/front-end/src/app/forms/form-3x/financial-summary/financial-summary.component.spec.ts b/front-end/src/app/forms/form-3x/financial-summary/financial-summary.component.spec.ts index 53426c518d..337fa4659a 100644 --- a/front-end/src/app/forms/form-3x/financial-summary/financial-summary.component.spec.ts +++ b/front-end/src/app/forms/form-3x/financial-summary/financial-summary.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { FinancialSummaryComponent } from './financial-summary.component'; @@ -6,7 +6,7 @@ describe('FinancialSummaryComponent', () => { let component: FinancialSummaryComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ FinancialSummaryComponent ] }) diff --git a/front-end/src/app/forms/form-3x/individual-receipt/abstract-schedule.ts b/front-end/src/app/forms/form-3x/individual-receipt/abstract-schedule.ts index 5cb9fecd14..3712ed973b 100644 --- a/front-end/src/app/forms/form-3x/individual-receipt/abstract-schedule.ts +++ b/front-end/src/app/forms/form-3x/individual-receipt/abstract-schedule.ts @@ -1,7 +1,7 @@ import { entityTypes } from './entity-types-json'; import { CurrencyPipe, DecimalPipe } from '@angular/common'; import { HttpClient } from '@angular/common/http'; -import { EventEmitter, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, Output } from '@angular/core'; +import { EventEmitter, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, Output, Directive } from '@angular/core'; import { FormBuilder, FormControl, FormGroup, ValidationErrors, Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { ModalDismissReasons, NgbTooltipConfig, NgbTypeaheadSelectItemEvent } from '@ng-bootstrap/ng-bootstrap'; @@ -53,6 +53,7 @@ export enum SaveActions { saveForReturnToSummary = 'saveForReturnToSUmmary' } +@Directive() export abstract class AbstractSchedule implements OnInit, OnDestroy, OnChanges { @Output() parentDataEmitter : EventEmitter = new EventEmitter(); diff --git a/front-end/src/app/forms/form-3x/individual-receipt/individual-receipt.component.spec.ts b/front-end/src/app/forms/form-3x/individual-receipt/individual-receipt.component.spec.ts index 8ede5f2ffa..dea696380a 100644 --- a/front-end/src/app/forms/form-3x/individual-receipt/individual-receipt.component.spec.ts +++ b/front-end/src/app/forms/form-3x/individual-receipt/individual-receipt.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { IndividualReceiptComponent } from './individual-receipt.component'; @@ -6,7 +6,7 @@ describe('IndividualReceiptComponent', () => { let component: IndividualReceiptComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ IndividualReceiptComponent ] }) diff --git a/front-end/src/app/forms/form-3x/report-type-sidebar/report-type-sidebar.component.spec.ts b/front-end/src/app/forms/form-3x/report-type-sidebar/report-type-sidebar.component.spec.ts index 4215e46665..6dfc5b2125 100644 --- a/front-end/src/app/forms/form-3x/report-type-sidebar/report-type-sidebar.component.spec.ts +++ b/front-end/src/app/forms/form-3x/report-type-sidebar/report-type-sidebar.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ReportTypeSidebarComponent } from './Report-type-sidebar.component'; @@ -6,7 +6,7 @@ describe('FormSidebarComponent', () => { let component: ReportTypeSidebarComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ReportTypeSidebarComponent ] }) diff --git a/front-end/src/app/forms/form-3x/report-type/report-type.component.spec.ts b/front-end/src/app/forms/form-3x/report-type/report-type.component.spec.ts index 2d22121cb9..a3ba43bc35 100644 --- a/front-end/src/app/forms/form-3x/report-type/report-type.component.spec.ts +++ b/front-end/src/app/forms/form-3x/report-type/report-type.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms'; @@ -9,7 +9,7 @@ describe('ReportTypeComponent', () => { let component: ReportTypeComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ HttpClientTestingModule, diff --git a/front-end/src/app/forms/form-3x/report-type/report-type.component.ts b/front-end/src/app/forms/form-3x/report-type/report-type.component.ts index 3b8cb80f62..7a4e1c8271 100644 --- a/front-end/src/app/forms/form-3x/report-type/report-type.component.ts +++ b/front-end/src/app/forms/form-3x/report-type/report-type.component.ts @@ -762,7 +762,7 @@ export class ReportTypeComponent implements OnInit, OnDestroy { * * @param {Element} tooltip The tooltip */ - public toggleToolTip(tooltip: { isOpen: () => void; close: () => void; open: () => void; }): void { + public toggleToolTip(tooltip: { isOpen: () => boolean; close: () => void; open: () => boolean; }): void { if (tooltip.isOpen()) { tooltip.close(); } else { diff --git a/front-end/src/app/forms/form-3x/sched-h1/sched-h1.component.spec.ts b/front-end/src/app/forms/form-3x/sched-h1/sched-h1.component.spec.ts index f372cc7b06..8b6a4cf187 100644 --- a/front-end/src/app/forms/form-3x/sched-h1/sched-h1.component.spec.ts +++ b/front-end/src/app/forms/form-3x/sched-h1/sched-h1.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { SchedH1Component } from './sched-h1.component'; @@ -6,7 +6,7 @@ describe('SchedH1Component', () => { let component: SchedH1Component; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ SchedH1Component ] }) diff --git a/front-end/src/app/forms/form-3x/sched-h5/sched-h5.component.spec.ts b/front-end/src/app/forms/form-3x/sched-h5/sched-h5.component.spec.ts index f35ba433e5..da5187943b 100644 --- a/front-end/src/app/forms/form-3x/sched-h5/sched-h5.component.spec.ts +++ b/front-end/src/app/forms/form-3x/sched-h5/sched-h5.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { SchedH5Component } from './sched-h5.component'; @@ -6,7 +6,7 @@ describe('SchedH5Component', () => { let component: SchedH5Component; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ SchedH5Component ] }) diff --git a/front-end/src/app/forms/form-3x/sched-h6/sched-h6.component.spec.ts b/front-end/src/app/forms/form-3x/sched-h6/sched-h6.component.spec.ts index 40dea7c167..f84e7ca6ef 100644 --- a/front-end/src/app/forms/form-3x/sched-h6/sched-h6.component.spec.ts +++ b/front-end/src/app/forms/form-3x/sched-h6/sched-h6.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { SchedH6Component } from './sched-h6.component'; @@ -6,7 +6,7 @@ describe('SchedH6Component', () => { let component: SchedH6Component; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ SchedH6Component ] }) diff --git a/front-end/src/app/forms/form-3x/transaction-sidebar/transaction-sidebar.component.spec.ts b/front-end/src/app/forms/form-3x/transaction-sidebar/transaction-sidebar.component.spec.ts index e4db146c10..46bdfef548 100644 --- a/front-end/src/app/forms/form-3x/transaction-sidebar/transaction-sidebar.component.spec.ts +++ b/front-end/src/app/forms/form-3x/transaction-sidebar/transaction-sidebar.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TransactionSidebarComponent } from './transaction-sidebar.component'; @@ -6,7 +6,7 @@ describe('FormSidebarComponent', () => { let component: TransactionSidebarComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ TransactionSidebarComponent ] }) diff --git a/front-end/src/app/forms/form-3x/transaction-type/transaction-type.component.spec.ts b/front-end/src/app/forms/form-3x/transaction-type/transaction-type.component.spec.ts index 8c544db66f..687c5be959 100644 --- a/front-end/src/app/forms/form-3x/transaction-type/transaction-type.component.spec.ts +++ b/front-end/src/app/forms/form-3x/transaction-type/transaction-type.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TransactionTypeComponent } from './transaction-type.component'; @@ -6,7 +6,7 @@ describe('TransactionTypeComponent', () => { let component: TransactionTypeComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ TransactionTypeComponent ] }) diff --git a/front-end/src/app/forms/form-99/f99/f99.component.spec.ts b/front-end/src/app/forms/form-99/f99/f99.component.spec.ts index 57fd396ee8..0fc95a3879 100644 --- a/front-end/src/app/forms/form-99/f99/f99.component.spec.ts +++ b/front-end/src/app/forms/form-99/f99/f99.component.spec.ts @@ -1,5 +1,5 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { CookieService } from 'ngx-cookie-service'; import { RouterTestingModule } from '@angular/router/testing'; @@ -10,7 +10,7 @@ describe('F99Component', () => { let component: F99Component; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ RouterTestingModule, diff --git a/front-end/src/app/forms/form-99/reason/reason.component.spec.ts b/front-end/src/app/forms/form-99/reason/reason.component.spec.ts index ccdb27a7a7..7b83ace61e 100644 --- a/front-end/src/app/forms/form-99/reason/reason.component.spec.ts +++ b/front-end/src/app/forms/form-99/reason/reason.component.spec.ts @@ -1,5 +1,5 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms'; @@ -10,7 +10,7 @@ describe('ReasonComponent', () => { let component: ReasonComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ FormsModule, diff --git a/front-end/src/app/forms/form-99/type/type.component.spec.ts b/front-end/src/app/forms/form-99/type/type.component.spec.ts index 89bc13edd2..e986582c31 100644 --- a/front-end/src/app/forms/form-99/type/type.component.spec.ts +++ b/front-end/src/app/forms/form-99/type/type.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms'; @@ -9,7 +9,7 @@ describe('TypeComponent', () => { let component: TypeComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ HttpClientTestingModule, diff --git a/front-end/src/app/forms/forms.component.spec.ts b/front-end/src/app/forms/forms.component.spec.ts index c54113bd8a..da35ecd269 100644 --- a/front-end/src/app/forms/forms.component.spec.ts +++ b/front-end/src/app/forms/forms.component.spec.ts @@ -1,5 +1,5 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { CookieService } from 'ngx-cookie-service'; import { RouterTestingModule } from '@angular/router/testing'; @@ -9,7 +9,7 @@ describe('FormsComponent', () => { let component: FormsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ RouterTestingModule, diff --git a/front-end/src/app/forms/sched-c/endorser-summary/endorser-summary.component.spec.ts b/front-end/src/app/forms/sched-c/endorser-summary/endorser-summary.component.spec.ts index 9d1066c76c..93de0bdf35 100644 --- a/front-end/src/app/forms/sched-c/endorser-summary/endorser-summary.component.spec.ts +++ b/front-end/src/app/forms/sched-c/endorser-summary/endorser-summary.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { EndorserSummaryComponent } from './endorser-summary.component'; @@ -6,7 +6,7 @@ describe('EndorserSummaryComponent', () => { let component: EndorserSummaryComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ EndorserSummaryComponent ] }) diff --git a/front-end/src/app/forms/sched-c/endorser/endorser.component.spec.ts b/front-end/src/app/forms/sched-c/endorser/endorser.component.spec.ts index b74ee78a72..962fb1e58c 100644 --- a/front-end/src/app/forms/sched-c/endorser/endorser.component.spec.ts +++ b/front-end/src/app/forms/sched-c/endorser/endorser.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { EndorserComponent } from '../endorser/endorser.component'; @@ -6,7 +6,7 @@ describe('IndividualReceiptComponent', () => { let component: EndorserComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ EndorserComponent ] }) diff --git a/front-end/src/app/forms/sched-c/loan.component.spec.ts b/front-end/src/app/forms/sched-c/loan.component.spec.ts index dff3be4f9a..0d8547e563 100644 --- a/front-end/src/app/forms/sched-c/loan.component.spec.ts +++ b/front-end/src/app/forms/sched-c/loan.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { LoanComponent } from './loan.component'; @@ -6,7 +6,7 @@ describe('LoanComponent', () => { let component: LoanComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ LoanComponent ] }) diff --git a/front-end/src/app/forms/sched-c/loanpayment/loanpayment.component.spec.ts b/front-end/src/app/forms/sched-c/loanpayment/loanpayment.component.spec.ts index 2b820485f1..5ea4250bad 100644 --- a/front-end/src/app/forms/sched-c/loanpayment/loanpayment.component.spec.ts +++ b/front-end/src/app/forms/sched-c/loanpayment/loanpayment.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { LoanpaymentComponent } from './loanpayment.component'; @@ -6,7 +6,7 @@ describe('LoanpaymentComponent', () => { let component: LoanpaymentComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ LoanpaymentComponent ] }) diff --git a/front-end/src/app/forms/sched-c1/sched-c1.component.spec.ts b/front-end/src/app/forms/sched-c1/sched-c1.component.spec.ts index 1bd8ed6693..d112c07d2d 100644 --- a/front-end/src/app/forms/sched-c1/sched-c1.component.spec.ts +++ b/front-end/src/app/forms/sched-c1/sched-c1.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { SchedC1Component } from './sched-c1.component'; @@ -6,7 +6,7 @@ describe('SchedC1Component', () => { let component: SchedC1Component; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ SchedC1Component ] }) diff --git a/front-end/src/app/forms/sched-d/debt-summary/debt-summary.component.spec.ts b/front-end/src/app/forms/sched-d/debt-summary/debt-summary.component.spec.ts index e34f219847..b8984b79c9 100644 --- a/front-end/src/app/forms/sched-d/debt-summary/debt-summary.component.spec.ts +++ b/front-end/src/app/forms/sched-d/debt-summary/debt-summary.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { DebtSummaryComponent } from './debt-summary.component'; @@ -6,7 +6,7 @@ describe('DebtSummaryComponent', () => { let component: DebtSummaryComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ DebtSummaryComponent ] }) diff --git a/front-end/src/app/forms/sched-f-core/sched-f-core.component.spec.ts b/front-end/src/app/forms/sched-f-core/sched-f-core.component.spec.ts index 3172f2829b..77f2fabc1e 100644 --- a/front-end/src/app/forms/sched-f-core/sched-f-core.component.spec.ts +++ b/front-end/src/app/forms/sched-f-core/sched-f-core.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { SchedFCoreComponent } from './sched-f-core.component'; @@ -6,7 +6,7 @@ describe('FormsschedFCoreComponent', () => { let component: SchedFCoreComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ SchedFCoreComponent ] }) diff --git a/front-end/src/app/forms/sched-f/sched-f.component.spec.ts b/front-end/src/app/forms/sched-f/sched-f.component.spec.ts index a5e7182005..04b92a00ec 100644 --- a/front-end/src/app/forms/sched-f/sched-f.component.spec.ts +++ b/front-end/src/app/forms/sched-f/sched-f.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { SchedFComponent } from './sched-f.component'; @@ -6,7 +6,7 @@ describe('SchedFComponent', () => { let component: SchedFComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ SchedFComponent ] }) diff --git a/front-end/src/app/forms/sched-h1/sched-h1.component.spec.ts b/front-end/src/app/forms/sched-h1/sched-h1.component.spec.ts index f372cc7b06..8b6a4cf187 100644 --- a/front-end/src/app/forms/sched-h1/sched-h1.component.spec.ts +++ b/front-end/src/app/forms/sched-h1/sched-h1.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { SchedH1Component } from './sched-h1.component'; @@ -6,7 +6,7 @@ describe('SchedH1Component', () => { let component: SchedH1Component; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ SchedH1Component ] }) diff --git a/front-end/src/app/forms/sched-h2/sched-h2.component.spec.ts b/front-end/src/app/forms/sched-h2/sched-h2.component.spec.ts index 61fcb3058c..f3cc5aae9a 100644 --- a/front-end/src/app/forms/sched-h2/sched-h2.component.spec.ts +++ b/front-end/src/app/forms/sched-h2/sched-h2.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { SchedH2Component } from './sched-h2.component'; @@ -6,7 +6,7 @@ describe('SchedH2Component', () => { let component: SchedH2Component; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ SchedH2Component ] }) diff --git a/front-end/src/app/forms/sched-h3/sched-h3.component.scss b/front-end/src/app/forms/sched-h3/sched-h3.component.scss index 9da45df814..fbf4ff697e 100644 --- a/front-end/src/app/forms/sched-h3/sched-h3.component.scss +++ b/front-end/src/app/forms/sched-h3/sched-h3.component.scss @@ -65,7 +65,7 @@ width: 96%; } .sched-h3__item-range { - padding: 0m 0 0.25em 0; + padding: 0 0 0.25em 0; } .coord_expenditure_text { padding-top: 3em; @@ -215,7 +215,7 @@ } .subtitle { - font: 29; + font-size: 29px; /* error fix during Angular 8 upgrade */ } .summary_text_amt{ @@ -287,14 +287,16 @@ } } -pagination-controls /deep/ .ngx-pagination .current{ +/* previously included /deep/ before it was removed in Angular 8*/ +pagination-controls .ngx-pagination .current{ padding: 0.1875rem 0.625rem; background: #9B9B9B !important;; color: #fefefe; cursor: default; } -pagination-controls /deep/ .ngx-pagination a, .ngx-pagination button { +/* previously included /deep/ before it was removed in Angular 8*/ +pagination-controls .ngx-pagination a, .ngx-pagination button { color: #9B9B9B !important;; display: block; padding: 0.1875rem 0.625rem; diff --git a/front-end/src/app/forms/sched-h3/sched-h3.component.spec.ts b/front-end/src/app/forms/sched-h3/sched-h3.component.spec.ts index ebf1231039..2a1c8694e8 100644 --- a/front-end/src/app/forms/sched-h3/sched-h3.component.spec.ts +++ b/front-end/src/app/forms/sched-h3/sched-h3.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { SchedH3Component } from './sched-h3.component'; @@ -6,7 +6,7 @@ describe('SchedH3Component', () => { let component: SchedH3Component; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ SchedH3Component ] }) diff --git a/front-end/src/app/forms/sched-h4/sched-h4.component.spec.ts b/front-end/src/app/forms/sched-h4/sched-h4.component.spec.ts index a2311fb1f9..db75dc5812 100644 --- a/front-end/src/app/forms/sched-h4/sched-h4.component.spec.ts +++ b/front-end/src/app/forms/sched-h4/sched-h4.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { SchedH4Component } from './sched-h4.component'; @@ -6,7 +6,7 @@ describe('SchedH4Component', () => { let component: SchedH4Component; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ SchedH4Component ] }) diff --git a/front-end/src/app/forms/sched-h5/sched-h5.component.spec.ts b/front-end/src/app/forms/sched-h5/sched-h5.component.spec.ts index ebf1231039..2a1c8694e8 100644 --- a/front-end/src/app/forms/sched-h5/sched-h5.component.spec.ts +++ b/front-end/src/app/forms/sched-h5/sched-h5.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { SchedH3Component } from './sched-h3.component'; @@ -6,7 +6,7 @@ describe('SchedH3Component', () => { let component: SchedH3Component; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ SchedH3Component ] }) diff --git a/front-end/src/app/forms/sched-h6/sched-h6.component.spec.ts b/front-end/src/app/forms/sched-h6/sched-h6.component.spec.ts index 40dea7c167..f84e7ca6ef 100644 --- a/front-end/src/app/forms/sched-h6/sched-h6.component.spec.ts +++ b/front-end/src/app/forms/sched-h6/sched-h6.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { SchedH6Component } from './sched-h6.component'; @@ -6,7 +6,7 @@ describe('SchedH6Component', () => { let component: SchedH6Component; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ SchedH6Component ] }) diff --git a/front-end/src/app/forms/sched-l/sched-l.component.spec.ts b/front-end/src/app/forms/sched-l/sched-l.component.spec.ts index 6a22c85e2f..111d002cae 100644 --- a/front-end/src/app/forms/sched-l/sched-l.component.spec.ts +++ b/front-end/src/app/forms/sched-l/sched-l.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { SchedLComponent } from './sched-l.component'; @@ -6,7 +6,7 @@ describe('SchedLComponent', () => { let component: SchedLComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ SchedLComponent ] }) diff --git a/front-end/src/app/forms/transactions/categories/transaction-categories.component.spec.ts b/front-end/src/app/forms/transactions/categories/transaction-categories.component.spec.ts index 6f8d9bb60b..90a38285b2 100644 --- a/front-end/src/app/forms/transactions/categories/transaction-categories.component.spec.ts +++ b/front-end/src/app/forms/transactions/categories/transaction-categories.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { FormSidebarComponent } from './form-sidebar.component'; @@ -6,7 +6,7 @@ describe('FormSidebarComponent', () => { let component: FormSidebarComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ FormSidebarComponent ] }) diff --git a/front-end/src/app/forms/transactions/filter/transactions-filter.component.spec.ts b/front-end/src/app/forms/transactions/filter/transactions-filter.component.spec.ts index db8ff80df3..3778ffd944 100644 --- a/front-end/src/app/forms/transactions/filter/transactions-filter.component.spec.ts +++ b/front-end/src/app/forms/transactions/filter/transactions-filter.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TransactionsFilterSidbarComponent } from './transactions-filter-sidebar.component'; @@ -7,7 +7,7 @@ describe('TransactionsFilterSidbarComponent', () => { let component: TransactionsFilterSidbarComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ TransactionsFilterSidbarComponent ] }) diff --git a/front-end/src/app/forms/transactions/transactions-table/f24-link-modal/f24-link-modal.component.spec.ts b/front-end/src/app/forms/transactions/transactions-table/f24-link-modal/f24-link-modal.component.spec.ts index c93a9ba1c6..77bba1401e 100644 --- a/front-end/src/app/forms/transactions/transactions-table/f24-link-modal/f24-link-modal.component.spec.ts +++ b/front-end/src/app/forms/transactions/transactions-table/f24-link-modal/f24-link-modal.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { F24LinkModalComponent } from './f24-link-modal.component'; @@ -6,7 +6,7 @@ describe('F24LinkModalComponent', () => { let component: F24LinkModalComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ F24LinkModalComponent ] }) diff --git a/front-end/src/app/help/help.component.spec.ts b/front-end/src/app/help/help.component.spec.ts index 191eceee62..a8ba0cdfdd 100644 --- a/front-end/src/app/help/help.component.spec.ts +++ b/front-end/src/app/help/help.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { HelpComponent } from './help.component'; @@ -6,7 +6,7 @@ describe('HelpComponent', () => { let component: HelpComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ HelpComponent ] }) diff --git a/front-end/src/app/import-contacts-module/import-contacts/cancel-import-confirm/cancel-import-confirm.component.scss b/front-end/src/app/import-contacts-module/import-contacts/cancel-import-confirm/cancel-import-confirm.component.scss index 8f407308ef..dbb77c8a5b 100644 --- a/front-end/src/app/import-contacts-module/import-contacts/cancel-import-confirm/cancel-import-confirm.component.scss +++ b/front-end/src/app/import-contacts-module/import-contacts/cancel-import-confirm/cancel-import-confirm.component.scss @@ -3,7 +3,8 @@ .session-timed-out.modal-backdrop { background-color: #5b616b; opacity: 1 !important; - background-image: url('src/assets/img/fec-logo-5opac.png'); + //background-image: url('src/assets/img/fec-logo-5opac.png'); + background-image: url('../../../../assets/img/fec-logo-5opac.png'); background-repeat: no-repeat; -webkit-background-size: cover; -moz-background-size: cover; diff --git a/front-end/src/app/import-contacts-module/import-contacts/cancel-import-confirm/cancel-import-confirm.component.spec.ts b/front-end/src/app/import-contacts-module/import-contacts/cancel-import-confirm/cancel-import-confirm.component.spec.ts index 7804a8c6d7..a6347919f3 100644 --- a/front-end/src/app/import-contacts-module/import-contacts/cancel-import-confirm/cancel-import-confirm.component.spec.ts +++ b/front-end/src/app/import-contacts-module/import-contacts/cancel-import-confirm/cancel-import-confirm.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { CancelImportConfirmComponent } from './cancel-import-confirm.component'; @@ -6,7 +6,7 @@ describe('CancelImportConfirmComponent', () => { let component: CancelImportConfirmComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ CancelImportConfirmComponent ] }) diff --git a/front-end/src/app/import-contacts-module/import-contacts/clean-contacts/clean-contacts.component.spec.ts b/front-end/src/app/import-contacts-module/import-contacts/clean-contacts/clean-contacts.component.spec.ts index b4227c4f1c..3734153d70 100644 --- a/front-end/src/app/import-contacts-module/import-contacts/clean-contacts/clean-contacts.component.spec.ts +++ b/front-end/src/app/import-contacts-module/import-contacts/clean-contacts/clean-contacts.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { CleanContactsComponent } from './clean-contacts.component'; @@ -6,7 +6,7 @@ describe('CleanContactsComponent', () => { let component: CleanContactsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ CleanContactsComponent ] }) diff --git a/front-end/src/app/import-contacts-module/import-contacts/clean-contacts/duplicate-contacts/duplicate-contacts.component.spec.ts b/front-end/src/app/import-contacts-module/import-contacts/clean-contacts/duplicate-contacts/duplicate-contacts.component.spec.ts index e83dff3a3c..43e5cb7070 100644 --- a/front-end/src/app/import-contacts-module/import-contacts/clean-contacts/duplicate-contacts/duplicate-contacts.component.spec.ts +++ b/front-end/src/app/import-contacts-module/import-contacts/clean-contacts/duplicate-contacts/duplicate-contacts.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { DuplicateContactsComponent } from './duplicate-contacts.component'; @@ -6,7 +6,7 @@ describe('DuplicateContactsComponent', () => { let component: DuplicateContactsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ DuplicateContactsComponent ] }) diff --git a/front-end/src/app/import-contacts-module/import-contacts/clean-contacts/error-contacts/error-contacts-field/error-contacts-field.component.spec.ts b/front-end/src/app/import-contacts-module/import-contacts/clean-contacts/error-contacts/error-contacts-field/error-contacts-field.component.spec.ts index 64ee47970d..32a68f5033 100644 --- a/front-end/src/app/import-contacts-module/import-contacts/clean-contacts/error-contacts/error-contacts-field/error-contacts-field.component.spec.ts +++ b/front-end/src/app/import-contacts-module/import-contacts/clean-contacts/error-contacts/error-contacts-field/error-contacts-field.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ErrorContactsFieldComponent } from './error-contacts-field.component'; @@ -6,7 +6,7 @@ describe('ErrorContactsFieldComponent', () => { let component: ErrorContactsFieldComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ErrorContactsFieldComponent ] }) diff --git a/front-end/src/app/import-contacts-module/import-contacts/clean-contacts/error-contacts/error-contacts.component.spec.ts b/front-end/src/app/import-contacts-module/import-contacts/clean-contacts/error-contacts/error-contacts.component.spec.ts index 57077060cc..69cf1c0c6e 100644 --- a/front-end/src/app/import-contacts-module/import-contacts/clean-contacts/error-contacts/error-contacts.component.spec.ts +++ b/front-end/src/app/import-contacts-module/import-contacts/clean-contacts/error-contacts/error-contacts.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ErrorContactsComponent } from './error-contacts.component'; @@ -6,7 +6,7 @@ describe('ErrorContactsComponent', () => { let component: ErrorContactsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ErrorContactsComponent ] }) diff --git a/front-end/src/app/import-contacts-module/import-contacts/configure-contacts/configure-contacts.component.spec.ts b/front-end/src/app/import-contacts-module/import-contacts/configure-contacts/configure-contacts.component.spec.ts index 983ca1d64a..e36e687d1e 100644 --- a/front-end/src/app/import-contacts-module/import-contacts/configure-contacts/configure-contacts.component.spec.ts +++ b/front-end/src/app/import-contacts-module/import-contacts/configure-contacts/configure-contacts.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ConfigureContactsComponent } from './configure-contacts.component'; @@ -6,7 +6,7 @@ describe('ConfigureContactsComponent', () => { let component: ConfigureContactsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ConfigureContactsComponent ] }) diff --git a/front-end/src/app/import-contacts-module/import-contacts/import-contacts.component.spec.ts b/front-end/src/app/import-contacts-module/import-contacts/import-contacts.component.spec.ts index 49e1e5c21a..00db55ab84 100644 --- a/front-end/src/app/import-contacts-module/import-contacts/import-contacts.component.spec.ts +++ b/front-end/src/app/import-contacts-module/import-contacts/import-contacts.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ImportContactsComponent } from './import-contacts.component'; @@ -6,7 +6,7 @@ describe('ImportContactsComponent', () => { let component: ImportContactsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ImportContactsComponent] }) diff --git a/front-end/src/app/import-contacts-module/import-contacts/import-done-contacts/import-done-contacts.component.spec.ts b/front-end/src/app/import-contacts-module/import-contacts/import-done-contacts/import-done-contacts.component.spec.ts index bb9d6617d1..2c8ad1f2b2 100644 --- a/front-end/src/app/import-contacts-module/import-contacts/import-done-contacts/import-done-contacts.component.spec.ts +++ b/front-end/src/app/import-contacts-module/import-contacts/import-done-contacts/import-done-contacts.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ImportDoneContactsComponent } from './import-done-contacts.component'; @@ -6,7 +6,7 @@ describe('ImportDoneContactsComponent', () => { let component: ImportDoneContactsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ImportDoneContactsComponent ] }) diff --git a/front-end/src/app/import-contacts-module/import-contacts/import-how-to/import-how-to.component.spec.ts b/front-end/src/app/import-contacts-module/import-contacts/import-how-to/import-how-to.component.spec.ts index b4496bed82..7f3d19391b 100644 --- a/front-end/src/app/import-contacts-module/import-contacts/import-how-to/import-how-to.component.spec.ts +++ b/front-end/src/app/import-contacts-module/import-contacts/import-how-to/import-how-to.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ImportHowToComponent } from './import-how-to.component'; @@ -6,7 +6,7 @@ describe('ImportHowToComponent', () => { let component: ImportHowToComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ImportHowToComponent ] }) diff --git a/front-end/src/app/import-contacts-module/import-contacts/progress-bar/progress-bar.component.spec.ts b/front-end/src/app/import-contacts-module/import-contacts/progress-bar/progress-bar.component.spec.ts index f41343a1f4..011b124552 100644 --- a/front-end/src/app/import-contacts-module/import-contacts/progress-bar/progress-bar.component.spec.ts +++ b/front-end/src/app/import-contacts-module/import-contacts/progress-bar/progress-bar.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ProgressBarComponent } from './progress-bar.component'; @@ -6,7 +6,7 @@ describe('ProgressBarComponent', () => { let component: ProgressBarComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ProgressBarComponent ] }) diff --git a/front-end/src/app/import-contacts-module/import-contacts/review-upload/review-upload.component.spec.ts b/front-end/src/app/import-contacts-module/import-contacts/review-upload/review-upload.component.spec.ts index 00c282aab5..f3942ed91c 100644 --- a/front-end/src/app/import-contacts-module/import-contacts/review-upload/review-upload.component.spec.ts +++ b/front-end/src/app/import-contacts-module/import-contacts/review-upload/review-upload.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ReviewUploadComponent } from './review-upload.component'; @@ -6,7 +6,7 @@ describe('ReviewUploadComponent', () => { let component: ReviewUploadComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ReviewUploadComponent ] }) diff --git a/front-end/src/app/import-contacts-module/import-contacts/upload-contacts/upload-contacts.component.spec.ts b/front-end/src/app/import-contacts-module/import-contacts/upload-contacts/upload-contacts.component.spec.ts index cec15315e8..7007e52416 100644 --- a/front-end/src/app/import-contacts-module/import-contacts/upload-contacts/upload-contacts.component.spec.ts +++ b/front-end/src/app/import-contacts-module/import-contacts/upload-contacts/upload-contacts.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { UploadContactsComponent } from './upload-contacts.component'; @@ -6,7 +6,7 @@ describe('UploadContactsComponent', () => { let component: UploadContactsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ UploadContactsComponent ] }) diff --git a/front-end/src/app/import-fecfile-module/import-fecfile/import-fecfile-success/import-fecfile-success.component.spec.ts b/front-end/src/app/import-fecfile-module/import-fecfile/import-fecfile-success/import-fecfile-success.component.spec.ts index 145fa822dc..26da3e5269 100644 --- a/front-end/src/app/import-fecfile-module/import-fecfile/import-fecfile-success/import-fecfile-success.component.spec.ts +++ b/front-end/src/app/import-fecfile-module/import-fecfile/import-fecfile-success/import-fecfile-success.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ImportFecfileSuccessComponent } from './import-fecfile-success.component'; @@ -6,7 +6,7 @@ describe('ImportFecfileSuccessComponent', () => { let component: ImportFecfileSuccessComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ImportFecfileSuccessComponent ] }) diff --git a/front-end/src/app/import-fecfile-module/import-fecfile/import-fecfile.component.spec.ts b/front-end/src/app/import-fecfile-module/import-fecfile/import-fecfile.component.spec.ts index d148251087..9dd3d004f6 100644 --- a/front-end/src/app/import-fecfile-module/import-fecfile/import-fecfile.component.spec.ts +++ b/front-end/src/app/import-fecfile-module/import-fecfile/import-fecfile.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ImportFecfileComponent } from './import-fecfile.component'; @@ -6,7 +6,7 @@ describe('ImportFecfileComponent', () => { let component: ImportFecfileComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ImportFecfileComponent ] }) diff --git a/front-end/src/app/import-transactions-module/import-transactions/import-transactions.component.spec.ts b/front-end/src/app/import-transactions-module/import-transactions/import-transactions.component.spec.ts index 10006c65dc..86d6eebca8 100644 --- a/front-end/src/app/import-transactions-module/import-transactions/import-transactions.component.spec.ts +++ b/front-end/src/app/import-transactions-module/import-transactions/import-transactions.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ImportTransactionsComponent } from './import-transactions.component'; @@ -6,7 +6,7 @@ describe('ImportTransactionsComponent', () => { let component: ImportTransactionsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ImportTransactionsComponent ] }) diff --git a/front-end/src/app/import-transactions-module/import-transactions/import-trx-clean/import-trx-clean-info/import-trx-clean-info.component.spec.ts b/front-end/src/app/import-transactions-module/import-transactions/import-trx-clean/import-trx-clean-info/import-trx-clean-info.component.spec.ts index 7b27d5779e..7a3c09588a 100644 --- a/front-end/src/app/import-transactions-module/import-transactions/import-trx-clean/import-trx-clean-info/import-trx-clean-info.component.spec.ts +++ b/front-end/src/app/import-transactions-module/import-transactions/import-trx-clean/import-trx-clean-info/import-trx-clean-info.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ImportTrxCleanInfoComponent } from './import-trx-clean-info.component'; @@ -6,7 +6,7 @@ describe('ImportTrxCleanInfoComponent', () => { let component: ImportTrxCleanInfoComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ImportTrxCleanInfoComponent ] }) diff --git a/front-end/src/app/import-transactions-module/import-transactions/import-trx-clean/import-trx-clean.component.spec.ts b/front-end/src/app/import-transactions-module/import-transactions/import-trx-clean/import-trx-clean.component.spec.ts index b7310d4f6a..632f26ec44 100644 --- a/front-end/src/app/import-transactions-module/import-transactions/import-trx-clean/import-trx-clean.component.spec.ts +++ b/front-end/src/app/import-transactions-module/import-transactions/import-trx-clean/import-trx-clean.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ImportTrxCleanComponent } from './import-trx-clean.component'; @@ -6,7 +6,7 @@ describe('ImportTrxCleanComponent', () => { let component: ImportTrxCleanComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ImportTrxCleanComponent ] }) diff --git a/front-end/src/app/import-transactions-module/import-transactions/import-trx-done/import-trx-done.component.spec.ts b/front-end/src/app/import-transactions-module/import-transactions/import-trx-done/import-trx-done.component.spec.ts index 67f41a4838..b6dcd581e7 100644 --- a/front-end/src/app/import-transactions-module/import-transactions/import-trx-done/import-trx-done.component.spec.ts +++ b/front-end/src/app/import-transactions-module/import-transactions/import-trx-done/import-trx-done.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ImportTrxDoneComponent } from './import-trx-done.component'; @@ -6,7 +6,7 @@ describe('ImportTrxDoneComponent', () => { let component: ImportTrxDoneComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ImportTrxDoneComponent ] }) diff --git a/front-end/src/app/import-transactions-module/import-transactions/import-trx-file-select/import-trx-file-select.component.spec.ts b/front-end/src/app/import-transactions-module/import-transactions/import-trx-file-select/import-trx-file-select.component.spec.ts index bba92af667..17124f634e 100644 --- a/front-end/src/app/import-transactions-module/import-transactions/import-trx-file-select/import-trx-file-select.component.spec.ts +++ b/front-end/src/app/import-transactions-module/import-transactions/import-trx-file-select/import-trx-file-select.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ImportTrxFileSelectComponent } from './import-trx-file-select.component'; @@ -6,7 +6,7 @@ describe('ImportTrxFileSelectComponent', () => { let component: ImportTrxFileSelectComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ImportTrxFileSelectComponent ] }) diff --git a/front-end/src/app/import-transactions-module/import-transactions/import-trx-how-to/import-trx-how-to.component.spec.ts b/front-end/src/app/import-transactions-module/import-transactions/import-trx-how-to/import-trx-how-to.component.spec.ts index 0467264946..0696c48a30 100644 --- a/front-end/src/app/import-transactions-module/import-transactions/import-trx-how-to/import-trx-how-to.component.spec.ts +++ b/front-end/src/app/import-transactions-module/import-transactions/import-trx-how-to/import-trx-how-to.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ImportTrxHowToComponent } from './import-trx-how-to.component'; @@ -6,7 +6,7 @@ describe('ImportTrxHowToComponent', () => { let component: ImportTrxHowToComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ImportTrxHowToComponent ] }) diff --git a/front-end/src/app/import-transactions-module/import-transactions/import-trx-review/import-trx-review.component.spec.ts b/front-end/src/app/import-transactions-module/import-transactions/import-trx-review/import-trx-review.component.spec.ts index b81d619c49..bff00eb562 100644 --- a/front-end/src/app/import-transactions-module/import-transactions/import-trx-review/import-trx-review.component.spec.ts +++ b/front-end/src/app/import-transactions-module/import-transactions/import-trx-review/import-trx-review.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ImportTrxReviewComponent } from './import-trx-review.component'; @@ -6,7 +6,7 @@ describe('ImportTrxReviewComponent', () => { let component: ImportTrxReviewComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ImportTrxReviewComponent ] }) diff --git a/front-end/src/app/import-transactions-module/import-transactions/import-trx-review/upload-complete-message/upload-complete-message.component.spec.ts b/front-end/src/app/import-transactions-module/import-transactions/import-trx-review/upload-complete-message/upload-complete-message.component.spec.ts index 1b0556501c..912649d90f 100644 --- a/front-end/src/app/import-transactions-module/import-transactions/import-trx-review/upload-complete-message/upload-complete-message.component.spec.ts +++ b/front-end/src/app/import-transactions-module/import-transactions/import-trx-review/upload-complete-message/upload-complete-message.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { UploadCompleteMessageComponent } from './upload-complete-message.component'; @@ -6,7 +6,7 @@ describe('UploadCompleteMessageComponent', () => { let component: UploadCompleteMessageComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ UploadCompleteMessageComponent ] }) diff --git a/front-end/src/app/import-transactions-module/import-transactions/import-trx-sidebar/import-trx-sidebar.component.spec.ts b/front-end/src/app/import-transactions-module/import-transactions/import-trx-sidebar/import-trx-sidebar.component.spec.ts index 41c7c90db6..0d2d3729ba 100644 --- a/front-end/src/app/import-transactions-module/import-transactions/import-trx-sidebar/import-trx-sidebar.component.spec.ts +++ b/front-end/src/app/import-transactions-module/import-transactions/import-trx-sidebar/import-trx-sidebar.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ImportTrxSidebarComponent } from './import-trx-sidebar.component'; @@ -6,7 +6,7 @@ describe('ImportTrxSidebarComponent', () => { let component: ImportTrxSidebarComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ImportTrxSidebarComponent ] }) diff --git a/front-end/src/app/import-transactions-module/import-transactions/import-trx-start/import-trx-start.component.spec.ts b/front-end/src/app/import-transactions-module/import-transactions/import-trx-start/import-trx-start.component.spec.ts index 259d8cc521..b8b69d0ad4 100644 --- a/front-end/src/app/import-transactions-module/import-transactions/import-trx-start/import-trx-start.component.spec.ts +++ b/front-end/src/app/import-transactions-module/import-transactions/import-trx-start/import-trx-start.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ImportTrxStartComponent } from './import-trx-start.component'; @@ -6,7 +6,7 @@ describe('ImportTrxStartComponent', () => { let component: ImportTrxStartComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ImportTrxStartComponent ] }) diff --git a/front-end/src/app/import-transactions-module/import-transactions/import-trx-upload/import-trx-upload.component.spec.ts b/front-end/src/app/import-transactions-module/import-transactions/import-trx-upload/import-trx-upload.component.spec.ts index 349491360c..0b44c15943 100644 --- a/front-end/src/app/import-transactions-module/import-transactions/import-trx-upload/import-trx-upload.component.spec.ts +++ b/front-end/src/app/import-transactions-module/import-transactions/import-trx-upload/import-trx-upload.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ImportTrxUploadComponent } from './import-trx-upload.component'; @@ -6,7 +6,7 @@ describe('ImportTrxUploadComponent', () => { let component: ImportTrxUploadComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ImportTrxUploadComponent ] }) diff --git a/front-end/src/app/password/reset-selector/reset-selector.component.spec.ts b/front-end/src/app/password/reset-selector/reset-selector.component.spec.ts index a1e7c5ec60..681287d1d5 100644 --- a/front-end/src/app/password/reset-selector/reset-selector.component.spec.ts +++ b/front-end/src/app/password/reset-selector/reset-selector.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ResetSelectorComponent } from './reset-selector.component'; @@ -6,7 +6,7 @@ describe('ResetSelectorComponent', () => { let component: ResetSelectorComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ResetSelectorComponent ] }) diff --git a/front-end/src/app/password/user-info/user-info.component.spec.ts b/front-end/src/app/password/user-info/user-info.component.spec.ts index 118a993ea1..f12a49c0e2 100644 --- a/front-end/src/app/password/user-info/user-info.component.spec.ts +++ b/front-end/src/app/password/user-info/user-info.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { UserInfoComponent } from './user-info.component'; @@ -6,7 +6,7 @@ describe('UserInfoComponent', () => { let component: UserInfoComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ UserInfoComponent ] }) diff --git a/front-end/src/app/profile/profile.component.spec.ts b/front-end/src/app/profile/profile.component.spec.ts index fdd7580366..ae6b563a21 100644 --- a/front-end/src/app/profile/profile.component.spec.ts +++ b/front-end/src/app/profile/profile.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { HeaderComponent } from '../shared/partials/header/header.component'; import { SidebarComponent } from '../shared/partials/sidebar/sidebar.component'; @@ -8,7 +8,7 @@ describe('ProfileComponent', () => { let component: ProfileComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ RouterTestingModule diff --git a/front-end/src/app/reports/reportdetails/reportdetails.component.spec.ts b/front-end/src/app/reports/reportdetails/reportdetails.component.spec.ts index 4ee936f80a..7b87f4baf1 100644 --- a/front-end/src/app/reports/reportdetails/reportdetails.component.spec.ts +++ b/front-end/src/app/reports/reportdetails/reportdetails.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ReportdetailsComponent } from './reportdetails.component'; @@ -6,7 +6,7 @@ describe('ReportdetailsComponent', () => { let component: ReportdetailsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ReportdetailsComponent ] }) diff --git a/front-end/src/app/reports/reportheader/reportheader.component.spec.ts b/front-end/src/app/reports/reportheader/reportheader.component.spec.ts index 238068db3b..4b1408e654 100644 --- a/front-end/src/app/reports/reportheader/reportheader.component.spec.ts +++ b/front-end/src/app/reports/reportheader/reportheader.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ReportheaderComponent } from './reportheader.component'; @@ -6,7 +6,7 @@ describe('ReportheaderComponent', () => { let component: ReportheaderComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ReportheaderComponent ] }) diff --git a/front-end/src/app/reports/reports.component.spec.ts b/front-end/src/app/reports/reports.component.spec.ts index 0c7a3d220a..ff51f432a1 100644 --- a/front-end/src/app/reports/reports.component.spec.ts +++ b/front-end/src/app/reports/reports.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ReportsComponent } from './reports.component'; @@ -6,7 +6,7 @@ describe('ReportsComponent', () => { let component: ReportsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ReportsComponent ] }) diff --git a/front-end/src/app/reports/reports.service.ts b/front-end/src/app/reports/reports.service.ts index 0ba58aa017..d7c02c2e7f 100644 --- a/front-end/src/app/reports/reports.service.ts +++ b/front-end/src/app/reports/reports.service.ts @@ -1,5 +1,5 @@ import {Injectable, ChangeDetectionStrategy } from '@angular/core'; -import {Http, Response} from '@angular/http'; +// import {Http, Response} from '@angular/http'; import {IReport} from './report'; import {Observable} from 'rxjs/Observable'; import 'rxjs/add/operator/map'; diff --git a/front-end/src/app/reports/reportsidebar/reportsidebar.component.spec.ts b/front-end/src/app/reports/reportsidebar/reportsidebar.component.spec.ts index 71c11cf2aa..8ac9679e55 100644 --- a/front-end/src/app/reports/reportsidebar/reportsidebar.component.spec.ts +++ b/front-end/src/app/reports/reportsidebar/reportsidebar.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ReportsidebarComponent } from './reportsidebar.component'; @@ -6,7 +6,7 @@ describe('ReportsidebarComponent', () => { let component: ReportsidebarComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ReportsidebarComponent ] }) diff --git a/front-end/src/app/settings/settings.component.spec.ts b/front-end/src/app/settings/settings.component.spec.ts index 91588f354a..1df2bd032c 100644 --- a/front-end/src/app/settings/settings.component.spec.ts +++ b/front-end/src/app/settings/settings.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { SettingsComponent } from './settings.component'; @@ -6,7 +6,7 @@ describe('SettingsComponent', () => { let component: SettingsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ SettingsComponent ] }) diff --git a/front-end/src/app/shared/partials/confirm-modal/confirm-modal.component.spec.ts b/front-end/src/app/shared/partials/confirm-modal/confirm-modal.component.spec.ts index f57ba1f7be..a4bb91f9d8 100644 --- a/front-end/src/app/shared/partials/confirm-modal/confirm-modal.component.spec.ts +++ b/front-end/src/app/shared/partials/confirm-modal/confirm-modal.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ConfirmModalComponent } from './confirm-modal.component'; @@ -6,7 +6,7 @@ describe('ConfirmModalComponent', () => { let component: ConfirmModalComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ConfirmModalComponent ] }) diff --git a/front-end/src/app/shared/partials/header/header.component.spec.ts b/front-end/src/app/shared/partials/header/header.component.spec.ts index 307187994b..4ef2a60a5b 100644 --- a/front-end/src/app/shared/partials/header/header.component.spec.ts +++ b/front-end/src/app/shared/partials/header/header.component.spec.ts @@ -1,5 +1,5 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { ApiService } from '../../services/APIService/api.service'; @@ -9,7 +9,7 @@ import { HeaderComponent } from './header.component'; describe('HeaderComponent', () => { let component: HeaderComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ RouterTestingModule, diff --git a/front-end/src/app/shared/partials/input-modal/input-modal.component.spec.ts b/front-end/src/app/shared/partials/input-modal/input-modal.component.spec.ts index 3d150dd050..63c42e330f 100644 --- a/front-end/src/app/shared/partials/input-modal/input-modal.component.spec.ts +++ b/front-end/src/app/shared/partials/input-modal/input-modal.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { InputModalComponent } from './input-modal.component'; @@ -6,7 +6,7 @@ describe('InputModalComponent', () => { let component: InputModalComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ InputModalComponent ] }) diff --git a/front-end/src/app/shared/partials/preview/preview.component.spec.ts b/front-end/src/app/shared/partials/preview/preview.component.spec.ts index 571d5b9b94..79b46ec9fc 100644 --- a/front-end/src/app/shared/partials/preview/preview.component.spec.ts +++ b/front-end/src/app/shared/partials/preview/preview.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { PreviewComponent } from './preview.component'; @@ -6,7 +6,7 @@ describe('PreviewComponent', () => { let component: PreviewComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ PreviewComponent ] }) diff --git a/front-end/src/app/shared/partials/sidebar/sidebar.component.spec.ts b/front-end/src/app/shared/partials/sidebar/sidebar.component.spec.ts index 585f7d29ca..ed5507e0be 100644 --- a/front-end/src/app/shared/partials/sidebar/sidebar.component.spec.ts +++ b/front-end/src/app/shared/partials/sidebar/sidebar.component.spec.ts @@ -1,5 +1,5 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { SidebarComponent } from './sidebar.component'; @@ -8,7 +8,7 @@ describe('SidebarComponent', () => { let component: SidebarComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ RouterTestingModule, diff --git a/front-end/src/app/shared/partials/sign-and-submit/sign-and-submit.component.spec.ts b/front-end/src/app/shared/partials/sign-and-submit/sign-and-submit.component.spec.ts index 73ec0a9c4e..e795190042 100644 --- a/front-end/src/app/shared/partials/sign-and-submit/sign-and-submit.component.spec.ts +++ b/front-end/src/app/shared/partials/sign-and-submit/sign-and-submit.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { SignAndSubmitComponent } from './sign-and-submit.component'; @@ -6,7 +6,7 @@ describe('SignAndSubmitComponent', () => { let component: SignAndSubmitComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ SignAndSubmitComponent ] }) diff --git a/front-end/src/app/shared/partials/sign/sign.component.spec.ts b/front-end/src/app/shared/partials/sign/sign.component.spec.ts index 0ecf2ebcd4..e1a33fabc3 100644 --- a/front-end/src/app/shared/partials/sign/sign.component.spec.ts +++ b/front-end/src/app/shared/partials/sign/sign.component.spec.ts @@ -1,5 +1,5 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms'; @@ -10,7 +10,7 @@ describe('SignComponent', () => { let component: SignComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ FormsModule, diff --git a/front-end/src/app/shared/partials/sign/sign.component.ts b/front-end/src/app/shared/partials/sign/sign.component.ts index 658141a385..277a9ce1b0 100644 --- a/front-end/src/app/shared/partials/sign/sign.component.ts +++ b/front-end/src/app/shared/partials/sign/sign.component.ts @@ -9,7 +9,7 @@ import { MessageService } from '../../services/MessageService/message.service'; import { DialogService } from '../../services/DialogService/dialog.service'; import { ConfirmModalComponent, ModalHeaderClassEnum } from '../confirm-modal/confirm-modal.component'; import { ReportTypeService } from '../../../forms/form-3x/report-type/report-type.service'; -import { loadElementInternal } from '@angular/core/src/render3/util'; +// import { loadElementInternal } from '@angular/core/src/render3/util'; @Component({ selector: 'app-sign', diff --git a/front-end/src/app/shared/partials/spinner/spinner.component.spec.ts b/front-end/src/app/shared/partials/spinner/spinner.component.spec.ts index a51f575d7c..f80aad8f2d 100644 --- a/front-end/src/app/shared/partials/spinner/spinner.component.spec.ts +++ b/front-end/src/app/shared/partials/spinner/spinner.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { SpinnerComponent } from './spinner.component'; @@ -6,7 +6,7 @@ describe('SpinnerComponent', () => { let component: SpinnerComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ SpinnerComponent ] }) diff --git a/front-end/src/app/shared/partials/steps/steps.component.spec.ts b/front-end/src/app/shared/partials/steps/steps.component.spec.ts index 71ae8e74ab..ddc22350eb 100644 --- a/front-end/src/app/shared/partials/steps/steps.component.spec.ts +++ b/front-end/src/app/shared/partials/steps/steps.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { StepsComponent } from './steps.component'; @@ -6,7 +6,7 @@ describe('StepsComponent', () => { let component: StepsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ StepsComponent ] }) diff --git a/front-end/src/app/shared/partials/submit/submit.component.spec.ts b/front-end/src/app/shared/partials/submit/submit.component.spec.ts index 6a557bed51..236c07c2ff 100644 --- a/front-end/src/app/shared/partials/submit/submit.component.spec.ts +++ b/front-end/src/app/shared/partials/submit/submit.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { SubmitComponent } from './submit.component'; @@ -7,7 +7,7 @@ describe('SubmitComponent', () => { let component: SubmitComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ RouterTestingModule, diff --git a/front-end/src/app/shared/partials/validate/validate.component.spec.ts b/front-end/src/app/shared/partials/validate/validate.component.spec.ts index 3269fc7fd0..d9a6e91c6c 100644 --- a/front-end/src/app/shared/partials/validate/validate.component.spec.ts +++ b/front-end/src/app/shared/partials/validate/validate.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ValidateComponent } from './validate.component'; @@ -6,7 +6,7 @@ describe('ValidateComponent', () => { let component: ValidateComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ValidateComponent ] }) diff --git a/front-end/src/app/shared/scss/_modal-standard.scss b/front-end/src/app/shared/scss/_modal-standard.scss index 58098a9971..19fa382e25 100644 --- a/front-end/src/app/shared/scss/_modal-standard.scss +++ b/front-end/src/app/shared/scss/_modal-standard.scss @@ -5,7 +5,7 @@ .session-timed-out.modal-backdrop { background-color: #5b616b; opacity: 1 !important; - background-image: url('src/assets/img/fec-logo-5opac.png'); + background-image: url('../../../assets/img/fec-logo-5opac.png'); background-repeat: no-repeat; -webkit-background-size: cover; -moz-background-size: cover; diff --git a/front-end/src/app/shared/services/DialogService/dialog.service.ts b/front-end/src/app/shared/services/DialogService/dialog.service.ts index 8650ddd8c8..611dd423e9 100644 --- a/front-end/src/app/shared/services/DialogService/dialog.service.ts +++ b/front-end/src/app/shared/services/DialogService/dialog.service.ts @@ -1,8 +1,9 @@ -import { Injectable, ViewChild } from '@angular/core'; +import { Injectable, ViewChild, Directive } from '@angular/core'; import { Observable, of } from 'rxjs'; import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; import { ModalHeaderClassEnum } from '../../partials/confirm-modal/confirm-modal.component'; +@Directive() @Injectable({ providedIn: 'root' }) diff --git a/front-end/src/app/shared/services/FormsService/forms.service.ts b/front-end/src/app/shared/services/FormsService/forms.service.ts index 5ac58d6f4d..4bf8aa0d70 100644 --- a/front-end/src/app/shared/services/FormsService/forms.service.ts +++ b/front-end/src/app/shared/services/FormsService/forms.service.ts @@ -11,7 +11,7 @@ import { ReportFilterModel } from 'src/app/reports/model/report-filter.model'; import { FilterPipe, FilterTypeEnum } from 'src/app/shared/pipes/filter/filter.pipe'; import { DatePipe } from '@angular/common'; import { ZipCodePipe } from 'src/app/shared/pipes/zip-code/zip-code.pipe'; -import { RequestOptions } from '@angular/http'; +// import { RequestOptions } from '@angular/http'; /*export interface GetReportsResponse { reports: reportModel[]; diff --git a/front-end/src/app/shared/services/SessionService/session.service.ts b/front-end/src/app/shared/services/SessionService/session.service.ts index 6af78368bf..ae0b7444d6 100644 --- a/front-end/src/app/shared/services/SessionService/session.service.ts +++ b/front-end/src/app/shared/services/SessionService/session.service.ts @@ -7,7 +7,7 @@ import { environment } from '../../../../environments/environment'; import * as jwt_decode from 'jwt-decode'; import { Observable, BehaviorSubject, of } from 'rxjs'; import { AppConfigService } from '../../../app-config.service'; -import { tokenKey } from '@angular/core/src/view'; +// import { tokenKey } from '@angular/core/src/view'; @Injectable({ providedIn: 'root' diff --git a/front-end/src/app/shared/utils/two-factor-guard/two-factor-guard.guard.spec.ts b/front-end/src/app/shared/utils/two-factor-guard/two-factor-guard.guard.spec.ts index b4265507cb..718632300d 100644 --- a/front-end/src/app/shared/utils/two-factor-guard/two-factor-guard.guard.spec.ts +++ b/front-end/src/app/shared/utils/two-factor-guard/two-factor-guard.guard.spec.ts @@ -1,4 +1,4 @@ -import { TestBed, async, inject } from '@angular/core/testing'; +import { TestBed, inject, waitForAsync } from '@angular/core/testing'; import { TwoFactorGuardGuard } from './two-factor-guard.guard'; diff --git a/front-end/src/app/tools-create-backup/tools-create-backup.component.spec.ts b/front-end/src/app/tools-create-backup/tools-create-backup.component.spec.ts index 1624e40f76..b3e103b408 100644 --- a/front-end/src/app/tools-create-backup/tools-create-backup.component.spec.ts +++ b/front-end/src/app/tools-create-backup/tools-create-backup.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ToolsCreateBackupComponent } from './tools-create-backup.component'; @@ -6,7 +6,7 @@ describe('ToolsCreateBackupComponent', () => { let component: ToolsCreateBackupComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ToolsCreateBackupComponent ] }) diff --git a/front-end/src/app/tools-export-names/tools-export-names.component.spec.ts b/front-end/src/app/tools-export-names/tools-export-names.component.spec.ts index 4612027132..14fbd56f45 100644 --- a/front-end/src/app/tools-export-names/tools-export-names.component.spec.ts +++ b/front-end/src/app/tools-export-names/tools-export-names.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ToolsExportNamesComponent } from './tools-export-names.component'; @@ -6,7 +6,7 @@ describe('ToolsExportNamesComponent', () => { let component: ToolsExportNamesComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ToolsExportNamesComponent ] }) diff --git a/front-end/src/app/tools-import-names/tools-import-names.component.spec.ts b/front-end/src/app/tools-import-names/tools-import-names.component.spec.ts index 6d0afe40de..cfc51adc13 100644 --- a/front-end/src/app/tools-import-names/tools-import-names.component.spec.ts +++ b/front-end/src/app/tools-import-names/tools-import-names.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ToolsImportNamesComponent } from './tools-import-names.component'; @@ -6,7 +6,7 @@ describe('ToolsImportNamesComponent', () => { let component: ToolsImportNamesComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ToolsImportNamesComponent ] }) diff --git a/front-end/src/app/tools-import-transactions/tools-import-transactions.component.spec.ts b/front-end/src/app/tools-import-transactions/tools-import-transactions.component.spec.ts index 1fc5ddcd19..262e80b45a 100644 --- a/front-end/src/app/tools-import-transactions/tools-import-transactions.component.spec.ts +++ b/front-end/src/app/tools-import-transactions/tools-import-transactions.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ToolsImportTransactionsComponent } from './tools-import-transactions.component'; @@ -6,7 +6,7 @@ describe('ToolsImportTransactionsComponent', () => { let component: ToolsImportTransactionsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ToolsImportTransactionsComponent ] }) diff --git a/front-end/src/app/tools-merge-names/tools-merge-names.component.spec.ts b/front-end/src/app/tools-merge-names/tools-merge-names.component.spec.ts index 13ed811d42..6471ea010c 100644 --- a/front-end/src/app/tools-merge-names/tools-merge-names.component.spec.ts +++ b/front-end/src/app/tools-merge-names/tools-merge-names.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ToolsMergeNamesComponent } from './tools-merge-names.component'; @@ -6,7 +6,7 @@ describe('ToolsMergeNamesComponent', () => { let component: ToolsMergeNamesComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ToolsMergeNamesComponent ] }) diff --git a/front-end/src/app/tools/tools.component.spec.ts b/front-end/src/app/tools/tools.component.spec.ts index 0af9ffb170..06c297ad9e 100644 --- a/front-end/src/app/tools/tools.component.spec.ts +++ b/front-end/src/app/tools/tools.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ToolsComponent } from './tools.component'; @@ -6,7 +6,7 @@ describe('ToolsComponent', () => { let component: ToolsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ToolsComponent ] }) diff --git a/front-end/src/app/users/users.component.spec.ts b/front-end/src/app/users/users.component.spec.ts index 909b5bafc3..23956cb05a 100644 --- a/front-end/src/app/users/users.component.spec.ts +++ b/front-end/src/app/users/users.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { UsersComponent } from './users.component'; @@ -6,7 +6,7 @@ describe('UsersComponent', () => { let component: UsersComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ UsersComponent ] }) diff --git a/front-end/src/environments/environment.local.ts b/front-end/src/environments/environment.local.ts index 1f62315329..423778a29d 100644 --- a/front-end/src/environments/environment.local.ts +++ b/front-end/src/environments/environment.local.ts @@ -6,7 +6,7 @@ export const environment = { validateSuccess: 'All required fields have passed validation.', awsRegion: 'us-east-1', awsIdentityPoolId: 'us-east-1:f0f414b2-8e9f-4488-9cc1-34a5918a1a1d', - ACCESS_KEY: _process.env.ACCESS_KEY, - SECRET_KEY: _process.env.SECRET_KEY, + ACCESS_KEY: "_process.env.ACCESS_KEY", //TODO: fix this. Hacked to get Angular 8 upgrade working + SECRET_KEY: "_process.env.SECRET_KEY", //TODO: fix this. Hacked to get Angular 8 upgrade working dcfConverterApiUrl: 'https://dev-efile-api.efdev.fec.gov/dcf_converter/v1' }; diff --git a/front-end/src/environments/environment.ts b/front-end/src/environments/environment.ts index 1e2af5fa63..0c5b0b85f2 100644 --- a/front-end/src/environments/environment.ts +++ b/front-end/src/environments/environment.ts @@ -10,8 +10,8 @@ export const environment = { validateSuccess: 'All required fields have passed validation.', awsRegion: 'us-east-1', awsIdentityPoolId: 'us-east-1:f0f414b2-8e9f-4488-9cc1-34a5918a1a1d', - ACCESS_KEY: _process.env.ACCESS_KEY, - SECRET_KEY: _process.env.SECRET_KEY, + ACCESS_KEY: "_process.env.ACCESS_KEY", //TODO: fix this. Hacked to get Angular 8 upgrade working + SECRET_KEY: "_process.env.SECRET_KEY", //TODO: fix this. Hacked to get Angular 8 upgrade working dcfConverterApiUrl: 'https://dev-efile-api.efdev.fec.gov/dcf_converter/v1' }; diff --git a/front-end/src/polyfills.ts b/front-end/src/polyfills.ts index 503cfea789..b7d7e9d653 100644 --- a/front-end/src/polyfills.ts +++ b/front-end/src/polyfills.ts @@ -3,7 +3,7 @@ * You can add your own extra polyfills to this file. * * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsvers. + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. * 2. Application imports. Files imported after ZoneJS that should be loaded before your main * file. * @@ -11,28 +11,13 @@ * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. * - * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html + * Learn more in https://angular.io/guide/browser-support */ /*************************************************************************************************** - * BROWSER POLYFILLS - */ +* BROWSER POLYFILLS +*/ -/** IE9, IE10 and IE11 requires all of the following polyfills. **/ -import 'core-js/es6/symbol'; -import 'core-js/es6/object'; -import 'core-js/es6/function'; -import 'core-js/es6/parse-int'; -import 'core-js/es6/parse-float'; -import 'core-js/es6/number'; -import 'core-js/es6/math'; -import 'core-js/es6/string'; -import 'core-js/es6/date'; -import 'core-js/es6/array'; -import 'core-js/es6/regexp'; -import 'core-js/es6/map'; -import 'core-js/es6/weak-map'; -import 'core-js/es6/set'; import 'core-js/es7/array'; @@ -81,6 +66,9 @@ import 'hammerjs/hammer'; * APPLICATION IMPORTS */ +import '@angular/localize/init'; + + // Add global to window, assigning the value of window itself. // For AWS issue // https://github.com/aws/aws-sdk-js/issues/1944 diff --git a/front-end/src/styles.scss b/front-end/src/styles.scss index 38b878c4c9..688173ec34 100644 --- a/front-end/src/styles.scss +++ b/front-end/src/styles.scss @@ -1,5 +1,6 @@ /* You can add global styles to this file, and also import other style files */ -$fa-font-path: '../node_modules/@fortawesome/fontawesome-free/webfonts'; +//$fa-font-path: '../node_modules/@fortawesome/fontawesome-free/webfonts'; +$fa-font-path: '~/../node_modules/@fortawesome/fontawesome-free/webfonts'; @import '../node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss'; @import '../node_modules/@fortawesome/fontawesome-free/scss/solid.scss'; @import './app/shared/scss/classes/icons'; diff --git a/front-end/src/tsconfig.app.json b/front-end/src/tsconfig.app.json index c6bfb7e605..57a7e5944c 100644 --- a/front-end/src/tsconfig.app.json +++ b/front-end/src/tsconfig.app.json @@ -2,14 +2,16 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/app", - "module": "es2015", // "types": [], "types": [ "node" ] }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ], + "files": [ + "main.ts", + "polyfills.ts" + ], "include": [ + "src/**/*.d.ts" + ] +, } \ No newline at end of file diff --git a/front-end/src/tsconfig.spec.json b/front-end/src/tsconfig.spec.json index 8f7cedecab..de7733630e 100644 --- a/front-end/src/tsconfig.spec.json +++ b/front-end/src/tsconfig.spec.json @@ -2,7 +2,6 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/spec", - "module": "commonjs", "types": [ "jasmine", "node" diff --git a/front-end/tsconfig.json b/front-end/tsconfig.json index ef44e2862b..0fce0d8dbd 100644 --- a/front-end/tsconfig.json +++ b/front-end/tsconfig.json @@ -2,13 +2,16 @@ "compileOnSave": false, "compilerOptions": { "baseUrl": "./", + "downlevelIteration": true, + "importHelpers": true, + "module": "es2020", "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, - "target": "es5", + "target": "es2015", "typeRoots": [ "node_modules/@types" ], diff --git a/front-end/tslint.json b/front-end/tslint.json new file mode 100644 index 0000000000..3e278a5d04 --- /dev/null +++ b/front-end/tslint.json @@ -0,0 +1,8 @@ +{ + "rules": { + "deprecation": { + "severity": "warning" + } + } + +} \ No newline at end of file