diff --git a/.gitignore b/.gitignore index 43acecfc90..f729909bc2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ node_modules # dependencies /node_modules -.vscode/ .idea # testing /coverage diff --git a/accounts/.gitignore b/accounts/.gitignore index 7802c1d4fb..e22e5bf4e2 100755 --- a/accounts/.gitignore +++ b/accounts/.gitignore @@ -2,7 +2,6 @@ # dependencies /node_modules -.vscode/ .idea # testing /coverage diff --git a/accounts/.vscode/launch.json b/accounts/.vscode/launch.json new file mode 100644 index 0000000000..25915b7092 --- /dev/null +++ b/accounts/.vscode/launch.json @@ -0,0 +1,17 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Jest Test", + "program": "${workspaceFolder}/node_modules/jest/bin/jest", + "args": ["--runInBand", "${workspaceFolder}/src/test"], + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen" + } + ] +} \ No newline at end of file diff --git a/accounts/src/test/resendVerification.test.js b/accounts/src/test/resendVerification.test.js index 9b3d226980..89b7f7fcfa 100644 --- a/accounts/src/test/resendVerification.test.js +++ b/accounts/src/test/resendVerification.test.js @@ -14,7 +14,7 @@ describe('Resend Verification API', () => { beforeAll(async () => { - jest.setTimeout(15000); + jest.setTimeout(30000); browser = await puppeteer.launch(utils.puppeteerLaunchConfig); page = await browser.newPage(); await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36'); diff --git a/accounts/src/test/test-init.js b/accounts/src/test/test-init.js index 11bf7fb491..deecfc740e 100644 --- a/accounts/src/test/test-init.js +++ b/accounts/src/test/test-init.js @@ -1,5 +1,5 @@ const utils = require('./test-utils'); - +const cards = ['4000056655665556', '4242424242424242', '5555555555554444', '2223003122003222', '5200828282828210', '5105105105105100'] module.exports = { /** * @@ -36,7 +36,7 @@ module.exports = { elementHandle = await page.$('iframe[name=__privateStripeFrame5]'); frame = await elementHandle.contentFrame(); await frame.waitForSelector('input[name=cardnumber]'); - await frame.type('input[name=cardnumber]', '42424242424242424242', { + await frame.type('input[name=cardnumber]', cards[Math.floor(Math.random() * cards.length)], { delay:50 }); @@ -64,8 +64,12 @@ module.exports = { await page.click('input[name=zipCode]'); await page.type('input[name=zipCode]', utils.user.address.zipcode); await page.select('#country', 'India') + await page.waitFor(60000); //wait for a second because of stripe rate limits. await page.click('button[type=submit]'); - await page.waitFor(25000); + await page.waitForSelector('.request-reset-step', { + timeout: 60000 + }) + }, loginUser: async function (user, page){ const { email, password } = user; @@ -76,6 +80,6 @@ module.exports = { await page.click('input[name=password]'); await page.type('input[name=password]', password); await page.click('button[type=submit]'); - await page.waitFor(5000); + await page.waitFor(10000); } } \ No newline at end of file diff --git a/slack/.vscode/launch.json b/slack/.vscode/launch.json new file mode 100644 index 0000000000..29550102ca --- /dev/null +++ b/slack/.vscode/launch.json @@ -0,0 +1,17 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Launch Program", + "skipFiles": [ + "/**" + ], + "program": "${workspaceFolder}/server.js" + } + ] +} \ No newline at end of file