Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage main #901

Merged
merged 159 commits into from
Sep 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
ffe9136
E2E Test - Edit User
cp4r3z Jul 9, 2018
7cdb735
E2E Test - Edit Campaign
cp4r3z Jul 10, 2018
a8a2f3e
E2E Test - Copy Campaign
cp4r3z Jul 10, 2018
1b7620c
E2E Test - Texter Workflow
cp4r3z Jul 10, 2018
09dba71
E2E Test - Opt Outs
cp4r3z Jul 10, 2018
4af4881
Merge branch '617-e2e-edit-user' of https://github.com/cp4r3z/Spoke i…
shakalee14 Jul 13, 2018
4f3207c
Merge in patch from 614-e2e-basic-texter
cp4r3z Jul 13, 2018
fcc972f
E2E Tests - Cleanup after Merge
cp4r3z Jul 13, 2018
563c22c
E2E Test - Interactions - Define Answers
cp4r3z Jul 14, 2018
6a9b2e9
E2E Tests - Minor Cleanup
cp4r3z Jul 14, 2018
b6b1925
E2E Tests - Improve stability
cp4r3z Jul 14, 2018
1674fb3
E2E Tests - Reporting Test Result to Sauce Labs
cp4r3z Jul 14, 2018
dfd0fc0
Refactor query to use knex. Select on all matching roles.
bchrobot Jul 18, 2018
663b4f7
Merge branch '617-e2e-edit-user' of https://github.com/cp4r3z/Spoke i…
shakalee14 Jul 20, 2018
4925219
E2E Tests - Count failures within specs
cp4r3z Jul 21, 2018
ad0ea53
E2E Tests - Using draft-js selector instead of webDriverTestID
cp4r3z Jul 21, 2018
b9481df
E2E Tests - Use lodash instead of camelCase
cp4r3z Jul 21, 2018
8ed6ee5
Merge branch 'main' into 617-e2e-edit-user
cp4r3z Jul 23, 2018
f67556d
Merge branch 'stage-main-e2e-investigation' into 617-e2e-edit-user
cp4r3z Jul 23, 2018
e197e98
Merge branch '617-e2e-edit-user' of https://github.com/cp4r3z/Spoke i…
shakalee14 Jul 24, 2018
497aeea
Merge branch 'backwards-role-compatibility' of https://github.com/bch…
shakalee14 Jul 25, 2018
70400f8
Merge branch 'message-attribution' of https://github.com/bchrobot/Spo…
shakalee14 Jul 25, 2018
7e7e0bb
Merge branch 'bchrobot-message-attribution' into stage-main
shakalee14 Jul 25, 2018
1bc73a5
Merge branch 'distributed-warehouse-contacts' into stage-main
shakalee14 Jul 25, 2018
4fb2b2f
Merge branch 'cp4r3z-617-e2e-edit-user' into stage-main
shakalee14 Jul 25, 2018
8c0c565
Refactor query to use knex. Select on all matching roles.
bchrobot Jul 18, 2018
6816d8a
Replace right join with inner join for SQLite compatibility.
bchrobot Jul 25, 2018
91b4abd
Merge branch 'bchrobot-backwards-role-compatibility' into stage-main
shakalee14 Jul 25, 2018
6812239
E2E Tests - Minor changes, Additional clicks when sending Keys
cp4r3z Jul 26, 2018
c73a6ce
Merge branch '617-e2e-edit-user' of https://github.com/cp4r3z/Spoke i…
shakalee14 Jul 26, 2018
967f09e
Merge branch 'cp4r3z-617-e2e-edit-user' into stage-main
shakalee14 Jul 26, 2018
ee21c8e
E2E Tests - Some additional waits in places that get stuck in tests
cp4r3z Jul 26, 2018
bea943c
E2E Tests - Wait until logout returns to baseUrl
cp4r3z Jul 26, 2018
eb9a055
E2E Tests - Additional stability tweaks
cp4r3z Jul 27, 2018
e6d04d2
E2E Tests - Wait after sending Opt Out
cp4r3z Jul 27, 2018
7f60d46
E2E Tests - More wait in the Date Picker
cp4r3z Jul 27, 2018
e5f4867
Merge branch '617-e2e-edit-user' of https://github.com/cp4r3z/Spoke i…
shakalee14 Jul 27, 2018
764f90e
Testing updated jest config
shakalee14 Jul 27, 2018
24b21be
Merge branch 'cp4r3z-617-e2e-edit-user' into stage-main
shakalee14 Jul 27, 2018
e4e502d
E2E Tests - More waits
cp4r3z Jul 28, 2018
6f8017f
Merge branch 'stage-main' into 617-e2e-edit-user
cp4r3z Jul 28, 2018
38e46a4
E2E Tests - Add the ability to wait for element staleness
cp4r3z Jul 28, 2018
3bc41a7
E2E Tests - Removing extra refreshes
cp4r3z Jul 28, 2018
6e9171a
Merge branch 'main' into 617-e2e-edit-user
shakalee14 Aug 21, 2018
e17a26e
work in progress: setting up due_by correctly
dzeez Aug 29, 2018
7259022
Reverts to camelCase pkg
Aug 22, 2018
5524cd4
Makes camelCase function and removes unneeded package
shakalee14 Aug 30, 2018
c3e63f5
Merge branch 'main' into cp4r3z-617-e2e-edit-user
shakalee14 Aug 30, 2018
ae1a60f
we only use the count not all the ids, so just get the count
schuyler1d Aug 31, 2018
e55f585
fields added to database model and graphql; graphql query and mutatio…
lperson Aug 25, 2018
7268ac4
texting hours per campaign configuration implemented, should be iPad …
lperson Aug 27, 2018
1284c1d
changed double quotes to single quotes
lperson Aug 27, 2018
d85c1fb
get campaign timezone settings into texting hours configs
lperson Aug 30, 2018
fde0888
add campaign to ContactToolbar props, add some TODO comments
lperson Aug 30, 2018
29a64ed
implementing texting hours/
lperson Sep 1, 2018
f90050c
removed 2 unnecessary changes
lperson Sep 1, 2018
308482d
implement timezone overrides, some tests for DstHelper
lperson Sep 1, 2018
2d2d667
added tests
lperson Sep 2, 2018
24919b8
added utils.jsx
lperson Sep 2, 2018
62ff83a
Merge branch 'fix_sql_error_in_texter_view' into new_texting_hours_pe…
lperson Sep 2, 2018
f505e74
minor bug fixes, ready to roll out for UAT
lperson Sep 2, 2018
fc732a0
renamed timezone_if_no_zipcode to just timezone
lperson Sep 2, 2018
25423de
better prompt for timezone field on campaign timezone edit
lperson Sep 2, 2018
5d3dde3
fixing tests
lperson Sep 2, 2018
063485f
fixing tests
lperson Sep 2, 2018
ec070c1
decouple contact-getting from advancing contact info
schuyler1d Sep 3, 2018
d0fbf59
fix tests for decoupling contact-getting and move to pollInterval set…
schuyler1d Sep 3, 2018
6097604
linting components
schuyler1d Sep 3, 2018
6be5589
fixed overaggressive lint-fix
schuyler1d Sep 3, 2018
5d7d3fa
Merge branch '813-decouple-contactgetting' into scaling-wip
schuyler1d Sep 3, 2018
02f1650
Merge remote-tracking branch 'origin/redis-change-file-structure' int…
schuyler1d Sep 3, 2018
d4a8418
Merge remote-tracking branch 'origin/knex-rethink-ordertablecreation'…
schuyler1d Sep 3, 2018
aa744b5
stub for opt-out caching
schuyler1d Sep 4, 2018
cf13851
stubbing out some cacheable-queries files
schuyler1d Sep 4, 2018
ec658e8
canned responses, cached
schuyler1d Sep 5, 2018
b2424af
fix cacheableData passing
schuyler1d Sep 5, 2018
1b8257b
removes unused and incorrect queries to load firstText and gets it fr…
schuyler1d Sep 6, 2018
f1eb387
Merge remote-tracking branch 'origin/813-firsttextfromcampaign' into …
schuyler1d Sep 6, 2018
f8e0d57
update queries for first text
schuyler1d Sep 6, 2018
213b251
Merge remote-tracking branch 'origin/813-firsttextfromcampaign' into …
schuyler1d Sep 6, 2018
9c3f43e
migration is not triggered when we are not creating the db
schuyler1d Sep 6, 2018
04a925a
implement cached opt-outs per-organization
schuyler1d Sep 6, 2018
5d2fd35
wip: campaignContacdt cache loading and structure. TODO: messageStatu…
schuyler1d Sep 6, 2018
daeac65
Merge remote-tracking branch 'origin/main' into 813-decouple-contactg…
schuyler1d Sep 6, 2018
6318acb
await assignmentRequired
schuyler1d Sep 6, 2018
616597b
Merge remote-tracking branch 'origin/813-decouple-contactgetting' int…
schuyler1d Sep 6, 2018
b48fcec
load,clear for campaign-contact. TODO: messageStatus
schuyler1d Sep 6, 2018
1c54499
fix contact load
schuyler1d Sep 7, 2018
88d8b83
Merge remote-tracking branch 'origin/813-decouple-contactgetting' int…
schuyler1d Sep 7, 2018
5fc9e78
simplify getContacts() conditions
schuyler1d Sep 8, 2018
1e5f016
correct assignment sql tests to match sql tweaks
schuyler1d Sep 8, 2018
90a0e33
admin UI in settings for updating org-specific opt-out message defaul…
mathemagica Sep 10, 2018
39a7ee5
instead of generic error message on error parsing exception, still di…
mathemagica Sep 10, 2018
aa366f6
Merge branch 'main' into 741-default-instancewide-optout-message
mathemagica Sep 10, 2018
168d50d
Reverts changes in 722
shakalee14 Sep 10, 2018
7e01fe4
Merge remote-tracking branch 'origin/main' into scaling-campaign
schuyler1d Sep 10, 2018
2b8cabe
campaign caching spike
schuyler1d Sep 10, 2018
4817a74
resolve opt out message override with env-wide default, move this to …
mathemagica Sep 10, 2018
8375dd3
export campaign in cacheableData
schuyler1d Sep 10, 2018
b96ab1c
merge main into scaling-campaign
schuyler1d Sep 10, 2018
fcd6493
fix merge conflict
schuyler1d Sep 10, 2018
5da8b14
add cacheableData README.md stub
schuyler1d Sep 10, 2018
82468e4
organization cache clearing
schuyler1d Sep 10, 2018
e0b1e02
documenting caching environment variables
schuyler1d Sep 10, 2018
1ea92d3
WIP: passing orgId based on env var setting
shakalee14 Sep 11, 2018
f4f09a9
load() call needs to return a real Campaign() object rather than a de…
schuyler1d Sep 11, 2018
7a44334
more explanation of how batching and windowing work for contact loadi…
mathemagica Sep 11, 2018
348d0d5
Merge remote-tracking branch 'origin/main' into 817-sqlitefix
schuyler1d Sep 11, 2018
76922c5
dueBy rendered as date regardless of object value
schuyler1d Sep 11, 2018
04d857d
Merge remote-tracking branch 'origin/817-sqlitefix' into scaling-tip
schuyler1d Sep 11, 2018
c0480c1
Merge branch '817-sqlitefix' into 884-instance-opt-outs
shakalee14 Sep 11, 2018
7f96d57
Merge branch 'scaling-tip' into 884-instance-opt-outs
shakalee14 Sep 11, 2018
bc15e00
tweaks
mathemagica Sep 11, 2018
cd94282
tweaks
mathemagica Sep 11, 2018
1889ca4
Removing opts outs based on env setting for uploads and warehouse que…
shakalee14 Sep 11, 2018
c7f91ba
WIP: making sure opting out contact in one campaign disables texting …
shakalee14 Sep 11, 2018
20f4458
documentation first
Sep 5, 2018
c5dae83
some distinction between zero and null
Sep 11, 2018
ecddc19
saving zeroes but not blanks
Sep 11, 2018
ab90def
now saving blank max contacts
Sep 11, 2018
6e290d8
remove some logs and disable Send First Texts if max contacts 0
Sep 11, 2018
7dc1348
cleanup
Sep 11, 2018
c3edf1b
Adds documentation for env var
shakalee14 Sep 11, 2018
f300410
merge lperson/new_texting_hours_per_campaign into main
schuyler1d Sep 11, 2018
3cfab09
merge origin/scaling-tip with new_texting_hours_per_campaign
schuyler1d Sep 11, 2018
77cc784
Reverting changes in campaign contact to reduce complexity
shakalee14 Sep 12, 2018
d997216
Allowing logic to be based on env var vs orgId
shakalee14 Sep 12, 2018
7d030f5
Removes duplicate code and creates global func for opt out queries
shakalee14 Sep 12, 2018
cd9eca3
Merge pull request #892 from MoveOnOrg/813-decouple-contactgetting-mo…
mathemagica Sep 12, 2018
a405542
Merge branch 'main' into 741-default-instancewide-optout-message
mathemagica Sep 12, 2018
653ecf0
pr feedback
mathemagica Sep 12, 2018
276ccd0
added sorting to post-scaling query to load canned responses from db
Sep 12, 2018
ee683be
Changes func name to match what it does - returns cells not count
shakalee14 Sep 12, 2018
c89b587
Merge branch 'cp4r3z-617-e2e-edit-user' into stage-main
shakalee14 Sep 12, 2018
0266575
Merge branch 'force-display-of-graphql-errors' into stage-main
shakalee14 Sep 12, 2018
f7cd022
Merge branch '817-sqlitefix' into stage-main
shakalee14 Sep 12, 2018
a76d36b
Merge branch '741-default-instancewide-optout-message' into stage-main
shakalee14 Sep 12, 2018
5e84fde
Merge branch 'migrate-ifnotdbcreate' into stage-main
shakalee14 Sep 12, 2018
3a97d25
Merge branch 'scaling-tip' into stage-main
shakalee14 Sep 12, 2018
e998e50
Merge branch '813-decouple-contactgetting' into stage-main
shakalee14 Sep 12, 2018
6bae826
Merge branch 'simplify-getcontacts' into stage-main
shakalee14 Sep 12, 2018
bafc886
Merge branch '828-fix-maxContacts' into stage-main
shakalee14 Sep 12, 2018
b100683
Merge branch '884-instance-opt-outs' into stage-main
shakalee14 Sep 12, 2018
8e0136b
Merge branch '798-response-sort-scaling' into stage-main
shakalee14 Sep 12, 2018
aadd0b9
Merge branch 'new_texting_hours_per_campaign-withcaching' into stage-…
shakalee14 Sep 12, 2018
6ea4f18
dur, need to return cached campaign object
schuyler1d Sep 12, 2018
585b570
Merge branch 'scaling-tip' into stage-main
shakalee14 Sep 12, 2018
960b18f
bump rethink-knex-adapter -- allow saving an object with extra proper…
schuyler1d Sep 12, 2018
7a6e356
Merge branch 'scaling-tip-savefix' into stage-main
shakalee14 Sep 12, 2018
930b224
Change default to 50 for initial page load
shakalee14 Sep 12, 2018
8cdcc9b
Only check for listSize and pageSize if campaignFilters exist
shakalee14 Sep 12, 2018
d28cc6e
Merge branch 'campaign-page-related-fixes' into stage-main
shakalee14 Sep 12, 2018
c1feaab
also invalidate org cache after updating opt out message
mathemagica Sep 13, 2018
277aae5
Changes default listSize to 100
shakalee14 Sep 14, 2018
20b3038
fix top script, which was not the initial one, but sometimes the last…
schuyler1d Sep 14, 2018
42d4e0e
fix contactsFilter undefined case in getContacts
schuyler1d Sep 14, 2018
46232b3
make sure we actually have an existing contact in AssignmentTexter co…
schuyler1d Sep 14, 2018
8defda2
fix loading a new contact info after a dynamic assignment
schuyler1d Sep 14, 2018
ed235dc
lint AssignmentTexter.jsx
schuyler1d Sep 14, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"semi": ["error", "never"],
"react/require-extension": "off",
},
"env": { "jest": true, "node": true, "browser": true }
"env": { "jest": true, "node": true, "browser": true, "jasmine": true }
}
20 changes: 4 additions & 16 deletions __test__/containers/AssignmentTexterContact.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,17 @@ const propsWithEnforcedTextingHoursCampaign = {
},
campaign: campaign,
contacts: [
{
id: 19,
customFields: "{}"
},
{
id: 20,
customFields: "{}"
}
],
allContacts: [
{
id: 19
},
{
id: 20
}
],
allContactsCount: 2,
},
refreshData: jest.fn(),
data: {
loading: false,
contact: {
contact: {
id: 19,
assignmentId: 9,
firstName: "larry",
Expand All @@ -101,7 +90,6 @@ const propsWithEnforcedTextingHoursCampaign = {
},
messageStatus: "needsMessage",
messages: []
}
}
}

