Check vccode file in.

This commit is contained in:
Nawaz Dhandala
2020-02-27 00:02:06 +01:00
parent 5a5615f44f
commit 76c5901fa8
6 changed files with 43 additions and 7 deletions

1
.gitignore vendored
View File

@@ -3,7 +3,6 @@ node_modules
# dependencies
/node_modules
.vscode/
.idea
# testing
/coverage

1
accounts/.gitignore vendored
View File

@@ -2,7 +2,6 @@
# dependencies
/node_modules
.vscode/
.idea
# testing
/coverage

17
accounts/.vscode/launch.json vendored Normal file
View File

@@ -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"
}
]
}

View File

@@ -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');

View File

@@ -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);
}
}

17
slack/.vscode/launch.json vendored Normal file
View File

@@ -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": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/server.js"
}
]
}