Questions tagged [e2e]

146 questions
2
votes
1 answer

Short stack trace with async await in protractor 7

I'm trying to automate some tests with protractor and jasmine and I'm using async/await to resolve the promises. The issue is, when an error does happen, the stack trace is TOO short and thus, I can't seem to locate the source of the issue. I did…
Amrou
  • 371
  • 1
  • 3
  • 18
2
votes
1 answer

Error: Cannot find module 'mocha/lib/cli/run-option-metadata' on running detox test

Running npx detox test --configuration android.emu.release giving these error on detox. detox[44685] ERROR: [cli.js] Require stack: detox[44685] ERROR: [cli.js] -…
2
votes
1 answer

Getting this error when running ng e2e on mac with visual studio code

Setup : @angular/cli@8.1.2 @ionic/cli@6.12.3 cordova@10.0.0 npm@6.14.10 “protractor”: “~5.4.0 Mac OS : Catalina This is the error I am getting ** Angular Live Development Server is listening on localhost:4200, open your browser on…
2
votes
0 answers

Skip or Run a Jest Test Based on Variable

I am wondering if it is possible in Jest to skip one or more tests in a suite based on the value of a variable used in the beforeEach function. My code: let errLoadingData = false; beforeEach(async () => { await page.goto('myurl.com'); …
Marlo
  • 490
  • 3
  • 7
  • 21
1
vote
1 answer

Parallel testing with Playwright - My tests use from old credential when I run them in parallel mode and workers don't try to get new credential

This is my fixture file: I try for signup new user here import { test as baseTest, request } from '@playwright/test'; import SignUp from '../pages/SignUp'; import fs from 'fs'; import path from 'path'; export * from '@playwright/test'; export const…
1
vote
1 answer

How do I isolate tests for CRUD App in Playwright

The Playwright docs say that each tests should be isolated so tests can run in parallel, and intuitively I agree with that, but I'm having problems at a practical level. My first try at isolating my tests is to truncate the table (clear all records)…
Amy Blankenship
  • 6,485
  • 2
  • 22
  • 45
1
vote
1 answer

Cypress login if not redirected to home page

I have a React app on http://localhost:3000/ which displays a login page, or if the user is logged in already then it will redirect to http://localhost:3000/home. This is the first time I'm trying Cypress and I'm not sure how to begin my test. This…
Ani23
  • 71
  • 2
  • 6
1
vote
1 answer

Make Jest setup wait until docker compose command is executed

I have Jest E2E project configured for Nx Nest app. My goal is to run docker compose up for E2E testing and docker compose down after testing is over. In global-setup.ts, I wrote: /* eslint-disable */ var __TEARDOWN_MESSAGE__: string; var os =…
Arkadi
  • 1,153
  • 1
  • 14
  • 35
1
vote
1 answer

Cypress Auth0 authentication

I have a NextJS application that uses Auth0 for authorization. I am trying to write Cypress tests for e2e testing, but I am having trouble with logging in via Auth0. I have followed the documentaion on Cypress Documentation for both "Login with…
1
vote
3 answers

How run test after fail in Cypress?

Example: I ran the tests in cypress. Test accounts have been created Next I get a failure in one of the tests Test accounts remain created on the server After failure, I want to delete the accounts I created. For it, I have the last…
Yevhen
  • 11
  • 2
1
vote
0 answers

how to make it wait for it to find the element before the click

I have to click an element but it takes time to be visible , so I use waitForTimeOut , but I want to use some other type of validation or good practice. example await generateReport.clickUiOnCreateReportPage("singleCodeBtn"); await…
karen
  • 11
  • 1
1
vote
1 answer

Why Cypress throw this error: Step implementation missing for...(even when there is implemented step def.)

I am using Cypress version 10.9.0 for e2e testing. Of course, there are more step defs but it stops at the first then step as it can be seen from the SS image. When('I enter an invalid username on the login page', () => { …
1
vote
1 answer

How to log HTTP response header value for all cypress requests?

One of my ideas would be to overwrite the request command, but I don't know how to handle the response object. A snippet I already have: Cypress.Commands.overwrite( 'request', ( originalFn: Cypress.CommandOriginalFn<'request'>, …
1
vote
1 answer

Cypress Error Catching: how to catch error, warn using cy.log(), then continue with test

so I'm trying to use something like "error catching" to catch an error, cy.log a custom error message, then continue with the test without error catching after that point. For example, clicking a button that increases quantity in cart, then…
J.Long
  • 335
  • 3
  • 11
1
vote
0 answers

Is there a way to scroll on a site that uses virtual scroll in Playwright?

I'm attempting to scroll on a page that has virtual scrolling, but it doesn't seem to scroll at all. If I disable virtual scrolling on the site it will start to scroll correctly using: await page.locator('data-testid=row', {hasText:…
Daniel
  • 95
  • 1
  • 11
1 2
3
9 10