@newageerp/node-tests
v1.0.11
Published
## instalation ``` npm install @newageerp/node-tests@latest ```
Readme
Netzet test automation
instalation
npm install @newageerp/node-tests@latestusage
import testPkg from '@newageerp/node-tests'
<button data-testid={testPkg.home.startQuiz}>Start quiz</button>
<div data-testid={testPkg.quiz.stopContainer}>
...
</div>Homepage
testPkg.home.startQuiz - quiz start button
Quiz page
testPkg.quiz.singleBtn - put this on each answer if one answer is expected
testPkg.quiz.multipleBtn - put this on each answer if there are multiple options
testPkg.quiz.continueBtn - put this on next step button (for multiple options answer or prompt)
testPkg.quiz.nameInput - "name" control (PL project)
to stop quiz loop:
testPkg.quiz.stopContainer - if the quiz ends without loading and immediately goes to the next page, then put this on any container on the next page after the quiz
testPkg.quiz.stopLoadingContainer - if the quiz has loading screen, then put this on loading container
Email page
testPkg.email.input - "email" control
testPkg.email.continueBtn - Email submit button
Result page
testPkg.result.continueBtn - CTA button to next step
Checkout page
testPkg.checkout.plan - put this on each plan container
testPkg.checkout.initiate - CTA button which opens a window with payments
testPkg.checkout.continue - put this on a a window with payments where continue button is placed
Payment Window
testPkg.paymentWindow.container - put this on payment window container, as high up the dom as possible
testPkg.paymentWindow.customSubmitBtn - put this only if custom submit button is used
testPkg.paymentWindow.paymentPayPalSubmitBtn - put this only if a custom PayPal submit button is used
Upsell page
testPkg.upsell.successBtn - put this on "Add to cart" button on regular template
testPkg.upsell.downSaleSuccessBtn - put this on "Add to cart" button on down-sell template
testPkg.upsell.rejectToDownSaleBtn - put this on cancel button, if the next window is loaded there will be a down-sell template
testPkg.upsell.rejectBtn - put this on cancel button
testPkg.upsell.processingContainer - put this on processing payment container
Thank you page
testPkg.thankYou.registerBtn - App registration button
testPkg.thankYou.container - Thank you page container
