title,body,link,tags,view_count,is_answered,score,answer_count
When to do E2E Testing,"<p>I am working in a project (angular and spring boot) and we do UnitTests and Integration tests. I am a little confused about E2E testing. When should I use E2E testing, what advantages could e2e Test bring to me. </p>

<p>When UnitTest suffices, when  I sould use E2E Test. </p>

<p>This is a general question and it does not releate to a specific technology</p>
",https://stackoverflow.com/questions/59822420/when-to-do-e2e-testing,"['selenium', 'unit-testing', 'protractor']",817,True,1,2
Getting started with E2E Testing,"<p>I am very new to testing. I needed to get started with E2E testing scripts from scratch. Could anyone please guide me where to start from? Any books or youtube channel?</p>

<p>I have installed Selenium, VS Code and Visual Studio but none of the tutorials I saw use Visual Studio. I may be wrong. </p>

<p>Any help is appreciated.  </p>
",https://stackoverflow.com/questions/61630551/getting-started-with-e2e-testing,['e2e-testing'],32,False,0,1
Multi user e2e testing with puppeteer,"<p>I am looking for a product that would allow me simulate/test multiple (more than two) users, each logged in to their account, use a web application.</p>
<p>Having multiple users in the test is not to simulate high load as is the case of stress testing; nor it is to make for shorter test time with parallel testing. The reason is to test if the application behaves correctly when users interact with each other.</p>
<p>So basically each user will have their own session cookie sent with ajax or ordinary GET and POST requests they send.</p>
<p>The users each could live in a separate window or be in an iframe on a single page.</p>
<p>Reading through these issues I could not say for sure if this is possible in the latest version of puppeteer or not. Can this be achieved?</p>
<p>Issues:</p>
<ul>
<li><a href=""https://github.com/pyppeteer/pyppeteer/issues/5"" rel=""nofollow noreferrer"">https://github.com/pyppeteer/pyppeteer/issues/5</a></li>
<li><a href=""https://github.com/puppeteer/puppeteer/issues/4413"" rel=""nofollow noreferrer"">https://github.com/puppeteer/puppeteer/issues/4413</a></li>
</ul>
",https://stackoverflow.com/questions/63013903/multi-user-e2e-testing-with-puppeteer,"['automated-tests', 'puppeteer', 'e2e-testing', 'functional-testing']",727,False,2,1
E2E testing multiple posibilities with exception,"<p>i have a problem that i don't exactly know how to solve. I'm implementing an E2E test in which using selenium i need to click in a Link and check that is sending me to the right URL. </p>

<p>Here starts the problem...</p>

<p>There are 3 possibilities, mix of 2 types of links, just one type of link or the other type of link. No problems with the situations in which there are both types of links but when there is just one type when it searches for the identifier we use for the links that are not in page it gives me a timeoutException. This is not a failure because it's a posible situation but i will like to know if there is a way in which to check that if it finds no links it asserts that the exception is thrown.</p>

<p>I though using a runCatching (or try catch) wait for the link to appear and if it doesn't appear the test asserts that when i look for the element the timeout exception is thrown again.</p>

<p>It smells a bit for me this way of doing it and i don't know if it's correctly done.</p>

<p>EDIT: Im ussing AssertK and JUnit5 for testing.</p>

<p>EDIT 2: I've done this, i dont know if it a correct way of doing it</p>

<pre><code>runCatching {
            driver.waitFor(numberOfWidgetsToBeMoreThan(BrowserSelector.cssSelector(OFFERS_WITH_PRICE_AND_DATE), 0), ofMillis(2000))
        }.onFailure {
            assertThrows&lt;WaitTimeoutException&gt; {
                findLink(OFFERS_WITH_PRICE_AND_DATE)
            }
        }.onSuccess {
            val widget = findLink(OFFERS_WITH_PRICE_AND_DATE)
            widget.click()
            assertThat(driver.url).contains(NO_DATE_TEXT)
        }
</code></pre>
",https://stackoverflow.com/questions/60265076/e2e-testing-multiple-posibilities-with-exception,"['kotlin', 'e2e-testing', 'junit5']",186,False,0,1
Get Mongoose instance in NestJS e2e testing,"<p>I'm starting to write e2e tests for my NestJS API, and I would like to use a test database.
I imported the MongooseModule in the test module, and it's correctly using the expected test database.</p>
<p>Then, I'd like to clear the collection and re-insert fixtures before my tests.
In order to do that, I'd like to use the Mongoose instance used by NestJS.
But I didn't succeed, and finally created a second connection (in the beforeAll hook)</p>
<p>I didn't find any solutions yet to avoid this.</p>
<p>Here is the code :</p>
<pre><code>
describe('Color', () =&gt; {
  let app: INestApplication
  let db: Connection

  beforeAll(async () =&gt; {
    db = await mongoose.createConnection(process.env.MONGO_TEST_URL, {
      useNewUrlParser: true,
      useUnifiedTopology: true,
      useCreateIndex: true
    })

    db.model('Color', ColorSchema)
  })

  beforeEach(async () =&gt; {
    const moduleFixture: TestingModule = await Test.createTestingModule({
      imports: [
        MongooseModule.forRoot(process.env.MONGO_TEST_URL, {
          useCreateIndex: true,
          useFindAndModify: false
        }),
        AppModule
      ]
    }).compile()

    await db.model('Color').deleteMany({})
    await db.model('Color').insertMany(ColorFixtures)

    app = moduleFixture.createNestApplication()
    await app.init()
  })

  afterAll(async () =&gt; {
    await db.close()
    await app.close()
  })

  it('/ (GET)', () =&gt; {
    return request(app.getHttpServer())
      .post('/graphql')
      .send({
        operationName: 'findAll',
        query: 'query findAll { colors { id name } }',
        variables: {}
      })
      .expect(200)
      .expect({})
  })
})

</code></pre>
<p>Any idea?</p>
",https://stackoverflow.com/questions/61827702/get-mongoose-instance-in-nestjs-e2e-testing,"['mongoose', 'nestjs']",1457,True,5,2
E2E Testing Material-UI Select with Puppeteer,"<p>I'm unable to access dropdown values (<code>&lt;MenuItem&gt;</code>) in dropdown on Material-UI <code>Select</code> component.</p>

<p>Basically, what I'm trying to accomplish is following, click on input with <code>id='x'</code>, wait for the dropdown to show up (<code>div</code> with <code>ul</code> and <code>li</code>, where each li has <code>id='y'</code> prop), select specific one and then click on it. </p>

<p>The dropdown is related to filter...</p>

<p>Note: Using native select is not an option.</p>
",https://stackoverflow.com/questions/60949856/e2e-testing-material-ui-select-with-puppeteer,"['reactjs', 'material-ui', 'puppeteer']",1559,True,2,2
Angular e2e testing - check template before OnInit executes,"<p>In Angular 9 application, I have component that in</p>
<pre><code>ngOnInit(): void {
  this.records$ = this.service.loadRecords();
}
</code></pre>
<p><code>loadReords()</code> returns Observable that starts with <code>null</code> and next after Http request completes emit list of records.</p>
<p>In template there are conditions that if <code>records$</code> is null so called 'loading' div would be visible, when changed list of records - table of records.</p>
<p>When I try to test it (e2e) with protractor after <code>page.navigateTo();</code> what returns:</p>
<pre><code>navigateTo(): Promise&lt;unknown&gt; {
 return browser.get(`${browser.baseUrl}${this.url}`) as Promise&lt;unknown&gt;;
}
</code></pre>
<p>I can traverse page that is completed (records already loaded - even proxy API call for those records is intentionally delayed).</p>
<p>How I can traverse page that is rendered with 'loading' phase - before <code>records$</code> stream is loaded?</p>
",https://stackoverflow.com/questions/64308559/angular-e2e-testing-check-template-before-oninit-executes,"['angular', 'protractor', 'lifecycle', 'e2e']",366,False,4,1
E2E Testing using cypress - Azure AD Single Sign On,"<p>I have been trying to achieve end to end testing using cypress in my angular project and is stuck with a single sign-on issue. Please help me with possible approaches.</p>

<p>Briefing:
My Angular application uses Azure AD Microsoft login to authenticate users to use the application. Is there a way to handle this sign on using cypress or is there a way to bypass
sign on completely.</p>

<p>I have already tried the following blogs and still stuck:
<a href=""https://www.eliostruyf.com/cypress-test-sharepoint-solution-azure-ad-secured-api/"" rel=""nofollow noreferrer"">https://www.eliostruyf.com/cypress-test-sharepoint-solution-azure-ad-secured-api/</a>  
<a href=""https://www.techtonic.com/resources/blog/puppeteer-can-fill-in-cypress-gaps"" rel=""nofollow noreferrer"">https://www.techtonic.com/resources/blog/puppeteer-can-fill-in-cypress-gaps</a>  
<a href=""https://docs.cypress.io/guides/references/best-practices.html#Visiting-external-sites"" rel=""nofollow noreferrer"">https://docs.cypress.io/guides/references/best-practices.html#Visiting-external-sites</a>  
<a href=""https://docs.cypress.io/examples/examples/recipes.html#Single-Sign-On"" rel=""nofollow noreferrer"">https://docs.cypress.io/examples/examples/recipes.html#Single-Sign-On</a> </p>

<p>Whenever I use Cypress to navigate to any page in my app(apart from login), it's getting redirected back to the login giving 401.
Is there any solution to bypass the complete login process and continue E2E testing of the whole app using cypress?
If not, how to handle azure AD single sign-on testing with cypress or any other technology? </p>
",https://stackoverflow.com/questions/61899300/e2e-testing-using-cypress-azure-ad-single-sign-on,"['single-sign-on', 'cypress', 'e2e-testing', 'angular-e2e']",938,False,4,0
Approaches to scaling E2E testing with SMS MFA (Twilio),"<p>Currently, I am using AWS Cognito for user management + MFA. For my E2E tests (run in-band), I have a user (test@email.com) in Cognito with a Twilio phone number. For every E2E test, the test user needs to sign in using the standard MFA flow:</p>

<ul>
<li>User inputs email + password</li>
<li>Cognito verifies + sends MFA to associated phone number</li>
<li>User enters MFA code in application</li>
<li>Cognito verifies it and logs in</li>
</ul>

<p>This is fine for a single E2E test suite being ran since there will be no race conditions with other E2E tests. Though if I were to scale this approach (multiple test suites ran in parallel), different test suites would be receiving login pins that will not be validated since Cognito invalidates previously sent MFA codes.</p>

<p>Having <code>N</code> unique phone numbers where the test suite will pick one at random will also not work because if I have <code>N+1</code> test suites running simultaneously, then the race condition will still exist.</p>

<p>Is there a more sound approach to scaling E2E tests using MFA? </p>
",https://stackoverflow.com/questions/59669639/approaches-to-scaling-e2e-testing-with-sms-mfa-twilio,"['twilio', 'amazon-cognito', 'e2e-testing']",329,False,2,1
separate unit testing and E2E testing in npm build,"<p>I am using ant-design-pro in my project. For unit testing it's jest and for e2e testing it's puppeteer. To run tests we have npm run test:all which basically runs tests for all types of tests. Is there a way to separate these files to run tests separately like run only jest files(.test.js) or e2e files(.e2e.js)?</p>
<p>Thanks in advance for your help</p>
",https://stackoverflow.com/questions/63787187/separate-unit-testing-and-e2e-testing-in-npm-build,"['reactjs', 'jestjs', 'puppeteer', 'ant-design-pro']",575,False,0,1
Stencil e2e Testing: mock a function in puppeteer browser context,"<p>I have Stencil component which uses axios.get to get some data from a server (e.g. localhost:3000 during development).  Now I have an e2e.ts test which tests this component in conjunction with several other components.  I would like to mock the axios.get function to isolate my tests from the server.  In a spec.ts test I would mock axios using jest with the following code:</p>

<pre><code>import axios from 'axios';
import {myComponent} from './my-component';

const mock = jest.spyOn(axios, 'get');

test('get data', async () =&gt; {
  ...
  mock.mockResolvedValue('hello');
  ...
});
</code></pre>

<p>But this does not work in e2e tests.  I have tried installing jest-puppeteer but I cannot find any examples of how you would mock a function with jest mocking API with jest-puppeteer.</p>

<p>Any example code would be greatly appreciated.</p>

<p>P.S. Note: if I use Puppeteer to intercept a request and respond to it I get a ""Request is already handled"" error.  Here's example code:</p>

<pre><code>const page = await newE2EPage();
await page.setRequestInterception(true);
page.on('request', req =&gt; {
  if(req.url() === 'http://localhost:3000/') {
    request.respond({
      contentType: 'text/plain',
      headers: {'Access-Control-Allow-Origin': '*'},
      body: 'hello'
    })
  }
  else {
    request.continue({});
  }
});
await page.setContent('&lt;my-component&gt;&lt;/my-component&gt;');

</code></pre>
",https://stackoverflow.com/questions/61066112/stencil-e2e-testing-mock-a-function-in-puppeteer-browser-context,"['mocking', 'jestjs', 'puppeteer', 'e2e-testing', 'stenciljs']",2652,True,1,1
Wordpress Gutenberg e2e testing - net::ERR_CONNECTION_REFUSED at http://localhost:8889,"<p>I'm trying to get a simple set of e2e tests running on a Gutenberg block. It's from an existing Git repo to demonstrate e2e testing. I haven't made any alterations, but the author hasn't replied so I'm trying myself to get it working.</p>
<p>Below is a single test (I have commented out the others for now until I can get one passing):</p>
<pre><code>import {
    createNewPost,
    enablePageDialogAccept,
    getEditedPostContent,
    insertBlock,
} from '@wordpress/e2e-test-utils';

describe( 'Wrapper block', () =&gt; {
    beforeAll( async () =&gt; {
        await enablePageDialogAccept();
    } );
    beforeEach( async () =&gt; {
        await createNewPost();
    } );

    it( 'Wrapper block should be available', async () =&gt; {
        await insertBlock( 'Wrapper Block' );

        // Check if block was inserted
        expect( await page.$( '[data-type=&quot;e2e-tests-example/wrapper-block&quot;]' ) ).not.toBeNull();

        expect( await getEditedPostContent() ).toMatchSnapshot();
    } );
} );
</code></pre>
<p>Below is my package.json with versions and script commands:</p>
<pre><code>{
  &quot;name&quot;: &quot;e2e-tests-example&quot;,
  ...
  &quot;scripts&quot;: {
    ...
    &quot;test:e2e&quot;: &quot;wp-scripts test-e2e&quot;
  },
  &quot;wp-env&quot;: {
    &quot;plugin-dir&quot;: &quot;e2e-tests-example&quot;,
    &quot;plugin-name&quot;: &quot;E2E Tests Example&quot;,
    &quot;docker-template&quot;: &quot;./docker-compose.override.yml&quot;,
    &quot;welcome-logo&quot;: [
      &quot;E2E Tests Example&quot;
    ],
    &quot;welcome-build-command&quot;: &quot;npm run dev&quot;
  }
}
</code></pre>
<p>When I try to run the e2e tests, it seems that the test environment isn't available so just errors:</p>
<pre><code>PS C:\...\e2e-tests-example-wp-plugin&gt; npm run test:e2e

&gt; e2e-tests-example@1.0.0 test:e2e C:\Users\marty\Sites\nmis-wp\wp-content\plugins\e2e-tests-example-wp-plugin
&gt; wp-scripts test-e2e

 FAIL  e2e-tests/wrapper-block.spec.js (7.233s)
  ● Wrapper block › Wrapper block should be available

    net::ERR_CONNECTION_REFUSED at http://localhost:8889/wp-admin/post-new.php

      at navigate (node_modules/puppeteer/lib/FrameManager.js:120:37)
        -- ASYNC --
      at Frame.&lt;anonymous&gt; (node_modules/puppeteer/lib/helper.js:111:15)
      at Page.goto (node_modules/puppeteer/lib/Page.js:675:49)
      at Page.goto (node_modules/puppeteer/lib/helper.js:112:23)
      at _callee$ (node_modules/@wordpress/e2e-test-utils/build/@wordpress/e2e-test-utils/src/visit-admin-page.js:20:13)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:271:22)
      at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
      at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
      at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
      at node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
        -- ASYNC --
      at Page.goto (node_modules/puppeteer/lib/helper.js:111:15)
      at _callee$ (node_modules/@wordpress/e2e-test-utils/build/@wordpress/e2e-test-utils/src/visit-admin-page.js:20:13)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:271:22)
      at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
      at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
      at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
      at node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
      at node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12

  ● Wrapper block › Wrapper block should be available

    No node found for selector: .edit-post-header [aria-label=&quot;Add block&quot;]

      at assert (node_modules/puppeteer/lib/helper.js:283:11)
      at DOMWorld.click (node_modules/puppeteer/lib/DOMWorld.js:366:5)
        -- ASYNC --
      at Frame.&lt;anonymous&gt; (node_modules/puppeteer/lib/helper.js:111:15)
      at Page.click (node_modules/puppeteer/lib/Page.js:1067:29)
      at _callee$ (node_modules/@wordpress/e2e-test-utils/build/@wordpress/e2e-test-utils/src/open-global-block-inserter.js:5:13)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:271:22)
      at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
      at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
      at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
      at node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7

 › 3 snapshots obsolete.
   • Wrapper block Alignment should be set 1
   • Wrapper block Background color should be applied 1
   • Wrapper block Margin bottom should be applied 1
 FAIL  e2e-tests/wrapper-block-filters.spec.js
  ● Test suite failed to run

    Your test suite must contain at least one test.

      at node_modules/@jest/core/build/TestScheduler.js:242:24
      at asyncGeneratorStep (node_modules/@jest/core/build/TestScheduler.js:131:24)
      at _next (node_modules/@jest/core/build/TestScheduler.js:151:9)
      at node_modules/@jest/core/build/TestScheduler.js:156:7
      at node_modules/@jest/core/build/TestScheduler.js:148:12
      at onResult (node_modules/@jest/core/build/TestScheduler.js:271:25)

Snapshot Summary
 › 3 snapshots obsolete from 1 test suite. To remove them all, re-run jest with `-u`.
   ↳ e2e-tests/wrapper-block.spec.js
       • Wrapper block Alignment should be set 1
       • Wrapper block Background color should be applied 1
       • Wrapper block Margin bottom should be applied 1
Test Suites: 2 failed, 2 total
Tests:       1 failed, 1 total
Snapshots:   3 obsolete, 0 total
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! e2e-tests-example@1.0.0 test:e2e: `wp-scripts test-e2e`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the e2e-tests-example@1.0.0 test:e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\marty\AppData\Roaming\npm-cache\_logs\2020-09-11T11_17_03_665Z-debug.log
</code></pre>
<p>If I've missed any other files that I need to include, let me know. The repo I'm working from can be found here (with all the files) - <a href=""https://github.com/liip/e2e-tests-example-wp-plugin"" rel=""nofollow noreferrer"">https://github.com/liip/e2e-tests-example-wp-plugin</a></p>
<p>I notice there is a docker-compose.override.yml files but no instruction to run any docker containers manually, and no docker-compose.yml files. I'm not finding a ton of resources on e2e testing with gutenberg, just thought it would be nice to work from a working project and learn from that.</p>
",https://stackoverflow.com/questions/63846293/wordpress-gutenberg-e2e-testing-neterr-connection-refused-at-http-localhos,"['wordpress', 'wordpress-gutenberg']",577,False,0,1
Wrong API on file-upload using Cypress.io for E2E testing,"<p>I am testing a portal with Cypress.io, which has a file upload functionality.</p>
<p>But my file always failed to upload because the API call is going wrong.</p>
<p>Correct API Call:<br />
**</p>
<blockquote>
<p>POST 200 /etl/v1.0.0/datauploaderetl/spaces/etl_jyddc0tx/data-files</p>
</blockquote>
<p>**</p>
<p>But when uploading through Cypress, the following is the URL:
**</p>
<blockquote>
<p>POST 404 /etl/v1.0.0/datauploaderetl/data-files</p>
</blockquote>
<p>**
As you can clearly see, the API is incorrect. I added the wait here, still, it doesn't work.
Following is the piece of code:</p>
<pre><code>cy.fixture(fileName1).then(fileContent =&gt; {
        cy.get('input[type=&quot;file&quot;]').attachFile({
            fileContent: fileContent.toString(),
            fileName: fileName1,
            mimeType: fileType
        })
    });
    cy.waitUntil(() =&gt; cy.get(&quot;:nth-child(98) &gt; .modal &gt; .modal-lg &gt; .modal-content &gt; .modal-body&quot;)
        .should('contain.text', 'Status: completed')
    );
</code></pre>
<p><a href=""https://i.stack.imgur.com/sEfPa.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/sEfPa.png"" alt=""This is how the modal looks like after uploading a file"" /></a></p>
<p>Please help!</p>
",https://stackoverflow.com/questions/65191778/wrong-api-on-file-upload-using-cypress-io-for-e2e-testing,"['node.js', 'cypress', 'ui-automation', 'e2e-testing', 'browser-automation']",442,True,0,2
How to run single test file in jest puppeteer e2e testing?,"<p>I am new to puppeteer automation testing, Can anyone please tell me how to execute only one test file.</p>
",https://stackoverflow.com/questions/61075046/how-to-run-single-test-file-in-jest-puppeteer-e2e-testing,"['angular', 'jest-puppeteer']",855,True,-1,1
Is there any way to get WebdriverIO E2E testing code coverage?,"<p>I am using <strong>WebdriverIO</strong> for the e2e automation testing. I would like to get the code coverage for my e2e tests. Is there any way I can get the <strong>code coverage</strong> for <strong>e2e tests</strong>?</p>
<p>Thanks in advance :)</p>
",https://stackoverflow.com/questions/62808377/is-there-any-way-to-get-webdriverio-e2e-testing-code-coverage,"['automated-tests', 'code-coverage', 'e2e-testing', 'webdriver-io']",1729,True,0,3
unable to navigate in dashboard after checking credential in e2e testing,"<p>I am new to e2e testing. I am writing test cases for angular login page its working in login but i am unable to navigate to homePage after checking login credential
I am getting this in console.</p>
<ol>
<li>It will route to home page When username password is correct then go to home page</li>
</ol>
<ul>
<li>Failed: No element found using locator: By(css selector, app-homepage h1)</li>
</ul>
<ol start=""2"">
<li>should  Login work when login is successful — he should redirect to default home page page</li>
</ol>
<ul>
<li>Failed: No element found using locator: By(css selector, app-homepage h1)</li>
</ul>
<p>this is my spec file</p>
<pre><code>import { LoginPage } from './login.po';
import { HomePage } from '../HomePgE2E/home.po';

describe('should  Login work', () =&gt; {
  let page: LoginPage;
  let homePage:HomePage;
  const wrongCredentias = {
    username: '',
    password: ''
  };

  beforeEach(() =&gt; {
    page = new LoginPage();
   homePage= new HomePage();
  });

  it('when user trying to login with wrong credentials he should stay on “login” page', () =&gt; {
    page.navigateTo();
    page.fillCredentials(wrongCredentias);
    expect(page.getPageTitleText()).toEqual('Sign in to your account');
    expect(page.getErrorMessage()).toEqual('Email cannot be empty.');
  });

  it('when login is successful — he should redirect to default home page page ', () =&gt; {
    page.navigateTo();
    page.fillCredentials();
    homePage.navigateTo();
    expect(homePage.getPageTitleText()).toEqual('welcome');
  });
});
</code></pre>
<p>And this welcome text coming from</p>
<pre><code>import { browser, by, element } from 'protractor';

export class HomePage {
  navigateTo() {
    return browser.get('/home');
  }

   getPageTitleText() {
    return element(by.css('app-homepage h1')).getText();
  } 
}
</code></pre>
",https://stackoverflow.com/questions/63841766/unable-to-navigate-in-dashboard-after-checking-credential-in-e2e-testing,"['angular8', 'e2e-testing']",47,True,0,1
"Problem with e2e testing with NestJS TestingModule, GraphQL code first and TypeOrm","<p>I'm in struggle since few days with <strong>e2e testing</strong> my <strong>NestJS</strong> application using <strong>GraphQL</strong> code first approach and <strong>TypeOrm</strong>.</p>

<p>I'm trying to create a <strong>TestingModule</strong> by injecting nestjs <strong>GraphQLModule</strong> with <em>autoSchemaFile</em> and I'm always getting the error ""<em>Schema must contain uniquely named types but contains multiple types named ...</em>"".</p>

<p>Here a reproduction of my bug with minimal code:</p>

<p><code>character.entity.ts</code>:</p>

<pre class=""lang-js prettyprint-override""><code>import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
import { ObjectType, Field, ID } from 'type-graphql';

@Entity()
@ObjectType()
export class Character {
    @PrimaryGeneratedColumn()
    @Field(() =&gt; ID)
    id: string;

    @Column({ unique: true })
    @Field()
    name: string;
}
</code></pre>

<p><code>character.resolver.ts</code>:</p>

<pre class=""lang-js prettyprint-override""><code>import { Query, Resolver } from '@nestjs/graphql';
import { Character } from './models/character.entity';
import { CharacterService } from './character.service';

@Resolver(() =&gt; Character)
export class CharacterResolver {
    constructor(private readonly characterService: CharacterService) {}

    @Query(() =&gt; [Character], { name: 'characters' })
    async getCharacters(): Promise&lt;Character[]&gt; {
        return this.characterService.findAll();
    }
}
</code></pre>

<p><code>character.module.ts</code>:</p>

<pre class=""lang-js prettyprint-override""><code>import { Module } from '@nestjs/common';
import { CharacterResolver } from './character.resolver';
import { CharacterService } from './character.service';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Character } from './models/character.entity';

@Module({
    imports: [TypeOrmModule.forFeature([Character])],
    providers: [CharacterResolver, CharacterService],
})
export class CharacterModule {}
</code></pre>

<p><code>app.module.ts</code>:</p>

<pre class=""lang-js prettyprint-override""><code>import { Module } from '@nestjs/common';
import { CharacterModule } from './character/character.module';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Connection } from 'typeorm';
import { GraphQLModule } from '@nestjs/graphql';

