From ec667f19765498319844cdccc3a3320e848e421b Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 13:37:16 -0500 Subject: [PATCH 01/21] migrate ci to github actions --- .github/workflow/LintAndTest.yml | 29 +++++++++++++++++++++++++++++ .travis.yml | 18 ------------------ 2 files changed, 29 insertions(+), 18 deletions(-) create mode 100644 .github/workflow/LintAndTest.yml delete mode 100644 .travis.yml diff --git a/.github/workflow/LintAndTest.yml b/.github/workflow/LintAndTest.yml new file mode 100644 index 000000000..4a0ce739b --- /dev/null +++ b/.github/workflow/LintAndTest.yml @@ -0,0 +1,29 @@ +name: Lint & Test + +on: + pull_request: + types: [opened, edited, reopened, ready_for_review] + branches: + - master + - develop + +jobs: + check-pr-title-format: + runs-on: ubuntu-20.04 + - uses: actions/setup-node@v2 + with: + node-version: '10' + steps: + - name: Install Dependencies + run: | + yarn install --frozen-lockfile + - name: Build Licenses + run: | + node ./tools/licenses/fetchLicenses.js + - name: Lint + run: | + yarn lint + - name: Test + run: | + yarn test + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b59cd64c0..000000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: node_js -node_js: - - "lts/dubnium" -cache: yarn - -install: - - yarn install --frozen-lockfile - -script: - - node ./tools/licenses/fetchLicenses.js - - yarn lint - - yarn test - -# Only build on pushes or PRs to these branches -branches: - only: - - master - - develop From cb0a3d5ceb0df793913b0fa0d954a95170400c90 Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 13:38:44 -0500 Subject: [PATCH 02/21] fix folder name --- .github/{workflow => workflows}/LintAndTest.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{workflow => workflows}/LintAndTest.yml (100%) diff --git a/.github/workflow/LintAndTest.yml b/.github/workflows/LintAndTest.yml similarity index 100% rename from .github/workflow/LintAndTest.yml rename to .github/workflows/LintAndTest.yml From 4cf5583a2394bf1e0c4b7f4d5c88203bf57bb515 Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 13:41:17 -0500 Subject: [PATCH 03/21] fix node step --- .github/workflows/LintAndTest.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/LintAndTest.yml b/.github/workflows/LintAndTest.yml index 4a0ce739b..a04d57e99 100644 --- a/.github/workflows/LintAndTest.yml +++ b/.github/workflows/LintAndTest.yml @@ -10,10 +10,10 @@ on: jobs: check-pr-title-format: runs-on: ubuntu-20.04 - - uses: actions/setup-node@v2 - with: - node-version: '10' steps: + - uses: actions/setup-node@v2 + with: + node-version: '10' - name: Install Dependencies run: | yarn install --frozen-lockfile From 6f7f6281f1035ecaeffde9c4eb5d5a17ac94007b Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 13:43:33 -0500 Subject: [PATCH 04/21] update job name --- .github/workflows/LintAndTest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/LintAndTest.yml b/.github/workflows/LintAndTest.yml index a04d57e99..7980ec1d0 100644 --- a/.github/workflows/LintAndTest.yml +++ b/.github/workflows/LintAndTest.yml @@ -8,7 +8,7 @@ on: - develop jobs: - check-pr-title-format: + lint-and-test: runs-on: ubuntu-20.04 steps: - uses: actions/setup-node@v2 From ed392f8d84973e361ee08c9b7ce823473929cffb Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 13:47:54 -0500 Subject: [PATCH 05/21] checkout repo --- .github/workflows/LintAndTest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/LintAndTest.yml b/.github/workflows/LintAndTest.yml index 7980ec1d0..161c3cad8 100644 --- a/.github/workflows/LintAndTest.yml +++ b/.github/workflows/LintAndTest.yml @@ -11,6 +11,7 @@ jobs: lint-and-test: runs-on: ubuntu-20.04 steps: + - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: '10' From d6ad85003f7894286d4d138646aacc11014bf24c Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 13:55:18 -0500 Subject: [PATCH 06/21] run on syncronize --- .github/workflows/LintAndTest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/LintAndTest.yml b/.github/workflows/LintAndTest.yml index 161c3cad8..3d2730bc7 100644 --- a/.github/workflows/LintAndTest.yml +++ b/.github/workflows/LintAndTest.yml @@ -2,7 +2,7 @@ name: Lint & Test on: pull_request: - types: [opened, edited, reopened, ready_for_review] + types: [opened, edited, synchronize, reopened, ready_for_review] branches: - master - develop From e2bdf452c3871d099fbe6dc955d4585428ce9a8c Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 13:56:36 -0500 Subject: [PATCH 07/21] test failed lint --- src/classes/ABTest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/ABTest.js b/src/classes/ABTest.js index 76b380256..5d0867dac 100644 --- a/src/classes/ABTest.js +++ b/src/classes/ABTest.js @@ -19,7 +19,7 @@ import globals from './Globals'; import { getJson } from '../utils/utils'; import { log } from '../utils/common'; -const { BROWSER_INFO, CMP_BASE_URL, EXTENSION_VERSION } = globals; +const { BROWSER_INFO, CMP_BASE_URL, EXTENSION_VERSION, FAIL } = globals; /** Helper class for handling A/B tests. * @memberof BackgroundClasses From e03958ef174cf214141af4bee615a97335d7277d Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 14:10:20 -0500 Subject: [PATCH 08/21] Revert "test failed lint" This reverts commit e2bdf452c3871d099fbe6dc955d4585428ce9a8c. --- src/classes/ABTest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/ABTest.js b/src/classes/ABTest.js index 5d0867dac..76b380256 100644 --- a/src/classes/ABTest.js +++ b/src/classes/ABTest.js @@ -19,7 +19,7 @@ import globals from './Globals'; import { getJson } from '../utils/utils'; import { log } from '../utils/common'; -const { BROWSER_INFO, CMP_BASE_URL, EXTENSION_VERSION, FAIL } = globals; +const { BROWSER_INFO, CMP_BASE_URL, EXTENSION_VERSION } = globals; /** Helper class for handling A/B tests. * @memberof BackgroundClasses From c1629da63f840341f42bfba321f2c3781a1ba5ba Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 15:21:51 -0500 Subject: [PATCH 09/21] fix test --- .../Step1_LogInForm/__tests__/Step1_LoginForm.test.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/Step1_LoginForm.test.jsx b/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/Step1_LoginForm.test.jsx index c64fb0a34..db47b2581 100644 --- a/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/Step1_LoginForm.test.jsx +++ b/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/Step1_LoginForm.test.jsx @@ -15,7 +15,7 @@ import React from 'react'; import renderer from 'react-test-renderer'; import { shallow } from 'enzyme'; import { MemoryRouter } from 'react-router'; -import Step1_LoginForm from '../Step1_LoginForm'; +import Step1_LogInForm from '../Step1_LogInForm'; const noop = () => {}; describe('app/hub/Views/Step1_LoginForm component', () => { @@ -33,7 +33,7 @@ describe('app/hub/Views/Step1_LoginForm component', () => { const component = renderer.create( - + ).toJSON(); expect(component).toMatchSnapshot(); @@ -49,7 +49,7 @@ describe('app/hub/Views/Step1_LoginForm component', () => { handleSubmit: jest.fn(), } - const component = shallow(); + const component = shallow(); expect(happyState.handleSubmit.mock.calls.length).toBe(0); component.find('form').simulate('submit'); expect(happyState.handleSubmit.mock.calls.length).toBe(1); @@ -65,7 +65,7 @@ describe('app/hub/Views/Step1_LoginForm component', () => { handleSubmit: jest.fn(), }; - const component = shallow(); + const component = shallow(); expect(sadState.handleSubmit.mock.calls.length).toBe(0); component.find('form').simulate('submit'); From 66d864c0cdc6aab06909cd07ab733917815b78c8 Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 15:33:53 -0500 Subject: [PATCH 10/21] tmp --- .../Step1_LogInForm/__tests__/{Step1_LoginForm.test.jsx => foo} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/{Step1_LoginForm.test.jsx => foo} (100%) diff --git a/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/Step1_LoginForm.test.jsx b/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/foo similarity index 100% rename from app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/Step1_LoginForm.test.jsx rename to app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/foo From cddc94b18ff9c780d95459b1cd097a784975ce67 Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 15:34:36 -0500 Subject: [PATCH 11/21] rename because capitalizations are hard --- .../Step1_LogInForm/__tests__/{foo => Step1_LogInForm.test.jsx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/{foo => Step1_LogInForm.test.jsx} (100%) diff --git a/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/foo b/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/Step1_LogInForm.test.jsx similarity index 100% rename from app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/foo rename to app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/Step1_LogInForm.test.jsx From 61e027abb4af75f81b5f44038613650a8b3f6850 Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 15:47:48 -0500 Subject: [PATCH 12/21] remove snapshots --- .../Step1_LoginForm.test.jsx.snap | 85 ------------------- 1 file changed, 85 deletions(-) delete mode 100644 app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/__snapshots__/Step1_LoginForm.test.jsx.snap diff --git a/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/__snapshots__/Step1_LoginForm.test.jsx.snap b/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/__snapshots__/Step1_LoginForm.test.jsx.snap deleted file mode 100644 index b747c6459..000000000 --- a/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/__snapshots__/Step1_LoginForm.test.jsx.snap +++ /dev/null @@ -1,85 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`app/hub/Views/Step1_LoginForm component Snapshot tests with react-test-renderer Login Form view is rendered correctly 1`] = ` -
-
-
- - -
-
-
-
- - -
-
-
-
- -
- forgot_password -
-
-
-
-
- -
-
-`; From d64e84fb94062f944c30b1489a63dd1a7caac55a Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 15:48:40 -0500 Subject: [PATCH 13/21] add back snapshots with proper casing --- .../Step1_LogInForm.test.jsx.snap | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/__snapshots__/Step1_LogInForm.test.jsx.snap diff --git a/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/__snapshots__/Step1_LogInForm.test.jsx.snap b/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/__snapshots__/Step1_LogInForm.test.jsx.snap new file mode 100644 index 000000000..b747c6459 --- /dev/null +++ b/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/__snapshots__/Step1_LogInForm.test.jsx.snap @@ -0,0 +1,85 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`app/hub/Views/Step1_LoginForm component Snapshot tests with react-test-renderer Login Form view is rendered correctly 1`] = ` +
+
+
+ + +
+
+
+
+ + +
+
+
+
+ +
+ forgot_password +
+
+
+
+
+ +
+
+`; From 6406da8c04a9c125785400bce12024a66026beaa Mon Sep 17 00:00:00 2001 From: Christopher Tino Date: Wed, 10 Feb 2021 16:00:37 -0500 Subject: [PATCH 14/21] clean up unit test logging --- src/utils/common.js | 1 - test/setup.js | 11 ++++++++++- test/utils/common.test.js | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/utils/common.js b/src/utils/common.js index d2f1e78e6..9150c8f35 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -128,7 +128,6 @@ export function prefsGet(...args) { * @return {Promise} prefs object which has been set, or error */ export function prefsSet(prefs) { - log('PREFS SET', prefs); return new Promise(((resolve, reject) => { if (typeof prefs !== 'undefined') { chrome.storage.local.set(prefs, () => { diff --git a/test/setup.js b/test/setup.js index e6c2ba6cc..d4eb81af3 100644 --- a/test/setup.js +++ b/test/setup.js @@ -19,8 +19,17 @@ import { enableFetchMocks } from 'jest-fetch-mock'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; -Enzyme.configure({ adapter: new Adapter() }); +// Disable logging +jest.mock('../src/utils/common', () => { + const commonActual = jest.requireActual('../src/utils/common'); + return { + ...commonActual, + log: () => false, + }; +}); + enableFetchMocks(); +Enzyme.configure({ adapter: new Adapter() }); // Fake the translation function to only return the translation key global.t = function(str) { diff --git a/test/utils/common.test.js b/test/utils/common.test.js index 9fcf96748..b8f52f290 100644 --- a/test/utils/common.test.js +++ b/test/utils/common.test.js @@ -11,7 +11,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0 */ -import { prefsSet, prefsGet } from '../../src/utils/common'; +import { prefsGet } from '../../src/utils/common'; describe('tests for prefsGet()', () => { // Setup prefsGet() by initializing chrome.storage.local.get() From df30ffd3d1ee508eefeb0263f210c9512c6c5b86 Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 16:55:00 -0500 Subject: [PATCH 15/21] tmp --- .../OnboardingViews/{Step1_LogInForm => foo}/Step1_LogInForm.scss | 0 .../{Step1_LogInForm => foo}/Step1_LogInFormContainer.jsx | 0 .../Step1_LogInForm.jsx => foo/Step1_LoginForm.jsx} | 0 .../{Step1_LogInForm => foo}/__tests__/Step1_LogInForm.test.jsx | 0 .../__tests__/__snapshots__/Step1_LogInForm.test.jsx.snap | 0 .../Views/OnboardingViews/{Step1_LogInForm => foo}/index.js | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename app/dawn-hub/Views/OnboardingViews/{Step1_LogInForm => foo}/Step1_LogInForm.scss (100%) rename app/dawn-hub/Views/OnboardingViews/{Step1_LogInForm => foo}/Step1_LogInFormContainer.jsx (100%) rename app/dawn-hub/Views/OnboardingViews/{Step1_LogInForm/Step1_LogInForm.jsx => foo/Step1_LoginForm.jsx} (100%) rename app/dawn-hub/Views/OnboardingViews/{Step1_LogInForm => foo}/__tests__/Step1_LogInForm.test.jsx (100%) rename app/dawn-hub/Views/OnboardingViews/{Step1_LogInForm => foo}/__tests__/__snapshots__/Step1_LogInForm.test.jsx.snap (100%) rename app/dawn-hub/Views/OnboardingViews/{Step1_LogInForm => foo}/index.js (100%) diff --git a/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/Step1_LogInForm.scss b/app/dawn-hub/Views/OnboardingViews/foo/Step1_LogInForm.scss similarity index 100% rename from app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/Step1_LogInForm.scss rename to app/dawn-hub/Views/OnboardingViews/foo/Step1_LogInForm.scss diff --git a/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/Step1_LogInFormContainer.jsx b/app/dawn-hub/Views/OnboardingViews/foo/Step1_LogInFormContainer.jsx similarity index 100% rename from app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/Step1_LogInFormContainer.jsx rename to app/dawn-hub/Views/OnboardingViews/foo/Step1_LogInFormContainer.jsx diff --git a/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/Step1_LogInForm.jsx b/app/dawn-hub/Views/OnboardingViews/foo/Step1_LoginForm.jsx similarity index 100% rename from app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/Step1_LogInForm.jsx rename to app/dawn-hub/Views/OnboardingViews/foo/Step1_LoginForm.jsx diff --git a/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/Step1_LogInForm.test.jsx b/app/dawn-hub/Views/OnboardingViews/foo/__tests__/Step1_LogInForm.test.jsx similarity index 100% rename from app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/Step1_LogInForm.test.jsx rename to app/dawn-hub/Views/OnboardingViews/foo/__tests__/Step1_LogInForm.test.jsx diff --git a/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/__snapshots__/Step1_LogInForm.test.jsx.snap b/app/dawn-hub/Views/OnboardingViews/foo/__tests__/__snapshots__/Step1_LogInForm.test.jsx.snap similarity index 100% rename from app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/__snapshots__/Step1_LogInForm.test.jsx.snap rename to app/dawn-hub/Views/OnboardingViews/foo/__tests__/__snapshots__/Step1_LogInForm.test.jsx.snap diff --git a/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/index.js b/app/dawn-hub/Views/OnboardingViews/foo/index.js similarity index 100% rename from app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/index.js rename to app/dawn-hub/Views/OnboardingViews/foo/index.js From 2c183e7adfd4b6ee5725ea095679fab998f26387 Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 16:55:30 -0500 Subject: [PATCH 16/21] folder --- .../OnboardingViews/{foo => Step1_LogInForm}/Step1_LogInForm.scss | 0 .../{foo => Step1_LogInForm}/Step1_LogInFormContainer.jsx | 0 .../OnboardingViews/{foo => Step1_LogInForm}/Step1_LoginForm.jsx | 0 .../{foo => Step1_LogInForm}/__tests__/Step1_LogInForm.test.jsx | 0 .../__tests__/__snapshots__/Step1_LogInForm.test.jsx.snap | 0 .../Views/OnboardingViews/{foo => Step1_LogInForm}/index.js | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename app/dawn-hub/Views/OnboardingViews/{foo => Step1_LogInForm}/Step1_LogInForm.scss (100%) rename app/dawn-hub/Views/OnboardingViews/{foo => Step1_LogInForm}/Step1_LogInFormContainer.jsx (100%) rename app/dawn-hub/Views/OnboardingViews/{foo => Step1_LogInForm}/Step1_LoginForm.jsx (100%) rename app/dawn-hub/Views/OnboardingViews/{foo => Step1_LogInForm}/__tests__/Step1_LogInForm.test.jsx (100%) rename app/dawn-hub/Views/OnboardingViews/{foo => Step1_LogInForm}/__tests__/__snapshots__/Step1_LogInForm.test.jsx.snap (100%) rename app/dawn-hub/Views/OnboardingViews/{foo => Step1_LogInForm}/index.js (100%) diff --git a/app/dawn-hub/Views/OnboardingViews/foo/Step1_LogInForm.scss b/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/Step1_LogInForm.scss similarity index 100% rename from app/dawn-hub/Views/OnboardingViews/foo/Step1_LogInForm.scss rename to app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/Step1_LogInForm.scss diff --git a/app/dawn-hub/Views/OnboardingViews/foo/Step1_LogInFormContainer.jsx b/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/Step1_LogInFormContainer.jsx similarity index 100% rename from app/dawn-hub/Views/OnboardingViews/foo/Step1_LogInFormContainer.jsx rename to app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/Step1_LogInFormContainer.jsx diff --git a/app/dawn-hub/Views/OnboardingViews/foo/Step1_LoginForm.jsx b/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/Step1_LoginForm.jsx similarity index 100% rename from app/dawn-hub/Views/OnboardingViews/foo/Step1_LoginForm.jsx rename to app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/Step1_LoginForm.jsx diff --git a/app/dawn-hub/Views/OnboardingViews/foo/__tests__/Step1_LogInForm.test.jsx b/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/Step1_LogInForm.test.jsx similarity index 100% rename from app/dawn-hub/Views/OnboardingViews/foo/__tests__/Step1_LogInForm.test.jsx rename to app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/Step1_LogInForm.test.jsx diff --git a/app/dawn-hub/Views/OnboardingViews/foo/__tests__/__snapshots__/Step1_LogInForm.test.jsx.snap b/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/__snapshots__/Step1_LogInForm.test.jsx.snap similarity index 100% rename from app/dawn-hub/Views/OnboardingViews/foo/__tests__/__snapshots__/Step1_LogInForm.test.jsx.snap rename to app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/__tests__/__snapshots__/Step1_LogInForm.test.jsx.snap diff --git a/app/dawn-hub/Views/OnboardingViews/foo/index.js b/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/index.js similarity index 100% rename from app/dawn-hub/Views/OnboardingViews/foo/index.js rename to app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/index.js From 43e597c5a021c9bf98083cee26490227e3556ffb Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 16:58:42 -0500 Subject: [PATCH 17/21] tmp --- .../OnboardingViews/Step1_LogInForm/{Step1_LoginForm.jsx => foo} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/{Step1_LoginForm.jsx => foo} (100%) diff --git a/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/Step1_LoginForm.jsx b/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/foo similarity index 100% rename from app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/Step1_LoginForm.jsx rename to app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/foo From 42e9d4d55dc93837f4f353ebcad3dd933f12d81b Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 16:59:02 -0500 Subject: [PATCH 18/21] make consistent across plaforms --- .../OnboardingViews/Step1_LogInForm/{foo => Step1_LogInForm.jsx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/{foo => Step1_LogInForm.jsx} (100%) diff --git a/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/foo b/app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/Step1_LogInForm.jsx similarity index 100% rename from app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/foo rename to app/dawn-hub/Views/OnboardingViews/Step1_LogInForm/Step1_LogInForm.jsx From 88fa662b0809defe534fd2dc3f1b0a8c3ff8c71e Mon Sep 17 00:00:00 2001 From: wlycdgr Date: Wed, 10 Feb 2021 17:25:29 -0500 Subject: [PATCH 19/21] Fix proptype issue with OptIn component tests --- app/panel/components/Settings/__tests__/OptIn.jsx | 3 +++ .../components/Settings/__tests__/__snapshots__/OptIn.jsx.snap | 2 ++ 2 files changed, 5 insertions(+) diff --git a/app/panel/components/Settings/__tests__/OptIn.jsx b/app/panel/components/Settings/__tests__/OptIn.jsx index 3ac666606..f7eb8478d 100644 --- a/app/panel/components/Settings/__tests__/OptIn.jsx +++ b/app/panel/components/Settings/__tests__/OptIn.jsx @@ -22,6 +22,7 @@ describe('app/panel/Settings/OptIn.jsx', () => { const settingsData = { enable_metrics: false, enable_human_web: false, + enable_abtests: false, }; const component = renderer.create( @@ -37,6 +38,7 @@ describe('app/panel/Settings/OptIn.jsx', () => { const settingsData = { enable_metrics: true, enable_human_web: true, + enable_abtests: true, }; const component = renderer.create( @@ -54,6 +56,7 @@ describe('app/panel/Settings/OptIn.jsx', () => { const settingsData = { enable_metrics: true, enable_human_web: true, + enable_abtests: true, }; const toggleCheckbox = jest.fn(); diff --git a/app/panel/components/Settings/__tests__/__snapshots__/OptIn.jsx.snap b/app/panel/components/Settings/__tests__/__snapshots__/OptIn.jsx.snap index ef02188b0..8cbc32a7e 100644 --- a/app/panel/components/Settings/__tests__/__snapshots__/OptIn.jsx.snap +++ b/app/panel/components/Settings/__tests__/__snapshots__/OptIn.jsx.snap @@ -89,6 +89,7 @@ exports[`app/panel/Settings/OptIn.jsx Snapshot tests with react-test-renderer Op className="s-square-checkbox" > Date: Wed, 10 Feb 2021 17:31:20 -0500 Subject: [PATCH 20/21] Fix ChoosePlanView component test proptype mismatch --- .../__tests__/ChoosePlanView.test.jsx | 4 +- .../ChoosePlanView.test.jsx.snap | 370 ++---------------- 2 files changed, 40 insertions(+), 334 deletions(-) diff --git a/app/dawn-hub/Views/OnboardingViews/Step4_ChoosePlanView/__tests__/ChoosePlanView.test.jsx b/app/dawn-hub/Views/OnboardingViews/Step4_ChoosePlanView/__tests__/ChoosePlanView.test.jsx index 8f815686f..73407dd44 100644 --- a/app/dawn-hub/Views/OnboardingViews/Step4_ChoosePlanView/__tests__/ChoosePlanView.test.jsx +++ b/app/dawn-hub/Views/OnboardingViews/Step4_ChoosePlanView/__tests__/ChoosePlanView.test.jsx @@ -16,6 +16,7 @@ import renderer from 'react-test-renderer'; import { shallow } from 'enzyme'; import { MemoryRouter } from 'react-router'; import ChoosePlanView from '../ChoosePlanView'; +import { SEARCH_GHOSTERY } from '../../Step3_ChooseDefaultSearchView/ChooseDefaultSearchConstants'; const noop = () => {}; @@ -25,7 +26,8 @@ describe('app/dawn-hub/Views/OnboardingViews/Step4_ChoosePlanView/ChoosePlanView selectedGhosteryGlow: true, actions: { setSetupStep: noop - } + }, + defaultSearch: SEARCH_GHOSTERY, }; describe('Snapshot tests with react-test-renderer', () => { test('ChoosePlanView is rendered correctly', () => { diff --git a/app/dawn-hub/Views/OnboardingViews/Step4_ChoosePlanView/__tests__/__snapshots__/ChoosePlanView.test.jsx.snap b/app/dawn-hub/Views/OnboardingViews/Step4_ChoosePlanView/__tests__/__snapshots__/ChoosePlanView.test.jsx.snap index 17346e643..e7ef3d63c 100644 --- a/app/dawn-hub/Views/OnboardingViews/Step4_ChoosePlanView/__tests__/__snapshots__/ChoosePlanView.test.jsx.snap +++ b/app/dawn-hub/Views/OnboardingViews/Step4_ChoosePlanView/__tests__/__snapshots__/ChoosePlanView.test.jsx.snap @@ -43,345 +43,49 @@ exports[`app/dawn-hub/Views/OnboardingViews/Step4_ChoosePlanView/ChoosePlanView.
- ghostery_dawn_onboarding_choose_an_option + ghostery_dawn_onboarding_based_on_your_privacy_preferences
-
+
+
-
-
-
- - - - - -
-
-
-
-
-

- Ghostery -

-
-

- hub_upgrade_plan_free -

-
-

- - hub_upgrade_basic_protection - -

-
-
- - ghostery_dawn_onboarding_private_search -
-
- - ghostery_dawn_onboarding_tracker_protection -
-
- - ghostery_dawn_onboarding_speedy_page_loads -
-
- - ghostery_dawn_onboarding_intelligence_technology -
-
-
-
-
-
-
- - - - - -
-
-
-
-

- Ghostery Plus -

-
-

- $4.99 -

-

- per_month -

-
-

- - hub_upgrade_additional_protection - -

-
-
- - ghostery_dawn_onboarding_private_search -
-
- - ghostery_dawn_onboarding_tracker_protection -
-
- - ghostery_dawn_onboarding_speedy_page_loads -
-
- - ghostery_dawn_onboarding_intelligence_technology -
-
- - ghostery_dawn_onboarding_ad_free -
-
- - ghostery_dawn_onboarding_supports_ghosterys_mission -
-
-
-
-
-
-
- - - - - -
-
-
-
-
-

- Ghostery Premium -

-
-

- $11.99 -

-

- per_month -

-
-

- - hub_upgrade_maximum_protection - -

-
-
- - ghostery_dawn_onboarding_private_search -
-
- - ghostery_dawn_onboarding_tracker_protection -
-
- - ghostery_dawn_onboarding_speedy_page_loads -
-
- - ghostery_dawn_onboarding_intelligence_technology -
-
- - ghostery_dawn_onboarding_ad_free -
-
- - ghostery_dawn_onboarding_supports_ghosterys_mission -
-
- - VPN -
-
- - ghostery_dawn_onboarding_unlimited_bandwidth -
-
-
-
+ ghostery_dawn_onboarding_ad_free_with_ghostery_plus_subscription
+ className="ChoosePlanView__adFreePromo" + > + (ghostery_dawn_onboarding_ad_free_promo) +
+
+ ghostery_dawn_onboarding_ad_free_promo_description +
+ + ghostery_dawn_onboarding_start_trial + +
+ ghostery_dawn_onboarding_see_all_plans +
+
`; From 342a6b771a97423c3d61806edb02c0a862426373 Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Wed, 10 Feb 2021 17:47:09 -0500 Subject: [PATCH 21/21] remove edited trigger --- .github/workflows/LintAndTest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/LintAndTest.yml b/.github/workflows/LintAndTest.yml index 3d2730bc7..23787df4e 100644 --- a/.github/workflows/LintAndTest.yml +++ b/.github/workflows/LintAndTest.yml @@ -2,7 +2,7 @@ name: Lint & Test on: pull_request: - types: [opened, edited, synchronize, reopened, ready_for_review] + types: [opened, synchronize, reopened, ready_for_review] branches: - master - develop