Expand All @@ -121,7 +109,7 @@ describe('when contact is not within texting hours...', () => {
campaign={campaign}
assignment={propsWithEnforcedTextingHoursCampaign.assignment}
refreshData={propsWithEnforcedTextingHoursCampaign.refreshData}
data={propsWithEnforcedTextingHoursCampaign.data}
contact={propsWithEnforcedTextingHoursCampaign.contact}
/>
</MuiThemeProvider>
)
Expand All @@ -144,7 +132,7 @@ describe('when contact is within texting hours...', () => {
campaign={campaign}
assignment={propsWithEnforcedTextingHoursCampaign.assignment}
refreshData={propsWithEnforcedTextingHoursCampaign.refreshData}
data={propsWithEnforcedTextingHoursCampaign.data}
contact={propsWithEnforcedTextingHoursCampaign.contact}
/>
</MuiThemeProvider>
)
Expand Down
142 changes: 119 additions & 23 deletions __test__/e2e/basic_text_manager.test.js
Original file line number Diff line number Diff line change
@@ -1,47 +1,143 @@
import { selenium } from './util/helpers'
import STRINGS from './data/strings'
import { login, invite, campaigns, people } from './page-functions/index'
import { campaigns, login, main, people, texter } from './page-functions/index'

// Instantiate browser(s)
const driver = selenium.buildDriver()
const driverTexter = selenium.buildDriver()
jasmine.getEnv().addReporter(selenium.reporter)

describe('Basic Text Manager Workflow', () => {
// Instantiate browser(s)
const driverAdmin = selenium.buildDriver({ name: 'Spoke E2E Tests - Chrome - Basic Text Manager Workflow - Admin' })
const driverTexter = selenium.buildDriver({ name: 'Spoke E2E Tests - Chrome - Basic Text Manager Workflow - Texter' })

describe('Basic text manager workflow', () => {
const CAMPAIGN = STRINGS.campaigns.existingTexter
beforeAll(() => {
global.e2e = {}
})

/**
* Test Suite Sequence:
* Setup Admin and Texter Users
* Create Campaign (No Existing Texter)
* Create Campaign (Existing Texter)
* Create Campaign (No Existing Texter with Opt-Out)
* Create Campaign (Existing Texter with Opt-Out)
*/

afterAll(async () => {
await selenium.quitDriver(driver)
await selenium.quitDriver(driverAdmin)
await selenium.quitDriver(driverTexter)
})

describe('(As Admin) Open Landing Page', () => {
login.landing(driver)
})
describe('Setup Admin User', () => {
describe('(As Admin) Open Landing Page', () => {
login.landing(driverAdmin)
})

describe('(As Admin) Log In an admin to Spoke', () => {
login.tryLoginThenSignUp(driverAdmin, STRINGS.users.admin0)
})

describe('(As Admin) Log In an admin to Spoke', () => {
login.tryLoginThenSignUp(driver, CAMPAIGN.admin)
describe('(As Admin) Create a New Organization / Team', () => {
main.createOrg(driverAdmin, STRINGS.org)
})
})

describe('(As Admin) Create a New Organization / Team', () => {
invite.createOrg(driver, STRINGS.org)
describe('Create Campaign (No Existing Texter)', () => {
const CAMPAIGN = STRINGS.campaigns.noExistingTexter

describe('(As Admin) Create a New Campaign', () => {
campaigns.startCampaign(driverAdmin, CAMPAIGN)
})

describe('(As Texter) Follow the Invite URL', () => {
texter.viewInvite(driverTexter)
login.tryLoginThenSignUp(driverTexter, CAMPAIGN.texter)
})

describe('(As Texter) Verify Todos', () => {
texter.viewSendFirstTexts(driverTexter)
})

describe('(As Texter) Log Out', () => {
main.logOutUser(driverTexter)
})
})

describe('(As Admin) Invite a new User', () => {
people.invite(driver)
describe('Create Campaign (Existing Texter)', () => {
const CAMPAIGN = STRINGS.campaigns.existingTexter

describe('(As Admin) Invite a new Texter', () => {
people.invite(driverAdmin)
})

describe('(As Texter) Follow the Invite URL', () => {
texter.viewInvite(driverTexter)
login.tryLoginThenSignUp(driverTexter, CAMPAIGN.texter)
})

describe('(As Admin) Create a New Campaign', () => {
campaigns.startCampaign(driverAdmin, CAMPAIGN)
})

describe('(As Texter) Send Texts', () => {
texter.sendTexts(driverTexter, CAMPAIGN)
})

describe('(As Admin) Send Replies', () => {
campaigns.sendReplies(driverAdmin, CAMPAIGN)
})

describe('(As Texter) View Replies', () => {
texter.viewReplies(driverTexter, CAMPAIGN)
})

describe('(As Texter) Opt Out Contact', () => {
texter.optOutContact(driverTexter)
})

describe('(As Texter) Log Out', () => {
main.logOutUser(driverTexter)
})
})

describe('(As Texter) Follow the Invite URL', () => {
describe('should follow the link to the invite', async () => {
it('should follow the link to the invite', async () => {
await driverTexter.get(global.e2e.joinUrl)
})
describe('Create Campaign (No Existing Texter with Opt-Out)', () => {
const CAMPAIGN = STRINGS.campaigns.noExistingTexterOptOut

describe('(As Admin) Create a New Campaign', () => {
campaigns.startCampaign(driverAdmin, CAMPAIGN)
})

describe('(As Texter) Follow the Invite URL', () => {
texter.viewInvite(driverTexter)
login.tryLoginThenSignUp(driverTexter, CAMPAIGN.texter)
})

describe('(As Texter) Verify Todos', () => {
texter.viewSendFirstTexts(driverTexter)
})

describe('(As Texter) Log Out', () => {
main.logOutUser(driverTexter)
})
})

describe('(As Admin) Create a New Campaign', () => {
campaigns.startCampaign(driver, CAMPAIGN)
describe('Create Campaign (Existing Texters with Opt-Out)', () => {
const CAMPAIGN = STRINGS.campaigns.existingTexterOptOut

describe('(As Admin) Invite a new Texter', () => {
people.invite(driverAdmin)
})

describe('(As Texter) Follow the Invite URL', () => {
texter.viewInvite(driverTexter)
login.tryLoginThenSignUp(driverTexter, CAMPAIGN.texter)
})

describe('(As Admin) Create a New Campaign', () => {
campaigns.startCampaign(driverAdmin, CAMPAIGN)
})

describe('(As Texter) Verify Todos', () => {
texter.viewSendFirstTexts(driverTexter)
})
})
})
50 changes: 50 additions & 0 deletions __test__/e2e/create_copy_campaign.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { selenium } from './util/helpers'
import STRINGS from './data/strings'
import { campaigns, login, main, people, texter } from './page-functions/index'

jasmine.getEnv().addReporter(selenium.reporter)

describe('Create and Copy Campaign', () => {
// Instantiate browser(s)
const driverAdmin = selenium.buildDriver({ name: 'Spoke E2E Tests - Chrome - Create and Copy Campaign - Admin' })
const driverTexter = selenium.buildDriver({ name: 'Spoke E2E Tests - Chrome - Create and Copy Campaign - Texter' })
const CAMPAIGN = STRINGS.campaigns.copyCampaign

beforeAll(() => {
global.e2e = {}
})

afterAll(async () => {
await selenium.quitDriver(driverAdmin)
await selenium.quitDriver(driverTexter)
})

describe('(As Admin) Open Landing Page', () => {
login.landing(driverAdmin)
})

describe('(As Admin) Log In an admin to Spoke', () => {
login.tryLoginThenSignUp(driverAdmin, CAMPAIGN.admin)
})

describe('(As Admin) Create a New Organization / Team', () => {
main.createOrg(driverAdmin, STRINGS.org)
})

describe('(As Admin) Invite a new User', () => {
people.invite(driverAdmin)
})

describe('(As Texter) Follow the Invite URL', () => {
texter.viewInvite(driverTexter)
login.tryLoginThenSignUp(driverTexter, CAMPAIGN.texter)
})

describe('(As Admin) Create a New Campaign', () => {
campaigns.startCampaign(driverAdmin, CAMPAIGN)
})

describe('(As Admin) Copy Campaign', () => {
campaigns.copyCampaign(driverAdmin, CAMPAIGN)
})
})
39 changes: 39 additions & 0 deletions __test__/e2e/create_edit_campaign.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { selenium } from './util/helpers'
import STRINGS from './data/strings'
import { campaigns, login, main } from './page-functions/index'

jasmine.getEnv().addReporter(selenium.reporter)

describe('Create and Edit Campaign', () => {
// Instantiate browser(s)
const driver = selenium.buildDriver({ name: 'Spoke E2E Tests - Chrome - Create and Edit Campaign - Admin' })
const CAMPAIGN = STRINGS.campaigns.editCampaign

beforeAll(() => {
global.e2e = {}
})

afterAll(async () => {
await selenium.quitDriver(driver)
})

describe('(As Admin) Open Landing Page', () => {
login.landing(driver)
})

describe('(As Admin) Log In an admin to Spoke', () => {
login.tryLoginThenSignUp(driver, CAMPAIGN.admin)
})

describe('(As Admin) Create a New Organization / Team', () => {
main.createOrg(driver, STRINGS.org)
})

describe('(As Admin) Create a New Campaign', () => {
campaigns.startCampaign(driver, CAMPAIGN)
})

describe('(As Admin) Edit Campaign', () => {
campaigns.editCampaign(driver, CAMPAIGN)
})
})
Loading