@Module({
    imports: [TypeOrmModule.forRoot(), GraphQLModule.forRoot({ autoSchemaFile: 'schema.gql' }), CharacterModule],
    controllers: [],
    providers: [],
})
export class AppModule {
    constructor(private readonly connection: Connection) {}
}
</code></pre>

<p>and finally: <code>character.e2e-spec.ts</code>:</p>

<pre class=""lang-js prettyprint-override""><code>import { INestApplication } from '@nestjs/common';
import { Test, TestingModule } from '@nestjs/testing';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CharacterModule } from '../src/character/character.module';
import { GraphQLModule } from '@nestjs/graphql';

describe('CharacterResolver (e2e)', () =&gt; {
    let app: INestApplication;

    beforeAll(async () =&gt; {
        const module: TestingModule = await Test.createTestingModule({
            imports: [
                TypeOrmModule.forRoot(),
                GraphQLModule.forRoot({ playground: false, autoSchemaFile: 'schema.gql' }),
                CharacterModule,
            ],
        }).compile();

        app = module.createNestApplication();
        await app.init();
    });

    it('should create testing module', () =&gt; {
        expect(1).toBe(1);
    });

    afterAll(async () =&gt; {
        await app.close();
    });
});
</code></pre>

<p>And after running <code>npm run test:e2e</code>:</p>

<pre><code>Schema must contain uniquely named types but contains multiple types named ""Character"".

      at typeMapReducer (../node_modules/graphql/type/schema.js:262:13)
          at Array.reduce (&lt;anonymous&gt;)
      at new GraphQLSchema (../node_modules/graphql/type/schema.js:145:28)
      at Function.generateFromMetadataSync (../node_modules/type-graphql/dist/schema/schema-generator.js:31:24)
      at Function.&lt;anonymous&gt; (../node_modules/type-graphql/dist/schema/schema-generator.js:16:33)
      at ../node_modules/tslib/tslib.js:110:75
      at Object.__awaiter (../node_modules/tslib/tslib.js:106:16)
      at Function.generateFromMetadata (../node_modules/type-graphql/dist/schema/schema-generator.js:15:24)
</code></pre>

