├── .babelrc ├── .dockerignore ├── .env.example ├── .eslintrc ├── .gitignore ├── .osfg-dir-config.js ├── .sequelizerc ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE.md ├── README.md ├── client ├── actions │ ├── accountsManagementActions.js │ ├── appActions.js │ ├── appActions.spec.js │ ├── campaignActions.js │ ├── campaignActions.spec.js │ ├── listActions.js │ ├── listActions.spec.js │ ├── notificationActions.js │ ├── permissionActions.js │ ├── permissionActions.spec.js │ ├── settingsActions.js │ └── settingsActions.spec.js ├── components │ ├── 404 │ │ ├── index.js │ │ └── index.spec.js │ ├── accountsManagement │ │ ├── CreateAccountForm.js │ │ └── DeleteAccountForm.js │ ├── admin-lte │ │ ├── Footer.js │ │ ├── Footer.spec.js │ │ ├── Header.js │ │ ├── Header.spec.js │ │ ├── RightSidebar.js │ │ ├── RightSidebar.spec.js │ │ ├── Sidebar.js │ │ ├── Sidebar.spec.js │ │ ├── WS-Notification.js │ │ └── WS-Notification.spec.js │ ├── analytics │ │ ├── CampaignReportsTable.js │ │ └── CampaignReportsTable.spec.js │ ├── campaigns │ │ ├── CreateCampaignForm.js │ │ ├── CreateCampaignForm.spec.js │ │ ├── ManageCampaigns.js │ │ ├── ManageCampaigns.spec.js │ │ ├── ManageCampaignsGraph.js │ │ ├── ManageCampaignsGraph.spec.js │ │ ├── ManageCampaignsTable.js │ │ ├── ManageCampaignsTable.spec.js │ │ ├── PreviewCampaignForm.js │ │ └── PreviewCampaignForm.spec.js │ ├── common │ │ ├── DisabledLink.js │ │ ├── DisabledLink.spec.js │ │ ├── FormRenderWrappers.js │ │ ├── FormRenderWrappers.spec.js │ │ ├── SidebarLink.js │ │ ├── SidebarLink.spec.js │ │ ├── SidebarTreeview.js │ │ ├── SidebarTreeview.spec.js │ │ ├── TextEditorPlain.js │ │ ├── TextEditorPlain.spec.js │ │ ├── TextEditorRich.js │ │ └── TextEditorRich.spec.js │ ├── dashboard │ │ ├── UserInfo.js │ │ └── UserInfo.spec.js │ ├── lists │ │ ├── ErrorsList.js │ │ ├── ErrorsList.spec.js │ │ ├── ListSignupFormCreator.js │ │ ├── ListSignupFormCreator.spec.js │ │ ├── ManageLists.js │ │ ├── ManageLists.spec.js │ │ ├── ManageListsTable.js │ │ ├── ManageListsTable.spec.js │ │ ├── ManageSubscribersTable.js │ │ ├── ManageSubscribersTable.spec.js │ │ ├── SubscribersTable.js │ │ └── SubscribersTable.spec.js │ ├── permissions │ │ ├── GrantPermissionForm.js │ │ ├── GrantPermissionForm.spec.js │ │ ├── ManageActivePermissionsTable.js │ │ ├── ManageActivePermissionsTable.spec.js │ │ ├── ManageGrantOfferedPermissionsTable.js │ │ ├── ManageGrantOfferedPermissionsTable.spec.js │ │ ├── ManageGrantedPermissionsTable.js │ │ ├── ManageGrantedPermissionsTable.spec.js │ │ ├── ManageReceivedPermissionOffersTable.js │ │ └── ManageReceivedPermissionOffersTable.spec.js │ └── templates │ │ ├── CreateTemplateForm.js │ │ ├── CreateTemplateForm.spec.js │ │ ├── ManageTemplatesTable.js │ │ ├── ManageTemplatesTable.spec.js │ │ ├── PreviewTemplateForm.js │ │ └── PreviewTemplateForm.spec.js ├── constants │ ├── actionTypes.js │ └── endpoints.js ├── containers │ ├── AddEmail.js │ ├── AddEmail.spec.js │ ├── App.js │ ├── App.spec.js │ ├── Dashboard.js │ ├── Dashboard.spec.js │ ├── Notifications.js │ ├── Notifications.spec.js │ ├── Settings.js │ ├── Settings.spec.js │ ├── accountsManagement │ │ ├── CreateAccount.js │ │ └── DeleteAccount.js │ ├── analytics │ │ ├── CampaignReports.js │ │ └── CampaignReports.spec.js │ ├── campaigns │ │ ├── CampaignView.js │ │ ├── CampaignView.spec.js │ │ ├── CreateCampaign.js │ │ ├── CreateCampaign.spec.js │ │ ├── ManageCampaignsBox.js │ │ └── ManageCampaignsBox.spec.js │ ├── common │ │ ├── TextEditor.js │ │ └── TextEditor.spec.js │ ├── lists │ │ ├── CreateList.js │ │ ├── CreateList.spec.js │ │ ├── ImportCSV.js │ │ ├── ImportCSV.spec.js │ │ ├── ManageListSubscribers.js │ │ ├── ManageListSubscribers.spec.js │ │ ├── ManageListsBox.js │ │ └── ManageListsBox.spec.js │ ├── permissions │ │ ├── GrantPermissions.js │ │ ├── GrantPermissions.spec.js │ │ ├── OfferedPermissions.js │ │ ├── OfferedPermissions.spec.js │ │ ├── ReceivedPermissions.js │ │ └── ReceivedPermissions.spec.js │ └── templates │ │ ├── CreateTemplate.js │ │ ├── CreateTemplate.spec.js │ │ ├── ManageTemplates.js │ │ ├── ManageTemplates.spec.js │ │ ├── TemplateView.js │ │ └── TemplateView.spec.js ├── favicon.ico ├── index.ejs ├── index.js ├── reducers │ ├── accountsManagementReducer.js │ ├── appReducer.js │ ├── appReducer.spec.js │ ├── campaignReducer.js │ ├── campaignReducer.spec.js │ ├── index.js │ ├── initialState.js │ ├── listReducer.js │ ├── listReducer.spec.js │ ├── notificationsReducer.js │ ├── notificationsReducer.spec.js │ ├── permissionReducer.js │ ├── permissionReducer.spec.js │ ├── settingsReducer.js │ └── settingsReducer.spec.js ├── routes.js ├── store │ ├── configureStore.dev.js │ ├── configureStore.js │ └── configureStore.prod.js ├── styles │ ├── header.scss │ ├── index.scss │ └── tables.scss ├── utils │ ├── adminLte │ │ ├── app.js │ │ ├── assets │ │ │ └── Lato-Regular.ttf │ │ └── mail-for-good-theme.css │ ├── deepFillArray.js │ └── subscriberListParsers │ │ ├── parseSubscriberList.js │ │ └── parseSubscriberList.spec.js └── webpack-public-path.js ├── config └── paths.js ├── docker-compose.yml ├── docs ├── 1.png ├── 10.png ├── 11.png ├── 12.png ├── 13.png ├── 14.png ├── 15.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png ├── 8.png ├── 9.png ├── aws-deployment-guide │ └── index.html ├── aws_deploy.md ├── categories │ └── index.xml ├── create_campaign_1.png ├── create_campaign_2.png ├── docs-hugo-templates │ ├── archetypes │ │ └── default.md │ ├── config.toml │ ├── content │ │ ├── aws-deployment-guide.md │ │ ├── getting-started │ │ │ └── index.md │ │ ├── google-api-guide.md │ │ ├── how-to-contribute │ │ │ └── index.md │ │ ├── index.md │ │ ├── license │ │ │ └── index.md │ │ ├── local-deployment-guide.md │ │ ├── public │ │ │ ├── 1.png │ │ │ ├── 10.png │ │ │ ├── 11.png │ │ │ ├── 12.png │ │ │ ├── 13.png │ │ │ ├── 14.png │ │ │ ├── 15.png │ │ │ ├── 2.png │ │ │ ├── 3.png │ │ │ ├── 4.png │ │ │ ├── 5.png │ │ │ ├── 6.png │ │ │ ├── 7.png │ │ │ ├── 8.png │ │ │ ├── 9.png │ │ │ ├── aws-deployment-guide │ │ │ │ └── index.html │ │ │ ├── categories │ │ │ │ └── index.xml │ │ │ ├── create_campaign_1.png │ │ │ ├── create_campaign_2.png │ │ │ ├── elastic_allocate_new.png │ │ │ ├── elastic_associate.png │ │ │ ├── elastic_associate_conf.png │ │ │ ├── fonts │ │ │ │ ├── icon.eot │ │ │ │ ├── icon.svg │ │ │ │ ├── icon.ttf │ │ │ │ └── icon.woff │ │ │ ├── getting-started │ │ │ │ ├── index.html │ │ │ │ └── index.xml │ │ │ ├── google-api-guide │ │ │ │ └── index.html │ │ │ ├── google_origins.png │ │ │ ├── header_logo.jpeg │ │ │ ├── hero.png │ │ │ ├── how-to-contribute │ │ │ │ ├── index.html │ │ │ │ └── index.xml │ │ │ ├── images │ │ │ │ ├── favicon.ico │ │ │ │ ├── logo.png │ │ │ │ └── screen.png │ │ │ ├── index.html │ │ │ ├── index.xml │ │ │ ├── javascripts │ │ │ │ ├── application.js │ │ │ │ ├── modal.js │ │ │ │ ├── modernizr.js │ │ │ │ └── test.js │ │ │ ├── license │ │ │ │ ├── index.html │ │ │ │ └── index.xml │ │ │ ├── local-deployment-guide │ │ │ │ └── index.html │ │ │ ├── logo.png │ │ │ ├── modal.css │ │ │ ├── modal.js │ │ │ ├── navbar_ec2_elasticIP.png │ │ │ ├── settings.png │ │ │ ├── sitemap.xml │ │ │ ├── static │ │ │ │ ├── javascripts │ │ │ │ │ └── modal.js │ │ │ │ └── stylesheets │ │ │ │ │ └── modal.css │ │ │ ├── stylesheets │ │ │ │ ├── application.css │ │ │ │ ├── highlight │ │ │ │ │ ├── github_highlightjs.css │ │ │ │ │ └── highlight.css │ │ │ │ ├── index.css │ │ │ │ ├── misc.css │ │ │ │ ├── modal.css │ │ │ │ ├── palettes.css │ │ │ │ └── temporary.css │ │ │ └── tags │ │ │ │ └── index.xml │ │ └── static │ │ │ ├── javascripts │ │ │ └── modal.js │ │ │ └── stylesheets │ │ │ └── modal.css │ ├── layouts │ │ └── partials │ │ │ └── footer.html │ ├── static │ │ ├── 1.png │ │ ├── 10.png │ │ ├── 11.png │ │ ├── 12.png │ │ ├── 13.png │ │ ├── 14.png │ │ ├── 15.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ ├── 9.png │ │ ├── create_campaign_1.png │ │ ├── create_campaign_2.png │ │ ├── elastic_allocate_new.png │ │ ├── elastic_associate.png │ │ ├── elastic_associate_conf.png │ │ ├── google_origins.png │ │ ├── header_logo.jpeg │ │ ├── hero.png │ │ ├── javascripts │ │ │ └── modal.js │ │ ├── logo.png │ │ ├── navbar_ec2_elasticIP.png │ │ ├── settings.png │ │ └── stylesheets │ │ │ ├── highlight │ │ │ └── highlight.css │ │ │ ├── misc.css │ │ │ ├── modal.css │ │ │ └── palettes.css │ └── themes │ │ └── hugo-material-docs │ │ ├── CHANGELOG.md │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── archetypes │ │ └── default.md │ │ ├── exampleSite │ │ ├── config.toml │ │ ├── content │ │ │ ├── adding-content │ │ │ │ └── index.md │ │ │ ├── getting-started │ │ │ │ └── index.md │ │ │ ├── index.md │ │ │ ├── license │ │ │ │ └── index.md │ │ │ └── roadmap │ │ │ │ └── index.md │ │ └── static │ │ │ └── .gitkeep │ │ ├── images │ │ ├── screenshot.png │ │ └── tn.png │ │ ├── layouts │ │ ├── 404.html │ │ ├── _default │ │ │ ├── __list.html │ │ │ └── single.html │ │ ├── index.html │ │ ├── partials │ │ │ ├── drawer.html │ │ │ ├── footer.html │ │ │ ├── footer_js.html │ │ │ ├── head.html │ │ │ ├── header.html │ │ │ ├── nav.html │ │ │ └── nav_link.html │ │ └── shortcodes │ │ │ ├── note.html │ │ │ └── warning.html │ │ ├── static │ │ ├── fonts │ │ │ ├── icon.eot │ │ │ ├── icon.svg │ │ │ ├── icon.ttf │ │ │ └── icon.woff │ │ ├── images │ │ │ ├── favicon.ico │ │ │ ├── logo.png │ │ │ └── screen.png │ │ ├── javascripts │ │ │ ├── application.js │ │ │ └── modernizr.js │ │ └── stylesheets │ │ │ ├── application.css │ │ │ ├── highlight │ │ │ └── highlight.css │ │ │ ├── palettes.css │ │ │ └── temporary.css │ │ └── theme.toml ├── elastic_allocate_new.png ├── elastic_associate.png ├── elastic_associate_conf.png ├── fonts │ ├── icon.eot │ ├── icon.svg │ ├── icon.ttf │ └── icon.woff ├── getting-started │ ├── index.html │ └── index.xml ├── google-api-guide │ └── index.html ├── google_origins.png ├── header_logo.jpeg ├── hero.png ├── how-to-contribute │ ├── index.html │ └── index.xml ├── images │ ├── favicon.ico │ ├── logo.png │ └── screen.png ├── index.html ├── index.xml ├── javascripts │ ├── application.js │ ├── modal.js │ └── modernizr.js ├── license │ ├── index.html │ └── index.xml ├── local-deployment-guide │ └── index.html ├── local_deploy.md ├── logo.png ├── navbar_ec2_elasticIP.png ├── planned_features.md ├── public │ ├── 1.png │ ├── 10.png │ ├── 11.png │ ├── 12.png │ ├── 13.png │ ├── 14.png │ ├── 15.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── 6.png │ ├── 7.png │ ├── 8.png │ ├── 9.png │ ├── aws-deployment-guide │ │ └── index.html │ ├── categories │ │ └── index.xml │ ├── create_campaign_1.png │ ├── create_campaign_2.png │ ├── elastic_allocate_new.png │ ├── elastic_associate.png │ ├── elastic_associate_conf.png │ ├── fonts │ │ ├── icon.eot │ │ ├── icon.svg │ │ ├── icon.ttf │ │ └── icon.woff │ ├── getting-started │ │ ├── index.html │ │ └── index.xml │ ├── google-api-guide │ │ └── index.html │ ├── google_origins.png │ ├── header_logo.jpeg │ ├── hero.png │ ├── how-to-contribute │ │ ├── index.html │ │ └── index.xml │ ├── images │ │ ├── favicon.ico │ │ ├── logo.png │ │ └── screen.png │ ├── index.html │ ├── index.xml │ ├── javascripts │ │ ├── application.js │ │ ├── modal.js │ │ ├── modernizr.js │ │ └── test.js │ ├── license │ │ ├── index.html │ │ └── index.xml │ ├── local-deployment-guide │ │ └── index.html │ ├── logo.png │ ├── modal.css │ ├── modal.js │ ├── navbar_ec2_elasticIP.png │ ├── settings.png │ ├── sitemap.xml │ ├── static │ │ ├── javascripts │ │ │ └── modal.js │ │ └── stylesheets │ │ │ └── modal.css │ ├── stylesheets │ │ ├── application.css │ │ ├── highlight │ │ │ ├── github_highlightjs.css │ │ │ └── highlight.css │ │ ├── index.css │ │ ├── misc.css │ │ ├── modal.css │ │ ├── palettes.css │ │ └── temporary.css │ └── tags │ │ └── index.xml ├── resources │ ├── deploy_images │ │ ├── 1.png │ │ ├── 10.png │ │ ├── 11.png │ │ ├── 12.png │ │ ├── 13.png │ │ ├── 14.png │ │ ├── 15.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ ├── 9.png │ │ ├── elastic_allocate_new.png │ │ ├── elastic_associate.png │ │ ├── elastic_associate_conf.png │ │ ├── google_origins.png │ │ └── navbar_ec2_elasticIP.png │ └── hero.png ├── setting_up.md ├── settings.png ├── sitemap.xml ├── static │ ├── javascripts │ │ └── modal.js │ └── stylesheets │ │ └── modal.css ├── stylesheets │ ├── application.css │ ├── highlight │ │ └── highlight.css │ ├── misc.css │ ├── modal.css │ ├── palettes.css │ └── temporary.css └── tags │ └── index.xml ├── package-lock.json ├── package.json ├── public ├── assets │ ├── btn_google_signin_dark_normal_web@2x.png │ ├── btn_google_signin_light_disabled_web@2x.png │ ├── btn_google_signin_light_focus_web@2x.png │ ├── btn_google_signin_light_normal_web@2x.png │ └── btn_google_signin_light_pressed_web@2x.png ├── index.pug └── main.css ├── server ├── config │ ├── passport │ │ ├── google.js │ │ └── local.js │ ├── secrets.js │ ├── sequelize_config.js │ └── server │ │ ├── index.js │ │ ├── io.js │ │ ├── passport.js │ │ ├── redis.js │ │ ├── restore-db-state.js │ │ ├── sequelize.js │ │ ├── session.js │ │ └── webpack-dev-middleware.js ├── controllers │ ├── accountsManagement │ │ ├── create-user.js │ │ └── delete-user.js │ ├── analytics │ │ ├── clickthrough.js │ │ ├── get-clickthroughs.js │ │ ├── open.js │ │ └── refresh.js │ ├── campaign │ │ ├── create-campaign.js │ │ ├── create-campaign.spec.js │ │ ├── delete-campaigns.js │ │ ├── email │ │ │ ├── amazon-ses │ │ │ │ ├── README.md │ │ │ │ ├── config │ │ │ │ │ └── configSes.js │ │ │ │ ├── controllers │ │ │ │ │ ├── finishCampaignSend.js │ │ │ │ │ ├── getAmazonEmailArray.js │ │ │ │ │ ├── getArrayOfEmailIds.js │ │ │ │ │ └── updateCampaignStatus.js │ │ │ │ ├── index.js │ │ │ │ ├── lib │ │ │ │ │ ├── amazon.js │ │ │ │ │ ├── analytics.js │ │ │ │ │ ├── analytics.spec.js │ │ │ │ │ ├── mail-merge.js │ │ │ │ │ ├── mail-merge.spec.js │ │ │ │ │ ├── nest-array.js │ │ │ │ │ └── nest-array.spec.js │ │ │ │ ├── notifications │ │ │ │ │ ├── sendFinalNotification.js │ │ │ │ │ └── sendUpdateEmailsSentNotification.js │ │ │ │ ├── queue │ │ │ │ │ ├── index.js │ │ │ │ │ └── sendEmail.js │ │ │ │ ├── send-test.js │ │ │ │ └── utils │ │ │ │ │ └── sendCampaignSuccessEmail.js │ │ │ └── index.js │ │ ├── export-sent-unsent-csv.js │ │ ├── get-campaigns.js │ │ ├── send-campaign.js │ │ ├── send-campaign.spec.js │ │ ├── stop-campaign-sending.js │ │ └── stop-campaign-sending.spec.js │ ├── list │ │ ├── add-subscribers.js │ │ ├── delete-lists.js │ │ ├── delete-subscribers.js │ │ ├── export-list-subscribers-csv.js │ │ ├── get-list-subscribers.js │ │ ├── get-lists.js │ │ ├── import-csv.js │ │ ├── subscribe.js │ │ └── update-list.js │ ├── permissions │ │ ├── accept-permission-offer.js │ │ ├── acl-lib │ │ │ ├── acl-campaign-permissions.js │ │ │ ├── acl-list-permissions.js │ │ │ └── acl-template-permissions.js │ │ ├── delete-active-permissions.js │ │ ├── delete-grant-offered-permissions.js │ │ ├── delete-granted-permissions.js │ │ ├── get-active-permissions.js │ │ ├── get-grant-offered-permissions.js │ │ ├── get-granted-permissions.js │ │ ├── get-received-permission-offers.js │ │ ├── grant-permission.js │ │ └── reject-permission-offers.js │ ├── settings │ │ ├── changesettings.js │ │ ├── configure-aws │ │ │ └── configure-aws.js │ │ └── get-settings.js │ ├── subscriber │ │ └── unsubscribe.js │ ├── template │ │ ├── create-template.js │ │ ├── delete-templates.js │ │ └── get-templates.js │ └── websockets │ │ ├── get-profile.js │ │ ├── send-single-notification.js │ │ └── send-update-notification.js ├── feedback-consumer │ ├── consumer.js │ └── feedback-consumer.js ├── index.js ├── migrations │ └── 20180521070624-pass-to-classical-auth-flow.js ├── models │ ├── acl.js │ ├── analysis.js │ ├── analysisemail.js │ ├── campaign.js │ ├── campaignanalytics.js │ ├── campaignanalyticslink.js │ ├── campaignanalyticsopen.js │ ├── campaignsubscriber.js │ ├── index.js │ ├── list.js │ ├── listsubscriber.js │ ├── offerPermission.js │ ├── setting.js │ ├── subscriber.js │ ├── template.js │ └── user.js ├── routes │ ├── accountsManagement.js │ ├── auth.js │ ├── campaigns.js │ ├── index.js │ ├── lists.js │ ├── middleware │ │ ├── acl.js │ │ └── auth.js │ ├── permissions.js │ └── templates.js └── tests │ ├── controllers │ ├── campaigns │ │ └── export-list-subscribers-csv.func.js │ └── lists │ │ ├── import-csv.func.js │ │ ├── stop-campaign-sending.func.js │ │ └── test-csv-files │ │ └── 10emailswithtoomanycommas │ └── mocha.opts ├── tools ├── build.js ├── chalkConfig.js ├── setup │ └── initial_setup.py ├── testClientSetup.js └── testSetup.js ├── utility └── generateEmailCsv.py ├── webpack.config.build.js └── webpack.config.dev.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "transform-decorators-legacy" 4 | ], 5 | "presets": [ 6 | "latest", 7 | "react", 8 | "stage-1" 9 | ], 10 | "env": { 11 | "development": { 12 | "presets": [ 13 | "react-hmre" 14 | ] 15 | }, 16 | "production": { 17 | "plugins": [ 18 | "transform-react-constant-elements", 19 | "transform-react-remove-prop-types" 20 | ] 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.sequelizerc: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | config: './server/config/sequelize_config.js', 3 | migrationsPath: './server/migrations', 4 | modelsPath: './server/models', 5 | seedersPath: './server/seed' 6 | }; 7 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | All Open Source for Good projects follow Free Code Camp's [contributor's guide](https://github.com/freeCodeCamp/freeCodeCamp/blob/master/CONTRIBUTING.md). 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8.2.1-onbuild 2 | 3 | # Copying package.json and running 4 | # npm install are automatically handled 5 | 6 | # Add source files 7 | COPY . . 8 | 9 | # And then compile the frontend 10 | RUN npm run build 11 | 12 | CMD ["npm", "start"] 13 | EXPOSE 8080 14 | -------------------------------------------------------------------------------- /client/actions/appActions.spec.js: -------------------------------------------------------------------------------- 1 | // Test actions not indirectly tested in reducers 2 | import { expect } from 'chai'; 3 | 4 | import { 5 | emitProfileRequest, 6 | localNotification 7 | } from './appActions'; 8 | 9 | describe('(Actions) app', () => { 10 | 11 | it('should exist', () => { 12 | expect(emitProfileRequest).to.be.a('function'); 13 | expect(localNotification).to.be.a('function'); 14 | }); 15 | 16 | }); -------------------------------------------------------------------------------- /client/actions/campaignActions.spec.js: -------------------------------------------------------------------------------- 1 | // Test actions not indirectly tested in reducers 2 | import { expect } from 'chai'; 3 | 4 | import { 5 | requestStopSending, 6 | completeStopSending, 7 | stopSending, 8 | getCampaigns, 9 | postCreateTemplate, 10 | postCreateCampaign, 11 | deleteCampaigns, 12 | postSendCampaign, 13 | postTestEmail, 14 | getTemplates, 15 | deleteTemplates 16 | } from './campaignActions'; 17 | 18 | describe('(Actions) campaign', () => { 19 | 20 | it('should exist', () => { 21 | expect(requestStopSending).to.be.a('function'); 22 | expect(completeStopSending).to.be.a('function'); 23 | expect(stopSending).to.be.a('function'); 24 | expect(getCampaigns).to.be.a('function'); 25 | expect(postCreateTemplate).to.be.a('function'); 26 | expect(postCreateCampaign).to.be.a('function'); 27 | expect(deleteCampaigns).to.be.a('function'); 28 | expect(postSendCampaign).to.be.a('function'); 29 | expect(postTestEmail).to.be.a('function'); 30 | expect(getTemplates).to.be.a('function'); 31 | expect(deleteTemplates).to.be.a('function'); 32 | }); 33 | 34 | }); -------------------------------------------------------------------------------- /client/actions/listActions.spec.js: -------------------------------------------------------------------------------- 1 | // Test actions not indirectly tested in reducers 2 | import { expect } from 'chai'; 3 | 4 | import { 5 | getListSubscribers, 6 | getLists, 7 | submitCSV, 8 | deleteListSubscribers, 9 | deleteLists 10 | } from './listActions'; 11 | 12 | describe('(Actions) list', () => { 13 | 14 | it('should exist', () => { 15 | expect(getListSubscribers).to.be.a('function'); 16 | expect(getLists).to.be.a('function'); 17 | expect(submitCSV).to.be.a('function'); 18 | expect(deleteListSubscribers).to.be.a('function'); 19 | expect(deleteLists).to.be.a('function'); 20 | }); 21 | 22 | }); -------------------------------------------------------------------------------- /client/actions/notificationActions.js: -------------------------------------------------------------------------------- 1 | import { RECEIVE_NOTIFICATION, CONSUME_NOTIFICATION } from '../constants/actionTypes'; 2 | 3 | export function notify(notification) { 4 | return { 5 | type: RECEIVE_NOTIFICATION, 6 | notification: { 7 | message: notification.message, 8 | dismissAfter: 20000, 9 | isActive: true, 10 | activeBarStyle: { 11 | background: notification.colour === 'green' ? 'green' : 'crimson', 12 | left: '' 13 | } 14 | }}; 15 | } 16 | 17 | export function consume() { 18 | return { type: CONSUME_NOTIFICATION }; 19 | } 20 | -------------------------------------------------------------------------------- /client/actions/settingsActions.spec.js: -------------------------------------------------------------------------------- 1 | // Test actions not indirectly tested in reducers 2 | import { expect } from 'chai'; 3 | 4 | import { 5 | getBooleanForAssignedSettings, 6 | changeSettings 7 | } from './settingsActions'; 8 | 9 | describe('(Actions) settings', () => { 10 | 11 | it('should exist', () => { 12 | expect(getBooleanForAssignedSettings).to.be.a('function'); 13 | expect(changeSettings).to.be.a('function'); 14 | }); 15 | 16 | }); -------------------------------------------------------------------------------- /client/components/404/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const NotFound = () => { 4 | return ( 5 |
6 |
7 |

Page not found 8 | Please check the URL 9 |

10 |
11 |
12 | ); 13 | }; 14 | 15 | export default NotFound; 16 | -------------------------------------------------------------------------------- /client/components/404/index.spec.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | import { expect } from 'chai'; 4 | 5 | import NotFound from '../404'; 6 | 7 | const wrapper = shallow(); 8 | 9 | describe('(Component) NotFound', () => { 10 | it('renders without exploding', () => { 11 | expect(wrapper).to.have.lengthOf(1); 12 | }); 13 | }); -------------------------------------------------------------------------------- /client/components/admin-lte/Footer.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Footer = (props) => { // eslint-disable-line no-unused-vars 4 | return ( 5 |