A MERN stack-based application for business owners to create email survey and collect feedback from consumers. Stack: React, Redux, Node.js/Express, MongoDB, Redis, OAuth2, Passport, Stripe API, Jest.
In survey.test.js file, second test case fails with a timeout. Page stuck at the survey review page, no click event observed in browser window.
describe('and using valid inputs',async()=>{beforeEach(async()=>{awaitpage.type('[name="title"]','My Title');awaitpage.type('[name="subject"]','My Subject');awaitpage.type('[name="body"]','My Content');awaitpage.type('[name="recipients"]','[email protected]');awaitpage.click('form button');});test('submitting takes user to review screen',async()=>{consttext=awaitpage.getContentsOf('h5');expect(text).toEqual('Please confirm your entries:');});test('submitting then saving adds survey to index page',async()=>{awaitpage.click('button.green');awaitpage.waitFor('.card');consttitle=awaitpage.getContentsOf('.card-title');constcontent=awaitpage.getContentsOf('p');expect(title).toEqual('My Title');expect(content).toEqual('My Content');});});