<p>I don't find any other way to create a testing module with graphql code first approach on official doc or while googling... Am I missing something ?</p>
",https://stackoverflow.com/questions/59919546/problem-with-e2e-testing-with-nestjs-testingmodule-graphql-code-first-and-typeo,"['graphql', 'e2e-testing', 'nestjs']",1346,True,4,1
Azure Pipeline E2E Testing: unknown error: Chrome failed to start: exited abnormally,"<p>I about to run my protractor test in azure pipeline.
Following steps are success,</p>
<ol>
<li>npm install</li>
<li>webdriver update</li>
</ol>
<p>when running &quot;npm run e2e&quot; got below error (highlighted with space),</p>
<pre><code>2020-12-28T11:24:00.1123719Z Date: 2020-12-28T11:24:00.108Z - Hash: 3bfb7dbf8249d8ecd0a9 - Time: 44081ms
2020-12-28T11:24:00.1205386Z ** Angular Live Development Server is listening on localhost:4203, open your browser on http://localhost:4203/ **
2020-12-28T11:24:00.1739298Z [34mâ„¹[39m [90mï½¢wdmï½£[39m: Compiled successfully.
2020-12-28T11:24:01.9754480Z [11:24:01] I/launcher - Running 1 instances of WebDriver
2020-12-28T11:24:01.9755656Z [11:24:01] I/direct - Using ChromeDriver directly...


2020-12-28T11:24:06.7970214Z [11:24:06] E/launcher - unknown error: Chrome failed to start: exited abnormally.
2020-12-28T11:24:06.7972134Z   (unknown error: DevToolsActivePort file doesn't exist)
2020-12-28T11:24:06.7980054Z   (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)



2020-12-28T11:24:06.7981720Z   (Driver info: chromedriver=87.0.4280.88 (89e2380a3e36c3464b5dd1302349b1382549290d-refs/branch-heads/4280@{#1761}),platform=Linux 4.15.0-1100-azure x86_64)
2020-12-28T11:24:06.7982724Z [11:24:06] E/launcher - WebDriverError: unknown error: Chrome failed to start: exited abnormally.
2020-12-28T11:24:06.7983474Z   (unknown error: DevToolsActivePort file doesn't exist)
2020-12-28T11:24:06.7984515Z   (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
2020-12-28T11:24:06.7985577Z   (Driver info: chromedriver=87.0.4280.88 (89e2380a3e36c3464b5dd1302349b1382549290d-refs/branch-heads/4280@{#1761}),platform=Linux 4.15.0-1100-azure x86_64)
2020-12-28T11:24:06.7986586Z     at Object.checkLegacyResponse (/home/vsts/work/1/s/amaze-commerce/node_modules/selenium-webdriver/lib/error.js:546:15)
2020-12-28T11:24:06.7987489Z     at parseHttpResponse (/home/vsts/work/1/s/amaze-commerce/node_modules/selenium-webdriver/lib/http.js:509:13)
2020-12-28T11:24:06.7988405Z     at doSend.then.response (/home/vsts/work/1/s/amaze-commerce/node_modules/selenium-webdriver/lib/http.js:441:30)
2020-12-28T11:24:06.7988962Z     at process._tickCallback (internal/process/next_tick.js:68:7)
2020-12-28T11:24:06.7989391Z From: Task: WebDriver.createSession()
2020-12-28T11:24:06.7990163Z     at Function.createSession (/home/vsts/work/1/s/amaze-commerce/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
2020-12-28T11:24:06.7991076Z     at Function.createSession (/home/vsts/work/1/s/amaze-commerce/node_modules/selenium-webdriver/chrome.js:761:15)
2020-12-28T11:24:06.7992017Z     at Direct.getNewDriver (/home/vsts/work/1/s/amaze-commerce/node_modules/protractor/built/driverProviders/direct.js:77:33)
2020-12-28T11:24:06.7992916Z     at Runner.createBrowser (/home/vsts/work/1/s/amaze-commerce/node_modules/protractor/built/runner.js:195:43)
2020-12-28T11:24:06.7993802Z     at q.then.then (/home/vsts/work/1/s/amaze-commerce/node_modules/protractor/built/runner.js:339:29)
2020-12-28T11:24:06.8001078Z     at _fulfilled (/home/vsts/work/1/s/amaze-commerce/node_modules/q/q.js:834:54)
2020-12-28T11:24:06.8001877Z     at /home/vsts/work/1/s/amaze-commerce/node_modules/q/q.js:863:30
2020-12-28T11:24:06.8002782Z     at Promise.promise.promiseDispatch (/home/vsts/work/1/s/amaze-commerce/node_modules/q/q.js:796:13)
2020-12-28T11:24:06.8003556Z     at /home/vsts/work/1/s/amaze-commerce/node_modules/q/q.js:556:49
2020-12-28T11:24:06.8004307Z     at runSingle (/home/vsts/work/1/s/amaze-commerce/node_modules/q/q.js:137:13)
2020-12-28T11:24:06.8005078Z [11:24:06] E/launcher - Process exited with error code 199
2020-12-28T11:24:07.4394944Z npm ERR! code ELIFECYCLE
2020-12-28T11:24:07.4395828Z npm ERR! errno 1
2020-12-28T11:24:07.4462731Z npm ERR! amaze-commerce@1.0.0 e2etest: `node --max_old_space_size=35000 ./node_modules/@angular/cli/bin/ng e2e`
2020-12-28T11:24:07.4465097Z npm ERR! Exit status 1
2020-12-28T11:24:07.4468705Z npm ERR! 
2020-12-28T11:24:07.4472803Z npm ERR! Failed at the amaze-commerce@1.0.0 e2etest script.
2020-12-28T11:24:07.4475619Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-12-28T11:24:07.4546066Z 
2020-12-28T11:24:07.4546683Z npm ERR! A complete log of this run can be found in:
2020-12-28T11:24:07.4547625Z npm ERR!     /home/vsts/.npm/_logs/2020-12-28T11_24_07_448Z-debug.log
2020-12-28T11:24:07.4656714Z ##[error]Bash exited with code '1'.
2020-12-28T11:24:07.4737893Z ##[section]Finishing: run e2e test
</code></pre>
<p><a href=""https://i.stack.imgur.com/gz88g.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/gz88g.png"" alt=""enter image description here"" /></a>
Please help me on this issue.
Thanks in Advance.</p>
",https://stackoverflow.com/questions/65477331/azure-pipeline-e2e-testing-unknown-error-chrome-failed-to-start-exited-abnorm,"['node.js', 'angular', 'azure-devops', 'protractor', 'e2e-testing']",736,True,1,1
NestJS: e2e testing using an axios-based client is not working as expected,"<p>I have a NestJS application that exposes some endpoints, and I have written a client application that I plan on releasing as an NPM package to work with the nest server. I am attempting to write end-to-end tests that start the nest server, connect it to a test database in a local docker container, and test it using the client. Here are some snippets of what I'm attempting to do:</p>
<p>Controller:</p>
<pre><code>@Controller('/api/v1/messages')
export class MessagesController {

    constructor(
        private messagesService: MessagesService
    ) {}

    @Get()
    @UsePipes(new ValidationPipe({ whitelist: true, forbidNonWhitelisted: true }))
    private findAll(
        @Query() searchCriteria: MessageSearchDto
    ): Promise&lt;MessageDto[]&gt; {
        if (Object.keys(searchCriteria).length &gt; 0) 
            return this.messagesService.search(searchCriteria);
        return this.messagesService.findAll();
    }
}
</code></pre>
<p>Client:</p>
<pre><code>const http = require('axios');
const dotenv = require('dotenv');

dotenv.config();

export class MessageClient {

    public baseUri: string = process.env.MessageClientTarget ?? './';

    constructor() {}

    public async findAll() {
        return await http.get(this.baseTarget());
    }

    private baseTarget() {
        return `${this.baseUri}/api/v1/messages`;
    }
}
</code></pre>
<p>e2e Test:</p>
<pre><code>describe('MessageController (e2e)', () =&gt; {
    let app: INestApplication;
    let client: MessageClient = new MessageClient();

    beforeAll(async () =&gt; {
        let moduleFixture: TestingModule = await Test.createTestingModule({
        imports: [AppModule, MessagesModule],
        }).compile();

        app = moduleFixture.createNestApplication();
        await app.init();
    });

    afterAll(async () =&gt; {
        await app.close();
    });

    it('/ (GET)', async done =&gt; {
        const { data: messages } = await client.findAll()
        expect(messages).toEqual([]);    
        done();
    });
});
</code></pre>
<p>And .env:</p>
<pre><code>MessageClientTarget=http://localhost:3000
</code></pre>
<p>When I attempt to run this, I get the following error: &quot;connect ECONNREFUSED 127.0.0.1:3000&quot;</p>
<p>From what I understand, this is because the createNestApplication method doesn't actually start a server but instead creates a mocked version of the application.</p>
<p>My question is how can I work with INestApplication or TestingModule in order to start the application or what other way do I have to programmatically start a NestJS application. It is important to me that I perform the e2e testing with the Axios based client rather than supertest as a way of testing both the client and the server.</p>
<p>I have verified that the server is supposed to start on port 3000 locally, and I have verified that the client has the correct baseUri set. The address used by the client during testing is: http://localhost:3000/api/v1/messages and was verified by outputting the value to the console during the test. Also, only the database currently lives in a docker container and I have that running correctly. The whole application works perfectly when ran locally and it is only in the test that it is failing.</p>
",https://stackoverflow.com/questions/65120058/nestjs-e2e-testing-using-an-axios-based-client-is-not-working-as-expected,"['axios', 'jestjs', 'nestjs', 'e2e-testing']",658,False,4,1
jest+supertest e2e testing of API endpoints that issue HTTP requests to other endpoints,"<p>I am e2e testing my API endpoints using jest and supertest. The api endpoints are implemented in express with typescript. The problem I am dealing with is that my app is setup as microservices where some of my endpoints issue HTTP requests to other endpoints. All of those microservices are mounted in the same app for the purpose of these tests.</p>

<p>So I am using</p>

<pre><code>const res = await request(app)
      .get(endpoint)
      .set('Authorization', authorization);
    expect(res.status).toEqual(200);
</code></pre>

<p>to fetch my endpoint. But this returns with statusCode 500 and the error <code>Error: connect ECONNREFUSED 127.0.0.1:8999</code>. The endpoint indeed issues an HTTP request to another endpoint on the same host. I guess supertest isn't actually starting the whole app, and therefore the other api endpoints aren't available? Is there a way to solve this? I don't want to mock the other endpoint, since this should be an end-to-end test. Unittests are available too, but right now I am writing e2e snapshot tests.</p>
",https://stackoverflow.com/questions/60314617/jestsupertest-e2e-testing-of-api-endpoints-that-issue-http-requests-to-other-en,"['typescript', 'jestjs', 'microservices', 'e2e-testing', 'supertest']",563,False,0,1
Stenciljs E2E Testing: how to find a child of a child in the Shadow Dom,"<p>I have components arranged like so:</p>
<pre><code>app-home
  shadow-root
    component1
      shadow-root
        div id=div1
</code></pre>
<p>In other words both my app-home and component1 have shadow doms.</p>
<p>I can find component1 easily in Stenciljs E2E Tests like so:</p>
<pre><code>const page = await newE2EPage();
await page.setContent('&lt;app-home&gt;&lt;/app-home&gt;');
const component1 = await page.find('app-home &gt;&gt;&gt; component1');
</code></pre>
<p>But, whatever I've tried I cannot get #div1 inside component1.  It's important that I get back an E2EElement so I can use its methods such as click which trigger changes in the page.</p>
<p>Here's what I've tried:</p>
<ol>
<li><p><code>page.find('app-home &gt;&gt;&gt; component1 &gt;&gt;&gt; #div1')</code></p>
<p>Returns null</p>
</li>
<li><p><code>component1.find(':host &gt;&gt;&gt; #div1')</code> or <code>component1.find(':root &gt;&gt;&gt; #div1')</code> or <code>component1.find('&gt;&gt;&gt; #div1')</code> or <code>component1.find('#div1')</code> or <code>component1.find('component1 &gt;&gt;&gt; #div1')</code></p>
<p>Returns null</p>
</li>
<li><p><code>component1.shadowRoot.querySelector('#div1')</code></p>
<p>This method gets an element but clicking on it or dispatching an event to it has
no effect on app-root or component1 in the page.</p>
</li>
</ol>
<p>Any suggestions then on how to find a child of a child when both elements have shadowDOMs?</p>
",https://stackoverflow.com/questions/60804053/stenciljs-e2e-testing-how-to-find-a-child-of-a-child-in-the-shadow-dom,"['javascript', 'e2e-testing', 'stenciljs']",1851,True,5,1
"In e2e testing, blank page is opened in Chromium Edge (New Edge Browser) using Protractor","<p>1.Open the MS Chromium edge and type the command ""<code>edge://settings/help</code>"" to check the version
2. Download the <a href=""https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/"" rel=""nofollow noreferrer"">MS Chromium edge webdriver</a> and placed it into project directory
3. Set the desired capabilities in conf.js file 
4. Start the server using command <code>""webdriver-manager start --edge msedgedriver.exe""</code>
5. Run the test using the ""<code>protractor conf.js</code>""</p>

<p>Environment:</p>

<pre><code>Chromium Edge Version =  83.0.478.37
Chromium web driver   = 83.0.478.37
Selenium server version = 3.141.59
JDK  =1.8.191
</code></pre>

<p>conf.js</p>

<pre><code>exports.config = {
    // The address of a running selenium server.
    seleniumAddress: 'http://localhost:4444/wd/hub',
     capabilities: {
       'browserName': 'chrome',
       'goog:chromeOptions': {
        // Faked out chrome binary
        'binary':'C:\\Program Files (x86)\\Microsoft\\Edge Beta\\Application\\msedge.exe'
      }

    },
    //Path of Chromium edge driver
    chromeDriver:'./msedgedriver.exe',

    specs: ['spec.js'],
    }
  };
</code></pre>

<p>Also tried with using desired capabilities in spec.js file as well but still blank page is opened</p>

<pre><code>describe('slow calculator', function() {
    beforeEach(function() {
        let options = new edge.Options();
        options.setEdgeChromium(true);
        //options.setBinaryPath(""C:\\Program Files (x86)\\Microsoft\\Edge Beta\\Application\\msedge.exe"");

        let browser = edge.Driver.createSession(options);

        browser.get('http://juliemr.github.io/protractor-demo/');

    });
 });
</code></pre>

<p><a href=""https://i.stack.imgur.com/xwnV3.jpg"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/xwnV3.jpg"" alt=""enter image description here""></a> </p>
",https://stackoverflow.com/questions/61985568/in-e2e-testing-blank-page-is-opened-in-chromium-edge-new-edge-browser-using-p,"['jasmine', 'protractor']",518,True,0,1
Cypress e2e testing: How to call JavaScript function from a link for a .js file,"<p>If I am visiting or requesting a page, the page DOM contains:</p>

<pre><code>&lt;script src=""/myassets/js/bashir.js""&gt;&lt;/script&gt;
</code></pre>

<p>Inside this JS file, i have my JS functions like <code>checkFields</code>
How can I call this function inside a <a href=""/questions/tagged/cypress"" class=""post-tag"" title=""show questions tagged &#39;cypress&#39;"" rel=""tag"">cypress</a> test?</p>
",https://stackoverflow.com/questions/61321613/cypress-e2e-testing-how-to-call-javascript-function-from-a-link-for-a-js-file,"['javascript', 'function', 'vue.js', 'cypress', 'e2e-testing']",432,False,0,0
When to do E2E Testing,"<p>I am working in a project (angular and spring boot) and we do UnitTests and Integration tests. I am a little confused about E2E testing. When should I use E2E testing, what advantages could e2e Test bring to me. </p>

<p>When UnitTest suffices, when  I sould use E2E Test. </p>

<p>This is a general question and it does not releate to a specific technology</p>
",https://stackoverflow.com/questions/59822420/when-to-do-e2e-testing,"['selenium', 'unit-testing', 'protractor']",817,True,1,2
How to test React Native Camera with E2E Detox with Mocha Runner,"<p>I am working one project for E2E testing react native with Detox but find a problem. 
I can not mock my camera to deal with detox E2E. Some of the documentation is there but it is hard to implement once there no working stuff. Any help would be appreciated :)</p>

<p><a href=""https://i.stack.imgur.com/UXES8.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/UXES8.png"" alt=""enter image description here""></a></p>

<p>The image above demonstrates how my E2E testing works. I want to take the picture from a react-native camera. </p>

<p>This my last code snippet</p>

<pre><code>describe('Pickup', () =&gt; {
  it('should change 1012 to 1023', async () =&gt; {
    await element(by.id('tab_pickup')).tap();
    await element(by.id('list_broadcast_pickup_0')).tap();
    await element(by.id('btn_accept_request_pickup_0')).tap();
    await element(by.id('btn_yes_start_pickup')).tap();
  });

  it('should select the camera’, async () =&gt; {

  });  
});
</code></pre>
",https://stackoverflow.com/questions/62180627/how-to-test-react-native-camera-with-e2e-detox-with-mocha-runner,"['react-native', 'e2e-testing', 'detox', 'react-native-camera']",417,False,1,0
Consumer-Driven Contract Testing Databases,"<p>I recently learned about consumer-driven contract testing to supplement complex integration/E2E testing. I would like to verify my database and service are in sync through a contract. Is someone aware of how to do this?</p>
",https://stackoverflow.com/questions/60155973/consumer-driven-contract-testing-databases,"['datacontract', 'pact', 'contract']",681,True,2,1
ReactJS dangerouslySetInnerHTML removes data attributes,"<p>When I add <code>data-test</code> attribute to <code>a</code> anchor tag in html string and then insert it with <code>dangerouslySetInnerHTML</code> the <code>data</code> attributes are being stripped out. How can I disable it? I need that attributes for E2E testing. Or maybe there is an alternative way of doing it.</p>
",https://stackoverflow.com/questions/63337099/reactjs-dangerouslysetinnerhtml-removes-data-attributes,"['html', 'reactjs', 'typescript', 'dom']",381,True,1,1
How to enable browser notifications using Cypress,"<p>I am using Cypress for e2e testing and the site I am testing requires to have the notification permission granted.
For manual testing, I go to chrome preferences->Privacy and Security->Site Settings->Notifications and set the site url to 'Allow'</p>

<p>But how do I do this on Cypress ?</p>
",https://stackoverflow.com/questions/60057248/how-to-enable-browser-notifications-using-cypress,['cypress'],1379,False,1,2
Can we write e2e tests of a app having Next JS API in testcafe?,"<p>Our app is in React + NextJS. Framework is like (Browser code -> (Making call to)->Next JS Api->(Making call  to)->External Rest API). I want to perform E2E Testing using Testcafe where I will mock only the External API call. How can we achieve the same?</p>
",https://stackoverflow.com/questions/62355146/can-we-write-e2e-tests-of-a-app-having-next-js-api-in-testcafe,"['testing', 'automation', 'automated-tests', 'e2e-testing', 'testcafe']",690,True,1,1
Protractor browser is undefined in onPrepare,"<p>I'm using angular 9 and trying to setup some e2e testing. I've seen many onPrepare examples where they get a hand on the browser. Even their comment documentation shows an example which doesn't work.</p>
<p>Any idea as to why the browser is undefined?</p>
<p>Here is the protractor.config.js</p>
<pre><code>// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require('jasmine-spec-reporter');
const { browser } = require('protractor');

/**
 * @type { import(&quot;protractor&quot;).Config }
 */
exports.config = {
  allScriptsTimeout: 11000,
  specs: [
    './src/**/*.e2e-spec.ts'
  ],
  capabilities: {
    browserName: 'chrome'
  },
  directConnect: true,
  baseUrl: 'http://localhost:4200/',
  framework: 'jasmine',
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000,
    print: function() {}
  },
  onPrepare() {
    require('ts-node').register({
      project: require('path').join(__dirname, './tsconfig.json')
    });
    jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));

    // this code is an example from the documentation of onPrepare
    // but browser is undefined
    return browser.getProcessedConfig().then(function(config) {
      console.log('Executing capability', config.capabilities);
    });
  }
};
</code></pre>
<p>Here is some info about angular</p>
<pre><code>Angular CLI: 9.0.7                                                       
Node: 10.19.0                                                            
OS: win32 x64                                                            
                                                                         
Angular: 9.0.7                                                           
... animations, cli, common, compiler, compiler-cli, core, forms         
... language-service, platform-browser, platform-browser-dynamic         
... router                                                               
Ivy Workspace: Yes                                                       
                                                                         
Package                           Version                                
-----------------------------------------------------------              
@angular-devkit/architect         0.900.7                                
@angular-devkit/build-angular     0.900.7                                
@angular-devkit/build-optimizer   0.900.7                                
@angular-devkit/build-webpack     0.900.7                                
@angular-devkit/core              9.0.7                                  
@angular-devkit/schematics        9.0.7                                  
@ngtools/webpack                  9.0.7                                  
@schematics/angular               9.0.7                                  
@schematics/update                0.900.7                                
rxjs                              6.5.5                                  
typescript                        3.7.5                                  
webpack                           4.41.2                                 
                                                                         
</code></pre>
<p>package.json</p>
<pre><code>{
  &quot;name&quot;: &quot;myapp3&quot;,
  &quot;version&quot;: &quot;0.0.0&quot;,
  &quot;scripts&quot;: {
    &quot;ng&quot;: &quot;ng&quot;,
    &quot;start&quot;: &quot;ng serve&quot;,
    &quot;build&quot;: &quot;ng build&quot;,
    &quot;test&quot;: &quot;ng test&quot;,
    &quot;lint&quot;: &quot;ng lint&quot;,
    &quot;e2e&quot;: &quot;ng e2e&quot;
  },
  &quot;private&quot;: true,
  &quot;dependencies&quot;: {
    &quot;@angular/animations&quot;: &quot;~9.0.2&quot;,
    &quot;@angular/common&quot;: &quot;~9.0.2&quot;,
    &quot;@angular/compiler&quot;: &quot;~9.0.2&quot;,
    &quot;@angular/core&quot;: &quot;~9.0.2&quot;,
    &quot;@angular/forms&quot;: &quot;~9.0.2&quot;,
    &quot;@angular/platform-browser&quot;: &quot;~9.0.2&quot;,
    &quot;@angular/platform-browser-dynamic&quot;: &quot;~9.0.2&quot;,
    &quot;@angular/router&quot;: &quot;~9.0.2&quot;,
    &quot;rxjs&quot;: &quot;~6.5.4&quot;,
    &quot;tslib&quot;: &quot;^1.10.0&quot;,
    &quot;zone.js&quot;: &quot;~0.10.2&quot;
  },
  &quot;devDependencies&quot;: {
    &quot;@angular-devkit/build-angular&quot;: &quot;~0.900.3&quot;,
    &quot;@angular/cli&quot;: &quot;~9.0.3&quot;,
    &quot;@angular/compiler-cli&quot;: &quot;~9.0.2&quot;,
    &quot;@angular/language-service&quot;: &quot;~9.0.2&quot;,
    &quot;@types/node&quot;: &quot;^12.11.1&quot;,
    &quot;@types/jasmine&quot;: &quot;~3.5.0&quot;,
    &quot;@types/jasminewd2&quot;: &quot;~2.0.3&quot;,
    &quot;codelyzer&quot;: &quot;^5.1.2&quot;,
    &quot;jasmine-core&quot;: &quot;~3.5.0&quot;,
    &quot;jasmine-spec-reporter&quot;: &quot;~4.2.1&quot;,
    &quot;karma&quot;: &quot;~4.3.0&quot;,
    &quot;karma-chrome-launcher&quot;: &quot;~3.1.0&quot;,
    &quot;karma-coverage-istanbul-reporter&quot;: &quot;~2.1.0&quot;,
    &quot;karma-jasmine&quot;: &quot;~2.0.1&quot;,
    &quot;karma-jasmine-html-reporter&quot;: &quot;^1.4.2&quot;,
    &quot;protractor&quot;: &quot;~5.4.3&quot;,
    &quot;ts-node&quot;: &quot;~8.3.0&quot;,
    &quot;tslint&quot;: &quot;~5.18.0&quot;,
    &quot;typescript&quot;: &quot;~3.7.5&quot;
  }
}
</code></pre>
",https://stackoverflow.com/questions/62585974/protractor-browser-is-undefined-in-onprepare,"['javascript', 'angular', 'protractor']",811,True,3,1
Angular 8 - ng e2e doesn&#39;t work with default chrome driver,"<p><a href=""https://i.stack.imgur.com/BGmNT.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/BGmNT.png"" alt=""enter image description here""></a></p>

<p>I have angular 8 and I want to run protractor for the e2e testing in which when I am running 
<strong><code>protractor protractor.conf.js</code></strong> command it's taking default chrome driver from <strong><code>node_modules</code></strong></p>

<p>But when I run ng e2e it's giving the error shown in the picture.</p>

<p>I have the <strong><em>Angular version - 8.3.8</strong> &amp; <strong>Protractor version - 5.4.2</strong> &amp; <strong>Chrome version - 79.0.3945.88</em></strong></p>
",https://stackoverflow.com/questions/59575461/angular-8-ng-e2e-doesnt-work-with-default-chrome-driver,"['protractor', 'angular8']",1263,False,1,2
ng e2e --configuration=e2e in Azure DevOps running for a long time,"<p>I have an angular web page where I am trying to run E2E testing in Azure DevOps Pipeline.</p>
<p>But my end to end testing is running for a long time and does not produce any result.</p>
<p>Not sure what I am missing, I have shared my configuration below.</p>
<p>angular.json</p>
<pre><code>&quot;e2e&quot;: {
         &quot;fileReplacements&quot;: [
              {
                      &quot;replace&quot;: &quot;src/app/core/services/auth.service.ts&quot;,
                      &quot;with&quot;: &quot;src/app/core/services/auth.service.mock.ts&quot;
               }
            ]
}
</code></pre>
<p>package.json</p>
<pre><code>&quot;scripts&quot;: {
    &quot;ng&quot;: &quot;ng&quot;,
    &quot;start&quot;: &quot;ng serve&quot;,
    &quot;build&quot;: &quot;ng build&quot;,
    &quot;build-prod&quot;: &quot;ng build --prod&quot;,
    &quot;test&quot;: &quot;ng test&quot;,
    &quot;lint&quot;: &quot;ng lint&quot;,
    &quot;e2e&quot;: &quot;ng e2e --configuration=e2e&quot;  
 }
</code></pre>
<p>protractor.conf.js</p>
<pre><code>capabilities: {
    browserName: 'chrome',
    chromeOptions: {
      args: [&quot;--incognito&quot;]
    }
  },
  chromeDriver: '../node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_87.0.4280.88',
  baseUrl: 'http://localhost:4200/login',
  framework: 'custom',
  ignoreUncaughtExceptions: true,
  frameworkPath: require.resolve('protractor-cucumber-framework'),
</code></pre>
<p>My Pipele Yml:</p>
<pre><code>- task: Npm@1
      displayName: 'npm Install'
      inputs:
        command: 'install'
        workingDir: './'
    - script: | 
                $(Agent.BuildDirectory)/s/node_modules/protractor/bin/webdriver-manager update --versions.chrome=chromedriver_87.0.4280.88
    - task: Npm@1
      displayName: 'E2E Testing'
      inputs:
        command: 'custom'
        workingDir: './'
        customCommand: 'run e2e'
</code></pre>
",https://stackoverflow.com/questions/65310141/ng-e2e-configuration-e2e-in-azure-devops-running-for-a-long-time,"['angular', 'azure-devops', 'protractor', 'e2e-testing']",387,True,0,1
Detox &quot;Cannot read property &#39;bindings&#39; of null&quot; error,"<p>I tried adding Detox e2e testing to my react native app and I am running into the following error when trying to run a simple test. </p>

<p><a href=""https://i.stack.imgur.com/IYmBL.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/IYmBL.png"" alt=""enter image description here""></a></p>

<p>I have only installed Detox to the iOS side of the app. The ""detox build"" command executed perfectly.</p>

<p>Below are the important files from my project.</p>

<p>Package.json</p>

<pre><code>{
 ""name"": ""ExerFit_mobileapp"",
 ""version"": ""0.0.1"",
 ""private"": true,
 ""scripts"": {
   ""start"": ""node node_modules/react-native/local-cli/cli.js start"",
   ""test"": ""jest""
 },
 ""dependencies"": {
   ""bcrypt"": ""^3.0.7"",
   ""firebase"": ""^5.5.9"",
   ""moment"": ""^2.24.0"",
   ""native-base"": ""^2.13.8"",
   ""qs"": ""^6.9.0"",
   ""react"": ""16.3.1"",
   ""react-native"": ""0.55.4"",
   ""react-native-custom-tabs"": ""^0.1.7"",
   ""react-native-datepicker"": ""^1.7.2"",
   ""react-native-navigation"": ""^3.7.0"",
   ""react-native-vector-icons"": ""^6.6.0"",
   ""react-navigation"": ""^2.18.2"",
   ""rn-apple-healthkit"": ""^0.6.5"",
   ""switch-button-react-native"": ""^1.0.3""
 },
 ""devDependencies"": {
   ""babel-jest"": ""24.9.0"",
   ""babel-preset-react-native"": ""4.0.1"",
   ""detox"": ""^15.1.4"",
   ""jest"": ""24.9.0"",
   ""react-test-renderer"": ""16.3.1""
 },
 ""jest"": {
   ""preset"": ""react-native""
 },
 ""detox"": {
   ""test-runner"": ""jest"",
   ""specs"": ""e2e"",
   ""configurations"": {
     ""ios.sim.debug"": {
       ""binaryPath"": ""ios/build/Build/Products/Debug-iphonesimulator/ExerFit_mobileapp.app"",
    ""build"": ""xcodebuild -workspace ios/ExerFit_mobileapp.xcworkspace -scheme ExerFit_mobileapp -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build"",
    ""type"": ""ios.simulator"",
    ""name"": ""iPhone 7""
  }
}
}
}
</code></pre>

<p>config.json</p>

<pre><code>{
""setupFilesAfterEnv"": [""./init.js""],
""testEnvironment"": ""node"",
""reporters"": [""detox/runners/jest/streamlineReporter""],
""verbose"": true
}
</code></pre>

<p>init.js</p>

<pre><code>const detox = require('detox');
const config = require('../package.json').detox;
const adapter = require('detox/runners/jest/adapter');
const specReporter = require('detox/runners/jest/specReporter');


jest.setTimeout(120000);

jasmine.getEnv().addReporter(adapter);

jasmine.getEnv().addReporter(specReporter);

beforeAll(async () =&gt; {
  await detox.init(config);
}, 300000);

beforeEach(async () =&gt; {
  await adapter.beforeEach();
});

afterAll(async () =&gt; {
  await adapter.afterAll();
  await detox.cleanup();
});
</code></pre>
",https://stackoverflow.com/questions/60074592/detox-cannot-read-property-bindings-of-null-error,"['javascript', 'ios', 'react-native', 'testing', 'detox']",213,False,0,0
Protractor concatenate two spans with same class name,"<p>I'm new to Protractor E2E Testing. On a webpage I'm testing, there are two span tags with a class name of <code>name-part</code>. I need a way to concatenate the values of both in an element result. Here is how the code is laid out.</p>
<p><div class=""snippet"" data-lang=""js"" data-hide=""false"" data-console=""true"" data-babel=""false"">
<div class=""snippet-code"">
<pre class=""snippet-code-html lang-html prettyprint-override""><code>&lt;div class=""offer-name""&gt;
  1.01 ct. Center Diamond
  &lt;span class=""name-part""&gt;Monique Lhuillier Timeless Rollover Halo Diamond Engagement Ring&lt;/span&gt;
  &lt;span class=""name-part""&gt;in 18k Rose Gold&lt;/span&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>
<p>I need to concatenate both spans into one assertion. <code>Monique Lhuillier Timeless Rollover Halo Diamond Engagement Ring in 18k Rose Gold</code></p>
<p>Here is my code:</p>
<pre class=""lang-javascript prettyprint-override""><code>tester.it('Clicking the defined number of products should bring up Product Details page every time', (testContext) =&gt; {
catalogResults().totalResults().then((totalCount) =&gt; {
  for (let i = 0; i &lt; totalCount; i++) {
    let testLink = element.all(by.css('.catalog-offer a')).get(i);
    const offerResultsName = element.all(by.css('.offer-name')).get(i).getText();
    const offerResultsPrice = element.all(by.css('.offer-details-wrapper .price-display')).get(i).getText();
    testerUtils.performActionAndWait(testLink.click);
    element(by.css('.image-and-details .name-start')).getText().then(displayName =&gt; {
      expect(offerResultsName).to.eventually.include(displayName, 'Display name does not match with results name.')
      console.log(displayName);
    })
    element(by.css('.details .subtotal &gt; span')).getText().then(displayPrice =&gt; {
      expect(offerResultsPrice).to.eventually.equal(displayPrice, 'Display price does not match with results price.');
      console.log(displayPrice);
    });
    expect(testerUtils.getPageId()).to.eventually.equal('Recently Purchased Engagement Ring Details');
    testerUtils.go(testContext.url);
  }
});
</code></pre>
<p>});</p>
",https://stackoverflow.com/questions/64056114/protractor-concatenate-two-spans-with-same-class-name,"['javascript', 'protractor']",60,True,1,1
Getting started with E2E Testing,"<p>I am very new to testing. I needed to get started with E2E testing scripts from scratch. Could anyone please guide me where to start from? Any books or youtube channel?</p>

<p>I have installed Selenium, VS Code and Visual Studio but none of the tutorials I saw use Visual Studio. I may be wrong. </p>

<p>Any help is appreciated.  </p>
",https://stackoverflow.com/questions/61630551/getting-started-with-e2e-testing,['e2e-testing'],32,False,0,1
Checking if an element is present in protractor-cucumber-framework,"<p>I am having an e2e testing pack with protractor-cucumber-framework and Chai for asserting.</p>
<p>I have a Feature file with a data table as below.</p>
<pre><code>Scenario: Menu Validation
        Given I am on the home page
        When I do Hover over the menu item I should have the menu dropdown
            |menu1                    |
            |menu2                    |
            |menu3                    |
</code></pre>
<p>I have the step definition as below.</p>
<pre><code>When(/^I do Hover over the menu item I should have the menu dropdown/, (dataTable) =&gt; {
    let rootMenu : Array&lt;string&gt; = Array.from( dataTable.rawTable )
    rootMenu.forEach((ele) =&gt; {
        console.log(ele[0]);
        element(by.id(ele[0])).isPresent().then(function(present) { 
            expect(present).to.equal(true);
         });
    });
});
</code></pre>
<p>Even if the menu element ID is not present this test step never fail, I checked further the <code>expect(present).to.equal(true);</code> never get executed. I am not sure what I am missing.</p>
",https://stackoverflow.com/questions/65223973/checking-if-an-element-is-present-in-protractor-cucumber-framework,"['protractor', 'cucumber', 'chai']",413,True,1,1
What are the performance of every selector&#39;s types?,"<p>In CodeceptJs, you have different way to select elements and manipulate them for e2e testing : </p>

<ul>
<li>CSS selector</li>
<li>Xpath selector</li>
<li>Semantic locator</li>
<li>Locator builder</li>
</ul>

<p>But I have some questions about their performance. Which are the best locator type ?
What is the ratio between them ?
Currently, I use Locator builder but I don't know if they're efficient like CSS selector or ID selector.</p>
",https://stackoverflow.com/questions/60615541/what-are-the-performance-of-every-selectors-types,"['puppeteer', 'e2e-testing', 'codeceptjs']",367,True,0,1
separate unit testing and E2E testing in npm build,"<p>I am using ant-design-pro in my project. For unit testing it's jest and for e2e testing it's puppeteer. To run tests we have npm run test:all which basically runs tests for all types of tests. Is there a way to separate these files to run tests separately like run only jest files(.test.js) or e2e files(.e2e.js)?</p>
<p>Thanks in advance for your help</p>
",https://stackoverflow.com/questions/63787187/separate-unit-testing-and-e2e-testing-in-npm-build,"['reactjs', 'jestjs', 'puppeteer', 'ant-design-pro']",575,False,0,1
How to correctly implement Vue.js tests?,"<p>I'm confused about testing my Vue.js application.
First of all, I'm not quite comfortable with the different types of tests and what they are supposed to do.</p>

<p>This is what I'm currently doing for a Vue.js SPA that uses different APIs:</p>

<p>On the unit testing side:
I run them using Jest &amp; Vue test-utils. I use createLocalVue to simulate the Vuex store and I mock the API calls.</p>

<p>On the e2e testing side :
I run them using Cypress. The first reflex was to use fixtures to mock the API call responses too, because I want to test the frontend working properly before merging without being dependent on API availability.</p>

<p>But I realize that my unit tests and e2e tests are very similar in the end.</p>

<p>Finally I have a lot of questions...</p>

<p>Ideally, should the e2e tests do the real API calls?</p>

<p>Can my unit tests really be considered as unit tests when I mock certain elements such as the Vuex store ?</p>

<p>What is the difference between e2e testing and integration testing?</p>

<p>Thanks for your help.</p>
",https://stackoverflow.com/questions/60231724/how-to-correctly-implement-vue-js-tests,"['vue.js', 'testing']",36,False,0,0
Wordpress Gutenberg e2e testing - net::ERR_CONNECTION_REFUSED at http://localhost:8889,"<p>I'm trying to get a simple set of e2e tests running on a Gutenberg block. It's from an existing Git repo to demonstrate e2e testing. I haven't made any alterations, but the author hasn't replied so I'm trying myself to get it working.</p>
<p>Below is a single test (I have commented out the others for now until I can get one passing):</p>
<pre><code>import {
    createNewPost,
    enablePageDialogAccept,
    getEditedPostContent,
    insertBlock,
} from '@wordpress/e2e-test-utils';

describe( 'Wrapper block', () =&gt; {
    beforeAll( async () =&gt; {
        await enablePageDialogAccept();
    } );
    beforeEach( async () =&gt; {
        await createNewPost();
    } );

    it( 'Wrapper block should be available', async () =&gt; {
        await insertBlock( 'Wrapper Block' );

        // Check if block was inserted
        expect( await page.$( '[data-type=&quot;e2e-tests-example/wrapper-block&quot;]' ) ).not.toBeNull();

        expect( await getEditedPostContent() ).toMatchSnapshot();
    } );
} );
</code></pre>
<p>Below is my package.json with versions and script commands:</p>
<pre><code>{
  &quot;name&quot;: &quot;e2e-tests-example&quot;,
  ...
  &quot;scripts&quot;: {
    ...
    &quot;test:e2e&quot;: &quot;wp-scripts test-e2e&quot;
  },
  &quot;wp-env&quot;: {
    &quot;plugin-dir&quot;: &quot;e2e-tests-example&quot;,
    &quot;plugin-name&quot;: &quot;E2E Tests Example&quot;,
    &quot;docker-template&quot;: &quot;./docker-compose.override.yml&quot;,
    &quot;welcome-logo&quot;: [
      &quot;E2E Tests Example&quot;
    ],
    &quot;welcome-build-command&quot;: &quot;npm run dev&quot;
  }
}
</code></pre>
<p>When I try to run the e2e tests, it seems that the test environment isn't available so just errors:</p>
<pre><code>PS C:\...\e2e-tests-example-wp-plugin&gt; npm run test:e2e

&gt; e2e-tests-example@1.0.0 test:e2e C:\Users\marty\Sites\nmis-wp\wp-content\plugins\e2e-tests-example-wp-plugin
&gt; wp-scripts test-e2e

 FAIL  e2e-tests/wrapper-block.spec.js (7.233s)
  ● Wrapper block › Wrapper block should be available

    net::ERR_CONNECTION_REFUSED at http://localhost:8889/wp-admin/post-new.php

      at navigate (node_modules/puppeteer/lib/FrameManager.js:120:37)
        -- ASYNC --
      at Frame.&lt;anonymous&gt; (node_modules/puppeteer/lib/helper.js:111:15)
      at Page.goto (node_modules/puppeteer/lib/Page.js:675:49)
      at Page.goto (node_modules/puppeteer/lib/helper.js:112:23)
      at _callee$ (node_modules/@wordpress/e2e-test-utils/build/@wordpress/e2e-test-utils/src/visit-admin-page.js:20:13)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:271:22)
      at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
      at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
      at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
      at node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
        -- ASYNC --
      at Page.goto (node_modules/puppeteer/lib/helper.js:111:15)
      at _callee$ (node_modules/@wordpress/e2e-test-utils/build/@wordpress/e2e-test-utils/src/visit-admin-page.js:20:13)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:271:22)
      at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
      at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
      at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
      at node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
      at node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12

  ● Wrapper block › Wrapper block should be available

    No node found for selector: .edit-post-header [aria-label=&quot;Add block&quot;]

      at assert (node_modules/puppeteer/lib/helper.js:283:11)
      at DOMWorld.click (node_modules/puppeteer/lib/DOMWorld.js:366:5)
        -- ASYNC --
      at Frame.&lt;anonymous&gt; (node_modules/puppeteer/lib/helper.js:111:15)
      at Page.click (node_modules/puppeteer/lib/Page.js:1067:29)
      at _callee$ (node_modules/@wordpress/e2e-test-utils/build/@wordpress/e2e-test-utils/src/open-global-block-inserter.js:5:13)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:271:22)
      at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
      at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
      at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
      at node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7

 › 3 snapshots obsolete.
   • Wrapper block Alignment should be set 1
   • Wrapper block Background color should be applied 1
   • Wrapper block Margin bottom should be applied 1
 FAIL  e2e-tests/wrapper-block-filters.spec.js
  ● Test suite failed to run

    Your test suite must contain at least one test.

      at node_modules/@jest/core/build/TestScheduler.js:242:24
      at asyncGeneratorStep (node_modules/@jest/core/build/TestScheduler.js:131:24)
      at _next (node_modules/@jest/core/build/TestScheduler.js:151:9)
      at node_modules/@jest/core/build/TestScheduler.js:156:7
      at node_modules/@jest/core/build/TestScheduler.js:148:12
      at onResult (node_modules/@jest/core/build/TestScheduler.js:271:25)

Snapshot Summary
 › 3 snapshots obsolete from 1 test suite. To remove them all, re-run jest with `-u`.
   ↳ e2e-tests/wrapper-block.spec.js
       • Wrapper block Alignment should be set 1
       • Wrapper block Background color should be applied 1
       • Wrapper block Margin bottom should be applied 1
Test Suites: 2 failed, 2 total
Tests:       1 failed, 1 total
Snapshots:   3 obsolete, 0 total
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! e2e-tests-example@1.0.0 test:e2e: `wp-scripts test-e2e`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the e2e-tests-example@1.0.0 test:e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\marty\AppData\Roaming\npm-cache\_logs\2020-09-11T11_17_03_665Z-debug.log
</code></pre>
<p>If I've missed any other files that I need to include, let me know. The repo I'm working from can be found here (with all the files) - <a href=""https://github.com/liip/e2e-tests-example-wp-plugin"" rel=""nofollow noreferrer"">https://github.com/liip/e2e-tests-example-wp-plugin</a></p>
<p>I notice there is a docker-compose.override.yml files but no instruction to run any docker containers manually, and no docker-compose.yml files. I'm not finding a ton of resources on e2e testing with gutenberg, just thought it would be nice to work from a working project and learn from that.</p>
",https://stackoverflow.com/questions/63846293/wordpress-gutenberg-e2e-testing-neterr-connection-refused-at-http-localhos,"['wordpress', 'wordpress-gutenberg']",577,False,0,1
Replacement to toBeVisible() in Jest,"<p>I installed detox for E2E testing with react-native, and i saw that after init command there is a
firstTest.e2e.js file, now when i changed the file to be .ts i get:</p>
<blockquote>
<p>Property 'toBeVisible' does not exist on type
'JestMatchersShape&lt;Matchers&lt;void, DetoxAny&gt;, Matchers&lt;Promise,
DetoxAny&gt;&gt;</p>
</blockquote>
<pre><code> it('should have welcome screen', async () =&gt; {
    await expect(element(by.id('check'))).toBeVisible();
    await element(by.id('check')).tap();
  });
</code></pre>
<p>I think that jest deprecated toBeVisible(), i saw the document and i didn't find a replacement.
Someone know how can i replace it ?</p>
",https://stackoverflow.com/questions/63700492/replacement-to-tobevisible-in-jest,"['react-native', 'jestjs', 'detox']",4105,False,0,0
Why I get an error when I run an e2e test using protractor with waitForAngularEnabled(true),"<p>I'm using protractor for e2e testing my angular app. For the login page I set waitForAngularEnabled(false) and afterwards I set it to waitForAngularEnabled(true). But my tests are failing with this error:</p>
<pre><code> Failed: script timeout
          (Session info: chrome=85.0.4183.83)
          (Driver info: chromedriver=85.0.4183.38 (9047dbc2c693f044042bbec5c91401c708c7c26a-refs/branch-heads/4183@{#779}),platform=Windows NT 10.0.18362 x86_64)
          (Session info: chrome=85.0.4183.83)
          (Driver info: chromedriver=85.0.4183.38 (9047dbc2c693f044042bbec5c91401c708c7c26a-refs/branch-heads/4183@{#779}),platform=Windows NT 10.0.18362 x86_64)
            at Object.checkLegacyResponse (....node_modules\selenium-webdriver\lib\error.js:546:15)
            at parseHttpResponse (....node_modules\selenium-webdriver\lib\http.js:509:13)
            at doSend.then.response (....node_modules\selenium-webdriver\lib\http.js:441:30)
            at process._tickCallback (internal/process/next_tick.js:68:7)
        From: Task: Protractor.waitForAngular() - Locator: By(css selector, body)
</code></pre>
<p>When I google for it I find a lot of posts suggesting I should set synchronization off or set waitForAngularEnabled to false. But then I loose this functionality.</p>
<p>Someone has an idea how to fix this?</p>
",https://stackoverflow.com/questions/63722668/why-i-get-an-error-when-i-run-an-e2e-test-using-protractor-with-waitforangularen,"['angular', 'protractor', 'angular9']",263,False,0,1
How to pass query params of a request url while mocking with Request Hooks in Testcafe?,"<p>My request url has multiple query params. I want to mock the response of the external API while writing my tests in Testcafe. I want to mock the data in E2E testing because my data will expire in every 15days.
Please suggest some ways to handle mocking the request with query param. I am able to mock the request not having any query param and I am using Request Hooks for that.</p>
",https://stackoverflow.com/questions/62382355/how-to-pass-query-params-of-a-request-url-while-mocking-with-request-hooks-in-te,"['testing', 'automation', 'mocking', 'automated-tests', 'testcafe']",2415,True,0,1
"Cypress 4.4.0 - How to use cy.clock(), cy.tick() in simple login in order to work","<p>using v 4.4.0 Cypress E2E testing framework. Trying a simple test just to log in into the webshop as customer, and to check, if he is logged off after 1 hour. Cookies are also set for 1h in webshop. </p>

<p>The user is still not logged off.</p>

<p>I have managed to make simple script:</p>

<pre><code> context('Secure logging off', () =&gt; {
  beforeEach(() =&gt; {
    cy.loginAsGrownupCustomer()
    cy.fixture('products').as('products')
  })

  it('after inactivity', function () {
    const { simpleProduct } = this.products
    const waitSeconds = 4000;
    const waitMilliseconds = waitSeconds * 1000;
    const buffer = 1000;
    cy.clock();
    cy.visit('/');
    cy.tick(waitMilliseconds + buffer);
    cy.get('[data-qa=""logout warning""]').should('be.visible');
  });
})
</code></pre>

<p>Tried also to extend time <code>const waitSeconds = 4000;</code> for thousands of seconds but still no luck, user is still in logged in status.</p>
",https://stackoverflow.com/questions/61358332/cypress-4-4-0-how-to-use-cy-clock-cy-tick-in-simple-login-in-order-to-wor,"['testing', 'cypress', 'e2e-testing']",476,False,0,0
Cypress integration testing with amazon cognito,"<p>I am trying to create an e2e testing for our client app which uses amazon cognito for login. I am trying to follow the aws documentation on logging in. I am getting a network error. I am not sure if this is the right way. I am getting a network error because probably it's passing thru our VPN. How should I resolve this using the aws library? Below is the sample code I used which I got from AWS documentation.</p>
<pre><code>var authenticationData = {
        Username : 'username',
        Password : 'password',
    };
    var authenticationDetails = new AmazonCognitoIdentity.AuthenticationDetails(authenticationData);
    var poolData = { UserPoolId : 'us-east-1_ExaMPle',
        ClientId : '1example23456789'
    };
    var userPool = new AmazonCognitoIdentity.CognitoUserPool(poolData);
    var userData = {
        Username : 'username',
        Pool : userPool
    };
    var cognitoUser = new AmazonCognitoIdentity.CognitoUser(userData);
    cognitoUser.authenticateUser(authenticationDetails, {
        onSuccess: function (result) {
            var accessToken = result.getAccessToken().getJwtToken();

            /* Use the idToken for Logins Map when Federating User Pools with identity pools or when passing through an Authorization Header to an API Gateway Authorizer */
            var idToken = result.idToken.jwtToken;
        },

        onFailure: function(err) {
            alert(err);
        },

});
</code></pre>
",https://stackoverflow.com/questions/62717370/cypress-integration-testing-with-amazon-cognito,"['amazon-cognito', 'cypress']",2537,True,5,2
How to use Android flavors to make a build for detox testing with higher minSdkVersion - - React-Native,"<p>I want to use Detox for React-native e2e testing which requires minSdkVersion of 18, but my app is on 16. I'm not yet ready to upgrade to 18 for my app, so i want to use android flavors to make one build for detox testing and another for production.
here is what i've done so far :
in app/build.gradle :</p>

<pre><code>flavorDimensions ""version""
    productFlavors {
        detox {
            // Assigns this product flavor to the ""version"" flavor dimension.
            // If you are using only one dimension, this property is optional,
            // and the plugin automatically assigns all the module's flavors to
            // that dimension.
            dimension ""version""
            versionNameSuffix ""-detox""
            minSdkVersion 18
        }
        prod {
            dimension ""version""
            versionNameSuffix ""-prod""
            minSdkVersion 16
        }
    }

</code></pre>

<p>Now in android studio i have 4 build variants : detoxDebug is synchronising ok but productionDebug gives this error:</p>

<p><a href=""https://i.stack.imgur.com/JKHwp.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/JKHwp.png"" alt=""enter image description here""></a></p>

<p><strong>THANKS!</strong></p>
",https://stackoverflow.com/questions/59771684/how-to-use-android-flavors-to-make-a-build-for-detox-testing-with-higher-minsdkv,"['android', 'react-native', 'build.gradle', 'detox', 'android-flavors']",453,False,1,0
How do I find the source of Android/Gradle &quot;out of memory&quot; errors?,"<p>I'm trying to get a React Native app to build, using Detox for e2e testing, and am getting <code>java.lang.OutOfMemoryError (no error message)</code>. The app builds fine if Detox is out of the equation. I'm on a macbook pro w/ 16GB RAM.</p>
<ul>
<li>multiDex is enabled</li>
<li>javaMaxHeapSize is 16g in my app build.gradle</li>
<li>I have <code>JVM_ARGS=&quot;-Xmx2048m -XX:MaxPermSize=512m&quot;</code> in my shell</li>
</ul>
<p>I'm new to Android, and the only documentation I can find about memory leaks assumes you're able to build the app and profile it.</p>
",https://stackoverflow.com/questions/62643644/how-do-i-find-the-source-of-android-gradle-out-of-memory-errors,"['android', 'react-native', 'detox']",219,False,0,0
Use specific flash player version in browser in cypress CI E2E,"<p>I'm working with Cypress for E2E testing. I Wrote a test for a site that works with flash player 11.2 and above. My tests work fine and pass in my device browser but fail on CI because instead of expected page another page shows up that says you should use flash player 11.2 or above.
Can I set flash player version for chrome in cypress? If not can I install it? Or use Docker image?</p>
<p>Cypress:    <code>5.0.0</code><br />
Browser:    <code>Chrome 85</code></p>
<p><a href=""https://i.stack.imgur.com/SiXpO.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/SiXpO.png"" alt=""enter image description here"" /></a></p>
",https://stackoverflow.com/questions/64205303/use-specific-flash-player-version-in-browser-in-cypress-ci-e2e,"['cypress', 'e2e-testing']",69,False,0,0
How to set state or dispatch actions from a navigator (ex : cypress testing),"<p>A good practice given by Cypress (e2e testing) is to set the state of the app programmatically rather than using the UI. This of course makes sense.</p>

<p>On this video <a href=""https://www.youtube.com/watch?v=5XQOK0v_YRE"" rel=""nofollow noreferrer"">https://www.youtube.com/watch?v=5XQOK0v_YRE</a> Brian Mann propose this solution to expose a Redux store :</p>

<p><a href=""https://i.stack.imgur.com/Kj3Hf.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/Kj3Hf.png"" alt=""Expose store""></a></p>

<p>Is there any possibility with NGXS to have access to the different state programmatically during testing ?  An example is for the login process : dispatching directly a Login action or setting the store with the access token, to be logged in before any test, would be nice.</p>
",https://stackoverflow.com/questions/61681954/how-to-set-state-or-dispatch-actions-from-a-navigator-ex-cypress-testing,"['cypress', 'ngxs']",1255,True,5,1
"Problem with e2e testing with NestJS TestingModule, GraphQL code first and TypeOrm","<p>I'm in struggle since few days with <strong>e2e testing</strong> my <strong>NestJS</strong> application using <strong>GraphQL</strong> code first approach and <strong>TypeOrm</strong>.</p>

<p>I'm trying to create a <strong>TestingModule</strong> by injecting nestjs <strong>GraphQLModule</strong> with <em>autoSchemaFile</em> and I'm always getting the error ""<em>Schema must contain uniquely named types but contains multiple types named ...</em>"".</p>

<p>Here a reproduction of my bug with minimal code:</p>

<p><code>character.entity.ts</code>:</p>

<pre class=""lang-js prettyprint-override""><code>import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
import { ObjectType, Field, ID } from 'type-graphql';

@Entity()
@ObjectType()
export class Character {
    @PrimaryGeneratedColumn()
    @Field(() =&gt; ID)
    id: string;

    @Column({ unique: true })
    @Field()
    name: string;
}
</code></pre>

<p><code>character.resolver.ts</code>:</p>

<pre class=""lang-js prettyprint-override""><code>import { Query, Resolver } from '@nestjs/graphql';
import { Character } from './models/character.entity';
import { CharacterService } from './character.service';

@Resolver(() =&gt; Character)
export class CharacterResolver {
    constructor(private readonly characterService: CharacterService) {}

    @Query(() =&gt; [Character], { name: 'characters' })
    async getCharacters(): Promise&lt;Character[]&gt; {
        return this.characterService.findAll();
    }
}
</code></pre>

<p><code>character.module.ts</code>:</p>

<pre class=""lang-js prettyprint-override""><code>import { Module } from '@nestjs/common';
import { CharacterResolver } from './character.resolver';
import { CharacterService } from './character.service';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Character } from './models/character.entity';

@Module({
    imports: [TypeOrmModule.forFeature([Character])],
    providers: [CharacterResolver, CharacterService],
})
export class CharacterModule {}
</code></pre>

<p><code>app.module.ts</code>:</p>

<pre class=""lang-js prettyprint-override""><code>import { Module } from '@nestjs/common';
import { CharacterModule } from './character/character.module';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Connection } from 'typeorm';
import { GraphQLModule } from '@nestjs/graphql';

@Module({
    imports: [TypeOrmModule.forRoot(), GraphQLModule.forRoot({ autoSchemaFile: 'schema.gql' }), CharacterModule],
    controllers: [],
    providers: [],
})
export class AppModule {
    constructor(private readonly connection: Connection) {}
}
</code></pre>

<p>and finally: <code>character.e2e-spec.ts</code>:</p>

<pre class=""lang-js prettyprint-override""><code>import { INestApplication } from '@nestjs/common';
import { Test, TestingModule } from '@nestjs/testing';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CharacterModule } from '../src/character/character.module';
import { GraphQLModule } from '@nestjs/graphql';

describe('CharacterResolver (e2e)', () =&gt; {
    let app: INestApplication;

    beforeAll(async () =&gt; {
        const module: TestingModule = await Test.createTestingModule({
            imports: [
                TypeOrmModule.forRoot(),
                GraphQLModule.forRoot({ playground: false, autoSchemaFile: 'schema.gql' }),
                CharacterModule,
            ],
        }).compile();

        app = module.createNestApplication();
        await app.init();
    });

    it('should create testing module', () =&gt; {
        expect(1).toBe(1);
    });

    afterAll(async () =&gt; {
        await app.close();
    });
});
</code></pre>

<p>And after running <code>npm run test:e2e</code>:</p>

<pre><code>Schema must contain uniquely named types but contains multiple types named ""Character"".

      at typeMapReducer (../node_modules/graphql/type/schema.js:262:13)
          at Array.reduce (&lt;anonymous&gt;)
      at new GraphQLSchema (../node_modules/graphql/type/schema.js:145:28)
      at Function.generateFromMetadataSync (../node_modules/type-graphql/dist/schema/schema-generator.js:31:24)
      at Function.&lt;anonymous&gt; (../node_modules/type-graphql/dist/schema/schema-generator.js:16:33)
      at ../node_modules/tslib/tslib.js:110:75
      at Object.__awaiter (../node_modules/tslib/tslib.js:106:16)
      at Function.generateFromMetadata (../node_modules/type-graphql/dist/schema/schema-generator.js:15:24)
</code></pre>

<p>I don't find any other way to create a testing module with graphql code first approach on official doc or while googling... Am I missing something ?</p>
",https://stackoverflow.com/questions/59919546/problem-with-e2e-testing-with-nestjs-testingmodule-graphql-code-first-and-typeo,"['graphql', 'e2e-testing', 'nestjs']",1346,True,4,1
Protractor for Angular : Wait for HTTP requests to finish before continuing the script,"<p>When I run my E2E testing script using protractor, the thing I do is that I do many <code>browser.sleep(xxxx)</code> to wait a moment for all HTTP requests (GET, POST, PUT,...) to end, because otherwise if I don't do this protractor does not wait and I can't do and test what I want to test in my angular application.</p>

<p>So is there a way to make sure that the script will not continue until all HTTP requests are no longer in status pending ?</p>

<p>My config file :</p>

<pre><code>allScriptsTimeout: 11000,
  seleniumAddress: 'http://localhost:4444/wd/hub',
  specs: [
    './e2e/**/*.e2e-spec.ts'
  ],
  capabilities: {
    'browserName': 'firefox'
  },
  directConnect: true,
  baseUrl: 'http://localhost:4200/',
  framework: 'jasmine',
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000,
    print: function() {}
  },
  onPrepare() {
    require('ts-node').register({
      project: 'e2e/tsconfig.e2e.json'
    });
    jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
  }
</code></pre>
",https://stackoverflow.com/questions/60851852/protractor-for-angular-wait-for-http-requests-to-finish-before-continuing-the,"['angular', 'testing', 'request', 'protractor']",313,False,1,0
Detox at least 75 percent of the view&#39;s area is displayed to the user,"<p>I tried to check with detox if the element is visible with android emulator.
I scroll my page and see the element but when I check with detox if the element is visible I get this error:</p>
<pre><code> Test Failed: 'at least 75 percent of the view's area is displayed to the user.' doesn't match the selected view.
    Expected: at least 75 percent of the view's area is displayed to the user.
         Got: &quot;ReactViewGroup{id=1227, visibility=VISIBLE, width=250, height=250, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.view.ViewGroup$LayoutParams@a376217, tag=test1, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=95.0, child-count=1}&quot;
</code></pre>
<p>I tried to scroll more to put the element in the middle of the screen, but there is no difference.</p>
<pre><code>await expect(element(by.id('test1')).atIndex('2')).toBeVisible();
</code></pre>
<p>I use react-native so it's the same code.., and It works perfectly with iOS but in android, I get the Error that I mention.</p>
<p>*detox is e2e testing library for react-native that use android-espresso</p>
",https://stackoverflow.com/questions/64278482/detox-at-least-75-percent-of-the-views-area-is-displayed-to-the-user,"['android', 'react-native', 'android-espresso', 'detox']",3221,False,5,2
How to Allow Mac Screen Recording for Github Action (Testcafe),"<p>I'm trying to set up e2e testing for an Electron app in GitHub Actions.</p>

<p>We've had this working with Travis for a while (I haven't been able to find what Travis does to deal with this). But the GitHub action is just halting at the request for screen recording permission prompt (which we cannot deal with as on CI).</p>

<pre><code>TestCafe requires permission to record the screen. Open 'System Preferences &gt; Security &amp; Privacy &gt; Privacy &gt; Screen Recording' and check 'TestCafe Browser Tools' in the application list.

Press any key to retry.
ERROR UnableToAccessScreenRecordingAPIError: The find-window process cannot access the Screen Recording API.
    at runFindWindowBinary (/Users/runner/runners/2.165.2/work/safe-network-app/safe-network-app/node_modules/testcafe-browser-tools/src/api/find-window.js:29:19)
</code></pre>

<p>Anyone successfully managed to get a GitHub Action running on mac for this?</p>

<p>Some large and varied googling hasn't turned up anything of much use thus far.</p>

<p>Any help/pointers would be massively appreciated.</p>
",https://stackoverflow.com/questions/60864013/how-to-allow-mac-screen-recording-for-github-action-testcafe,"['macos', 'continuous-integration', 'electron', 'testcafe', 'github-actions']",1291,True,3,1
Ionic 3 - App stuck on splashscreen. Starts running once I make a change and refreshes while emulating (iOS),"<p>Have an Ionic 3 app, that gets stuck on splash screen when I'm emulating on iOS. Funny thing, if I add a space to a ts file, it refreshes and starts working.</p>
<p><a href=""https://i.stack.imgur.com/CGSqb.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/CGSqb.png"" alt=""enter image description here"" /></a></p>
<p>This is messing up my E2E testing with Appium, so I'm wondering if anyone has a better idea of what might be causing this behaviour.</p>
<p>I'm leaving here all package.json dependencies, in case that helps:</p>
<pre><code>&quot;dependencies&quot;: {
&quot;@angular/animations&quot;: &quot;^4.0.0&quot;,
&quot;@angular/cdk&quot;: &quot;^2.0.0-beta.12&quot;,
&quot;@angular/common&quot;: &quot;5.0.0&quot;,
&quot;@angular/compiler&quot;: &quot;5.0.0&quot;,
&quot;@angular/compiler-cli&quot;: &quot;5.0.0&quot;,
&quot;@angular/core&quot;: &quot;5.0.0&quot;,
&quot;@angular/forms&quot;: &quot;^5.0.0&quot;,
&quot;@angular/http&quot;: &quot;5.0.0&quot;,
&quot;@angular/platform-browser&quot;: &quot;5.0.0&quot;,
&quot;@angular/platform-browser-dynamic&quot;: &quot;5.0.0&quot;,
&quot;@ionic-native/aes-256&quot;: &quot;^4.20.0&quot;,
&quot;@ionic-native/battery-status&quot;: &quot;^4.9.0&quot;,
&quot;@ionic-native/core&quot;: &quot;^4.10.1&quot;,
&quot;@ionic-native/device&quot;: &quot;^4.17.0&quot;,
&quot;@ionic-native/dialogs&quot;: &quot;^4.9.0&quot;,
&quot;@ionic-native/file&quot;: &quot;^4.9.0&quot;,
&quot;@ionic-native/file-chooser&quot;: &quot;^4.10.0&quot;,
&quot;@ionic-native/file-path&quot;: &quot;^4.10.0&quot;,
&quot;@ionic-native/file-transfer&quot;: &quot;^4.20.0&quot;,
&quot;@ionic-native/http&quot;: &quot;^4.10.0&quot;,
&quot;@ionic-native/insomnia&quot;: &quot;^4.9.2&quot;,
&quot;@ionic-native/keyboard&quot;: &quot;^4.15.0&quot;,
&quot;@ionic-native/local-notifications&quot;: &quot;^4.9.0&quot;,
&quot;@ionic-native/media&quot;: &quot;^4.9.0&quot;,
&quot;@ionic-native/network&quot;: &quot;^4.17.0&quot;,
&quot;@ionic-native/power-management&quot;: &quot;^4.9.2&quot;,
&quot;@ionic-native/pro&quot;: &quot;^4.9.2&quot;,
&quot;@ionic-native/screen-orientation&quot;: &quot;^4.20.0&quot;,
&quot;@ionic-native/splash-screen&quot;: &quot;4.3.2&quot;,
&quot;@ionic-native/status-bar&quot;: &quot;4.3.2&quot;,
&quot;@ionic/pro&quot;: &quot;^2.0.3&quot;,
&quot;@ionic/storage&quot;: &quot;2.1.3&quot;,
&quot;@types/crypto-js&quot;: &quot;^3.1.43&quot;,
&quot;awesome&quot;: &quot;0.0.7&quot;,
&quot;bootstrap&quot;: &quot;^4.0.0-beta.2&quot;,
&quot;cordova-ios&quot;: &quot;5.0.0&quot;,
&quot;cordova-plugin-advanced-http&quot;: &quot;^1.11.1&quot;,
&quot;cordova-plugin-android-permissions&quot;: &quot;^1.0.0&quot;,
&quot;cordova-plugin-background-upload&quot;: &quot;^1.0.12&quot;,
&quot;cordova-plugin-badge&quot;: &quot;0.8.8&quot;,
&quot;cordova-plugin-battery-status&quot;: &quot;^2.0.2&quot;,
&quot;cordova-plugin-device&quot;: &quot;^2.0.2&quot;,
&quot;cordova-plugin-dialogs&quot;: &quot;^2.0.1&quot;,
&quot;cordova-plugin-file&quot;: &quot;^6.0.1&quot;,
&quot;cordova-plugin-file-transfer&quot;: &quot;^1.7.1&quot;,
&quot;cordova-plugin-filechooser&quot;: &quot;^1.2.0&quot;,
&quot;cordova-plugin-filepath&quot;: &quot;^1.5.1&quot;,
&quot;cordova-plugin-insomnia&quot;: &quot;^4.3.0&quot;,
&quot;cordova-plugin-ionic&quot;: &quot;^5.3.0&quot;,
&quot;cordova-plugin-ionic-keyboard&quot;: &quot;^2.1.3&quot;,
&quot;cordova-plugin-ionic-webview&quot;: &quot;^2.3.1&quot;,
&quot;cordova-plugin-ios-camera-permissions&quot;: &quot;^1.2.0&quot;,
&quot;cordova-plugin-ios-disableshaketoedit&quot;: &quot;^1.0.0&quot;,
&quot;cordova-plugin-itunesfilesharing&quot;: &quot;0.0.1&quot;,
&quot;cordova-plugin-local-notification&quot;: &quot;0.9.0-beta.2&quot;,
&quot;cordova-plugin-media&quot;: &quot;^5.0.2&quot;,
&quot;cordova-plugin-network-information&quot;: &quot;^2.0.1&quot;,
&quot;cordova-plugin-powermanagement-orig&quot;: &quot;^1.1.2&quot;,
&quot;cordova-plugin-screen-orientation&quot;: &quot;^3.0.1&quot;,
&quot;cordova-plugin-splashscreen&quot;: &quot;^5.0.2&quot;,
&quot;cordova-plugin-statusbar&quot;: &quot;^2.4.2&quot;,
&quot;cordova-plugin-whitelist&quot;: &quot;^1.3.3&quot;,
&quot;crypto-js&quot;: &quot;^3.1.9-1&quot;,
&quot;es6-promise-plugin&quot;: &quot;^4.2.2&quot;,
&quot;font-awesome&quot;: &quot;4.7.0&quot;,
&quot;hammerjs&quot;: &quot;^2.0.8&quot;,
&quot;ionic-angular&quot;: &quot;3.9.2&quot;,
&quot;ionic-native-datepicker&quot;: &quot;^1.0.5&quot;,
&quot;ionicons&quot;: &quot;3.0.0&quot;,
&quot;ios-sim&quot;: &quot;^8.0.2&quot;,
&quot;jquery&quot;: &quot;3.3.1&quot;,
&quot;jwt-decode&quot;: &quot;^2.2.0&quot;,
&quot;ngx-dropdown-list&quot;: &quot;^1.1.1&quot;,
&quot;ngx-infinite-scroll&quot;: &quot;^0.8.3&quot;,
&quot;ngx-pagination&quot;: &quot;^4.1.0&quot;,
&quot;ngx-select-dropdown&quot;: &quot;^1.0.1&quot;,
&quot;node-sass&quot;: &quot;4.9.0&quot;,
&quot;rxjs&quot;: &quot;5.5.2&quot;,
&quot;sw-toolbox&quot;: &quot;3.6.0&quot;,
&quot;web-animations-js&quot;: &quot;^2.3.1&quot;,
&quot;zone.js&quot;: &quot;0.8.18&quot;
},
&quot;devDependencies&quot;: {
    &quot;@angular/cli&quot;: &quot;^1.5.0&quot;,
    &quot;@angular/router&quot;: &quot;^4.4.6&quot;,
    &quot;@ionic/app-scripts&quot;: &quot;^3.2.4&quot;,
    &quot;@types/jasmine&quot;: &quot;^2.6.3&quot;,
    &quot;@wdio/appium-service&quot;: &quot;^6.4.0&quot;,
    &quot;@wdio/cli&quot;: &quot;^6.4.2&quot;,
    &quot;@wdio/local-runner&quot;: &quot;^6.4.2&quot;,
    &quot;@wdio/mocha-framework&quot;: &quot;^6.4.0&quot;,
    &quot;@wdio/selenium-standalone-service&quot;: &quot;^6.4.0&quot;,
    &quot;@wdio/spec-reporter&quot;: &quot;^6.4.0&quot;,
    &quot;@wdio/sync&quot;: &quot;^6.4.0&quot;,
    &quot;appium&quot;: &quot;^1.18.1&quot;,
    &quot;appium-doctor&quot;: &quot;^1.15.3&quot;,
    &quot;chromedriver&quot;: &quot;^84.0.1&quot;,
    &quot;ionic-mocks&quot;: &quot;^0.13.0&quot;,
    &quot;jasmine-core&quot;: &quot;^2.8.0&quot;,
    &quot;jasmine-spec-reporter&quot;: &quot;^4.2.1&quot;,
    &quot;karma&quot;: &quot;^1.7.1&quot;,
    &quot;karma-chrome-launcher&quot;: &quot;^2.2.0&quot;,
    &quot;karma-cli&quot;: &quot;^1.0.1&quot;,
    &quot;karma-coverage-istanbul-reporter&quot;: &quot;^1.3.0&quot;,
    &quot;karma-jasmine&quot;: &quot;^1.1.0&quot;,
    &quot;karma-jasmine-html-reporter&quot;: &quot;^0.2.2&quot;,
    &quot;karma-junit-reporter&quot;: &quot;^1.2.0&quot;,
    &quot;protractor&quot;: &quot;^5.1.2&quot;,
    &quot;sass-loader&quot;: &quot;^6.0.7&quot;,
    &quot;ts-node&quot;: &quot;^3.3.0&quot;,
    &quot;tslint-eslint-rules&quot;: &quot;^4.1.1&quot;,
    &quot;typescript&quot;: &quot;^2.4.2&quot;,
    &quot;wdio-appium-service&quot;: &quot;^0.2.3&quot;,
    &quot;wdio-chromedriver-service&quot;: &quot;^6.0.3&quot;,
    &quot;wdio-jasmine-framework&quot;: &quot;^0.3.8&quot;,
    &quot;wdio-mochawesome-reporter&quot;: &quot;^4.0.0&quot;,
    &quot;wdio-spec-reporter&quot;: &quot;^0.1.5&quot;,
    &quot;webdriverio&quot;: &quot;^6.4.2&quot;,
    &quot;ws&quot;: &quot;3.3.2&quot;
  },
</code></pre>
<hr />
<p>BTW, already tried the following:</p>
<ul>
<li><p>Removing platform and building again</p>
<pre><code> ionic cordova platform rm ios
 ionic cordova platform add ios@5.0.0
 ionic cordova emulate ios -lc --target iPad--6th-generation- 
</code></pre>
</li>
<li><p>When preparing/building I have a different issue:</p>
<pre><code> ionic-app-script task: &quot;build&quot; 
 Error: Failed to transpile program 
 at new BuildError ([...]/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
</code></pre>
</li>
</ul>
",https://stackoverflow.com/questions/63630943/ionic-3-app-stuck-on-splashscreen-starts-running-once-i-make-a-change-and-ref,"['ios', 'angular', 'ionic-framework']",82,True,0,2
Check for dynamic elements in cypress,"<p>I am trying to use cypress to perform e2e testing. I am trying to check for a modal that is opened dynamically. Because it is being displayed dynamically I need cypress to check if the element is present before performing the test. I tried :</p>

<pre><code>cy.get('.modal.show').then(($body) =&gt; {
    //perform checks
});
</code></pre>

<p>but I get the error <em>Timed out retrying: Expected to find element: .modal.show, but never found it.</em></p>

<p>Is there a way to tell cypress to check for an element before performing the rest of the tests?
The <em>.show</em> class is only added when the modal is visible.</p>
",https://stackoverflow.com/questions/61960998/check-for-dynamic-elements-in-cypress,['cypress'],952,False,1,0
How to create Traffic Mirroring of a Load Balancer for a Window of Time?,"<p>I have a pipeline where the front end is a load balancer, taking in a json payload. I want to set up a traffic mirror of the json payload on a one time basis for a window of 4-6 hours. The current pipeline is completely on AWS. The final goal is to load this windowed payload into an S3 bucket for E2E testing purposes.</p>
<p>Does anyone know a method for traffic mirroring during a one time window?</p>
<p>I'm quite new to this field, so any resources you can point me to would be great.</p>
",https://stackoverflow.com/questions/63599985/how-to-create-traffic-mirroring-of-a-load-balancer-for-a-window-of-time,"['amazon-web-services', 'etl', 'load-balancing', 'pipeline', 'amazon-elb']",277,False,1,0
Protractor &amp; Angular 8: Set localStorage before Angular app runs?,"<p>I have some E2E testing requirements where I need to mock some data through localStorage, but I'm having a hard time getting localStorage set before Angular runs. The app eventually does see the localStorage item I set, but only after Angular is well into running component code and making HTTP requests. Here is what I have tried:</p>
<pre><code>beforeAll(() =&gt; {
  // Attempt #1
  browser.get('/');
  browser.executeScript(`window.localStorage.setItem('foo', 'bar');`);

  // Attempt #2
  browser.get('/').then(() =&gt; {
    return browser.executeScript(`window.localStorage.setItem('foo', 'bar');`);
  });
});
</code></pre>
<p>Does Protractor have some other mechanism to accomplish this? Or maybe some other creative way of injecting data into an Angular app before it loads on a per-spec (or browser.get) basis? Thanks!</p>
",https://stackoverflow.com/questions/63346637/protractor-angular-8-set-localstorage-before-angular-app-runs,"['protractor', 'angular8']",158,False,0,1
Detox can&#39;t find custom component that has been given testId,"<p>I am trying to implement e2e testing on my React Native app. </p>

<p>Detox builds succeed on both Android and iOS and I have managed to get mocks working as expected, but detox can't seem to locate any of the components on the page I want to test. All of the components I am trying to locate have a testId, and when I try to test on both Android and iOS the ids are present in the view hierarchy. </p>

<p>This is the error I am receiving on android:</p>

<pre><code>androidx.test.espresso.base.DefaultFailureHandler$AssertionFailedWithCauseError: 'at least 75 percent of the view's area is displayed to the user.' doesn't match the selected view.
    Expected: at least 75 percent of the view's area is displayed to the user.
         Got: null

        at dalvik.system.VMStack.getThreadStackTrace(Native Method)
        at java.lang.Thread.getStackTrace(Thread.java:1538)
        at androidx.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:96)
        at androidx.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:59)
        at androidx.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:324)
        at androidx.test.espresso.ViewInteraction.check(ViewInteraction.java:306)
        at com.wix.detox.espresso.DetoxAssertion.assertMatcher(DetoxAssertion.java:32)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.commons.lang3.reflect.MethodUtils.invokeStaticMethod(MethodUtils.java:443)
        at org.apache.commons.lang3.reflect.MethodUtils.invokeStaticMethod(MethodUtils.java:405)
        at com.wix.invoke.types.ClassTarget.execute(ClassTarget.java:23)
        at com.wix.invoke.types.Target.invoke(Target.java:59)
        at com.wix.invoke.MethodInvocation.invoke(MethodInvocation.java:35)
        at com.wix.invoke.MethodInvocation.invoke(MethodInvocation.java:26)
        at com.wix.invoke.MethodInvocation.invoke(MethodInvocation.java:20)
        at com.wix.detox.InvokeActionHandler.handle(DetoxActionHandlers.kt:52)
        at com.wix.detox.DetoxManager$4.run(DetoxManager.java:121)
        at android.os.Handler.handleCallback(Handler.java:790)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at com.wix.detox.Detox$1.run(Detox.java:135)
        at java.lang.Thread.run(Thread.java:764)
    Caused by: junit.framework.AssertionFailedError: 'at least 75 percent of the view's area is displayed to the user.' doesn't match the selected view.
    Expected: at least 75 percent of the view's area is displayed to the user.
         Got: null

        at androidx.test.espresso.matcher.ViewMatchers.assertThat(ViewMatchers.java:540)
        at com.wix.detox.espresso.assertion.ViewAssertions$MatchesViewAssertion.check(ViewAssertions.java:52)
        at androidx.test.espresso.ViewInteraction$SingleExecutionViewAssertion.check(ViewInteraction.java:425)
        at androidx.test.espresso.ViewInteraction$2.call(ViewInteraction.java:288)
        at androidx.test.espresso.ViewInteraction$2.call(ViewInteraction.java:272)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at android.os.Handler.handleCallback(Handler.java:790)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

    Check device logs for full details!

       9 | 
      10 |   it('should have physiotherapy button', async () =&gt; {
    &gt; 11 |     await expect(element(by.id('Physiotherapy button'))).toBeVisible();
         |                                                             ^
      12 |   });
      13 | 
      14 |   it('should have reminders button', async () =&gt; {

      at Client.execute (../node_modules/detox/src/client/Client.js:92:28)
      at InvocationManager.execute (../node_modules/detox/src/invoke.js:11:39)
      at MatcherAssertionInteraction.execute (../node_modules/detox/src/android/expect.js:128:35)
      at ExpectElement.toBeVisible (../node_modules/detox/src/android/expect.js:275:112)
      at _callee3$ (dashboard.spec.js:11:61)
      at tryCatch (../node_modules/regenerator-runtime/runtime.js:45:40)
      at Generator.invoke [as _invoke] (../node_modules/regenerator-runtime/runtime.js:271:22)
      at Generator.prototype.&lt;computed&gt; [as next] (../node_modules/regenerator-runtime/runtime.js:97:21)
      at tryCatch (../node_modules/regenerator-runtime/runtime.js:45:40)
      at invoke (../node_modules/regenerator-runtime/runtime.js:135:20)
      at ../node_modules/regenerator-runtime/runtime.js:170:11
      at callInvokeWithMethodAndArg (../node_modules/regenerator-runtime/runtime.js:169:16)
      at AsyncIterator.enqueue (../node_modules/regenerator-runtime/runtime.js:192:13)
      at AsyncIterator.prototype.&lt;computed&gt; [as next] (../node_modules/regenerator-runtime/runtime.js:97:21)
      at Object.exports.async (../node_modules/regenerator-runtime/runtime.js:216:14)
</code></pre>

<p>Here is the test: </p>

<pre><code>describe('Dashboard', () =&gt; {
  beforeEach(async () =&gt; {
    await device.reloadReactNative();
  });

  it('should have physiotherapy button', async () =&gt; {
    await expect(element(by.id('Physiotherapy button'))).toBeVisible();
  });
</code></pre>

<p>and here is the component I am trying to test:</p>

<pre><code>/* Dashboard with custom buttons to navigate between pages */
import React, {Component} from 'react';
import {View, StyleSheet} from 'react-native';
import SplashScreen from 'react-native-splash-screen';
import DashboardButton from '../layout/DashboardButton';
import {connect} from 'react-redux';
import * as actions from '../../actions/index';
import {NavigationEvents} from 'react-navigation';

export class Dashboard extends Component {
  constructor(props) {
    super(props);

    // present log in page if user is not logged in
    if (props.loggedIn !== true) {
      this.login();
    }

    // show dashboard
    SplashScreen.hide();
  }

  login() {
    this.props.addDevice('testId', 'testToken');
    this.props.loginUser('testId', 'testToken');
    this.props.loadInitialReminders();
    this.props.loadInitialDiaryEntries();
  }

  render() {
    return (
      &lt;View testId={'Dashboard'} accessible={true} style={styles.mainContainer}&gt;
        &lt;NavigationEvents
          onDidFocus={() =&gt; {
            if (this.props.loggedIn !== true) {
              this.login();
            }
          }}
        /&gt;

        &lt;DashboardButton
          testId={'Physiotherapy button'}
          accessibilityLabel={'Physiotherapy button'}
          accessibilityHint={
            'Navigates to the Physiotherapy exercise categories screen'
          }
          disabled={!this.props.loggedIn}
          title=""PHYSIOTHERAPY""
          customClick={() =&gt;
            this.props.navigation.navigate('PhysiotherapyExerciseCategories')
          }
        /&gt;
        &lt;DashboardButton
          testId={'Reminders button'}
          accessibilityLabel={'Reminders button'}
          accessibilityHint={'Navigates to the Reminders screen'}
          disabled={!this.props.loggedIn}
          title=""REMINDERS""
          customClick={() =&gt; this.props.navigation.navigate('Reminders')}
        /&gt;
        &lt;DashboardButton
          testId={'Diary button'}
          accessibilityLabel={'Diary button'}
          accessibilityHint={'Navigates to the Diary screen'}
          disabled={!this.props.loggedIn}
          title=""DIARY""
          customClick={() =&gt; this.props.navigation.navigate('Diary')}
        /&gt;
      &lt;/View&gt;
    );
  }
}

const mapStateToProps = state =&gt; {
  return {
    loggedIn: state.authorisationReducer.loggedIn,
    reminders: state.remindersReducer.reminders,
    notificationsSet: state.remindersReducer.notificationsSet,
  };
};

export default connect(
  mapStateToProps,
  actions,
)(Dashboard);

const styles = StyleSheet.create({
  mainContainer: {
    flex: 1,
    backgroundColor: 'white',
    flexDirection: 'column',
  },
});
</code></pre>

<p>As you can see I am looking for a custom component but that is simply wrapped around a TouchableOpacity which has the prop testId={props.testId}. I have also tried giving the main view in the Dashboard component an ID and searching for that, but still no luck.</p>

<p>I have tried searching by label and by id. </p>

<p>I also read that it could be a react native issue as they nest components so detox won't be able to find the component. Is this the case? Here's my package.json file to show you the versions I am using:</p>

<pre><code>{
  ""name"": ""XXX"",
  ""version"": ""1.0.0"",
  ""private"": true,
  ""description"": ""XXX"",
  ""author"": ""XXX"",
  ""scripts"": {
    ""android"": ""react-native run-android"",
    ""ios"": ""react-native run-ios"",
    ""start"": ""react-native start"",
    ""test"": ""jest"",
    ""lint"": ""eslint .""
  },
  ""dependencies"": {
    ""@bam.tech/react-native-make"": ""^1.0.3"",
    ""@fortawesome/fontawesome-svg-core"": ""^1.2.25"",
    ""@fortawesome/free-solid-svg-icons"": ""^5.11.2"",
    ""@fortawesome/react-native-fontawesome"": ""^0.1.0"",
    ""@react-native-community/async-storage"": ""^1.8.1"",
    ""@react-native-community/cli"": ""^4.0.0"",
    ""@react-native-community/cli-platform-android"": ""^4.6.3"",
    ""@react-native-community/datetimepicker"": ""^2.2.1"",
    ""@react-native-community/netinfo"": ""^5.5.1"",
    ""axios"": ""^0.18.1"",
    ""bcryptjs"": ""^2.4.3"",
    ""body-parser"": ""^1.19.0"",
    ""classnames"": ""^2.2.6"",
    ""concurrently"": ""^4.1.2"",
    ""enzyme-adapter-react-16"": ""^1.15.2"",
    ""express"": ""^4.17.1"",
    ""is-empty"": ""^1.2.0"",
    ""jetifier"": ""^1.6.5"",
    ""jsonwebtoken"": ""^8.5.1"",
    ""jwt-decode"": ""^2.2.0"",
    ""lodash.uniqueid"": ""^4.0.1"",
    ""moment"": ""^2.24.0"",
    ""mongoose"": ""^5.7.12"",
    ""node-schedule"": ""^1.3.2"",
    ""passport"": ""^0.4.0"",
    ""passport-jwt"": ""^4.0.0"",
    ""react"": ""16.9.0"",
    ""react-dom"": ""^16.12.0"",
    ""react-native"": ""0.61.5"",
    ""react-native-auth0"": ""^2.3.0"",
    ""react-native-base64"": ""0.0.2"",
    ""react-native-elements"": ""^1.2.7"",
    ""react-native-firebase"": ""^5.6.0"",
    ""react-native-gesture-handler"": ""^1.5.0"",
    ""react-native-modal"": ""^11.5.4"",
    ""react-native-modal-selector"": ""^1.1.5"",
    ""react-native-paper"": ""^3.2.1"",
    ""react-native-render-html"": ""^4.2.0"",
    ""react-native-screens"": ""^2.0.0-beta.2"",
    ""react-native-splash-screen"": ""^3.0.6"",
    ""react-native-svg"": ""^11.0.1"",
    ""react-native-uuid-generator"": ""^6.1.1"",
    ""react-native-vector-icons"": ""^6.6.0"",
    ""react-native-webview"": ""^8.1.2"",
    ""react-navigation"": ""^4.0.10"",
    ""react-navigation-stack"": ""^1.10.3"",
    ""react-redux"": ""^5.1.2"",
    ""react-router-dom"": ""^4.3.1"",
    ""react-scripts"": ""^3.3.0"",
    ""redux"": ""^4.0.4"",
    ""redux-thunk"": ""^2.3.0"",
    ""serialize-javascript"": ""^2.1.2"",
    ""typescript"": ""^3.7.2"",
    ""validator"": ""^10.11.0"",
    ""xss"": ""^1.0.6""
  },
  ""devDependencies"": {
    ""@babel/core"": ""^7.6.2"",
    ""@babel/preset-env"": ""^7.1.0"",
    ""@babel/preset-flow"": ""^7.8.3"",
    ""@babel/preset-react"": ""^7.0.0"",
    ""@babel/runtime"": ""^7.6.2"",
    ""@bam.tech/react-native-make"": ""^1.0.3"",
    ""@react-native-community/eslint-config"": ""^0.0.5"",
    ""babel-jest"": ""^24.9.0"",
    ""detox"": ""^16.1.1"",
    ""dotenv-webpack"": ""^1.7.0"",
    ""enzyme"": ""^3.11.0"",
    ""eslint"": ""^6.5.1"",
    ""jest"": ""^25.3.0"",
    ""metro-react-native-babel-preset"": ""^0.56.0"",
    ""nodemon"": ""^2.0.0"",
    ""react-test-renderer"": ""16.9.0"",
    ""redux-mock-store"": ""^1.5.4""
  },
  ""jest"": {
    ""preset"": ""react-native"",
    ""setupFiles"": [
      ""./node_modules/react-native-gesture-handler/jestSetup.js"",
      ""./node_modules/react-test-renderer/cjs/react-test-renderer.development.js""
    ],
    ""setupFilesAfterEnv"": [
      ""./__mocks__/async-storage.js"",
      ""./__mocks__/auth0.js"",
      ""./__mocks__/firebase.js"",
      ""./__mocks__/net-info.js"",
      ""./__mocks__/react-native-navigation.js"",
      ""./__mocks__/react-native-splash-screen.js""
    ],
    ""transformIgnorePatterns"": [
      ""./node_modules/?!(react-navigation|react-native-gesture-handler)""
    ]
  },
  ""detox"": {
    ""configurations"": {
      ""ios.sim.debug"": {
        ""binaryPath"": ""ios/build/Build/Products/Debug-iphonesimulator/Tulip.app"",
        ""build"": ""RN_SRC_EXT=e2e.js xcodebuild -workspace ios/clean.xcworkspace -scheme Tulip -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build"",
        ""type"": ""ios.simulator"",
        ""device"": {
          ""type"": ""iPhone 11 Pro""
        }
      },
      ""android.emu.debug"": {
        ""binaryPath"": ""android/app/build/outputs/apk/debug/app-debug.apk"",
        ""build"": ""RN_SRC_EXT=e2e.js cd android &amp;&amp; ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug &amp;&amp; cd .."",
        ""type"": ""android.emulator"",
        ""device"": {
          ""avdName"": ""Pixel_2_XL_API_27""
        }
      },
      ""android.emu.release"": {
        ""binaryPath"": ""android/app/build/outputs/apk/release/app-release.apk"",
        ""build"": ""RN_SRC_EXT=e2e.js cd android &amp;&amp; ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release &amp;&amp; cd .."",
        ""type"": ""android.emulator"",
        ""device"": {
          ""avdName"": ""Pixel_2_XL_API_27""
        }
      }
    },
    ""test-runner"": ""jest""
  }
}
</code></pre>

<p>If you know a way around this or an alternate approach to e2e testing, please let me know. Thank you in advance for your help. </p>
",https://stackoverflow.com/questions/61141102/detox-cant-find-custom-component-that-has-been-given-testid,"['javascript', 'react-native', 'jestjs', 'enzyme', 'detox']",2788,False,-1,1
nestjs mock imported module,"<p>I'm trying to test my <code>AuthModule</code> controller <strong>HTTP layer</strong> with <code>supertest</code> as described in the official <a href=""https://docs.nestjs.com/fundamentals/testing#end-to-end-testing"" rel=""noreferrer"">Nestjs documentation</a>. This module uses an <code>EmailService</code> imported from an <code>EmailModule</code>.</p>

<p>I know you can override providers as follows:</p>

<pre class=""lang-js prettyprint-override""><code>const moduleFixture: TestingModule = await Test.createTestingModule({
      imports: [
        AuthModule,
      ],
    })
      .overrideProvider(EmailService)
      .useValue(buildMock(EmailService))
</code></pre>

<p>but this doesn't work, I'm assuming because the <code>EmailModule</code> is imported in the <code>AuthModule</code>. A workaround is to <code>.overrideProvider(...).useValue(...)</code> every provider in the <code>EmailModule</code>, but this non sense as I'd then have to also mock modules imported by the <code>EmailModule</code>.</p>

<p>When I'm e2e testing the <code>AuthModule</code>, I honestly don't care about how the <code>EmailModule</code> works. All I should need to mock is the <code>EmailService</code> and make sure my auth module interacts with that service properly.</p>

<p>The <code>Test.createTestingModule({})</code> doesn't have a <code>.overrideModule()</code> method, unfortunately.</p>

<p>I tried mocking the <code>EmailModule</code> with jest:</p>

<pre class=""lang-js prettyprint-override""><code>jest.mock('../../src/email/email.module.ts', () =&gt; {
  @Module({})
  class EmailModule {

  }

  return EmailModule;
});
</code></pre>

<p>but I get this error:</p>

<pre><code>Error: Nest cannot create the module instance. Often, this is because of a circular dependency between modules. Use forwardRef() to avoid it.

(Read more: https://docs.nestjs.com/fundamentals/circular-dependency)
Scope [RootTestModule -&gt; AppModule]
</code></pre>

<p>Does anyone know how this can be achieved ?</p>
",https://stackoverflow.com/questions/60756629/nestjs-mock-imported-module,"['testing', 'jestjs', 'nestjs']",10548,True,20,3
Can I use karate for testing microservices?,"<p>Let me give some background. We're trying to do e2e testing between a bunch of spring boot services that write to kafka, move files and talk to other services to do the file moving. I think we're pretty good on integration testing with mocks and whatnot, but is there a way to leverage karate or any other testing framework to help achieve fully e2e for the few major scenarios? Like can i have a test on one service that takes actual data and sends to the next service without mocking?</p>
<p>I hope that made sense. Thank you.</p>
",https://stackoverflow.com/questions/65501980/can-i-use-karate-for-testing-microservices,"['spring-boot', 'e2e-testing', 'karate']",1191,True,3,3
unable to navigate in dashboard after checking credential in e2e testing,"<p>I am new to e2e testing. I am writing test cases for angular login page its working in login but i am unable to navigate to homePage after checking login credential
I am getting this in console.</p>
<ol>
<li>It will route to home page When username password is correct then go to home page</li>
</ol>
<ul>
<li>Failed: No element found using locator: By(css selector, app-homepage h1)</li>
</ul>
<ol start=""2"">
<li>should  Login work when login is successful — he should redirect to default home page page</li>
</ol>
<ul>
<li>Failed: No element found using locator: By(css selector, app-homepage h1)</li>
</ul>
<p>this is my spec file</p>
<pre><code>import { LoginPage } from './login.po';
import { HomePage } from '../HomePgE2E/home.po';

describe('should  Login work', () =&gt; {
  let page: LoginPage;
  let homePage:HomePage;
  const wrongCredentias = {
    username: '',
    password: ''
  };

  beforeEach(() =&gt; {
    page = new LoginPage();
   homePage= new HomePage();
  });

  it('when user trying to login with wrong credentials he should stay on “login” page', () =&gt; {
    page.navigateTo();
    page.fillCredentials(wrongCredentias);
    expect(page.getPageTitleText()).toEqual('Sign in to your account');
    expect(page.getErrorMessage()).toEqual('Email cannot be empty.');
  });

  it('when login is successful — he should redirect to default home page page ', () =&gt; {
    page.navigateTo();
    page.fillCredentials();
    homePage.navigateTo();
    expect(homePage.getPageTitleText()).toEqual('welcome');
  });
});
</code></pre>
<p>And this welcome text coming from</p>
<pre><code>import { browser, by, element } from 'protractor';

export class HomePage {
  navigateTo() {
    return browser.get('/home');
  }

   getPageTitleText() {
    return element(by.css('app-homepage h1')).getText();
  } 
}
</code></pre>
",https://stackoverflow.com/questions/63841766/unable-to-navigate-in-dashboard-after-checking-credential-in-e2e-testing,"['angular8', 'e2e-testing']",47,True,0,1
Which is the right usage in Protractor test? await expect(someFn()).toBe.. or expect(await someFn()).toBe,"<p>For e2e testing, I use Protractor with Jasmine and Control Flow is disabled. I am aware that Protractor uses <a href=""https://github.com/angular/jasminewd"" rel=""nofollow noreferrer"">jasminewd2</a> an adapter for Jasmine. And that it enhances expect so that it automatically unwraps promises before performing the assertion. So both the statements below has the same effect.</p>
<pre><code>expect(await someFn()).toBe..
await expect(someFn()).toBe..
</code></pre>
<p>Is there any situation where above statements will behave differently? What is the recommended option? Example spec <a href=""https://github.com/angular/protractor/blob/5.4.1/spec/ts/basic/element_spec.ts"" rel=""nofollow noreferrer"">here</a> follows the second approach of putting await first. Is there any advantage in doing this?</p>
<p>[Edit 1]
One difference I found is the way in which Promise reject is handled. Try catch will work in both cases, but second option allows catch-ing Promise way.</p>
<pre><code>it('should throw error 1', async () =&gt; {
  try {
    expect(await someFn()).toBe(1);
  } catch (err) {
    expect(err).toEqual('Unable to calculate');
  }
});

it('should throw error 2', async () =&gt; {
  await expect(someFn()).toBe(1)
                        .catch((err) =&gt; expect(err).toEqual('Unable to calculate'));
});
</code></pre>
",https://stackoverflow.com/questions/63661988/which-is-the-right-usage-in-protractor-test-await-expectsomefn-tobe-or-ex,"['angular', 'async-await', 'jasmine', 'protractor']",45,True,0,1
Testing Vue components that utilize cytoscape.js?,"<p>I am working on something that involves cytoscape.js and Vue.js. I am currently using jest.js for unit testing the Vue components. A lot of my components have their funtionality tied to a cytoscape graph that is mounted on a container.</p>

<p>This is how my test files look like: </p>

<pre><code>import graph from ""@/graph.vue""

import {
    mount,
    createLocalVue,
} from ""@vue/test-utils""

const localVue = createLocalVue();

describe('graph.vue', () =&gt; {

    it('should center the graph', () =&gt;{
        const wrapper = mount(graph, {
            localVue,
        })
        const button = wrapper.find('btn')
        expect(wrapper.vm.Cytoscape())).toHaveBeenCalled(0)
        button.trigger('click')
        expect(wrapper.vm.Cytoscape()).toHaveBeenCalled(1)
    })
}) 
</code></pre>

<p>If it uses any cytoscape, it gives the following error: </p>

<pre><code>Cannot read property 'className' of null

      11 | // run(): Startup-Function
      12 | export function run() {
    &gt; 13 |   cy = cytoscape({
         |        ^
      14 | 
      15 |     container: document.getElementById('cy'), // container to render in
      16 |     //builds graph 
      17 | }
</code></pre>

<p>I suspect that I have the wrong approach or even testing environment for this. What am I missing ?</p>

<p>Edit: I have found an alternative solution to the problem. Instead of unit testing with jest, there are many things that I needed to test that I could also test in E2E testing. I currently use Cypress to do that.</p>
",https://stackoverflow.com/questions/60047583/testing-vue-components-that-utilize-cytoscape-js,"['vue.js', 'vuejs2', 'jestjs', 'cytoscape.js', 'vue-test-utils']",549,False,2,0
Cypress e2e test without using wait function,"<p>I'm new in e2e testing with Cypress and I have a question.</p>

<p>I wrote a test and I want not to use Cypress wait() command in it.</p>

<pre><code>it('Should modify checkbox state', () =&gt; {
        login();
        cy.visit(TabsSettings.SIZE_FORMATS).then(() =&gt; {
            cy.xpath('(//div[@data-qa=""sizeFormats""]//*[4]//*//*[1]//*//*//*)[1]', { timeout: 10000 }).click().then(() =&gt; {
                expect(
                    cy.xpath('(//input[@type=""checkbox""])[1]')
                        .then(checkbox =&gt; checkbox).should('be.checked')
                );
            });
            cy.get('span').contains('Change').click().then(() =&gt; {
                cy.get('li').contains('Disable').click().then({ timeout: 5000 }, () =&gt; {
                    cy.wait(500);
                    cy.xpath('(//div[@data-qa=""sizeFormats""]//*[4]//*//*[1]//*//*//*)[1]').click().then(() =&gt; {
                        expect(
                            cy.xpath('(//input[@type=""checkbox""])[1]')
                                .then(checkbox =&gt; checkbox[0]).should('be.checked')
                        );
                    });
                    cy.xpath('(//div[@data-qa=""sizeFormats""]//*[4]//*//*[1]//*//*//*)[18]').click().then(() =&gt; {
                        expect(
                            cy.xpath('(//input[@type=""checkbox""])[2]')
                                .then(checkbox =&gt; checkbox[3]).should('not.checked')
                        );
                    });
                });
                cy.xpath('//span[contains(text(), ""Disable Selected"")]').click().then(() =&gt; {
                    cy.get('li').contains('Enable').click().then(() =&gt; {
                        expect(
                            cy.get('input[type=checkbox]')
                                .then(checkbox =&gt; checkbox).should('not.checked')
                        );
                    });
                });
                cy.get('input[type=checkbox]').then(el =&gt; el[0].click()).then(() =&gt; {
                    expect(
                        cy.get('input[type=checkbox]')
                            .then(checkbox =&gt; checkbox).should('be.checked')
                    );
                }).then(() =&gt; {
                    cy.xpath('//i').then(x =&gt; x[1].click());
                    cy.get('input[type=checkbox]').should('not.checked');
                });
                cy.get('div[data-main-select=true]').then(list =&gt; list[1].click()).then(() =&gt; {
                    cy.xpath('(//li[contains(text(), ""50"")])[1]').click().then(() =&gt; {
                        cy.get('input[type=checkbox]').should(checkboxes =&gt; {
                            expect(checkboxes).to.have.length(51);
                        });
                    });
                });
                cy.xpath('(//div[@data-qa=""sizeFormats""]//*[4]//*//*[1]//*//*//*)[1]').click().then(() =&gt; {
                    cy.wait(150);
                    expect(
                        cy.get('input[type=checkbox]')
                            .then(checkbox =&gt; checkbox).should('be.checked')
                    );
                });
            });
        });
    });
</code></pre>

<p>My problem is that if I not use that cy.wait(500) command, the test fails.
I googled a lot but I cannot find an answer for my problem.
The project is an React project, using Hooks. What may be caused the problem is that my component renders multiple times after that click() event. The page does not reload, but the main component rerenders several times. If this is the problem, how can I wait for finishing all renderings, and just after that continue the test, without using the wait function ?</p>
",https://stackoverflow.com/questions/59754574/cypress-e2e-test-without-using-wait-function,"['reactjs', 'testing', 'wait', 'cypress']",1343,True,1,2
Appium React Native Not Ready for Text Input,"<p>I've recently switched over to Appium + webdriverIO for E2E testing. Everything is working pretty well except for one test case relating to text input.</p>
<p>Basically, the component under test is a login screen that uses redux-form for form management. I'm constantly getting the error <code>&quot;'&quot;login-field&quot; Other' is not ready for a text input. Neither the accessibility element itself nor its accessible descendants have the input focus&quot;</code>. The components are as follow:</p>
<p><code>SignInScreen.tsx</code></p>
<pre class=""lang-js prettyprint-override""><code>export class SignInScreen extends React.Component&lt;any&gt; {
  render() {
    const { handleSubmit, submitting, style } = this.props;
    return (
      &lt;View style={style}&gt;
        &lt;View&gt;
          &lt;View&gt;
            &lt;Field
              name=&quot;login&quot;
              component={Input}
              accessibilityLabel=&quot;login-field&quot;
              testID=&quot;login-field&quot;
            /&gt;
            &lt;Field
              secureTextEntry
              name=&quot;password&quot;
              component={Input}
              accessibilityLabel=&quot;password-field&quot;
              testID=&quot;password-field&quot;
            /&gt;
          &lt;/View&gt;
        &lt;/View&gt;
      &lt;/View&gt;
    );
  }
}
</code></pre>
<p><code>Input.tsx</code></p>
<pre class=""lang-js prettyprint-override""><code>export class Input extends React.Component {
  render() {
    const {
      input,
      meta: { error, active, focused },
      accessibilityLabel,
      testID
    } = this.props;

    const showError = !active &amp;&amp; !!error &amp;&amp; !focused;
    const errorText = &quot;ERROR!&quot;

    return (
      &lt;View style={[style, styles.container]}&gt;
        &lt;TextInput
          autoCapitalize=&quot;none&quot;
          value={input.value}
          onChangeText={input.onChange}
          onFocus={input.onFocus}
          onBlur={input.onBlur}
          accessibilityLabel={accessibilityLabel},
          testID={testID}
        /&gt;

        &lt;View style={{height: 30}}&gt;
          {showError &amp;&amp; (
            &lt;Text&gt;{errorText}&lt;/Text&gt;
          )}
        &lt;/View&gt;
      &lt;/View&gt;
    );
  }
}
</code></pre>
<p><code>SignInScreen.test.ts</code></p>
<pre class=""lang-js prettyprint-override""><code>describe('Sign In Screen Test', () =&gt; {
  let client;

  beforeAll(async () =&gt; {
    // set up code
  });

  afterAll(async () =&gt; {
    // tear down code
  });

  it('Can login', async () =&gt; {
    const loginField = await client.$('~login-field');
    await loginField.setValue('test@gmail.com'); // error here

    const passwordField = await client.$('~password-field');
    await passwordField.set('password' + '\n');
  });
});
</code></pre>
<p>I do realize that the test cases work when I either add an additional <code>&lt;TextInput /&gt;</code> on top of the existing <code>&lt;TextInput /&gt;</code> component in the <code>Input.tsx</code> component as follows:</p>
<p><code>Input.tsx</code></p>
<pre class=""lang-js prettyprint-override""><code>export class Input extends React.Component {
  render() {
    const {
      input,
      meta: { error, active, focused },
      accessibilityLabel,
      testID
    } = this.props;

    const showError = !active &amp;&amp; !!error &amp;&amp; !focused;
    const errorText = &quot;ERROR!&quot;

    return (
      &lt;View style={[style, styles.container]}&gt;
        &lt;TextInput /&gt;
        &lt;TextInput
          autoCapitalize=&quot;none&quot;
          value={input.value}
          onChangeText={input.onChange}
          onFocus={input.onFocus}
          onBlur={input.onBlur}
          accessibilityLabel={accessibilityLabel},
          testID={testID}
        /&gt;

        &lt;View style={{height: 30}}&gt;
          {showError &amp;&amp; (
            &lt;Text&gt;{errorText}&lt;/Text&gt;
          )}
        &lt;/View&gt;
      &lt;/View&gt;
    );
  }
}
</code></pre>
<p>or I remove the fixed height in the <code>View</code> component that nests the error message as follows:</p>
<p><code>Input.tsx</code></p>
<pre class=""lang-js prettyprint-override""><code>export class Input extends React.Component {
  render() {
    const {
      input,
      meta: { error, active, focused },
      accessibilityLabel,
      testID
    } = this.props;

    const showError = !active &amp;&amp; !!error &amp;&amp; !focused;
    const errorText = &quot;ERROR!&quot;

    return (
      &lt;View style={[style, styles.container]}&gt;
        &lt;TextInput
          autoCapitalize=&quot;none&quot;
          value={input.value}
          onChangeText={input.onChange}
          onFocus={input.onFocus}
          onBlur={input.onBlur}
          accessibilityLabel={accessibilityLabel},
          testID={testID}
        /&gt;

        &lt;View&gt;
          {showError &amp;&amp; (
            &lt;Text&gt;{errorText}&lt;/Text&gt;
          )}
        &lt;/View&gt;
      &lt;/View&gt;
    );
  }
}
</code></pre>
<p>So what gives? I'm really lost as to what's causing Appium to not pick up the input focus without making the above adjustments.</p>
",https://stackoverflow.com/questions/63683916/appium-react-native-not-ready-for-text-input,"['react-native', 'appium', 'webdriver-io', 'appium-ios']",1713,True,2,2
Problem in creating Cypress code coverage report for E2E tests,"<p>I have been using cypress for E2E testing and wanted to create a full coverage report, to generate a complete coverage report you are required to run all cypress tests together. The first test calls the task <code>resetCoverage</code> in the start and <code>saveCoverage</code> at the end of the test and every test that follows with coverage task <code>combineCoverage</code> at the end.</p>

<p>The issue I am facing is running all the tests together hangs the system as well as fails due to timeout errors, it runs perfectly when running standalone tests. I wanted to know if there is a way to create a full report by running the cypress tests manually one by one without every test resetting the previous coverage report but rather combing the report.</p>
",https://stackoverflow.com/questions/61572438/problem-in-creating-cypress-code-coverage-report-for-e2e-tests,"['code-coverage', 'cypress', 'e2e-testing']",555,False,1,0
Jest with puppeteer using existing chrome browser,"<p>I am trying to make puppeteer work with Jest for e2e testing while using existing Chrome browser.</p>
<p>I choose my puppeteer version &quot;5.1.0&quot; for chrome browser version &quot;84.0.4147&quot; from the list of supported browsers.</p>
<p>I am trying to configure Jest with puppeteer using the information aviable at the following link</p>
<p><a href=""https://jestjs.io/docs/en/puppeteer"" rel=""nofollow noreferrer"">Jest Puppeteer configuration using jest-puppeteer</a></p>
<p>apparently puppeteer library tried to download chromium browser binary which i have skip b/c i would like to use existing chrome browser. and i am having hard time configuring that.</p>
<p>There is some help here at <a href=""https://github.com/smooth-code/jest-puppeteer"" rel=""nofollow noreferrer"">jest puppeteer preset documentation</a> but still not enough help how to use existing browser.</p>
<p>I am assuming using existing chrome configuration should be in <code>jest.puppeteer.config.js</code> but don't know yet how to do it !</p>
<p>Rite now my <code>jest-puppeteer.config.js</code> looks as following</p>
<pre><code>module.exports = {

launch: {
headless: false,
slowMo: false
devtools:true
},
browser: 'chromium'
browserContext: 'default'
</code></pre>
<p>}</p>
<p>when i run my tests, i get following error</p>
<pre><code>Error: Could not find browser revision 800071. Run &quot;PUPPETEER_PRODUCT=firefox 7pm install&quot; or &quot;PUPPETEER_PRODUCT=firefox yarn install&quot; to download a supported Fire fox browser binary&quot;
</code></pre>
",https://stackoverflow.com/questions/64123237/jest-with-puppeteer-using-existing-chrome-browser,"['jestjs', 'puppeteer', 'ts-jest', 'jest-puppeteer']",1332,True,0,2
Protractor Not Running because of Firewall?,"<p>I'm trying to get Protractor working on Windows Server 2016. Using the tutorial on official protractor website, I've got it working on my laptop at home running Windows 10 and a work VM running Windows 7. I have local admin rights on all three. The work VM running Server 2016 just fails with error below when I run the conf.js</p>

<pre><code>[16:36:25] I/launcher - Running 1 instances of WebDriver
[16:36:25] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[16:36:45] E/launcher - Timed out waiting for driver server to start.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'APC', ip: 'x.x.x.x', os.name: 'Windows Server 2016', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_231'
Driver info: driver.version: unknown
[16:36:45] E/launcher - WebDriverError: Timed out waiting for driver server to start.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'APC', ip: 'x.x.x.x', os.name: 'Windows Server 2016', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_231'
Driver info: driver.version: unknown
    at Object.checkLegacyResponse (C:\Users\btime\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:546:15)
    at parseHttpResponse (C:\Users\btime\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:509:13)
    at C:\Users\btime\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:441:30
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
From: Task: WebDriver.createSession()
    at Function.createSession (C:\Users\btime\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:769:24)
    at Function.createSession (C:\Users\btime\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\chrome.js:761:15)
    at createDriver (C:\Users\btime\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\index.js:170:33)
    at Builder.build (C:\Users\btime\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\index.js:626:16)
    at Hosted.getNewDriver (C:\Users\btime\AppData\Roaming\npm\node_modules\protractor\built\driverProviders\driverProvider.js:53:33)
    at Runner.createBrowser (C:\Users\btime\AppData\Roaming\npm\node_modules\protractor\built\runner.js:195:43)
    at C:\Users\btime\AppData\Roaming\npm\node_modules\protractor\built\runner.js:339:29
    at _fulfilled (C:\Users\btime\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54)
    at C:\Users\btime\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:863:30
    at Promise.promise.promiseDispatch (C:\Users\btime\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:796:13)
[16:36:45] E/launcher - Process exited with error code 199
</code></pre>

<p>The Server 2016 machine is an Azure Cloud VM. The Win7 machine is on-prem. Is this error any indication of a Firewall setting or something being blocked? I've been playing around with this for a few days and can't seem to figure it out. I know my company are all moving to Windows 10 eventually but my server would stay Server 2016 and we'd like to be able to make use of protractor for e2e testing of AngularJS and Angular 2+ apps.</p>
",https://stackoverflow.com/questions/60000083/protractor-not-running-because-of-firewall,"['angularjs', 'angular', 'protractor']",93,False,0,0
Cannot find module &#39;src/environments/environment&#39; after running ng e2e command,"<p>I'm new to Angular and Typescript and I'm trying to perform e2e testing on my Angular project by running the &quot;ng e2e&quot; command but I keep receiving the following error:</p>
<pre><code>E/launcher - Error: Error: Cannot find module 'src/environments/environment'
</code></pre>
<p>I've taken a look at related posts here on SO, but none of the solutions have worked for this situation or they have no answer. I've tried changing the relative path of the import to &quot;../environments/environment&quot; and &quot;../../environments/environment&quot; but the path doesn't resolve.</p>
<p>I've tried moving the environments folder into the e2e/src directory as well but no success.</p>
<p>Is this related to the fact that there are 2 src folders?</p>
<p>Any and all suggestions all welcome.</p>
<p>The error points to my app.e2e-spec.ts file as seen in the screenshot below (blurred partial path for privacy):</p>
<p><a href=""https://i.stack.imgur.com/kuNdX.jpg"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/kuNdX.jpg"" alt=""Command line after running ng e2e"" /></a></p>
<p>In my app.e2e-spec.ts file, my environment import resolves properly:</p>
<p><a href=""https://i.stack.imgur.com/5Qfhi.jpg"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/5Qfhi.jpg"" alt=""app.e2e-spec.ts imports"" /></a></p>
<p>My project structure seems pretty straightforward:</p>
<p><a href=""https://i.stack.imgur.com/M5CSW.jpg"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/M5CSW.jpg"" alt=""Project structure"" /></a></p>
",https://stackoverflow.com/questions/65429375/cannot-find-module-src-environments-environment-after-running-ng-e2e-command,"['angular', 'typescript', 'environment-variables', 'e2e-testing']",1206,True,1,1
jest+supertest e2e testing of API endpoints that issue HTTP requests to other endpoints,"<p>I am e2e testing my API endpoints using jest and supertest. The api endpoints are implemented in express with typescript. The problem I am dealing with is that my app is setup as microservices where some of my endpoints issue HTTP requests to other endpoints. All of those microservices are mounted in the same app for the purpose of these tests.</p>

<p>So I am using</p>

<pre><code>const res = await request(app)
      .get(endpoint)
      .set('Authorization', authorization);
    expect(res.status).toEqual(200);
</code></pre>

<p>to fetch my endpoint. But this returns with statusCode 500 and the error <code>Error: connect ECONNREFUSED 127.0.0.1:8999</code>. The endpoint indeed issues an HTTP request to another endpoint on the same host. I guess supertest isn't actually starting the whole app, and therefore the other api endpoints aren't available? Is there a way to solve this? I don't want to mock the other endpoint, since this should be an end-to-end test. Unittests are available too, but right now I am writing e2e snapshot tests.</p>
",https://stackoverflow.com/questions/60314617/jestsupertest-e2e-testing-of-api-endpoints-that-issue-http-requests-to-other-en,"['typescript', 'jestjs', 'microservices', 'e2e-testing', 'supertest']",563,False,0,1
Detox matchers work locally but fail on Circle CI,"<h3>Description</h3>
<p>As I'm working on a React Native Typescript project, I'm having trouble implementing e2e testing on my CI.</p>
<p>I am running Detox locally on a Mac with Catalina 10.15.6. The tests pass consistently (after I fixed flakiness noted <a href=""https://github.com/wix/Detox/blob/master/docs/Troubleshooting.Flakiness.md"" rel=""nofollow noreferrer"">here</a>).</p>
<p>When I push my changes, Circle CI runs automatically (on a Mac), building correctly. Then, the tests all fail due to issues with the matchers (which work correctly locally).</p>
<h3>Reproduction</h3>
<ol>
<li>Run Detox Build &amp; Test locally.</li>
<li>Initiate Circle CI, configured to do both the above.</li>
</ol>
<h3>Expected Behavior</h3>
<p>If the tests pass locally and all the matchers work, the same will occur on a Circle CI machine.</p>
<h3>Environment</h3>
<ul>
<li>Detox: ^17.0.0</li>
<li>React Native: 0.62.2</li>
<li>Node: 12.18.0</li>
<li>Device: iPhone 11 Pro (Simulator)</li>
<li>macOS: Catalina 10.15.6</li>
<li>Xcode: 11.5.0</li>
<li>Jest: ^24.9.0</li>
<li>Jest Circus: ^26.1.0</li>
<li>Typescript: ^3.8.3</li>
<li>Yarn: 1.22.4</li>
</ul>
<h3>Logs</h3>
<p>Here is the output from my failed test on Circle CI:</p>
<pre><code>yarn run v1.22.5
$ /Users/distiller/project/node_modules/.bin/detox test --cleanup
detox[12206] INFO:  [test.js] cleanup=true reportSpecs=true useCustomLogger=true forceAdbInstall=false DETOX_START_TIMESTAMP=1599242684729 node_modules/.bin/jest --config e2e/config.json '--testNamePattern=^((?!:android:).)*$' --maxWorkers 1 e2e
detox[12207] INFO:  [DetoxServer.js] server listening on localhost:49498...
detox[12207] INFO:  [AppleSimUtils.js] xx.xxx.xxxxx launched. To watch simulator logs, run:
        /usr/bin/xcrun simctl spawn 03E73092-B137-4FA2-B3F9-EE1901FCCC1E log stream --level debug --style compact --predicate 'process == &quot;xxxx&quot;'
detox[12207] INFO:  Project Test Suite is assigned to 03E73092-B137-4FA2-B3F9-EE1901FCCC1E {&quot;type&quot;:&quot;iPhone 11 Pro&quot;}
detox[12207] INFO:  Project Test Suite: should enter an invalid email and error message should appear
detox[12207] INFO:  Project Test Suite: should enter an invalid email and error message should appear [FAIL]
detox[12207] INFO:  Project Test Suite: should enter a registered email and pass the email input screen to login code entry
detox[12207] INFO:  Project Test Suite: should enter a registered email and pass the email input screen to login code entry [FAIL]
detox[12207] INFO:  Project Test Suite: should enter a valid email and invalid login code then error message should appear
detox[12207] INFO:  at e2e/firstTest.e2e.js:176:19 
 DO NOT REMOVE
detox[12207] INFO:  at e2e/firstTest.e2e.js:123:19 
 Something went wrong:  Error: Test Failed: Timed out while waiting for expectation: TOBEVISIBLE WITH MATCHER(identifier: == “xxxx”) TIMEOUT(1s)
TIP: To print view hierarchy on failed actions/matches, use loglevel verbose and above.
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
detox[12207] INFO:  Project Test Suite: should enter a valid email and invalid login code then error message should appear [FAIL]
detox[12207] INFO:  Project Test Suite: should enter a valid email then a valid login code and end up at the testing site preferences screen
detox[12207] INFO:  at e2e/firstTest.e2e.js:200:19 
 DO NOT REMOVE
detox[12207] INFO:  at e2e/firstTest.e2e.js:123:19 
 Something went wrong:  Error: Test Failed: Timed out while waiting for expectation: TOBEVISIBLE WITH MATCHER(identifier: == “xxxx”) TIMEOUT(1s)
TIP: To print view hierarchy on failed actions/matches, use loglevel verbose and above.
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
detox[12207] INFO:  Project Test Suite: should enter a valid email then a valid login code and end up at the testing site preferences screen [FAIL]
detox[12207] INFO:  Project Test Suite: should attempt to advance past testing site preferences screen without entering preference
detox[12207] INFO:  Project Test Suite: should attempt to advance past testing site preferences screen without entering preference [FAIL]
detox[12207] INFO:  Project Test Suite: should rank a testing site and advance to the availability page
detox[12207] INFO:  Project Test Suite: should rank a testing site and advance to the availability page [FAIL]
detox[12207] INFO:  Project Test Suite: should toggle a time slot, collapse an accordion, and then click submit
detox[12207] INFO:  [AppleSimUtils.js] xxx.xxxx.xxxx launched. To watch simulator logs, run:
        /usr/bin/xcrun simctl spawn 03E73092-B137-4FA2-B3F9-EE1901FCCC1E log stream --level debug --style compact --predicate 'process == &quot;XXXXX&quot;'
detox[12207] INFO:  Project Test Suite: should toggle a time slot, collapse an accordion, and then click submit [FAIL]

 FAIL  e2e/firstTest.e2e.js (174.609s)
  Project Test Suite
    ✕ should enter an invalid email and error message should appear (8205ms)
    ✕ should enter a registered email and pass the email input screen to login code entry (8695ms)
    ✕ should enter a valid email and invalid login code then error message should appear (10658ms)
    ✕ should enter a valid email then a valid login code and end up at the testing site preferences screen (13953ms)
    ✕ should attempt to advance past testing site preferences screen without entering preference (4959ms)
    ✕ should rank a testing site and advance to the availability page (5033ms)
    ✕ should toggle a time slot, collapse an accordion, and then click submit (9286ms)

  ● Project Test Suite › should enter an invalid email and error message should appear

    Test Failed: Failed expectation: TOBEVISIBLE WITH MATCHER(identifier: == “xxx”), View “&lt;RCTUITextField: 0x7f9fb28ef600&gt;” is not visible at point “{&quot;x&quot;:59.333333333333343,&quot;y&quot;:23.333333333333371}”; Window “&lt;RCTRedBoxWindow: 0x7f9fb24b4650&gt;” is above the tested view's window and its transparency around point “{&quot;x&quot;:98.000001271565765,&quot;y&quot;:309.66666730244958}” is below the tested threshold (0.5)
    TIP: To print view hierarchy on failed actions/matches, use loglevel verbose and above.



  ● Project Test Suite › should enter a registered email and pass the email input screen to login code entry

    Test Failed: No elements found for “MATCHER(identifier: == “xxx”)”
    TIP: To print view hierarchy on failed actions/matches, use loglevel verbose and above.




  ● Project Test Suite › should enter a valid email and invalid login code then error message should appear

    TypeError: Cannot read property 'XXXXX' of undefined

      80 |   it(&quot;should enter a valid email and invalid login code then error message should appear&quot;, async () =&gt; {
      81 |     const {
    &gt; 82 |       constant,
         |       ^
      83 |       constant2,
      84 |     } = await someFunction();
      85 |     await expect(constant).toBeVisible();

      at _callee4$ (firstTest.e2e.js:82:7)
      at tryCatch (../node_modules/regenerator-runtime/runtime.js:45:40)
      at Generator.invoke [as _invoke] (../node_modules/regenerator-runtime/runtime.js:274:22)
      at Generator.prototype.&lt;computed&gt; [as next] (../node_modules/regenerator-runtime/runtime.js:97:21)
      at tryCatch (../node_modules/regenerator-runtime/runtime.js:45:40)
      at invoke (../node_modules/regenerator-runtime/runtime.js:135:20)
      at ../node_modules/regenerator-runtime/runtime.js:145:13

  ● Project Test Suite › should enter a valid email then a valid login code and end up at the testing site preferences screen

    Test Failed: No elements found for “MATCHER(text == “xxxx”)”
    TIP: To print view hierarchy on failed actions/matches, use loglevel verbose and above.



  ● Project Test Suite › should attempt to advance past testing site preferences screen without entering preference

    Test Failed: No elements found for “MATCHER(text == “xxxx”)”
    TIP: To print view hierarchy on failed actions/matches, use loglevel verbose and above.



  ● Project Test Suite › should rank a testing site and advance to the availability page

    Test Failed: No elements found for “MATCHER(text == “xxxx”)”
    TIP: To print view hierarchy on failed actions/matches, use loglevel verbose and above.



  ● Project Test Suite › should toggle a time slot, collapse an accordion, and then click submit

    Test Failed: No elements found for “MATCHER(identifier: == “xxxx”)”
    TIP: To print view hierarchy on failed actions/matches, use loglevel verbose and above.



detox[12206] ERROR: [cli.js] Error: Command failed: node_modules/.bin/jest --config e2e/config.json '--testNamePattern=^((?!:android:).)*$' --maxWorkers 1 e2e

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Exited with code exit status 1
</code></pre>
",https://stackoverflow.com/questions/63801271/detox-matchers-work-locally-but-fail-on-circle-ci,"['javascript', 'continuous-integration', 'e2e-testing', 'circleci', 'detox']",705,False,0,0
How to do end to end testing better against a distributed system using a github PR workflow?,"<p>My team uses an internal e2e testing framework to test that everything from the http request to the http response is working as expected.</p>

<p>How these tests work is very complicated and flaky due to the nature of a distributed architecture across multiple geographies in AWS.</p>

<p>A big problem we have is that when we merge a feature PR into one of our many micro-services/lambdas that impact the response/behaviour of an endpoint, our e2e tests fail.</p>

<p>How we deal with this is by accepting that the e2e Jenkins job will be red temporarily until someone gets an e2e PR merged that updates/adds a test/s.</p>

<p>Because of the acceptance of the e2e job being red ""temporarily"", it leads to other changes that may or may not contain bugs slipping in.</p>

<p>The other problem is that we don't allow PRs to be merged if the build is failing (which is great), but if the e2e tests fail due to a change in a different service, the person fixing the e2e tests for the feature they are working on will need to fix the other failures in the same PR.</p>

<p>So my question is, what can my team do to fix this problem?</p>

<p>I want us to keep the e2e tests as they are very useful, but they're prone to be neglected for the reasons above.</p>

<p>Could we somehow tie the e2e tests repo to each feature branch so that when someone pushes code to a branch, a feature branch with the same name on our e2e test service runs against it and blocks the PR until they update the e2e tests?</p>

<ul>
<li>This would need the e2e test repo to somehow be linked so that code changes there appear in the feature PR for the relevant service/lambda. Not sure if this possible.</li>
</ul>

<p>Any advice/examples on how to do e2e testing using the github workflow for a distributed micro-services/lambda architecture in AWS would be extremely appreciated.</p>

<p>Also, I would find it hard to believe my team is the only one with this problem. So maybe this will help others.</p>
",https://stackoverflow.com/questions/59791202/how-to-do-end-to-end-testing-better-against-a-distributed-system-using-a-github,"['git', 'amazon-web-services', 'jenkins', 'github', 'e2e-testing']",1006,True,2,1
Protractor: How to properly wait after a click?,"<p>I am using Protractor for e2e testing. The tests should first enter too short username and passwords and because of Angular validators when clicked on a submit button (which is disabled) get rejected and stay put (this works!), then it should enter an username of correct length with also a password of a correct length, click on the submit button and NOT get redirected, because it's a false login. This fails... The last test requires to input correct login details and click on submit and should get redirected to the dashboard.
According to this answer <a href=""https://stackoverflow.com/a/21785088/12360035"">https://stackoverflow.com/a/21785088/12360035</a> is all it would take to solve my problem that seems to throw the </p>

<pre><code>- Failed: script timeout
    (Session info: chrome=79.0.3945.130)
    (Driver info: chromedriver=79.0.3945.16 (93fcc21110c10dbbd49bbff8f472335360e31d05-refs/branch-heads/3945@{#262}),platform=Windows NT 10.0.18362 x86_64)```
</code></pre>

<p>error for both of my tests.
How do I fix this?
My tests are written this way:</p>

<pre><code>it('should enter too short username and password and NOT get redirected =&gt; stay put', () =&gt; {
   element(by.css('#inputUser')).sendKeys('bah');
   element(by.css('#inputPassword')).sendKeys('bah');
   const btn = element(by.css('#loginSubmit'));
   btn.click();
   const curUrl = browser.getCurrentUrl();
   expect(curUrl).toBe('http://localhost:4200/avior/login');
 });

  it('should enter incorrect username and password and NOT get redirected =&gt; stay put', () =&gt; {
    const ele1 = element(by.css('#inputUser'));
    const ele2 = element(by.css('#inputPassword'));
    const btn = element(by.css('#loginSubmit'));
    ele1.clear();
    ele2.clear();
    ele1.sendKeys('bah');
    ele2.sendKeys('bahbahbah');
    btn.click();
    browser.waitForAngular();
    const curUrl = browser.getCurrentUrl();
    expect(curUrl).toBe('http://localhost:4200/avior/login');
  });

  it('should enter correct username and password and get redirected to /avior/dashboard', () =&gt; {
    const ele1 = element(by.css('#inputUser'));
    const ele2 = element(by.css('#inputPassword'));
    const btn = element(by.css('#loginSubmit'));
    ele1.clear();
    ele2.clear();
    ele1.sendKeys('Chad');
    ele2.sendKeys('chadchad');
    btn.click();
    browser.waitForAngular();
    const curUrl = browser.getCurrentUrl();
    expect(curUrl).toBe('http://localhost:4200/avior/dashboard');
  });
</code></pre>

<p><strong>UPDATE</strong>
A jwt token is sent as a cookie in response, that might be part of the problem. I can't seem to find info online on how to handle cookies with Protractor..</p>
",https://stackoverflow.com/questions/59827644/protractor-how-to-properly-wait-after-a-click,"['selenium', 'protractor', 'selenium-chromedriver', 'e2e-testing']",880,True,0,2
Mocking with Serverless Offline and Integration Tests,"<p>I have a Serverless stack (AWS) using API Gateway authentication and a Lambda, implementing a restful API using NestJS.</p>
<p>I'm using Serverless-offline to simulate the stack in my local environment. This allows me to simulate the API Gateway authentication (simple keys, not custom authorizer) and lambda execution from an end to end API call perspective.</p>
<p>I can use the NestJS test helpers to perform e2e tests, which allows me to inject mocks for other services not available in the stack.</p>
<p>What I'd like to do is use serverless-offline to run the tests - hence allowing me to test authentication  via its simulated API Gateway. I can see how I can do this by launching serverless-offline in my tests (e.g. <a href=""https://dev.to/didil/serverless-testing-strategies-4g92"" rel=""nofollow noreferrer"">https://dev.to/didil/serverless-testing-strategies-4g92</a>).</p>
<p>BUT, if I use serverless-offline (as link) then I can't see how it would be possible to inject mocks for other services not available in the stack.</p>
<p>Is there another solution for e2e testing that allows me to simulate the api gateway AND inject mocks?</p>
<p>Any help much appreciated!</p>
",https://stackoverflow.com/questions/65127818/mocking-with-serverless-offline-and-integration-tests,"['integration-testing', 'serverless-framework', 'serverless-offline']",612,True,4,1
E2E Testing using cypress - Azure AD Single Sign On,"<p>I have been trying to achieve end to end testing using cypress in my angular project and is stuck with a single sign-on issue. Please help me with possible approaches.</p>

<p>Briefing:
My Angular application uses Azure AD Microsoft login to authenticate users to use the application. Is there a way to handle this sign on using cypress or is there a way to bypass
sign on completely.</p>

<p>I have already tried the following blogs and still stuck:
<a href=""https://www.eliostruyf.com/cypress-test-sharepoint-solution-azure-ad-secured-api/"" rel=""nofollow noreferrer"">https://www.eliostruyf.com/cypress-test-sharepoint-solution-azure-ad-secured-api/</a>  
<a href=""https://www.techtonic.com/resources/blog/puppeteer-can-fill-in-cypress-gaps"" rel=""nofollow noreferrer"">https://www.techtonic.com/resources/blog/puppeteer-can-fill-in-cypress-gaps</a>  
<a href=""https://docs.cypress.io/guides/references/best-practices.html#Visiting-external-sites"" rel=""nofollow noreferrer"">https://docs.cypress.io/guides/references/best-practices.html#Visiting-external-sites</a>  
<a href=""https://docs.cypress.io/examples/examples/recipes.html#Single-Sign-On"" rel=""nofollow noreferrer"">https://docs.cypress.io/examples/examples/recipes.html#Single-Sign-On</a> </p>

<p>Whenever I use Cypress to navigate to any page in my app(apart from login), it's getting redirected back to the login giving 401.
Is there any solution to bypass the complete login process and continue E2E testing of the whole app using cypress?
If not, how to handle azure AD single sign-on testing with cypress or any other technology? </p>
",https://stackoverflow.com/questions/61899300/e2e-testing-using-cypress-azure-ad-single-sign-on,"['single-sign-on', 'cypress', 'e2e-testing', 'angular-e2e']",938,False,4,0
Cypress docker container unable to connect to my Angular localhost using dockerfile,"<p>So I am currently using MEAN Stack (But MySQL Instead of MongoDB).
And I am using Cypress for e2e testing. I am currently dockerizing my application and am facing the following issue.</p>

<p>I first deploy the angular and node container.
Then after the angular web application is built, I launch the cypress container.
The issue with that is my cypress container's localhost is unable to connect to angular's localhost.
Which is not the issue with Node and Angular connection.</p>

<p>so I am facing the following error</p>

<pre><code>Cypress could not verify that this server is running:

  &gt; http://localhost:4200

We are verifying this server because it has been configured as your `baseUrl`.

Cypress automatically waits until your server is accessible before running tests.

We will try connecting to it 3 more times...
We will try connecting to it 2 more times...
We will try connecting to it 1 more time...

Cypress failed to verify that your server is running.
</code></pre>

<p>I am using individual dockerfiles rather than Docker-compose as the building time of the angular file is rather long and so I am unable to use alias functionality of docker-compose(As the angular docker is still building when the cypress runs the command)</p>

<p>Is there a way to solve this issue?</p>

<p>For more information my Dockerfiles are below:
Dockerfile-Angular</p>

<pre><code>FROM node:10.16.3

# set working directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

# add `/app/node_modules/.bin` to $PATH
ENV PATH /usr/src/app/node_modules/.bin:$PATH

# install and cache app dependencies
COPY package.json /usr/src/app/package.json
RUN npm install \
    &amp;&amp; npm install -g @angular/cli@6.2.9

# add app
COPY . /usr/src/app

EXPOSE 4200
# start app
CMD ng serve --host 0.0.0.0
</code></pre>

<p>Node API Dockerfile</p>

<pre><code>FROM node:10.16.3

WORKDIR /usr/src/app/API

ENV PATH /usr/src/app/API/node_modules/.bin:$PATH

COPY package.json /usr/src/app/API/package.json
RUN npm install
COPY . /usr/src/app/API

EXPOSE 4711
CMD [""node"",""server""]
</code></pre>

<p>Cypress DockerFile</p>

<pre><code>FROM cypress/base:10.11.0

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

# add `/app/node_modules/.bin` to $PATH
ENV PATH /usr/src/app/node_modules/.bin:$PATH

# install dependencies
COPY . /usr/src/app

RUN npm install --save-dev cypress
RUN $(npm bin)/cypress verify
RUN  npm run cypress:run

</code></pre>

<p>Also, this setup is for development purpose not production.</p>

<hr>

<p>Update
I am not using the compose file. I am starting the docker container individually. </p>

<p>Angular 
<code>docker run -v ${PWD}:/usr/src/app -p 4200:4200 --name angular -it angular</code></p>

<p>Node 
<code>docker run -v ${PWD}:/usr/src/app/API -p 4711:4711 --name api -it api</code></p>

<p>Cypress 
<code>docker run -v ${PWD}:/usr/src/app --name cypress -it cypress</code></p>
",https://stackoverflow.com/questions/60258585/cypress-docker-container-unable-to-connect-to-my-angular-localhost-using-dockerf,"['docker', 'dockerfile', 'cypress']",501,False,1,0
Get all websocket messages in protractor,"<p>I have a react project wherein I communicate to a websocket and based on the message, I do something. I sometimes update the UI or just do not do anything.</p>

<p>When I am writing e2e tests, I am able to test the components in UI like this:</p>

<pre><code>When(/^I update the list ""(\d+)""$/, (listNumber) =&gt; {
  const elements = browser.$$('div.list_id')[listNumber];
  browser.call(() =&gt; (
    // I make the websocket call based on the listNumber to update the list
  ));
});
</code></pre>

<p>That works well.</p>

<p>My question is I want to have a method which is relevant to e2e testing which tracks all the websocket messages from the client.<br>
I do have a custom polling logic which tracks for changes in the UI but I cannot use it in this case.</p>

<p>For example : Consider the following messages from websocket</p>

<pre><code>{""adding_item"":""ListItem 1 with id 123""}
{""adding_item"":""ListItem 2 with id 345""}
{""bonus_item"":""BonusItem 1 with id 1""}
{""adding_item"":""ListItem 3 with id 124""}
</code></pre>

<p>For all the <code>adding_item</code> messages I change UI but for <code>bonus_item</code> I change nothing in the UI!   How do I detect <code>bonus_item</code> has been received from the websocket in the e2e test?</p>

<p>npm command I run :<br>
<code>""automation"": ""node node_modules/webdriverio/bin/wdio --host=localhost --baseUrl=http://localhost:9000 automation/wdio.conf.js""</code></p>

<p>Few things:<br>
I do not want to change the server/websocket logic.<br>
I do not want to change anything but e2e stuff. Meaning I do not want to change the actual app.</p>
",https://stackoverflow.com/questions/61569000/get-all-websocket-messages-in-protractor,"['javascript', 'node.js', 'websocket', 'protractor', 'webdriver-io']",727,True,1,1
Unable to connect to docker container in Jenkins pipeline when using &quot;Docker outside of Docker&quot; setup,"<p>I'm running a Jenkins job based on such agent:</p>

<pre><code>pipeline {
  agent {
    docker {
      image 'cypress/base:10'
        args '-v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v /usr/local/bin/docker-compose:/usr/local/bin/docker-compose -u root'
    }
  }
…
</code></pre>

<p><strong>note:</strong> <code>docker</code> and <code>docker-compose</code> are mounted into my agent container to be able to run docker containers inside the pipeline stages (""Docker outside of Docker"" setup)</p>

<p>down the pipeline, I start <code>docker-compose</code> setup that consists of 2 containers - server and webapp</p>

<pre><code>…
sh 'docker-compose up --build --detach'
…
</code></pre>

<p>After that, I want to send a GET request to <code>localhost:8080</code>, this is where the web-app should be served from. But I get</p>

<pre><code>Error: connect ECONNREFUSED localhost:8080
</code></pre>

<p>The same docker-compose setup works on my dev. machine. Port forwarding is set up correctly (8080:8080 port forwarding is enabled in <code>docker-compose</code> configuration file)</p>

<p>I think it's somewhat related to the ""Docker outside of Docker"" setup that I do in Jenkins 🤔Maybe port 8080 actually appears to be listening on the host of the agent of my pipeline, not sure…</p>

<p>I will be happy to get fresh ideas on the problem, completely run out of my mind with this.</p>

<p><em>And just to give more context: I want to run web-app + API server via docker-compose and then run Cypress (outside of docker-compose setup) to do E2E testing via UI</em></p>
",https://stackoverflow.com/questions/61131739/unable-to-connect-to-docker-container-in-jenkins-pipeline-when-using-docker-out,"['docker', 'jenkins', 'docker-compose', 'cypress', 'docker-in-docker']",1419,True,1,1
How to Avoid Cypress Flakiness Using Ng-Select Elements,"<p>We are using <a href=""http://cypress.io"" rel=""nofollow noreferrer"">Cypress</a> E2E testing framework on an Ionic 5 / Angular 9 project. Our tests mostly work as expected when running in the Cypress Test Runner GUI. However, when running in CLI-mode we get a lot of flakiness (i.e. <em>not always</em>, but certainly <em>multiple times</em> across our test suite per run) failures like this one:</p>
<blockquote>
<p>Timed out retrying: expected '&lt;span.ng-value-label&gt;' to be 'visible' This element <code>&lt;span.ng-value-label&gt;</code> is not visible because it has CSS property: <code>position: fixed</code> and it's being covered by another element: <code>&lt;div class=&quot;ng-input&quot;&gt;...&lt;/div&gt;</code></p>
</blockquote>
<p>These failures originate in our attempts to interact with <a href=""https://github.com/ng-select/ng-select"" rel=""nofollow noreferrer"">ng-select</a> elements, which expand into markup and CSS that we have little-to-no control over. We use CLI mode for our continuous integration efforts, so these failures relating to ng-select are severely limiting the value we are able extract from our Cypress tests and our ability trust the test results.</p>
<p>An example of our Cypress code that engages with ng-select is as follows:</p>
<pre class=""lang-js prettyprint-override""><code>cy.get(`[data-cy=show-percents]`)
  .should('be.visible')
  .click();

cy.get('ng-dropdown-panel')
  .should('be.visible')
  .contains('span', 'Count of responses')
  .should('be.visible')
  .click({ force: true });
</code></pre>
<p>... and the markup that goes with that snippet would look something like this:</p>
<pre class=""lang-html prettyprint-override""><code>&lt;ng-select
  [(ngModel)]=&quot;inputFig.showPercents&quot;
  [appendTo]=&quot;'body'&quot;
  [searchable]=&quot;false&quot;
  [items]=&quot;valuesMenu&quot;
  [clearable]=&quot;false&quot;
  bindLabel=&quot;title&quot;
  bindValue=&quot;val&quot; data-cy=&quot;show-percents&quot;&gt;
&lt;/ng-select&gt;
</code></pre>
<p>... and for completeness the bound typescript for this example contains:</p>
<pre class=""lang-js prettyprint-override""><code>valuesMenu = [
   {
      title: 'Count of responses', 
      val: false
   }, 
   {
      title: 'Percentage of total', 
      val: true
   }
];
</code></pre>
<p>What is a solution to being able to interact with ng-select <strong>consistently</strong> and <strong>reliably</strong> using Cypress tests?</p>
",https://stackoverflow.com/questions/63384937/how-to-avoid-cypress-flakiness-using-ng-select-elements,"['angular', 'ionic-framework', 'integration-testing', 'cypress', 'angular-ngselect']",1898,True,3,1
should E2E be run in production,"<p>Apologies if this is open ended.</p>
<p>Currently my team and I are working on our End to end (E2E) testing strategy and we seem to be unsure whether we should be executing our E2E tests against our staging site or on our production site. We have gathered that there are pros and cons to both.</p>
<p><strong>Pro Staging Tests</strong></p>
<ul>
<li>wont be corrupting analytics data on production.</li>
<li>Can detect failure before hitting production.</li>
</ul>
<p><strong>Pro Production Tests</strong></p>
<ul>
<li>Will be using actual components of the system including database and other configurations and may capture issues with prod configs.</li>
</ul>
<p>I am sometimes not sure if we are conflating E2E with monitoring services (if such a thing exists). Does someone have an opinion on the matter?</p>
<p>In addition when are E2E tests run? Since every member of the system is being tested there doesn't seem to be an owner of the test suite making it hard to determine when the E2E should be run. We were hoping that we could run E2E in some sort of a pipeline before hitting production. Does that mean I should run these test when either the Front end / backend changes? Or would you rather just run the execution of the E2E on an interval regardless of any change?</p>
",https://stackoverflow.com/questions/65110733/should-e2e-be-run-in-production,"['testing', 'integration-testing', 'cypress', 'e2e-testing', 'e2e']",2796,True,2,2
What is the best approach for Automation End To End Testing in an ETL Project?,"<p>We have an ETL Project wherein Data from one UI application flows down in a series of applications(Transformation/Logic).</p>
<p>The overall motto is to see the data of 'UI 1' in 'UI 2'.
'Spring Java Server 1' calls the API of UI1 Server and the data gets flow into different servers and persisted in the database. A script also persists some data in the database.
'UI 2 with Backend server' gets the data from database and show it in the UI.</p>
<p><a href=""https://i.stack.imgur.com/DpCQP.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/DpCQP.png"" alt=""enter image description here"" /></a></p>
<p>Now the question,
I am looking for the best possible way to perform E2E testing.
We'll start by triggering 'Spring Java Server 1' which calls APIs of 'UI 1 with BackendServer 1' and at the end using selenium see the data in 'UI 2'.</p>
<p>I am thinking about creating a separate Java Application with UI just for testing which triggers the 'Server 1' and with selenium verifies the UI2
But the problem is with Script. After the database, we have to manually run script and then wait for it to complete. How we can automate manually running the script with some kind of state Management?</p>
<p>Please suggest more on the architecture of E2E  or how can i enhance this E2E setup. And what tools/framework i can use.</p>
",https://stackoverflow.com/questions/63735864/what-is-the-best-approach-for-automation-end-to-end-testing-in-an-etl-project,"['java', 'testing', 'automated-tests', 'integration-testing', 'end-to-end']",340,False,0,1
How to test the existence of a Lazy Loaded route in Angular?,"<p>My question is similar to <a href=""https://stackoverflow.com/questions/59535910/how-to-test-the-existence-of-a-route-in-angular-using-jasmine"">this question</a>. I'm trying to write a test that checks the existence of a route in Angular. The main difference to the linked question, as that I'm using lazy loading modules instead of components.</p>

<p>I have a file <em>app.routes.ts</em> that contains the routes:</p>

<pre><code>import { Routes } from '@angular/router';

export const routes: Routes = [
    {
        path: '',
        loadChildren: () =&gt; import('./main/main.module').then(m =&gt; m.MainModule)
    }
];
</code></pre>

<p>In the test file <em>app.routes.spec.ts</em>, I expect that this route exists:</p>

<pre><code>import { routes } from './app.routes';

describe('app.routes', () =&gt; {
    it('should contain a route for /', () =&gt; {
        expect(routes).toContain({
            path: '',
            loadChildren: () =&gt; import('./main/main.module').then(m =&gt; m.MainModule)
        });
    });
});
</code></pre>

<p>When I run this, the test is not passing.</p>

<blockquote>
  <p>Expected [ Object({ path: '', loadChildren: Function }) ] to contain
  Object({ path: '', loadChildren: Function }). Error: Expected [
  Object({ path: '', loadChildren: Function }) ] to contain Object({
  path: '', loadChildren: Function }).
      at 
      at UserContext. (<a href=""http://localhost:9876/_karma_webpack_/src/app/app.routes.spec.ts:5:24"" rel=""nofollow noreferrer"">http://localhost:9876/_karma_webpack_/src/app/app.routes.spec.ts:5:24</a>)
      at ZoneDelegate.invoke (<a href=""http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:365:1"" rel=""nofollow noreferrer"">http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:365:1</a>)
      at ProxyZoneSpec.onInvoke (<a href=""http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-testing.js:305:1"" rel=""nofollow noreferrer"">http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-testing.js:305:1</a>)</p>
</blockquote>

<p>How can I fix this unit test, and make sure that the existence of lazy loaded routes can be tested? Thank you!</p>

<p><em>DISCLAIMER: I know that some people don't think this should be part of unit testing, and that routing should be tested in e2e testing. Personally I like the idea to check if all my routes exist, and there are no typos. The idea that if somebody would comment out a route for whatever reason and forgets to undo it, and automated testing catches this, makes me feel a bit safer.</em></p>
",https://stackoverflow.com/questions/62466379/how-to-test-the-existence-of-a-lazy-loaded-route-in-angular,"['angular', 'unit-testing']",3155,True,4,2
Protractor + Storybook: Failed: No element found using locator: By(css selector),"<p>I am trying to implement e2e testing of UI components for Storybook with Protractor. Any attempt to use a locator to find an element on the page provides an error in the terminal saying the element cannot be found using a Protractor locator, i.e (by.css, by.id and by.className). However, when running tests involving button text, they pass successfully with no errors.</p>
<p>To Reproduce</p>
<p>Steps to reproduce the behavior:
To reproduce the issue, protractor must be installed within a storybook project using Angular. Run the protractor command to start the test.</p>
<p>Test fails with this error in the terminal: Failed: No element found using locator: By(css selector)</p>
<p>Expected behavior</p>
<p>The expected behavior is to locate an input field on the screen and pass text into the input field to check that the value of that input is equal to a specific value.</p>
<p>Code:</p>
<pre><code>conf.js: 

exports.config = {
  framework: 'jasmine',
  seleniumAddress: 'http://localhost:4444/wd/hub',
  specs: ['spec.js'],
  capabilities: {
    browserName: 'chrome'
  }
}

</code></pre>
<pre><code>forms-spec.js: 

describe('Contact Form', function() {
    browser.waitForAngularEnabled(false);
    browser.ignoreSynchronization = true;
    it('should allow me to enter a first name', async() =&gt; {
    await browser.get('http://localhost:6006/?path=/story/components-contact-form--default');

    let text = element(by.css('input'));
    element(by.css('input')).sendKeys('Rohtas');
    expect(text.getAttribute('value')).toEqual('Rohtas');
      
    });

  })
Error: NoSuchElementError: No element found using locator: By(css selector, input)

</code></pre>
<p>HTML:</p>
<pre><code>&lt;input placeholder=&quot;name&quot; type=&quot;text&quot;&gt;
</code></pre>
<pre><code>System:
OS: Windows 10 10.0.17763
CPU: (8) x64 Intel(R) Core(TM) i5-8365U CPU @ 1.60GHz
Binaries:
Node: 12.16.3 - C:\Program Files\nodejs\node.EXE
npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 83.0.4103.97
Edge: Spartan (44.17763.831.0)
npmPackages:
@storybook/addon-a11y: ^5.3.19 =&gt; 5.3.19
@storybook/addon-actions: ^5.3.19 =&gt; 5.3.19
@storybook/addon-docs: ^5.3.19 =&gt; 5.3.19
@storybook/addon-jest: ^5.3.19 =&gt; 5.3.19
@storybook/addon-knobs: ^5.3.19 =&gt; 5.3.19
@storybook/addon-links: ^5.3.19 =&gt; 5.3.19
@storybook/addon-notes: ^5.3.19 =&gt; 5.3.19
@storybook/addon-storysource: ^5.3.19 =&gt; 5.3.19
@storybook/addon-viewport: ^5.3.19 =&gt; 5.3.19
@storybook/addons: ^5.3.19 =&gt; 5.3.19
@storybook/angular: ^5.3.19 =&gt; 5.3.19
@storybook/storybook-deployer: ^2.8.6 =&gt; 2.8.6

</code></pre>
<p>Additional context</p>
<p>If I add a className or ID to the input field, and try to locate using either method the same error appears.
However, using buttonText or partialButtonText on a button from the Protractor API works fine. Is there a compatibility issue between Protractor and Storybook I was not aware of?</p>
<p>The storybook iFrame could be getting in the way of finding the element but I'm unsure as to whether there's a workaround for it.</p>
",https://stackoverflow.com/questions/64142691/protractor-storybook-failed-no-element-found-using-locator-bycss-selector,"['angular', 'typescript', 'protractor', 'storybook', 'angular-storybook']",725,False,0,1
Karate - UI Testing - When using Zalenium Safari and MSEDGE immediately error on driver/session call =&gt; no capabilities found,"<p>git project: <a href=""https://github.com/jbart18/karate_testing"" rel=""nofollow noreferrer"">https://github.com/jbart18/karate_testing</a></p>
<p>I'm trying to simplify having the main browsers (Chrome, Firefox, Edge &amp; Safari) working via Zalenium. It seems the most simple approach and have been able to get chrome and firefox (gecko driver) running/working straight away.</p>
<p>The problem lies within Edge and Safari and the inability to submit capabilities in the session request.</p>
<p>I am running on Windows 10 professional and have been able to get tests working for:
edge: through specifying the executable path and setting the webdriver session
safari: running macos via VM and then specifying the executable path (a big hassle - though I will need to either debug safari issues or when needing xcode for mobile testing)</p>
<p>I am hoping to simplify e2e testing using zalenium. Please help.
I followed &quot;https://opensource.zalando.com/zalenium/#try-it&quot; to get zalenium up and running</p>
<p>request:
* configure driver = { type: 'safaridriver', start: false, webDriverUrl: 'http://localhost:4444/wd/hub'}</p>
<p>Error:
&quot;error&quot;: &quot;unknown error&quot;,
&quot;message&quot;: &quot;Error forwarding the new session cannot find : Capabilities {browserName: safari}&quot;,</p>
<p>However when I change the driver configuration statement&quot;</p>
<pre><code>* def session = { capabilities: { browserName: &quot;safari&quot; } }
* configure driver = { type: 'safaridriver', webDriverSession: '#(session)', start: false, showDriverLog: true, webDriverUrl: 'http://localhost:4444/wd/hub'}
</code></pre>
<p>Error:</p>
<h2>HTTP ERROR 500</h2>
<p>Problem accessing /wd/hub/session. Reason:
<pre>    Server Error</pre></p><h3>Caused by:</h3>java.io.IOException: org.openqa.grid.common.exception.GridException: No capabilities found in request: {&quot;capabilities&quot;:{&quot;browserName&quot;:&quot;safari&quot;}}
<p>I am unable to get either edge or safari via zalenium up and running.
Your help is greatly appreciated.</p>
<p>Thanks</p>
<p>jbart18</p>
",https://stackoverflow.com/questions/64680998/karate-ui-testing-when-using-zalenium-safari-and-msedge-immediately-error-on,"['karate', 'saucelabs']",853,True,1,2
How to test angular components in protractor?,"<p>I know that it's recommended to use karma/jasmine for component/unit testing but I want to do the same using protractor because of two reasons:</p>
<ul>
<li>it's not possible to emulate 'Tab' behaviour in javascript to move to the next focusable element (<a href=""https://stackoverflow.com/questions/40454754/is-there-a-way-to-programmatically-trigger-the-tab-key-to-move-the-focus-to-the"">Is there a way to programmatically trigger the TAB key to move the focus to the next focusable element?</a>). I need to be able to test 'Tab', 'Esc', key combinations and  with protractor it's as simple as calling <code>sendKey</code>.</li>
<li>karma/jasmine don't render css. You need to use <code>setStyleFixtures</code> which is a pain. The absence of css causes issues: for instance, jasmine/karma renders elements with 'display: none' and messes up the market (I'm not sure about this part but this is what happens when I create dx-data-grid).</li>
</ul>
<p>I know that protractor is meant to be used to do e2e testing but because of those two key benefits, I wonder if there is an easy way to use a protractor to do unit testing/integration testing.</p>
<p>An ideal solution for me would be to write a regular jasmine test with TestBed(to mock dependencies using angular's DI) and test it using protractor API without creating angular routes and special pages.</p>
<p>Heads-up, I've used jasmine for a couple of months, I'm not very familiar with protractor.</p>
",https://stackoverflow.com/questions/64867147/how-to-test-angular-components-in-protractor,"['angular', 'unit-testing', 'protractor', 'karma-jasmine']",174,False,0,0
NestJS: e2e testing using an axios-based client is not working as expected,"<p>I have a NestJS application that exposes some endpoints, and I have written a client application that I plan on releasing as an NPM package to work with the nest server. I am attempting to write end-to-end tests that start the nest server, connect it to a test database in a local docker container, and test it using the client. Here are some snippets of what I'm attempting to do:</p>
<p>Controller:</p>
<pre><code>@Controller('/api/v1/messages')
export class MessagesController {

    constructor(
        private messagesService: MessagesService
    ) {}

    @Get()
    @UsePipes(new ValidationPipe({ whitelist: true, forbidNonWhitelisted: true }))
    private findAll(
        @Query() searchCriteria: MessageSearchDto
    ): Promise&lt;MessageDto[]&gt; {
        if (Object.keys(searchCriteria).length &gt; 0) 
            return this.messagesService.search(searchCriteria);
        return this.messagesService.findAll();
    }
}
</code></pre>
<p>Client:</p>
<pre><code>const http = require('axios');
const dotenv = require('dotenv');

dotenv.config();

export class MessageClient {

    public baseUri: string = process.env.MessageClientTarget ?? './';

    constructor() {}

    public async findAll() {
        return await http.get(this.baseTarget());
    }

    private baseTarget() {
        return `${this.baseUri}/api/v1/messages`;
    }
}
</code></pre>
<p>e2e Test:</p>
<pre><code>describe('MessageController (e2e)', () =&gt; {
    let app: INestApplication;
    let client: MessageClient = new MessageClient();

    beforeAll(async () =&gt; {
        let moduleFixture: TestingModule = await Test.createTestingModule({
        imports: [AppModule, MessagesModule],
        }).compile();

        app = moduleFixture.createNestApplication();
        await app.init();
    });

    afterAll(async () =&gt; {
        await app.close();
    });

    it('/ (GET)', async done =&gt; {
        const { data: messages } = await client.findAll()
        expect(messages).toEqual([]);    
        done();
    });
});
</code></pre>
<p>And .env:</p>
<pre><code>MessageClientTarget=http://localhost:3000
</code></pre>
<p>When I attempt to run this, I get the following error: &quot;connect ECONNREFUSED 127.0.0.1:3000&quot;</p>
<p>From what I understand, this is because the createNestApplication method doesn't actually start a server but instead creates a mocked version of the application.</p>
<p>My question is how can I work with INestApplication or TestingModule in order to start the application or what other way do I have to programmatically start a NestJS application. It is important to me that I perform the e2e testing with the Axios based client rather than supertest as a way of testing both the client and the server.</p>
<p>I have verified that the server is supposed to start on port 3000 locally, and I have verified that the client has the correct baseUri set. The address used by the client during testing is: http://localhost:3000/api/v1/messages and was verified by outputting the value to the console during the test. Also, only the database currently lives in a docker container and I have that running correctly. The whole application works perfectly when ran locally and it is only in the test that it is failing.</p>
",https://stackoverflow.com/questions/65120058/nestjs-e2e-testing-using-an-axios-based-client-is-not-working-as-expected,"['axios', 'jestjs', 'nestjs', 'e2e-testing']",658,False,4,1
Grouping parallel runs in one entry on Cypress.io using Gitlab CI,"<p>I have an <code>Nx</code> project with <code>Gitlab CI</code> configured. My project has 2 kinds of E2E testing included - main project's and Storybook's ones. The tests themselves work fine, but I use <code>cypress.io</code> dashboard for E2E results gathering.</p>
<p>I configured the project to record them and it works, but I want them to be saved as one run, but with 2 groups x 2 browsers (Main/Storybook x Chrome/Firefox). Recording also works fine, <code>cypress.io</code> dashboard recognizes 2 browsers and groups correctly, but I only get results for one browser (there is one result for Chrome for Main and one for Firefox for Storybook - the second browsers are visible in filters, but results for them are empty - please, see the screenshots).</p>
<p><a href=""https://i.stack.imgur.com/DFCFH.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/DFCFH.png"" alt=""One test run with correct groups and browsers"" /></a></p>
<p><a href=""https://i.stack.imgur.com/4xb7u.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/4xb7u.png"" alt=""No results for Firefox for Main"" /></a></p>
<p>I tried some flags and configurations from <a href=""https://docs.cypress.io/guides/guides/parallelization.html"" rel=""nofollow noreferrer"">https://docs.cypress.io/guides/guides/parallelization.html</a></p>
<p>Unfortunately, no matter what I try, there is always some kind of error like:</p>
<blockquote>
<p>You passed the --parallel flag, but we do not parallelize tests across
different environments. This machine is sending different environment
parameters than the first machine that started this parallel run. The
existing run is: <a href=""https://dashboard.cypress.io/projects/qwerty/runs/44"" rel=""nofollow noreferrer"">https://dashboard.cypress.io/projects/qwerty/runs/44</a>
In order to run in parallel mode each machine must send identical
environment parameters such as:</p>
<ul>
<li>specs</li>
<li>osName</li>
<li>osVersion</li>
<li>browserName</li>
<li>browserVersion (major) This machine sent the following parameters: {   &quot;osName&quot;: &quot;linux&quot;,   &quot;osVersion&quot;: &quot;Ubuntu - 20.04&quot;,   &quot;browserName&quot;:
&quot;Firefox&quot;,   &quot;browserVersion&quot;: &quot;80.0.1&quot;,   &quot;specs&quot;: [
&quot;src/integration/app/app.spec.ts&quot;   ] } <a href=""https://on.cypress.io/parallel-group-params-mismatch"" rel=""nofollow noreferrer"">https://on.cypress.io/parallel-group-params-mismatch</a></li>
</ul>
</blockquote>
<p>Only one browser per group passes and the 2nd one gets the following error.</p>
<p><a href=""https://i.stack.imgur.com/9Ystn.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/9Ystn.png"" alt=""Pipeline result"" /></a></p>
<p>These are my scripts in <code>package.json</code>:</p>
<pre><code># 1st --parallel flag for nx and 2nd after -- for Cypress directly
# $CYPRESS_RECORD_KEY - key provided by cypress.io
# $CI_ID - &lt;branch-name&gt;-&lt;commit-hash&gt; - e.g. my-new-branch-qweqtwerwtreyzsxfc4123dxfv

&quot;e2e:ci&quot;: &quot;nx e2e main-e2e --prod --headless --parallel --record --key $CYPRESS_RECORD_KEY --ci-build-id $CI_ID --group MainWeb -- --parallel&quot;,
&quot;e2e:ci:chrome&quot;: &quot;yarn e2e:ci --browser=chrome&quot;,
&quot;e2e:ci:firefox&quot;: &quot;yarn e2e:ci --browser=firefox&quot;,

&quot;e2e:storybook:ci&quot;: &quot;nx e2e storybook-e2e --prod --headless --parallel --record --key $CYPRESS_RECORD_KEY --ci-build-id $CI_ID --group Storybook -- --parallel&quot;,
&quot;e2e:storybook:ci:chrome&quot;: &quot;yarn e2e:storybook:ci --browser=chrome&quot;,
&quot;e2e:storybook:ci:firefox&quot;: &quot;yarn e2e:storybook:ci --browser=firefox&quot;
</code></pre>
<p>And here is my <code>.gitlab-ci.yml</code> (e2e stage part only):</p>
<pre><code>E2E Main-Web - Chrome:
  stage: e2e
  script:
    - yarn e2e:ci:chrome

E2E Main-Web - Firefox:
  stage: e2e
  script:
    - yarn e2e:ci:firefox

E2E Storybook - Chrome:
  stage: e2e
  script:
    - yarn e2e:storybook:ci:chrome

E2E Storybook - Firefox:
  stage: e2e
  script:
    - yarn e2e:storybook:ci:firefox
</code></pre>
<p>I'm not sure what is wrong here. I tried so many configurations, flags, solutions (even parallelization on Gitlab), but always there is something wrong...</p>
<p>Of course I set <code>cypress.io &gt; Project Settings &gt; Parallelization &gt; Run Completion Delay</code> for <code>60s</code>.</p>
",https://stackoverflow.com/questions/64450913/grouping-parallel-runs-in-one-entry-on-cypress-io-using-gitlab-ci,"['gitlab-ci', 'cypress', 'nrwl-nx']",3532,True,3,1
Run the WebApp and API side-by-side for executing e2e tests,"<p>I have a SPA and a REST Api in a single repository in different .csproj. When I want to debug the app, I have to launch both the SPA and the Rest API manually using dotnet run command (or IIS Express in VS). Even if the codebase is totally isolated between the webapp and the api, it wasn't necessary to split the repository. Because even if they are on a totally different codebase, the front-end is hardly binded to the API.</p>
<p>The SPA and the API are hosted in different domains locally :</p>
<ul>
<li>A vue.js .Net Core SPA hosted on https://localhost:5000 (in production
app.mysite.com)</li>
<li>A .Net Core 3.1 API Rest hosted on https://localhost:5001 (in
production api.mysite.com)</li>
</ul>
<p>Now, I would like to run automatic end-to-end tests on the WebApp using any e2e testing framework (Maybe TestCafe or whatever...). For automating the tests before deployment, I am using Azure Devops CI.</p>
<p>Here is my current CI process :</p>
<p>Build</p>
<ul>
<li>API project build</li>
<li>API project unit test</li>
<li>WebApp project build</li>
<li>WebApp project unit test</li>
<li>Packaging into artifacts both the API &amp; WebApp</li>
</ul>
<p>Release (Staging) - Automatic after build</p>
<ul>
<li>Executing database migrations, etc...</li>
<li>Publish API &amp; WebApp to staging Azure App Service</li>
</ul>
<p>Release (Production) (Manual)</p>
<ul>
<li>Executing database migrations, etc...</li>
<li>Publish API &amp; WebApp to production Azure App Service</li>
</ul>
<p>I've set up the API as following, to make it uses a fake database for testing purpose when in &quot;Test&quot; environment :</p>
<pre class=""lang-cs prettyprint-override""><code>if (Environment.IsTest())
{
  var serviceProvider = new InMemoryDatabaseRoot();
  services.AddDbContext&lt;MyDbContext&gt;(options =&gt; options.UseInMemoryDatabase(&quot;MyDb&quot;, serviceProvider));
}
</code></pre>
<p>Now I would like to know if it exists a single npm command for launching the webapp and the API side-by-side in test environment and when both servers are ready, launching e2e tests. In every e2e tests frameworks docs, I haven't found a way to achieve this. In most use cases, the tests are only executed on the webapp.</p>
",https://stackoverflow.com/questions/62812073/run-the-webapp-and-api-side-by-side-for-executing-e2e-tests,"['c#', 'asp.net', 'asp.net-core', 'continuous-integration', 'automated-tests']",235,False,1,0
Cypress / React-Admin table sort question,"<p>Looking for some inspiration here. I'm using react-admin, which is a material-ui based framework, with Cypress for e2e testing, and got stuck on table sorting.</p>
<p>There is a Cypress test within the react-admin github project to test for table sorting, but all it does is look at whether the up/down indicator appears after you click the table heading to toggle the sort. That's a UI test, not an end-to-end test, as it doesn't look at the actual data to see if the data is sorted.</p>
<p>In my case, when you change the sort order, an API request is made and the UI renders the new sorted data from the API.</p>
<p>However, although Cypress correctly checks for the content of the first row using .contains() before the sort, once the sort is done, Cypress still responds as if the first row in the table contains the same data, rather than the new data I can see on-screen. I've checked source, and the DOM is updated to the new order.</p>
<p>It's like there's some caching going on somewhere, and I can't figure out where.</p>
<p>I can't share the full code as it's complex and proprietary, but I've boiled it down to a minimal example, which is available at <a href=""https://gitlab.com/notifium_public/cypress-table-sort"" rel=""nofollow noreferrer"">https://gitlab.com/notifium_public/cypress-table-sort</a></p>
<p>This uses react-admin's own demo site.</p>
<p>Just do:</p>
<pre><code>git clone https://gitlab.com/notifium_public/cypress-table-sort.git
npm install
npm run test
</code></pre>
<p>then run the table_sort.js test in Cypress.</p>
<p>You'll see that test logs in, checks the first row, then clicks a column header and checks that first row again. The data is randomised, so the best check I could come up with is to check the new first row doesn't contain a customer with a &quot;last seen&quot; date in 2020.</p>
<p>Visually, the new entry in the top row will be 2016/2017, but the test fails, as it's still got a a reference to the original 2020 row.</p>
<p>Any thoughts?
Regards,
Andy</p>
",https://stackoverflow.com/questions/64025737/cypress-react-admin-table-sort-question,"['material-ui', 'cypress', 'react-admin']",382,False,2,0
"Visual C++ build tools seems to be installed But Bazel can&#39;t find the following tools: cl.exe, link.exe, lib.exe, ml64.exe","<p>I am trying to build Angular on windows server 2019 AWS Virtual Machine. </p>

<ol>
<li>I downloaded angular-master.zip from <a href=""https://github.com/angular/angular"" rel=""nofollow noreferrer"">https://github.com/angular/angular</a></li>
<li>I unzipped this angular-master.zip</li>
</ol>

<p>I downloaded following Prerequisite softwares.
 1. Prerequisite Software</p>

<p>•   Git and/or the GitHub app (for Mac or Windows); GitHub's Guide to Installing Git is a good source of information.
•   Node.js, (version specified in the engines field of package.json) which is used to run a development web server, run tests, and generate distributable files.
•   Yarn (version specified in the engines field of package.json) which is used to install dependencies.
•   Java Development Kit which is used to execute the selenium standalone server for e2e testing.</p>

<ol start=""2"">
<li>I have done - yarn install</li>
<li><p>I have done - yarn global add windows-build-tools. It has installed C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools on my Virtual machine. It has also installed - C:\Users\Administrator.windows-build-tools\python27</p></li>
<li><p>I have done - node ./scripts/build/build-packages-dist.js</p></li>
</ol>

<p>it is giving following error –</p>

<p>INFO: Analyzed 18 targets (1 packages loaded, 179 targets configured).
INFO: Found 18 targets...
ERROR: C:/users/administrator/_bazel_administrator/e2kq7fn3/external/com_google_protobuf/BUILD:267:11: C++ compilation of rule '@com_google_protobuf//:protoc_lib' failed (Exit 1)</p>

<p>The target you are compiling requires Visual C++ build tools.
Bazel couldn't find a valid Visual C++ build tools installation on your machine.</p>

<p>Visual C++ build tools seems to be installed at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC
But Bazel can't find the following tools:
    cl.exe, link.exe, lib.exe, ml64.exe</p>

<p>Please check your installation following <a href=""https://docs.bazel.build/versions/master/windows.html#using"" rel=""nofollow noreferrer"">https://docs.bazel.build/versions/master/windows.html#using</a></p>

<p>INFO: Elapsed time: 2210.447s, Critical Path: 1095.73s
INFO: 18 processes: 16 local, 2 worker.
FAILED: Build did NOT complete successfully
child_process.js:669
    throw err;
    ^</p>

<p>Error: Command failed: yarn --cwd ""c:\angular\angular-master"" --silent bazel build --config=release --config=view-engine //packages/upgrade:npm_package //packages/service-worker:npm_package //packages/router:npm_package //packages/platform-webworker-dynamic:npm_package //packages/platform-webworker:npm_package //packages/platform-server:npm_package //packages/platform-browser-dynamic:npm_package //packages/platform-browser:npm_package //packages/localize:npm_package //packages/language-service:npm_package //packages/forms:npm_package //packages/elements:npm_package //packages/core:npm_package //packages/compiler-cli:npm_package //packages/compiler:npm_package //packages/common:npm_package //packages/bazel:npm_package //packages/animations:npm_package</p>

<pre><code>at checkExecSyncError (child_process.js:630:11)
at execSync (child_process.js:666:15)
at exec (c:\angular\angular-master\scripts\build\package-builder.js:122:18)
at buildTargetPackages (c:\angular\angular-master\scripts\build\package-builder.js:81:3)
at Object.&lt;anonymous&gt; (c:\angular\angular-master\scripts\build\build-packages-dist.js:18:1)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
</code></pre>

<p>status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 6708,
  stdout: null,
  stderr: null
}</p>
",https://stackoverflow.com/questions/62448565/visual-c-build-tools-seems-to-be-installed-but-bazel-cant-find-the-following,"['c++', 'angular', 'windows', 'visual-studio-2017', 'bazel']",658,False,3,0
Sharing volumes inside docker container on gitlab runner,"<p>So, I am trying to mount a working directory with project files into a child instance on a gitlab runner in sort of a DinD setup. I want to be able to mount a volume in a docker instance, which would allow me to muck around and test stuff. Like e2e testing and such… without compiling a new container to inject the files I need… Ideally, so I can share data in a DinD environment without having to build a new container for each job that runs…</p>
<p>I tried following (Docker volumes not mounted when using docker:dind (#41227) · Issues · GitLab.org / GitLab FOSS · GitLab) and I have some directories being mounted, but it is not the project data I am looking for.</p>
<p>So, the test jobs, I created a dummy file, and I wish to mount the directory in a container and view the files…</p>
<p>I have a test ci yml, which sort of does what I am looking for. I make test files in the volume I which to mount, which I would like to see in a directory listing, but sadly do not. I my second attempt at this, I couldn’t get the container ID becuase the labels don’t exist on the runner and it always comes up blank… However, the first stages show promise as It works perfectly on a “shell” runner outside of k8s. But, as soon as I change the tag to use a k8s runner it craps out. I can see old directory files /web and my directory I am mounting, but not the files within it. weird?</p>
<p>ci.yml</p>
<pre><code>image: docker:stable
services:
  - docker:dind

stages:
  - compile

variables:
  SHARED_PATH: /builds/$CI_PROJECT_PATH/shared/
  DOCKER_DRIVER: overlay2

.test: &amp;test
  stage: compile
  tags:
- k8s-vols
  script:
  - docker version
  - 'export TESTED_IMAGE=$(echo ${CI_JOB_NAME} | sed &quot;s/test //&quot;)'
  - docker pull ${TESTED_IMAGE}
  - 'export SHARED_PATH=&quot;$(dirname ${CI_PROJECT_DIR})/shared&quot;'
  - echo ${SHARED_PATH}
  - echo ${CI_PROJECT_DIR}
  - mkdir -p ${SHARED_PATH}
  - touch ${SHARED_PATH}/test_file
  - touch ${CI_PROJECT_DIR}/test_file2
  - find ${SHARED_PATH}
  #- find ${CI_PROJECT_DIR}
  - docker run --rm -v ${CI_PROJECT_DIR}:/mnt ${TESTED_IMAGE} find /mnt
  - docker run --rm -v ${CI_PROJECT_DIR}:/mnt ${TESTED_IMAGE} ls -lR /mnt
  - docker run --rm -v ${SHARED_PATH}:/mnt ${TESTED_IMAGE} find /mnt
  - docker run --rm -v ${SHARED_PATH}:/mnt ${TESTED_IMAGE} ls -lR /mnt

test alpine: *test
test ubuntu: *test
test centos: *test


testing:
  stage: compile
  tags:
- k8s-vols
  image:
name: docker:stable
entrypoint: [&quot;/bin/sh&quot;, &quot;-c&quot;]
  script:
# get id of container
- export CONTAINER_ID=$(docker ps -q -f &quot;label=com.gitlab.gitlab-runner.job.id=$CI_JOB_ID&quot; -f &quot;label=com.gitlab.gitlab-runner.type=build&quot;)
# get mount name
- export MOUNT_NAME=$(docker inspect $CONTAINER_ID -f &quot;{{ range .Mounts }}{{ if eq .Destination \&quot;/builds/${CI_PROJECT_NAMESPACE}\&quot; }}{{ .Source }}{{end}}{{end}}&quot; | cut -d &quot;/&quot; -f 6)
# run container
- docker run -v $MOUNT_NAME:/builds -w /builds/$CI_PROJECT_NAME --entrypoint=/bin/sh busybox -c &quot;ls -la&quot;
</code></pre>
<p>This is the values files I am working with…</p>
<pre><code>image: docker-registry.corp.com/base-images/gitlab-runner:alpine-v13.3.1
imagePullPolicy: IfNotPresent
gitlabUrl: http://gitlab.corp.com
runnerRegistrationToken: &quot;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&quot;
runnerToken: &quot;&quot;
unregisterRunners: true
terminationGracePeriodSeconds: 3600
concurrent: 5
checkInterval: 10
rbac:
  create: true
  resources: [&quot;pods&quot;, &quot;pods/exec&quot;, &quot;secrets&quot;]
  verbs: [&quot;get&quot;, &quot;list&quot;, &quot;watch&quot;,&quot;update&quot;, &quot;create&quot;, &quot;delete&quot;]
  clusterWideAccess: false
metrics:
  enabled: true
runners:
  image: docker-registry.corp.com/base-images/docker-dind:v1
  imagePullPolicy: &quot;if-not-present&quot;
  requestConcurrency: 5
  locked: true
  tags: &quot;k8s-vols&quot;
  privileged: true
  secret: gitlab-runner-vols
  namespace: gitlab-runner-k8s-vols
  pollTimeout: 180
  outputLimit: 4096
  kubernetes:
    volumes:
    - type: host_path
      volume:
        name: docker
        host_path: /var/run/docker.sock
        mount_path: /var/run/docker.sock
        read_only: false
  cache: {}
  builds: {}
  services: {}
  helpers:
    cpuLimit: 200m
    memoryLimit: 256Mi
    cpuRequests: 100m
    memoryRequests: 128Mi
    image: docker-registry.corp.com/base-images/gitlab-runner-helper:x86_64-latest
  env:
    NAME: VALUE
    CI_SERVER_URL: http://gitlab.corp.com
    CLONE_URL:
    RUNNER_REQUEST_CONCURRENCY: '1'
    RUNNER_EXECUTOR: kubernetes
    REGISTER_LOCKED: 'true'
    RUNNER_TAG_LIST: k8s-vols
    RUNNER_OUTPUT_LIMIT: '4096'
    KUBERNETES_IMAGE: ubuntu:18.04
    KUBERNETES_PRIVILEGED: 'true'
    KUBERNETES_NAMESPACE: gitlab-runners-k8s-vols
    KUBERNETES_POLL_TIMEOUT: '180'
    KUBERNETES_CPU_LIMIT:
    KUBERNETES_MEMORY_LIMIT:
    KUBERNETES_CPU_REQUEST:
    KUBERNETES_MEMORY_REQUEST:
    KUBERNETES_SERVICE_ACCOUNT:
    KUBERNETES_SERVICE_CPU_LIMIT:
    KUBERNETES_SERVICE_MEMORY_LIMIT:
    KUBERNETES_SERVICE_CPU_REQUEST:
    KUBERNETES_SERVICE_MEMORY_REQUEST:
    KUBERNETES_HELPER_CPU_LIMIT:
    KUBERNETES_HELPER_MEMORY_LIMIT:
    KUBERNETES_HELPER_CPU_REQUEST:
    KUBERNETES_HELPER_MEMORY_REQUEST:
    KUBERNETES_HELPER_IMAGE:
    KUBERNETES_PULL_POLICY:
securityContext:
  fsGroup: 65533
  runAsUser: 100
resources: {}
affinity: {}
nodeSelector: {}
tolerations: []
envVars:
    - name: CI_SERVER_URL
      value: http://gitlab.corp.com
    - name: CLONE_URL
    - name: RUNNER_REQUEST_CONCURRENCY
      value: '1'
    - name: RUNNER_EXECUTOR
      value: kubernetes
    - name: REGISTER_LOCKED
      value: 'true'
    - name: RUNNER_TAG_LIST
      value: k8s-vols
    - name: RUNNER_OUTPUT_LIMIT
      value: '4096'
    - name: KUBERNETES_IMAGE
      value: ubuntu:18.04
    - name: KUBERNETES_PRIVILEGED
      value: 'true'
    - name: KUBERNETES_NAMESPACE
      value: gitlab-runner-k8s-vols
    - name: KUBERNETES_POLL_TIMEOUT
      value: '180'
    - name: KUBERNETES_CPU_LIMIT
    - name: KUBERNETES_MEMORY_LIMIT
    - name: KUBERNETES_CPU_REQUEST
    - name: KUBERNETES_MEMORY_REQUEST
    - name: KUBERNETES_SERVICE_ACCOUNT
    - name: KUBERNETES_SERVICE_CPU_LIMIT
    - name: KUBERNETES_SERVICE_MEMORY_LIMIT
    - name: KUBERNETES_SERVICE_CPU_REQUEST
    - name: KUBERNETES_SERVICE_MEMORY_REQUEST
    - name: KUBERNETES_HELPER_CPU_LIMIT
    - name: KUBERNETES_HELPER_MEMORY_LIMIT
    - name: KUBERNETES_HELPER_CPU_REQUEST
    - name: KUBERNETES_HELPER_MEMORY_REQUEST
    - name: KUBERNETES_HELPER_IMAGE
    - name: KUBERNETES_PULL_POLICY
hostAliases:
  - ip: &quot;10.10.x.x&quot;
    hostnames:
    - &quot;ch01&quot;
podAnnotations:
  prometheus.io/path: &quot;/metrics&quot;
  prometheus.io/scrape: &quot;true&quot;
  prometheus.io/port: &quot;9252&quot;
podLabels: {}
</code></pre>
<p>So, I have made a couple of tweaks to the helm chart. I have added a a volumes section in the config map…</p>
<pre><code>config.toml: |
concurrent = {{ .Values.concurrent }}
check_interval = {{ .Values.checkInterval }}
log_level = {{ default “info” .Values.logLevel | quote }}
{{- if .Values.metrics.enabled }}
listen_address = ‘[::]:9252’
{{- end }}
volumes = [&quot;/builds:/builds&quot;]
#volumes = [&quot;/var/run/docker.sock:/var/run/docker.sock&quot;, “/cache”, “/builds:/builds”]
</code></pre>
<p>I tried using the last line, which includes the docker sock mount, but when it ran, it complained that it could no find mount docker.sock, file not found, so I used the builds directory only in this section, and in the values files, added, the docker.sock mount. and it seems to work fine. for everything else but this mounting thing…</p>
<p>I also saw examples of setting the runner to privileged, but that didn’t seem to do much for me…</p>
<p>when I run the pipeline, this is the output…</p>
<p><a href=""https://i.stack.imgur.com/sB98f.jpg"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/sB98f.jpg"" alt=""enter image description here"" /></a></p>
<p><a href=""https://i.stack.imgur.com/f7Vdt.jpg"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/f7Vdt.jpg"" alt=""enter image description here"" /></a></p>
<p>So as you can see no files…</p>
<p>Thanks for taking the time to be thorough in your request, it really helps!</p>
",https://stackoverflow.com/questions/65442827/sharing-volumes-inside-docker-container-on-gitlab-runner,"['gitlab', 'kubernetes-helm', 'docker-in-docker']",1548,False,2,0
