title,body,link,tags,view_count,is_answered,score,answer_count
Using jMeter for functional e2e testing,"<p>We're using JMeter for e2e testing of a GraphQL API and have some problems that only the GUI shows us the test results, when running from the console there is no useful ""test summary"" visible, and jMeter always exits with a ""0"" exit code indicating ""success"" to our CI.</p>

<p>I've reproduced a minimal example included below to indicate what I'm trying to do:</p>

<ul>
<li>use an HTTP sampler to make a request to a JSON API </li>
<li>make a ""JSON Assertion"" on the result</li>
<li>Print results of failed samplers or assertions to a file or console with a bean shell listener</li>
</ul>

<p>My goal is to print something like the ""View Results Tree"" as a passed/failed summary to the console where jMeter was run, or write it to a file.</p>

<p>Our tests make use of simple HTTP samplers with JSON Assertions, my goal was to try and use a Bean Shell Listener and check if any samplers or JSON assertions had errors, and write to a file in either case.</p>

<pre><code>&lt;?xml version=""1.0"" encoding=""UTF-8""?&gt;
&lt;jmeterTestPlan version=""1.2"" properties=""4.0"" jmeter=""4.0 r1823414""&gt;
&lt;hashTree&gt;
    &lt;TestPlan guiclass=""TestPlanGui"" testclass=""TestPlan"" testname=""Test Plan"" enabled=""true""&gt;
    &lt;stringProp name=""TestPlan.comments""&gt;&lt;/stringProp&gt;
    &lt;boolProp name=""TestPlan.functional_mode""&gt;false&lt;/boolProp&gt;
    &lt;boolProp name=""TestPlan.tearDown_on_shutdown""&gt;true&lt;/boolProp&gt;
    &lt;boolProp name=""TestPlan.serialize_threadgroups""&gt;false&lt;/boolProp&gt;
    &lt;elementProp name=""TestPlan.user_defined_variables"" elementType=""Arguments"" guiclass=""ArgumentsPanel"" testclass=""Arguments"" testname=""User Defined Variables"" enabled=""true""&gt;
        &lt;collectionProp name=""Arguments.arguments""/&gt;
    &lt;/elementProp&gt;
    &lt;stringProp name=""TestPlan.user_define_classpath""&gt;&lt;/stringProp&gt;
    &lt;/TestPlan&gt;
    &lt;hashTree&gt;
    &lt;ThreadGroup guiclass=""ThreadGroupGui"" testclass=""ThreadGroup"" testname=""Thread Group"" enabled=""true""&gt;
        &lt;stringProp name=""ThreadGroup.on_sample_error""&gt;continue&lt;/stringProp&gt;
        &lt;elementProp name=""ThreadGroup.main_controller"" elementType=""LoopController"" guiclass=""LoopControlPanel"" testclass=""LoopController"" testname=""Loop Controller"" enabled=""true""&gt;
        &lt;boolProp name=""LoopController.continue_forever""&gt;false&lt;/boolProp&gt;
        &lt;stringProp name=""LoopController.loops""&gt;1&lt;/stringProp&gt;
        &lt;/elementProp&gt;
        &lt;stringProp name=""ThreadGroup.num_threads""&gt;1&lt;/stringProp&gt;
        &lt;stringProp name=""ThreadGroup.ramp_time""&gt;1&lt;/stringProp&gt;
        &lt;boolProp name=""ThreadGroup.scheduler""&gt;false&lt;/boolProp&gt;
        &lt;stringProp name=""ThreadGroup.duration""&gt;&lt;/stringProp&gt;
        &lt;stringProp name=""ThreadGroup.delay""&gt;&lt;/stringProp&gt;
    &lt;/ThreadGroup&gt;
    &lt;hashTree&gt;
        &lt;HTTPSamplerProxy guiclass=""HttpTestSampleGui"" testclass=""HTTPSamplerProxy"" testname=""HTTP Request"" enabled=""true""&gt;
        &lt;elementProp name=""HTTPsampler.Arguments"" elementType=""Arguments"" guiclass=""HTTPArgumentsPanel"" testclass=""Arguments"" testname=""User Defined Variables"" enabled=""true""&gt;
            &lt;collectionProp name=""Arguments.arguments""/&gt;
        &lt;/elementProp&gt;
        &lt;stringProp name=""HTTPSampler.domain""&gt;jsonplaceholder.typicode.com&lt;/stringProp&gt;
        &lt;stringProp name=""HTTPSampler.port""&gt;&lt;/stringProp&gt;
        &lt;stringProp name=""HTTPSampler.protocol""&gt;https&lt;/stringProp&gt;
        &lt;stringProp name=""HTTPSampler.contentEncoding""&gt;&lt;/stringProp&gt;
        &lt;stringProp name=""HTTPSampler.path""&gt;/posts/1&lt;/stringProp&gt;
        &lt;stringProp name=""HTTPSampler.method""&gt;GET&lt;/stringProp&gt;
        &lt;boolProp name=""HTTPSampler.follow_redirects""&gt;true&lt;/boolProp&gt;
        &lt;boolProp name=""HTTPSampler.auto_redirects""&gt;false&lt;/boolProp&gt;
        &lt;boolProp name=""HTTPSampler.use_keepalive""&gt;true&lt;/boolProp&gt;
        &lt;boolProp name=""HTTPSampler.DO_MULTIPART_POST""&gt;false&lt;/boolProp&gt;
        &lt;stringProp name=""HTTPSampler.embedded_url_re""&gt;&lt;/stringProp&gt;
        &lt;stringProp name=""HTTPSampler.connect_timeout""&gt;&lt;/stringProp&gt;
        &lt;stringProp name=""HTTPSampler.response_timeout""&gt;&lt;/stringProp&gt;
        &lt;/HTTPSamplerProxy&gt;
        &lt;hashTree/&gt;
        &lt;JSONPathAssertion guiclass=""JSONPathAssertionGui"" testclass=""JSONPathAssertion"" testname=""JSON Assertion"" enabled=""true""&gt;
        &lt;stringProp name=""JSON_PATH""&gt;$.userID&lt;/stringProp&gt;
        &lt;stringProp name=""EXPECTED_VALUE""&gt;&lt;/stringProp&gt;
        &lt;boolProp name=""JSONVALIDATION""&gt;false&lt;/boolProp&gt;
        &lt;boolProp name=""EXPECT_NULL""&gt;false&lt;/boolProp&gt;
        &lt;boolProp name=""INVERT""&gt;false&lt;/boolProp&gt;
        &lt;boolProp name=""ISREGEX""&gt;true&lt;/boolProp&gt;
        &lt;/JSONPathAssertion&gt;
        &lt;hashTree/&gt;
    &lt;/hashTree&gt;
    &lt;BeanShellListener guiclass=""TestBeanGUI"" testclass=""BeanShellListener"" testname=""BeanShell Listener"" enabled=""true""&gt;
        &lt;boolProp name=""resetInterpreter""&gt;false&lt;/boolProp&gt;
        &lt;stringProp name=""parameters""&gt;&lt;/stringProp&gt;
        &lt;stringProp name=""filename""&gt;&lt;/stringProp&gt;
        &lt;stringProp name=""script""&gt;&lt;/stringProp&gt;
    &lt;/BeanShellListener&gt;
    &lt;hashTree/&gt;
    &lt;/hashTree&gt;
&lt;/hashTree&gt;
&lt;/jmeterTestPlan&gt;
</code></pre>

<p>I tried a Bean Shell Listener with the following contents, but I don't find the JSON Assertion results in the variables/context available to the Bean Shell Listener.</p>

<pre><code>import org.apache.jmeter.services.FileServer;

// Open File(s)
f = new FileOutputStream(FileServer.getFileServer().getBaseDir()+""/results.txt"", true); 
p = new PrintStream(f); 

// Write data to file 
p.println( ""sampleResult "" + sampleResult.toString() + "": "" + sampleResult.isSuccessful() );
p.println( ""sampleEvent  "" + sampleEvent.toString());
p.println( ""prev  "" + prev.toString());
p.println( ""props  "" + props.toString());
p.println( ""ctx  "" + ctx.toString());
p.println( ""vars  "" + vars.toString());

// Close File(s)
p.close();f.close();
</code></pre>

<p>We are not a Java shop, we use GitLab/etc for our CI, and the ideal case would be to be able to run our jMeter tests in the console, and see a summary of output as one would see when doing unit testing of a scripting language or similar, with a red/green summary of passed and failed tests.</p>
",https://stackoverflow.com/questions/49748683/using-jmeter-for-functional-e2e-testing,"['jmeter', 'functional-testing', 'e2e-testing', 'beanshell']",839,TRUE,0,1
Unit and e2e testing a grpc microservice,"<p>Hi everyone I'm creating a grpc microservice using the nestjs framework. Can anyone give me some advice on how I would test my grpc microservice (unit and e2e).</p>
",https://stackoverflow.com/questions/50414095/unit-and-e2e-testing-a-grpc-microservice,"['node.js', 'grpc', 'nestjs']",3130,TRUE,2,1
Passing arguments in Angular 6 e2e testing,"<p>With Angular 5 there is way to pass any number of arguments while executing e2e tests:</p>

<pre><code>ng e2e --serve false ""arg1"" ""arg2"" ""arg3""
</code></pre>

<p>These arguments reachable in <code>e2e.spec.ts</code> file through <code>NodeJS.Process.argv[]</code> array.</p>

<p>With Angular 6 all the additional arguments are ignored. After googling I haven't found any tips why it stopped to work and how to make it work again.</p>
",https://stackoverflow.com/questions/50829401/passing-arguments-in-angular-6-e2e-testing,"['protractor', 'angular6']",711,FALSE,3,0
Cypress e2e testing - How to get around Cross Origin Errors?,"<p>I'm testing a web app that integrates Gmail, Slack, Dropbox etc. I'm trying to write end to end tests with Cypress.io to verify that auth flows are working. Cypress restricts me from navigating outside my app's domain and gives me a Cross Origin Error. The Cypress docs say that testing shouldn't involve navigating outside your app. But the entire purpose of testing my app is to make sure these outside auth flows are functioning.</p>

<p>The docs also say you can add
    ""chromeWebSecurity"": false
to the cypress.json file to get around this restriction. I have done this, but am still getting cross origin errors (this is at the heart of my question. I would ideally get around this restriction).</p>

<p>I have attempted cypress' single-sign-on example. <a href=""https://github.com/cypress-io/cypress-example-recipes#logging-in---single-sign-on"" rel=""noreferrer"">https://github.com/cypress-io/cypress-example-recipes#logging-in---single-sign-on</a>
I was not able to make it work, and it's a lot more code than I think is necessary.</p>

<p>I've commented on this thread in github, but no responses yet.</p>

<p>Full error message:</p>

<pre><code>Error:     CypressError: Cypress detected a cross origin error happened 
on page load:

  &gt; Blocked a frame with origin ""https://www.example.com"" from 
accessing 
    a cross-origin frame.

    Before the page load, you were bound to the origin policy:
      &gt; https://example.com

A cross origin error happens when your application navigates to a new 
superdomain which does not match the origin policy above.

This typically happens in one of three ways:

1. You clicked an &lt;a&gt; that routed you outside of your application
2. You submitted a form and your server redirected you outside of your 
application
3. You used a javascript redirect to a page outside of your application

Cypress does not allow you to change superdomains within a single test.

You may need to restructure some of your test code to avoid this 
problem. 

Alternatively you can also disable Chrome Web Security which will turn 
off this restriction by setting { chromeWebSecurity: false } in your 
'cypress.json' file.

https://on.cypress.io/cross-origin-violation
</code></pre>
",https://stackoverflow.com/questions/50495996/cypress-e2e-testing-how-to-get-around-cross-origin-errors,"['e2e-testing', 'cypress']",27429,TRUE,22,4
Protractor E2E testing; Verifying account activation email,"<p>I am trying to create a script for email verification. I mean when we create an account on the site, then a verification mail will come to the given mail address and then we have to go to that mail and verify it(clicking on the link/or fetching the code). I tried <a href=""https://stackoverflow.com/questions/29311154/fetching-values-from-email-in-protractor-test-case/29382990#29382990"">this solution</a>. But I have got stuck on the specific error.</p>

<p>This is code which I am trying.</p>

<pre><code>describe(""Sample test case"", function () {

    function getLastEmail() {
    let deferred = protractor.promise.defer();
    console.log(""Waiting for an email..."");

    mailListener.on(""mail"", function(mail){
        deferred.fulfill(mail);
    });
    return deferred.promise;
}


beforeAll(function () {
    browser.waitForAngularEnabled(false);
    browser.get(""https://mail.google.com/mail/"");
    isAngularSite(false);
    browser.sleep(3000);
});

it(""should login with a registration code sent to an email"", function () {
    element(by.id(""username"")).sendKeys(""MyemailID"");
    element(by.id(""password"")).sendKeys(""mypassword"");
    element(by.id(""loginButton"")).click();

    browser.controlFlow().await(getLastEmail()).then(function (email) {
        expect(email.subject).toEqual(""BillPledge Email Verification"");
        expect(email.headers.to).toEqual(""support@billpledge.com"");

        // extract registration code from the email message
        let pattern = /Registration code is: (\w+)/g;
        let regCode = pattern.exec(email.text)[1];

        console.log(regCode);

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

<p>});</p>

<p>and this is my conf file.</p>

<pre><code>// An example configuration file.

exports.config = {
// The address of a running selenium server.
// seleniumAddress: 'http://localhost:4444/wd/hub',

// if we are using protractor's webdriver-manager locally, you cannot use selenium Address
// If the webdriver-manager needs to start a local server, you can use
selenium: 'http://localhost:4445/wd/hub',
seleniumPort: 4445, // Port matches the port above

// Capabilities to be passed to the webdriver instance.
capabilities: {
    'browserName': 'chrome'
},

// Spec patterns are relative to the current working directly when
// protractor is called.
specs: ['./e2eTest/GmailTest.js'],

// Options to be passed to Jasmine-node.
jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 300000
},

allScriptsTimeout: 200000,


onPrepare: function () {
    global.isAngularSite = function (flag) {
        browser.ignoreSynchronization = !flag;
    };

    browser.driver.manage().window().maximize();

    //To generate the report.
    let HtmlReporter = require('protractor-beautiful-reporter');
    jasmine.getEnv().addReporter(new HtmlReporter({
        baseDirectory: 'Results/Report'
    }).getJasmine2Reporter());

    let reporter = new HtmlReporter({
        baseDirectory: 'Results/Report'
    });

    let path = require('path');
    new HtmlReporter({
        baseDirectory: 'Results/Report'
        , preserveDirectory: false
        , cssOverrideFile: 'css/style.css'
        , takeScreenShotsForSkippedSpecs: true
        , screenshotsSubfolder: 'images'
        , jsonsSubfolder: 'jsons'
        , takeScreenShotsOnlyForFailedSpecs: false
        , gatherBrowserLogs: true
        , pathBuilder: function pathBuilder(spec, descriptions, results, capabilities) {
            // Return '&lt;browser&gt;/&lt;specname&gt;' as path for screenshots:
            // Example: 'firefox/list-should work'.
            return path.join(capabilities.caps_.browser, descriptions.join('-'));
        }
        , metaDataBuilder: function metaDataBuilder(spec, descriptions, results, capabilities) {
            // Return the description of the spec and if it has passed or not:
            return {
                description: descriptions.join(' ')
                , passed: results.passed()
            };
        }
    });

    let MailListener = require(""mail-listener2"");

    // here goes your email connection configuration
    let mailListener = new MailListener({
        username: ""myemailid"",
        password: ""mypassword"",
        host: ""imap.gmail.com"",
        port: 993, // imap port
        tls: true,
        tlsOptions: {rejectUnauthorized: false},
        mailbox: ""INBOX"", // mailbox to monitor
        searchFilter: [""UNSEEN"", ""FLAGGED""], // the search filter being used after an IDLE notification has been retrieved
        markSeen: true, // all fetched email willbe marked as seen and not fetched next time
        fetchUnreadOnStart: true, // use it only if you want to get all unread email on lib start. Default is `false`,
        mailParserOptions: {streamAttachments: true}, // options to be passed to mailParser lib.
        attachments: true, // download attachments as they are encountered to the project directory
        attachmentOptions: {directory: ""attachments/""} // specify a download directory for attachments
    });

    mailListener.start();

    mailListener.on(""server:connected"", function () {
        console.log(""Mail listener initialized"");
    });

    global.mailListener = mailListener;
},

onCleanUp: function () {
    mailListener.stop();


},
</code></pre>

<p>};</p>

<p>But while executing the script I am getting following error. The error is:</p>

<pre><code>Error: Please log in via your web browser: 
https://support.google.com/mail/accounts/answer/78754 (Failure)
</code></pre>

<p>and </p>

<pre><code>Failed: browser.controlFlow(...).await is not a function
</code></pre>

<p>I know I am doing some mistake but I am not able to figure out. So can anyone can help me in pointing out and solve it, not solve but at least some suggestion which can help in running this script perfectly.</p>

<p>Thanks</p>
",https://stackoverflow.com/questions/48499322/protractor-e2e-testing-verifying-account-activation-email,"['javascript', 'protractor', 'e2e-testing', 'email-verification', 'angular-e2e']",1415,TRUE,1,1
Gitlab CI - Start Nginx for E2E testing,"<p>Summary: I just want to run a nginx reverse proxy inside gitlab-ci, which maps to containers that I start using docker-compose up, so that I can run E2E tests on my application automatically.</p>

<p>So, I have an application that has 3 services: 1 DB, 1 Node API, and 1 Nginx server, which is serving angular static files.</p>

<p>In production, these services sit behind a nginx reverse proxy.</p>

<p>I want to be able to run E2E tests using an environment very similar to production.
So I have created a base image to run my Continuous Integration tests, which looks like this:</p>

<pre><code>FROM alpine:latest

# Use edge packages
RUN sed -i -e 's/v[[:digit:]]\.[[:digit:]]/edge/g' /etc/apk/repositories
RUN apk upgrade --update-cache --available

RUN apk update
RUN apk add npm
RUN apk add docker
RUN apk add py-pip
RUN pip install --upgrade pip
RUN pip install docker-compose
RUN apk add openrc --no-cache
RUN rc-update add docker boot
RUN npm install -g @angular/cli
RUN npm install -g protractor

# chromium dependencies
RUN apk add openjdk8-jre-base
RUN apk add nss
RUN apk add chromium-chromedriver
RUN apk add chromium
RUN apk upgrade --no-cache --available
ENV CHROME_BIN /usr/bin/chromium-browser
# netcat to test for docker-compose up
RUN apk add netcat-openbsd 
# add netstat to get listening ports
RUN apk add net-tools

## Install nginx to run as reverse proxy
RUN apk add nginx
RUN rc-update add nginx boot
# Add nginx conf
COPY ./proxy.crt /etc/nginx/proxy.crt
COPY ./proxy.key /etc/nginx/proxy.key
COPY ./nginx.conf /etc/nginx/nginx.conf
</code></pre>

<p>My gitlab-ci.yml:</p>

<pre><code>image: registry.gitlab.com/ldso18-19/t2g2/base_ci:1.0
services:
  - docker:dind

stages:
  - build
  - test
  - release
  - deploy

variables:
  DOCKER_HOST: tcp://docker:2375
  DOCKER_DRIVER: overlay2
  WEB_TEST_IMAGE: registry.gitlab.com/ldso18-19/t2g2/web:$CI_COMMIT_REF_SLUG
  API_TEST_IMAGE: registry.gitlab.com/ldso18-19/t2g2/api:$CI_COMMIT_REF_SLUG
  DB_TEST_IMAGE: registry.gitlab.com/ldso18-19/t2g2/db:$CI_COMMIT_REF_SLUG
  WEB_RELEASE_IMAGE: registry.gitlab.com/ldso18-19/t2g2/web:latest
  API_RELEASE_IMAGE: registry.gitlab.com/ldso18-19/t2g2/api:latest
  DB_RELEASE_IMAGE: registry.gitlab.com/ldso18-19/t2g2/db:latest

before_script:
  - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com

web_integration_tests:
  stage: test
  script:
    - rc-status
    - nginx -t
    - /etc/init.d/nginx start
    - netstat -l
    - docker-compose pull
    - docker-compose up -d
    - cd web/e2e
    - sleep 10
    - netstat -l
    - protractor prod-conf.js
</code></pre>

<p>My nginx.conf file:</p>

<pre><code>user  nginx;
worker_processes 1;
pid /var/run/nginx.pid;

events {}

http {
    include /etc/nginx/mime.types;
    # enable reverse proxy
    proxy_redirect      off;
    proxy_set_header    Host        $host;
    proxy_set_header    X-Real-IP   $remote_addr;
    proxy_ssl_session_reuse off;    

    server {

        server_name localhost;
        listen 443 ssl;
        listen [::]:443 ssl ipv6only=on; # managed by Certbot
        ssl_certificate /etc/nginx/proxy.crt; # managed by Certbot
        ssl_certificate_key /etc/nginx/proxy.key; # managed by Certbot
        ssl_session_cache shared:le_nginx_SSL:1m;
        ssl_session_timeout 1440m;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;

        ssl_ciphers ""ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS"";


        # Reverse Proxying (ineeve)
        location / {
            proxy_pass https://docker:4200;
        }

        location /api/ {
            proxy_pass https://docker:8443/;
        }
    }
}
daemon off;
</code></pre>

<p>My docker-compose file:</p>

<pre><code>version: '3.7'

services:
  web:
    image: registry.gitlab.com/project_name/web:42-ci
    ports:
      - 4200:4200
    depends_on:
      - api
  db:
    image: registry.gitlab.com/project_name/db:42-ci
    ports:
      - 5433:5432
    volumes:
      - postgres:/var/lib/postgresql/data
  api:
    image: registry.gitlab.com/project_name/api:42-ci
    depends_on:
      - db
    ports:
      - 8443:8443
volumes:
  postgres:  
</code></pre>

<p>The problem: when gitlab-ci runs I get the following error:</p>

<pre><code>$ rc-status
Service `hwdrivers' needs non existent service `dev'
 * Caching service dependencies ... [ ok ]
Runlevel: sysinit
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
Dynamic Runlevel: manual
$ nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
$ /etc/init.d/nginx start
 * You are attempting to run an openrc service on a
 * system which openrc did not boot.
 * You may be inside a chroot or you may have used
 * another initialization system to boot this system.
 * In this situation, you will get unpredictable results!
 * If you really want to do this, issue the following command:
 * touch /run/openrc/softlevel
 * ERROR: networking failed to start
 * ERROR: cannot start nginx as networking would not start
</code></pre>

<p>Any help would be much appreciated because I have spent almost 10h trying different configurations.</p>
",https://stackoverflow.com/questions/53284890/gitlab-ci-start-nginx-for-e2e-testing,"['docker', 'nginx', 'gitlab', 'e2e-testing']",1218,FALSE,0,0
E2e testing doing nothing since upgrade to ng7,"<p>We just completed our upgrade to Angular 7 and since then, it does nothing any time we try to run e2e tests. It doesn't throw any errors, just doesn't do anything.</p>

<p>I tried booting up a completely new angular project and e2e tests work fine there. I copied over their angular.json file and just replaced the pathing and it does the same thing. </p>

<p>Everything else works perfectly. Unit tests, serve, and aot builds.</p>

<p><a href=""https://i.stack.imgur.com/T1M9V.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/T1M9V.png"" alt=""E2e output""></a></p>

<p>Angular.json:</p>

<pre><code>{
    ""$schema"": ""./node_modules/@angular/cli/lib/config/schema.json"",
    ""version"": 1,
    ""newProjectRoot"": ""projects"",
    ""projects"": {
        ""lscloud-ui"": {
            ""root"": """",
            ""sourceRoot"": ""source"",
            ""projectType"": ""application"",
            ""architect"": {
                ""build"": {
                    ""builder"": ""@angular-devkit/build-angular:browser"",
                    ""options"": {
                        ""outputPath"": ""build/build"",
                        ""index"": ""source/index.html"",
                        ""main"": ""source/main.ts"",
                        ""tsConfig"": ""source/tsconfig.app.json"",
                        ""showCircularDependencies"": false,
                        ""polyfills"": ""source/polyfills.ts"",
                        ""assets"": [
                            ""source/assets"",
                            ""source/favicon.ico""
                        ],
                        ""styles"": [],
                        ""scripts"": []
                    },
                    ""configurations"": {
                        ""production"": {
                            ""optimization"": true,
                            ""outputHashing"": ""all"",
                            ""sourceMap"": false,
                            ""extractCss"": true,
                            ""namedChunks"": false,
                            ""aot"": true,
                            ""extractLicenses"": true,
                            ""vendorChunk"": false,
                            ""buildOptimizer"": true,
                            ""fileReplacements"": [
                                {
                                    ""replace"": ""source/environments/environment.ts"",
                                    ""with"": ""source/environments/environment.prod.ts""
                                }
                            ]
                        }
                    }
                },
                ""serve"": {
                    ""builder"": ""@angular-devkit/build-angular:dev-server"",
                    ""options"": {
                        ""browserTarget"": ""lscloud-ui:build""
                    },
                    ""configurations"": {
                        ""production"": {
                            ""browserTarget"": ""lscloud-ui:build:production""
                        }
                    }
                },
                ""extract-i18n"": {
                    ""builder"": ""@angular-devkit/build-angular:extract-i18n"",
                    ""options"": {
                        ""browserTarget"": ""lscloud-ui:build""
                    }
                },
                ""test"": {
                    ""builder"": ""@angular-devkit/build-angular:karma"",
                    ""options"": {
                        ""main"": ""source/test.ts"",
                        ""karmaConfig"": ""./karma.conf.js"",
                        ""polyfills"": ""source/polyfills.ts"",
                        ""tsConfig"": ""source/tsconfig.spec.json"",
                        ""scripts"": [],
                        ""styles"": [],
                        ""assets"": [
                            ""source/assets"",
                            ""source/favicon.ico""
                        ]
                    }
                },
                ""lint"": {
                    ""builder"": ""@angular-devkit/build-angular:tslint"",
                    ""options"": {
                        ""tsConfig"": [
                            ""source/tsconfig.app.json""
                        ],
                        ""exclude"": [
                            ""**/node_modules/**""
                        ]
                    }
                }
            }
        },
        ""lscloud-ui-e2e"": {
            ""root"": """",
            ""sourceRoot"": """",
            ""projectType"": ""application"",
            ""architect"": {
                ""e2e"": {
                    ""builder"": ""@angular-devkit/build-angular:protractor"",
                    ""options"": {
                        ""protractorConfig"": ""./protractor.conf.js"",
                        ""devServerTarget"": ""lscloud-ui:serve"",
                        ""port"": 49152
                    },
                    ""configurations"": {
                        ""production"": {
                            ""devServerTarget"": ""lscloud-ui:serve:production""
                        }
                    }
                },
                ""lint"": {
                    ""builder"": ""@angular-devkit/build-angular:tslint"",
                    ""options"": {
                        ""tsConfig"": [
                            ""e2e/tsconfig.e2e.json""
                        ],
                        ""exclude"": []
                    }
                }
            }
        }
    },
    ""defaultProject"": ""lscloud-ui"",
    ""schematics"": {
        ""@schematics/angular:component"": {
            ""prefix"": """",
            ""styleext"": ""css""
        },
        ""@schematics/angular:directive"": {
            ""prefix"": """"
        }
    }
}
</code></pre>

<p>protractor.conf.js</p>

<pre><code>const { SpecReporter } = require('jasmine-spec-reporter');

exports.config = {
    allScriptsTimeout: 11000,
    specs: [
        './e2e/**/*.e2e-spec.ts'
    ],
    capabilities: {
        'browserName': 'chrome'
    },
    directConnect: true,
    baseUrl: 'http://localhost:8081/',
    framework: 'jasmine',
    // capabilities: {
    //   'browserName': 'chrome',
    //   'chromeOptions': {
    //     'args': [ ""--headless"", ""--disable-gpu"", ""--window-size=800x600"" ]
    //   }
    // },
    jasmineNodeOpts: {
        showColors: true,
        defaultTimeoutInterval: 30000,
        print: function () { }
    },
    onPrepare() {
        browser.manage().window().setSize(1920, 1080);
        browser.ignoreSynchronization = true;
        require('ts-node').register({
            project: 'e2e/tsconfig.e2e.json'
        });
        jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
    },
    // seleniumAddress: 'http://localhost:4444/wd/hub',
    // seleniumSessionId: '82d468f7f7336afd5727cd8682c252eb',

    SELENIUM_PROMISE_MANAGER: false,
};
</code></pre>
",https://stackoverflow.com/questions/53307946/e2e-testing-doing-nothing-since-upgrade-to-ng7,"['angular', 'typescript', 'angular7', 'angular-e2e']",158,FALSE,1,0
Angular e2e testing after production with VSTS pipelines,"<p>I'm using VSTS build and release pipeline to deploy my angular application.
there is 3 ways to run e2e tests: </p>

<p>1- <strong>In the build pipeline</strong> after installing npm and angular dependencies.</p>

<p>2- <strong>In the release pipeline</strong> after the deployment of my application.</p>

<p>3- <strong>Locally</strong> before using VSTS pipelines.</p>

<p><strong>If i run it in the build pipeline:</strong>
How can i serve the angular app on certain port so that i can run the e2e on it during the build process in VSTS?</p>

<p><strong>If i run it in the release pipeline:</strong>
The deployed app won't have the npm dependencies just have the dist folder so that i can't run ng e2e there.</p>

<p><strong>If i run it locally:</strong>
This is time consuming and not preferred.</p>

<p>What is the best common way to run it?</p>
",https://stackoverflow.com/questions/52871055/angular-e2e-testing-after-production-with-vsts-pipelines,"['angular', 'azure-devops', 'e2e-testing', 'angular-e2e']",766,FALSE,1,1
E2E testing in a submodule of gradle project,"<p>Let's say that my project have 2 modules, API, core and store, and I want to write some E2E tests for the core. My intention is that the final structure for test is:</p>

<pre><code>root
  +- core
       +-src
          +-e2e
              +-java
</code></pre>

<p>Is it possible with gradle, or my only option is to put this tests as part of root project?</p>
",https://stackoverflow.com/questions/52165271/e2e-testing-in-a-submodule-of-gradle-project,"['gradle', 'continuous-integration', 'automated-tests']",389,TRUE,0,1
"e2e testing: Headless mode test passes, regular mode fails","<p>I have an e2e Protractor test that passes in headless mode and fails in regular browser testing.  What are the possible reasons it could be failing in regular browser testing?</p>

<p>Note: I'm using Chrome Version 68.0.3440.106 (Official Build) (64-bit) to run the test.</p>
",https://stackoverflow.com/questions/52104395/e2e-testing-headless-mode-test-passes-regular-mode-fails,"['javascript', 'selenium', 'selenium-webdriver', 'protractor', 'e2e-testing']",697,TRUE,1,1
How to inject services in e2e testing angular (protractor),"<p>i need to inject two services to my e2e test to test my service, first <strong>UrlDecoratorService</strong> second is <strong>APIFetcherService</strong> how to do that in e2e testing (protractor)?</p>

<p>this is two question i posted to understand my problem.</p>

<p><a href=""https://stackoverflow.com/questions/53337670/angular-e2e-testing-how-to-test-service-injectuse-another-services"">first post</a></p>

<p><a href=""https://stackoverflow.com/questions/53335638/e2e-testing-angular-7-failed-cannot-read-property-fetchdata-of-undefined"">second post</a></p>

<p>and right know i don't find the solution.</p>
",https://stackoverflow.com/questions/53340283/how-to-inject-services-in-e2e-testing-angular-protractor,"['angular', 'jasmine', 'protractor', 'e2e-testing', 'angular-e2e']",904,FALSE,0,0
Protractor: How to bypass login(Okta) for e2e testing?,"<p>I currently have had a login component added to my app, and in order to use the features of my app, I must be logged in. Now this is a problem because the implementation of the login is not my code, rather an authentication service (okta). So I cannot just manually enter my log in credentials and sign in with a beforeEach() test (as far as I know). If that is possible and I am able to open to it, I am unsure how I would access the elements. Is there a way I can store a user profile to protractor so that I am already signed into my app with protractor so that I do not need to sign in? I am currently using Chrome and angular 4+ if that helps. If this is not possible, please let me know and I will have to manually sign in. Any input is great, thank you!</p>
",https://stackoverflow.com/questions/50936264/protractor-how-to-bypass-loginokta-for-e2e-testing,"['angular', 'protractor', 'okta']",2205,TRUE,1,1
protractor e2e testing for data sorting involving two column,"<p>I have to verify if priority is same for two operations then it should be sorted as operation name. Using protractor.
 I tried this for verifying priority sorting but it is not working</p>

<pre><code>this.Then(
    /^Verify operations in with priority sorting ascending$/, function(callback) {
        var sorted = [] , unSorted = [],i=0;
        var OperationPriority = element.all(
                by.xpath('//table/tbody/tr//dx-number-box/div/input'));

        console.log(""count"" +OperationPriority.count);

        // OperationPriority.each(function(eachName){
        OperationPriority.map((eachName) =&gt;{
        // eachName.getText().then(function(name){
            unSorted[i] = eachName.getText();
            i++;
            console.log(""high"");
            console.log(unSorted[0]);
        });

        sorted = unSorted.slice();
        sorted.sort(); 

        console.log(sorted);
        console.log(unSorted);

        // expect(sorted).toEqual(unSorted);
        callback();
}); 
</code></pre>
",https://stackoverflow.com/questions/51984138/protractor-e2e-testing-for-data-sorting-involving-two-column,['protractor'],204,TRUE,0,1
Is it possible to use Cypress e2e testing with a firebase auth project?,"<p>I am exploring Cypress for e2e testing, looks like great software.
The problem is Authentication, the Cypress documentation explains why using the UI is very bad <a href=""https://docs.cypress.io/guides/getting-started/testing-your-app.html#Logging-In"" rel=""noreferrer"">here</a>.</p>
<p>So I tried looking at the network tap of my application, to see if I could create a POST request to the firebase API, and authenticate without using the GUI. But I can see that there at least 2 request fired, and token saved to application storage.</p>
<p>So what approach should I use?</p>
<ol>
<li>Authenticate with the UI of my application, and instruct Cypress not to touch the local storage</li>
<li>Keep experimenting with a way of sending the correct POST requests, and save the values to local storage.</li>
<li>Make Cypress run custom JS code, and then use the Firebase SDK to login.</li>
</ol>
<p>I am really looking for some advice here :)</p>
",https://stackoverflow.com/questions/48735570/is-it-possible-to-use-cypress-e2e-testing-with-a-firebase-auth-project,"['firebase', 'firebase-authentication', 'cypress']",11755,TRUE,23,6
"One Year Later, Still Struggling with Unit vs Integration vs E2E testing","<p>I recently watched a number of talks from the AssertJS conference (which I highly recommend), among them @kentcdodds ""<a href=""https://www.youtube.com/watch?v=Fha2bVoC8SE&amp;t=2s"" rel=""noreferrer"">Write Tests, Not Too Many, Mostly Integration</a>."" I've been working on an Angular project for over a year, have written some unit tests, and just started playing with Cypress, but I still feel this frustration around integration tests, and where to draw the lines. I'd really love to talk to some pro who does this day in and day out, but I don't know any where I work. Since I'm tired of not being able to figure this out, I thought I'd just ask the world here, cause you all are fantastic.</p>

<p>So in Angular (or React or Vue, etc), you have component code, and then you have the HTML template, and usually they interact in some way. The component code has functions in it that can be unit tested, and that part I'm ok with.</p>

<p>Where I haven't gotten things straight in my mind is, do you call it an integration test when you're testing how a component function changes the UI? If you're testing that kind of thing, should that be done just in E2E tests? Because Angular/Jasmine(or Jest) lets you do this kind of thing, referencing the UI:</p>

<pre><code>const el = fixture.debugElement.queryAll(By.css('button'));
expect(el[0].nativeElement.textContent).toEqual('Submit')
</code></pre>

<p>But does that mean you should? And if you do, then do you not cover that in your E2E tests? </p>

<p>And regarding integration with things like services, how far do you go with integrating? If you mock the actual HTTP call, and just test that it would get called with the right functions, is that an integration test, or is it still a unit test?</p>

<p>To sum up, I intuitively know what I need to test to have confidence that things are working as they should, I'm just not sure how to discern when something requires all three kinds of tests or not. </p>

<p>I know this is getting long, but here's my example app:</p>

<p><a href=""https://i.stack.imgur.com/yv0Ql.png"" rel=""noreferrer""><img src=""https://i.stack.imgur.com/yv0Ql.png"" alt=""example app""></a></p>

<p>There's a property called <code>hasNoProducts</code> that is set after a product is chosen and data is returned from the server (or not if there is none). If <code>hasNoProducts</code> is true, UI (through an *ngIf) shows that ""Sorry"" message. If false, then other selections become available. Depending on the product picked, those options change.</p>

<p>So I know I can write a unit test and mock the HTTP request so that I can test that <code>hasNoProducts</code> is set correctly. But then, I want to test that the message is displayed, or that the additional options are displayed. And if there is data, test that switching the product changes the data in the other lists that would subsequently show on screen. If I do that using Angular/Jasmine, is it an integration test since I'm ""integrating"" component and template? If not, then what would be an integration test?</p>

<p>I could keep asking questions, but I'll stop there in the hopes that someone has read this far and has some insight. Again, I've read tons of articles, watched tons of videos and done tutorials, but every time I sit down to apply to a real project, I get stuck on things like this, and I want to get past this! Thanks in advance.</p>
",https://stackoverflow.com/questions/50865927/one-year-later-still-struggling-with-unit-vs-integration-vs-e2e-testing,"['javascript', 'angular', 'unit-testing', 'integration-testing', 'e2e-testing']",1539,TRUE,14,1
How to click ion tab in protractor for e2e testing,"<p>I want to be able to navigate my ionic app using e2e.
I am doing this using protractor, by binding element by css.
I want to make an ion-tab to make a click.</p>

<p><code>element(by.css('.settingTabButton')).click();</code></p>

<p>I wanted to add a css attribute to an ion tab' class in the html so that i could grab that element by its css attribute. </p>

<pre><code>&lt;ion-tab class=""settingTabButton"" [root]=""tab3Root"" tabTitle=""Settings"" 
        tabIcon=""md-settings""&gt;
</code></pre>

<p>When I run the test it reports ""Failed element not visible"":</p>

<p>I think it is failing because ion-tab isn't a button so you can't call element.click() in protractor? </p>

<p><strong>chrome> Developer console >elements section :</strong> </p>

<pre><code>&lt;ion-tab class=""settingTabButton"" role=""tabpanel"" tabicon=""md-settings"" tabtitle=""Settings"" ng-reflect-root=""function SettingsPage(navCtrl,"" ng-reflect-tab-title=""Settings"" ng-reflect-tab-icon=""md-settings"" id=""tabpanel-t0-2"" aria-labelledby=""tab-t0-2"" aria-hidden=""true""&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=""nav-decor""&gt;&lt;/div&gt;&lt;/ion-tab&gt;
</code></pre>

<p>Is binding to elements using css the best solution for protractor?</p>

<blockquote>
  <p>See below pseudo for my implementation</p>
</blockquote>

<p><strong>tabs.html</strong></p>

<pre><code>&lt;ion-tabs&gt;
    &lt;ion-tab class=""settingTabButton"" [root]=""tab3Root"" tabTitle=""Settings"" 
        tabIcon=""md-settings""&gt;
    &lt;/ion-tab&gt;
&lt;/ion-tabs&gt;
</code></pre>

<p><strong>tabs.scss</strong>:</p>

<pre><code>.settingTabButton.important {

}
</code></pre>

<p>in the <strong>tabs.ts</strong> :</p>

<pre><code>@Component({
  templateUrl: 'tabs.html',
  styleUrls: ['/tabs.scss']
})
</code></pre>

<p><strong>example.e2e-spec.ts</strong></p>

<pre><code>describe('Login', () =&gt; {
    beforeEach(() =&gt; {
      page.navigateTo('http://localhost:8100/');
    });

    it('as unregistered user be able to navigate to setting screen', () =&gt; {
        element(by.css('.settingTabButton')).click().then(() =&gt; { // fails         here 
        expect(true).toBe(true);
      });
    });

 })
</code></pre>
",https://stackoverflow.com/questions/48172980/how-to-click-ion-tab-in-protractor-for-e2e-testing,"['html', 'css', 'protractor', 'ionic3', 'karma-jasmine']",992,TRUE,2,3
How to check if element is never visible in Cypress e2e testing?,"<p>Is there any way to assert that an element is never visible at any point when routing within Cypress?</p>
<p>I have a server-rendered web app that is sometimes showing a &quot;loading&quot; state when it shouldn't. So when I navigate between pages, a &quot;loading&quot; indicator is showing for a few seconds and then disappearing.</p>
<p>I know that Cypress's assertions will sometimes &quot;wait&quot; -- in this case Cypress waits until loading indicator goes away and that makes the test think that it has passed. But I want the test to fail because the loading indicator was visible <em>at some point</em>.</p>
<p>I'm using these two assertions:</p>
<p><code>cy.get('[data-test=&quot;loading&quot;]').should('not.exist');</code></p>
<p><code>cy.get('[data-test=&quot;loading&quot;]').should('not.be.visible');</code></p>
<p>But both of them are passing because the loading indicator goes away.</p>
<p>I've checked through all the documentation but there doesn't seem to be some kind of method for checking that an element is <em>never</em> visible. Is there some method I'm missing or some hack to test this a different way?</p>
",https://stackoverflow.com/questions/53745845/how-to-check-if-element-is-never-visible-in-cypress-e2e-testing,"['javascript', 'e2e-testing', 'cypress']",11622,TRUE,12,2
e2e testing a file download and verify (assertion) the content,"<p>I need to test a file download and assert that contents of the file are valid.</p>

<p>Tests are written in plain JS and testing tool doesn't matter. 
I have tried puppeteer, testcafe, cypress and even good old selenium with phantomJS but I am unable to get it done.</p>

<p>I am sure this is a very common use-case and someone out there in the wild should have already done it.</p>

<p>Point me to the right direction please.</p>
",https://stackoverflow.com/questions/52291290/e2e-testing-a-file-download-and-verify-assertion-the-content,"['javascript', 'unit-testing', 'puppeteer', 'e2e-testing', 'cypress']",874,FALSE,1,0
How to Properly Test Observables for e2e testing in Karma?,"<p>Currently I am trying to write a test that will perform the following actions:</p>

<ul>
<li>Load my Component</li>
<li>Wait for return from a service class (HTTP Call + Observable)</li>
<li>Check value returned.</li>
</ul>

<p>Service class: </p>

<pre><code>getMyInfo(): Observable&lt;any[]&gt; {
        return this.httpClient.get(`${this.serviceurl}/all`) as Observable&lt;any[]&gt;;
}
</code></pre>

<p>Relevant component code:</p>

<pre><code>ngOnInit() {
    this.myService.getMyInfo().subscribe((data: any[]) =&gt; {
      console.log('I was called')
      this.myInfo = data;
    })
}
</code></pre>

<p>In test class, using this method from Service will not work, the method is called, however the return is never applied in the class (Subscription).</p>

<p>Using a stub works, but this is not what I want, since I want to e2e.</p>

<pre><code>const serviceStub = {
  getMyInfo() {
    return fakeAsyncResponse([{  id: 1,name: 'myname'}]);
  }
};

 it(""should request names on component initiation."", inject([FrontendComponent, Service], async(component: FrontendComponent, service: Service) =&gt; {
    let debugElement = fixture.debugElement;
    let Service = debugElement.injector.get(Service);
    let incrementSpy = spyOn(Service, 'getMyInfo').and.callThrough();
    component.ngOnInit();
    expect(incrementSpy).toHaveBeenCalled();
    await fixture.whenStable();
    fixture.detectChanges();    
    console.log(component.myInfo);
    expect(component.myInfo.length).toEqual(1);
  }));
</code></pre>

<p>To sum up, how can I handle real http calls and then process the expect assertion without stubbing the service classes?</p>
",https://stackoverflow.com/questions/53867730/how-to-properly-test-observables-for-e2e-testing-in-karma,"['jasmine', 'observable', 'e2e-testing', 'angular7', 'angular-e2e']",123,FALSE,0,0
Is there any way to run Protractor e2e testing automatically?,"<p>I was working on an angular project and doing some e2e testing with Protractor. But its really annoying to run the </p>

<pre><code>ng e2e
</code></pre>

<p>every time to check whether my testing is working or not. Is there any way that Protractor will check my e2e code and do the testing for me automatically? I really do not want to run the ng e2e which compile the whole project and takes a bit time. </p>
",https://stackoverflow.com/questions/51494658/is-there-any-way-to-run-protractor-e2e-testing-automatically,['protractor'],313,FALSE,0,2
how to give custom test files path for detox e2e testing,"<p>We are using Detox framework for IOS e2e testing. Detox by default created e2e folder and run all test files created under it. </p>

<p>Is there any way I can create the test files on some other folder and configure that path and run it?</p>
",https://stackoverflow.com/questions/49774798/how-to-give-custom-test-files-path-for-detox-e2e-testing,"['react-native', 'jestjs', 'ios-ui-automation', 'detox']",2405,TRUE,3,2
How to test websockets (gateways) containing exception filters in e2e testing,"<h2>Problem</h2>

<p>Exception filters does not seem to be used at all when doing E2E testing on a gateway</p>

<h2>Code</h2>

<h3>some-gateway.e2e-spec.ts</h3>

<pre><code>import { INestApplication } from '@nestjs/common';
import { Test } from '@nestjs/testing';

import { AppModule } from '@/app.module';
import { SomeGateway } from './some.gateway';

describe('SomeGateway', () =&gt; {
    let app: INestApplication;
    let someGateway: SomeGateway;
    const mockClient = {
        emit: jest.fn(),
    };

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

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

        someGateway = app.get(SomeGateway);
    });

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

    beforeEach(() =&gt; {
        jest.resetAllMocks();
    });

    describe('someEventListener', () =&gt; {
        it('does not throw an exception because I have a exception filter', async (done) =&gt; {

            await someGateway.someEventListener(
                mockClient
            );

            expect(mockClient.emit).toHaveBeenCalled();
            done();
        });
    });
});
</code></pre>

<h3>some-gateway.ts</h3>

<pre><code>import { SomeExceptionFilter } from './some-exception-filter';
import { UseFilters } from '@nestjs/common';
import {
    SubscribeMessage,
    WebSocketGateway,
} from '@nestjs/websockets';

@UseFilters(new SomeExceptionFilter())
@WebSocketGateway({ namespace: 'some-namespace' })
export class SomeGateway {

    @SubscribeMessage('some-event')
    async someEventListener(client): Promise&lt;void&gt; {
        throw new Error();
    }
}
</code></pre>

<h3>some-exception-filter.ts</h3>

<pre><code>import { ArgumentsHost, Catch } from '@nestjs/common';

@Catch()
export class SomeExceptionFilter {
    catch(exception: any, host: ArgumentsHost) {
        console.log('i should be called :(');

        const client = host.switchToWs().getClient();

        client.emit('exception', { message: 'not ok' });
    }
}
</code></pre>

<h2>Some thoughts</h2>

<p>maybe I should use <code>app.getHttpServer()</code> to be able to make it work, but how to simulate a socket.io connection using <code>supertest</code>?</p>
",https://stackoverflow.com/questions/52536124/how-to-test-websockets-gateways-containing-exception-filters-in-e2e-testing,"['typescript', 'testing', 'socket.io', 'jestjs', 'nestjs']",2863,TRUE,1,1
e2e testing angular 7: Failed: Cannot read property &#39;fetchData&#39; of undefined,"<p>I'm trying to do some e2e testing for my service in angular 7, the method return Observable, this is my methode:</p>

<pre class=""lang-js prettyprint-override""><code>import { Injectable } from '@angular/core';
import { UrlDecoratorService } from ""../../common/url-decorator.service"";
import { APIFetcherService } from ""../common/api-fetcher.service"";
import { Observable } from 'rxjs';
import { IALChrono, ALChrono } from '../../common/IALChrono.interface';

@Injectable()
export class AnnonceChronoDetailService {
    private months: string[];
    constructor(private urlDecoratorService: UrlDecoratorService, private apiFetcher: APIFetcherService) {
    }

    fetchData(chronoInfo: ALChrono): Observable&lt;any&gt; {
        // construct API parameters and URL
        var URL: string = this.urlDecoratorService.urlAPIDecorate(""AL"", ""GetAccessChrono"");

        var params = this.urlDecoratorService.generateParameters({
            year: chronoInfo.year,
            month: chronoInfo.month,
            sortBy: chronoInfo.sortBy,
            sortDirection: chronoInfo.sortDirection,
            pageNumber: chronoInfo.currentPage,
            pageSize: chronoInfo.pageSize
        });

        return this.apiFetcher.fetchJson(URL, params);
    }
}
</code></pre>



<p>and this is my test :</p>

<pre class=""lang-js prettyprint-override""><code>import { AppPage } from './app.po';
import { AnnonceChronoDetailService } from '../../src/app/services/annonce-legale/annonce-chrono-detail.service';
import { ALChrono } from '../../src/app/common/IALChrono.interface';
import { APIResponse } from '../../src/app/common/api-response.interface';
import { Observable } from 'rxjs';

describe('workspace-project App', () =&gt; {
  let page: AppPage;
  let service: AnnonceChronoDetailService;
  this.chronoInfo = new ALChrono(); //it's a class

  beforeEach(() =&gt; {
    page = new AppPage();
  });

  it('should display welcome message', () =&gt; {
    page.navigateTo();
    expect(page.getParagraphText()).toEqual('Welcome to MyProject!');
  });


  it('#getObservableValue should return value from observable', (done: DoneFn) =&gt; {
    service.fetchData(this.chronoInfo).subscribe((resp: APIResponse) =&gt; {
      expect(resp.dataCount).toBe(5);
      done();
    });
  });
});
</code></pre>



<p>and this is my terminal error :</p>

<pre class=""lang-js prettyprint-override""><code>DevTools listening on ws://127.0.0.1:53112/devtools/browser/2a1d94b2-ef47-4910-9ee2-e875b615ed45
Jasmine started

  workspace-project App
    √ should display welcome message
    × #getObservableValue should return value from observable
      - Failed: Cannot read property 'fetchData' of undefined
          at UserContext.&lt;anonymous&gt; (D:\Front\e2e\src\app.e2e-spec.ts:34:13)
          at new ManagedPromise (D:\Front\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1077:7)
          at ControlFlow.promise (D:\Front\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2505:12)
          at TaskQueue.execute_ (D:\Front\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3084:14)
          at TaskQueue.executeNext_ (D:\Front\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3067:27)
          at asyncRun (D:\Front\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2974:25)
          at D:\Front\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:668:7
          at &lt;anonymous&gt;
      From: Task: Run it(""#getObservableValue should return value from observable"") in control flow
          at ControlFlow.emit (D:\Front\node_modules\protractor\node_modules\selenium-webdriver\lib\events.js:62:21)
          at ControlFlow.shutdown_ (D:\Front\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2674:10)
          at shutdownTask_.MicroTask (D:\Front\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2599:53)
      From asynchronous test:
      Error
          at Suite.&lt;anonymous&gt; (D:\Front\e2e\src\app.e2e-spec.ts:33:3)
          at Object.&lt;anonymous&gt; (D:\Front\e2e\src\app.e2e-spec.ts:7:1)
          at Module._compile (module.js:635:30)
          at Module.m._compile (D:\Front\node_modules\ts-node\src\index.ts:439:23)
          at Module._extensions..js (module.js:646:10)
          at Object.require.extensions.(anonymous function) [as .ts] (D:\Front\node_modules\ts-node\src\index.ts:442:12)

**************************************************
*                    Failures                    *
**************************************************

1) workspace-project App #getObservableValue should return value from observable
  - Failed: Cannot read property 'fetchData' of undefined

Executed 2 of 2 specs (1 FAILED) in 6 secs.
[10:02:20] I/launcher - 0 instance(s) of WebDriver still running
[10:02:20] I/launcher - chrome #01 failed 1 test(s)
[10:02:20] I/launcher - overall: 1 failed spec(s)
[10:02:20] E/launcher - Process exited with error code 1
An unexpected error occurred: undefined
</code></pre>



<p>i want to test the real value of my return methode not like the unit testing, and they don't know my method <strong>fetchData</strong>.</p>

<p>if you need some more information please tell me😁.</p>

<p>thanks a lot.</p>
",https://stackoverflow.com/questions/53335638/e2e-testing-angular-7-failed-cannot-read-property-fetchdata-of-undefined,"['angular', 'protractor', 'e2e-testing', 'angular2-observables', 'angular-e2e']",689,FALSE,1,1
Angular E2E testing getting hidden elements to show only during E2E,"<p>Currently I am using <code>browser.executeScript</code> to change hidden elements to show up during E2E.</p>

<p>In my app.po.ts, I have a function to set <code>display</code> to <code>inline</code>.</p>

<pre><code>    browser.executeScript('arguments[0].style.display = ""inline""',getHiddenElements());
</code></pre>

<p>By default, the hidden elements have css <code>display = none</code> so it won't show up during prod/dev. </p>

<p>My hidden component template:</p>

<pre><code>.hidden{
    display: none;
}

&lt;div class=""hidden""&gt;
   ...... my hidden elements .......
&lt;/div&gt;
</code></pre>

<p>Problem: The code in hidden component runs when the elements are hidden too. I prefer not to run it. Currently I am trying to have a conditional check in the component code to check for the hidden element css <code>display</code> style but I am unable to achieve it with <code>Renderer2</code> or <code>ElementRef</code> to get the css <code>class.hidden</code>.</p>

<p>How can I ensure that codes in hidden elements only runs during E2E testing, but not during dev/prod mode? Is there anyway to check if <code>.hidden.display</code> is none or in-line in <code>hidden.component.ts</code>?</p>
",https://stackoverflow.com/questions/50505029/angular-e2e-testing-getting-hidden-elements-to-show-only-during-e2e,"['javascript', 'css', 'angular', 'protractor', 'e2e-testing']",257,FALSE,0,1
angular e2e testing : how to test Service inject(use) another services,"<p>i'm trying to test my service with e2e test angular 7, my problem is i don't know how to do that:</p>

<p>it's my service, (the methode return Observable):</p>

<pre class=""lang-js prettyprint-override""><code>import { Injectable } from '@angular/core';
import { UrlDecoratorService } from ""../../common/url-decorator.service"";
import { APIFetcherService } from ""../common/api-fetcher.service"";
import { Observable } from 'rxjs';
import { IALChrono, ALChrono } from '../../common/IALChrono.interface';

@Injectable()
export class AnnonceChronoDetailService {
    private months: string[];
    constructor(private urlDecoratorService: UrlDecoratorService, private apiFetcher: APIFetcherService) {
    }

    fetchData(chronoInfo: ALChrono): Observable&lt;any&gt; {
        // construct API parameters and URL
        var URL: string = this.urlDecoratorService.urlAPIDecorate(""AL"", ""GetAccessChrono"");

        var params = this.urlDecoratorService.generateParameters({
            year: chronoInfo.year,
            month: chronoInfo.month,
            sortBy: chronoInfo.sortBy,
            sortDirection: chronoInfo.sortDirection,
            pageNumber: chronoInfo.currentPage,
            pageSize: chronoInfo.pageSize
        });

        return this.apiFetcher.fetchJson(URL, params);
    }
}
</code></pre>



<p>it have two other services inside my service, <strong>UrlDecoratorService</strong> and <strong>APIFetcherService</strong>.</p>

<p>this is my e2e test:</p>

<pre class=""lang-js prettyprint-override""><code>import { AppPage } from './app.po';
import { AnnonceChronoDetailService } from '../../src/app/services/annonce-legale/annonce-chrono-detail.service';
import { ALChrono } from '../../src/app/common/IALChrono.interface';
import { APIResponse } from '../../src/app/common/api-response.interface';
import { Observable } from 'rxjs';

describe('workspace-project App', () =&gt; {
  let page: AppPage;
  let service: AnnonceChronoDetailService;
  this.chronoInfo = new ALChrono(); //it's a class

  beforeEach(() =&gt; {
    page = new AppPage();
  });

  it('should display welcome message', () =&gt; {
    page.navigateTo();
    expect(page.getParagraphText()).toEqual('Welcome to MyProject!');
  });


  it('#getObservableValue should return value from observable', (done: DoneFn) =&gt; {
    service.fetchData(this.chronoInfo).subscribe((resp: APIResponse) =&gt; {
      expect(resp.dataCount).toBe(5);
      done();
    });
  });
});
</code></pre>



<p>what i need is how to inject the two services <strong>UrlDecoratorService</strong> and <strong>APIFetcherService</strong> to my e2e test, or how to test services that inject another services?</p>

<p>if you need <strong>more informations</strong> please tell me.</p>
",https://stackoverflow.com/questions/53337670/angular-e2e-testing-how-to-test-service-injectuse-another-services,"['angular', 'protractor', 'e2e-testing', 'angular-test', 'angular-e2e']",1384,TRUE,0,1
Unable to debug a TypeScript e2e testing framework using Visual Studio Code,"<p>I am not able to get debugging working on VSCode for an E2E testing framework . Only this message is displayed - Waiting for the debugger to disconnect.</p>

<p>However I am able to get debugging up and running for a simple TS code. I am beginning to wonder if I am even going in the right direction.</p>

<p>Below are the tsconfig.json, package.json and launch.json for the not working and the working projects.</p>

<p>The framework is close to the one offered by protractor. Install protractor using </p>

<pre><code>npm install -g protractor
</code></pre>

<p>You will see the framework in node_modules\protractor\exampleTypescript</p>

<p>tsconfig.json</p>

<pre><code>{
  ""compilerOptions"": {
    ""outDir"": ""tmp"",
    ""rootDir"": ""./"",
    ""sourceMap"": true,
    ""module"": ""commonjs"",
    ""moduleResolution"": ""node"",
    ""target"": ""es2017"",
    ""types"": [""jasmine"", ""jasminewd2"", ""node""]
  },

  ""exclude"": [
    ""node_modules"",
    ""asyncAwait"",
    ""plugins.ts""
  ]
}
</code></pre>

<p>package.json</p>

<pre><code>{
  ""name"": ""org_abc"",
  ""version"": ""1.0.0"",
  ""description"": ""org_abc_e2e automation tests"",
  ""author"": ""org_abc"",
  ""main"": ""./conf.ts"",
  ""license"": ""org_abc"",
  ""scripts"": {
    ""webdriver-update"": ""npx webdriver-manager update"",
    ""prestart"": ""npm run build"",
    ""build"": ""tsc"",
    ""tsc"": ""tsc"",
    ""test"": ""npm run tsc &amp;&amp; protractor tmp/conf.js"" 

  },
  ""dependencies"": {
    ""@types/jasmine"": ""^2.8.9"",
    ""@types/jasminewd2"": ""^2.0.4"",
    ""@types/node"": ""^10.12.0"",
    ""adm-zip"": ""0.4.7"",
    ""chance"": ""^1.0.16"",
    ""chromedriver"": ""^2.41"",
    ""colors"": ""1.1.2"",
    ""geckodriver"": ""1.8.1"",
    ""jasmine"": ""^2.99.0"",
    ""jasmine-reporters"": ""2.2.1"",
    ""jasmine-spec-reporter"": ""4.2.1"",
    ""mocha"": ""^5.2.0"",
    ""protractor"": ""^5.4.1"",
    ""protractor-jasmine2-screenshot-reporter"": ""0.4.0"",
    ""selenium-server"": ""^3.13.0"",
    ""selenium-webdriver"": ""^4.0.0-alpha.1"",
    ""ts-node"": ""^7.0.1"",
    ""webdriver-manager"": ""^12.0.6"",
    ""xml2js"": ""~0.4.19""
  },
  ""devDependencies"": {
    ""@types/jasmine"": ""^2.8.8"",
    ""@types/jasminewd2"": ""^2.0.4"",
    ""ts-node"": ""^7.0.1"",
    ""typescript"": ""^2.9.2"",
    ""yarn"": ""^1.10.1""
  }
}
</code></pre>

<p>launch.json</p>

<pre><code>{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    ""version"": ""0.2.0"",
    ""configurations"": [{
        ""type"": ""node"",
        ""request"": ""launch"",
        ""name"": ""XPIA"",
        ""program"": ""${workspaceFolder}\\conf.ts"",
        ""preLaunchTask"": ""npm: build"",
        ""sourceMaps"": true,
        ""smartStep"": true,
        ""internalConsoleOptions"": ""openOnSessionStart"",
        ""protocol"": ""auto"",
        ""args"": [""${workspaceRoot}\\conf.ts""],
        ""outFiles"": [
            ""${workspaceFolder}/tmp/**/*.js""
        ]
    }]
}
</code></pre>

<p>Debug output:</p>

<pre><code>C:\Program Files\nodejs\node.exe --inspect-brk=31907 tmp\conf.js C:\Users\user_name\Documents\automation\conf.ts 
Debugger listening on ws://127.0.0.1:31907/5ffdafc9-39d4-4f1a-afad-2593d4adacd7
Debugger attached.
Waiting for the debugger to disconnect...
</code></pre>

<p><a href=""https://i.stack.imgur.com/DP3qv.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/DP3qv.png"" alt=""Debugging Not Working Folder Structure""></a></p>

<p>===========================
<strong>The below one is a simple project and I am able to debug it:</strong></p>

<p>In VS Code, I created a TS file with a couple of variables and I am able to debug.</p>

<p>tsconfig.json</p>

<pre><code>{
    ""compileOnSave"": true,
    ""compilerOptions"": {
        ""outDir"": ""./out"",
        ""rootDir"": ""./src"",
        ""sourceMap"": true,
        ""moduleResolution"": ""node"",
        ""target"": ""es5""
    }
}
</code></pre>

<p>package.json</p>

<pre><code>{
  ""name"": ""typescript-debugging"",
  ""version"": ""1.0.0"",
  ""description"": ""typescript-debugging-desc"",
  ""main"": ""src/app.ts"",
  ""scripts"": {
    ""test"": ""echo \""Error: no test specified\"" &amp;&amp; exit 1"",
    ""start"": ""node out/app.js"",
    ""prestart"": ""npm run build"",
    ""build"": ""tsc""
  },
  ""author"": """",
  ""license"": ""ISC"",
  ""devDependencies"": {
    ""typescript"": ""^3.1.3""
  }
}
</code></pre>

<p>launch.json</p>

<pre><code>{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    ""version"": ""0.2.0"",
    ""configurations"": [{
        ""type"": ""node"",
        ""request"": ""launch"",
        ""name"": ""Launch Program"",
        ""program"": ""${workspaceFolder}\\src\\app.ts"",
        ""preLaunchTask"": ""npm: build"",
        ""sourceMaps"": true,
        ""smartStep"": true,
        ""internalConsoleOptions"": ""openOnSessionStart"",
        ""outFiles"": [
            ""${workspaceFolder}/out/**/*.js""
        ]
    }]
}
</code></pre>

<p><a href=""https://i.stack.imgur.com/5eQqy.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/5eQqy.png"" alt=""Debugging working screenshot""></a></p>
",https://stackoverflow.com/questions/53047923/unable-to-debug-a-typescript-e2e-testing-framework-using-visual-studio-code,"['typescript', 'protractor', 'visual-studio-code', 'e2e-testing']",1107,TRUE,0,1
how to right click to select context menu in cypress e2e testing,"<p>I am using PRIMENG context menu data table. I want to select view and delete option from a context menu in cypress e2e testing framework.</p>

<p>primeng data table :- <a href=""https://www.primefaces.org/primeng/#/table/contextmenu"" rel=""nofollow noreferrer"">https://www.primefaces.org/primeng/#/table/contextmenu</a></p>
",https://stackoverflow.com/questions/53736694/how-to-right-click-to-select-context-menu-in-cypress-e2e-testing,"['e2e-testing', 'cypress']",2214,FALSE,-1,2
Cypress e2e testing. Unable to get primeng toast element to get text,"<p>I'm using cypress for e2e testing and I have primeng toast messages. I want the text present in toast but when I trigger toast and try to get the element but I'm unable to get the element. </p>

<p>primeng toast link:-     <a href=""https://www.primefaces.org/primeng/#/toast"" rel=""nofollow noreferrer"">https://www.primefaces.org/primeng/#/toast</a>.  </p>
",https://stackoverflow.com/questions/53773948/cypress-e2e-testing-unable-to-get-primeng-toast-element-to-get-text,['cypress'],5937,TRUE,-1,1
Is it possible to check the expected colorcode in E2E testing using Testcafe?,"<blockquote>
  <p>Is it possible to check the expected colorcode in E2E testing using Testcafe?
  Am using Testcafe tool for E2E testing, I wanna check the color is green for the text, How can I check it.. Is it possible to do these type of UI test in E2E test??</p>
</blockquote>
",https://stackoverflow.com/questions/51951733/is-it-possible-to-check-the-expected-colorcode-in-e2e-testing-using-testcafe,"['node.js', 'user-interface', 'automated-tests', 'e2e-testing', 'testcafe']",371,TRUE,3,1
Detox e2e testing with react-navigation and react-native-fluid-transitions - expect .toBeVisible failing,"<p>I have a detox e2e test to test out the flow from the start of my app up to the login.</p>

<p>My app starts with a splash screen. It then loads my <strong>StackNavigator</strong> whose first element is a <strong>FluidNavigator</strong> from <strong>react-native-fluid-transitions</strong> library.</p>

<p>The test fails with an error that it is unable to pass my assertion for my element:</p>

<pre><code>    Failed: [Error: Error: An assertion failed.

    Exception with Assertion: {
      ""Assertion Criteria"":  ""assertWithMatcher:matcherForSufficientlyVisible(&gt;=0.750000)"",
      ""Element Matcher"":  ""((!(kindOfClass('RCTScrollView')) &amp;&amp; (respondsToSelector(accessibilityIdentifier) &amp;&amp; accessibilityID('signInOrRegisterPage'))) || (((kindOfClass('UIView') || respondsToSelector(accessibilityContainer)) &amp;&amp; parentThatMatches(kindOfClass('RCTScrollView'))) &amp;&amp; ((kindOfClass('UIView') || respondsToSelector(accessibilityContainer)) &amp;&amp; parentThatMatches((respondsToSelector(accessibilityIdentifier) &amp;&amp; accessibilityID('signInOrRegisterPage'))))))""
    }


    Error Trace: [
      {
        ""Description"":  ""Assertion with matcher [M] failed: UI element [E] failed to match the following matcher(s): [S]"",
        ""Description Glossary"":    {
          ""M"":  ""matcherForSufficientlyVisible(&gt;=0.750000)"",
          ""E"":  ""&lt;RCTView:0x7fb63252a270; AX=N; AX.id='signInOrRegisterPage'; AX.label='Welcome to the CompCare Member App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 0}, {375, 667}}; AX.activationPoint={187.5, 333.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 667}}; opaque; alpha=1&gt;"",
          ""S"":  ""matcherForSufficientlyVisible(&gt;=0.750000)""
        },
        ""Error Domain"":  ""com.google.earlgrey.ElementInteractionErrorDomain"",
        ""Error Code"":  ""3"",
        ""File Name"":  ""GREYAssertions.m"",
        ""Function Name"":  ""+[GREYAssertions grey_createAssertionWithMatcher:]_block_invoke"",
        ""Line"":  ""75""
      }
    ]
</code></pre>

<p>Here is my e2e test:</p>

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

  it('should show the Sign In Or Register page', async () =&gt; {
    await expect(element(by.id('signInOrRegisterPage'))).toBeVisible();
  });

  it('should show the register button and the sign in button', async () =&gt; {
    await expect(element(by.id('btnRegisterForApp'))).toBeVisible();
    await expect(element(by.id('btnSignIn'))).toBeVisible();
  });

  it('should navigate to the sign in page', async () =&gt; {
    await element(by.id('btnSignIn')).tap();
    await expect(element(by.id('signInPage'))).toBeVisible();
  });

  it('should show the pin input keypad', async () =&gt; {
    await expect(element(by.id('pinInputKeypad'))).toBeVisible();
  });

  it('should show the dashboard after entering a series of digits', async () =&gt; {
    await element(by.id('testInput1')).tap();
    await element(by.id('testInput9')).tap();
    await element(by.id('testInput6')).tap();
    await element(by.id('testInput0')).tap();
    //await expect(element(by.id('dashboard'))).toBeVisible();
  });
})
</code></pre>

<p>I have tried using detox's <code>await device.disableSynchronization();</code> and then using <code>await waitFor(element(by.id('signInOrRegisterPage'))).toBeVisible().withTimeout(2000);</code>. That didn't work either.</p>

<p>Here is more of my code in case it helps:</p>

<p><strong>App.js</strong></p>

<pre><code>import React, { Component } from 'react';
import SplashScreen from 'react-native-splash-screen';
import { View } from 'react-native';

import StackNavigator from './components/StackNavigator';

export default class App extends Component {

  componentDidMount() {
    SplashScreen.hide();
  }

  render() {
    return (
        &lt;StackNavigator /&gt;
    );
  }
}
</code></pre>

<p>Basics of my <strong>StackNavigator.js</strong></p>

<pre><code>const StackNavigator = createStackNavigator(
  {
    FluidTransitionNavigator: {
      screen: FluidTransitionNavigator
    },
    Dashboard: {
      screen: Dashboard
    }
  },
  {
    initialRouteName: 'FluidTransitionNavigator',
    headerMode: 'float',
    navigationOptions: (props) =&gt; ({
      header: renderHeader(props)
    }),
    // transitionConfig: transitionConfig
  }
);
</code></pre>

<p>Basics of my <strong>FluidTransitionNavigator</strong>:</p>

<pre><code>const FluidTransitionNavigator = FluidNavigator({
  SignInOrRegister: {
    screen: SignInOrRegister
  },
  Login: {
    screen: Login
  }
});
</code></pre>

<p>My <strong>SignInOrRegister</strong> page:</p>

<pre><code>class SignInOrRegister extends Component {
  onRegisterPress() {
  }

  onSignInPress() {
    this.props.navigation.push('Login');
  }

  render() {
    return (
      &lt;View style={styles.mainViewStyle} testID='signInOrRegisterPage'&gt;

        &lt;Transition appear=""horizontal""&gt;
          &lt;View style={{ flex: 1, zIndex: 2}}&gt;
            &lt;Text style={styles.welcomeTextStyle}&gt;Welcome to the App&lt;/Text&gt;
            &lt;View style={styles.logoViewStyle}&gt;
              &lt;Image
                source={require('./images/Logo.png')}
                style={styles.logoStyle}
              /&gt;
            &lt;/View&gt;
            &lt;Text style={styles.instructionTextStyle}&gt;
              I just installed the app.
            &lt;/Text&gt;
            &lt;UniButton testID='btnRegisterForApp' style={{ marginTop: 10 }} type='primary' label='Register for App' onPress={this.onRegisterPress.bind(this)} /&gt;
            &lt;UniButton testID='btnSignIn' style={{ marginTop: 30, zIndex: 10 }} type='secondary' label='I just want to Sign In' onPress={this.onSignInPress.bind(this)} /&gt;
          &lt;/View&gt;
        &lt;/Transition&gt;

        &lt;Transition shared=""brand_btm""&gt;
          &lt;View style={styles.brandingImageViewStyle}&gt;
            &lt;BrandingBottom /&gt;
          &lt;/View&gt;
        &lt;/Transition&gt;
      &lt;/View&gt;
    );
  }
}
</code></pre>

<p>I have also tried removing the <code>Transition</code> elements from my <strong>SignInOrRegister</strong> component:</p>

<pre><code>render() {
    return (
      &lt;View style={styles.mainViewStyle} testID='signInOrRegisterPage'&gt;

        {/* &lt;Transition appear=""horizontal""&gt; */}
          &lt;View style={{ flex: 1, zIndex: 2}}&gt;
            &lt;Text style={styles.welcomeTextStyle}&gt;Welcome to the CompCare Member App&lt;/Text&gt;
            &lt;View style={styles.logoViewStyle}&gt;
              &lt;Image
                source={require('./images/Logo.png')}
                style={styles.logoStyle}
              /&gt;
            &lt;/View&gt;
            &lt;Text style={styles.instructionTextStyle}&gt;
              I just installed the app.
            &lt;/Text&gt;
            &lt;UniButton testID='btnRegisterForApp' style={{ marginTop: 10 }} type='primary' label='Register for App' onPress={this.onRegisterPress.bind(this)} /&gt;
            &lt;UniButton testID='btnSignIn' style={{ marginTop: 30, zIndex: 10 }} type='secondary' label='I just want to Sign In' onPress={this.onSignInPress.bind(this)} /&gt;
          &lt;/View&gt;
        {/* &lt;/Transition&gt; */}

        {/* &lt;Transition shared=""brand_btm""&gt; */}
          &lt;View style={styles.brandingImageViewStyle}&gt;
            &lt;BrandingBottom /&gt;
          &lt;/View&gt;
        {/* &lt;/Transition&gt; */}
      &lt;/View&gt;
    );
  }
</code></pre>

<p>But I still get a failed test.</p>

<p>Here is the entire View Hierarchy:</p>

<pre><code>Hierarchy: &lt;UIWindow:0x7fb6326273e0; AX=N; AX.frame={{0, 0}, {375, 667}}; AX.activationPoint={187.5, 333.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 667}}; opaque; alpha=1&gt;
      |--&lt;RCTRootView:0x7fb632519780; AX=N; AX.frame={{0, 0}, {375, 667}}; AX.activationPoint={187.5, 333.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 667}}; opaque; alpha=1&gt;
      |  |--&lt;RCTRootContentView:0x7fb634a00450; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 0}, {375, 667}}; AX.activationPoint={187.5, 333.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 667}}; opaque; alpha=1&gt;
      |  |  |--&lt;RCTView:0x7fb632530950; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In Welcome to the I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 0}, {375, 667}}; AX.activationPoint={187.5, 333.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 667}}; opaque; alpha=1&gt;
      |  |  |  |--&lt;RCTView:0x7fb63252ef50; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 0}, {375, 667}}; AX.activationPoint={187.5, 333.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 667}}; opaque; alpha=1&gt;
      |  |  |  |  |--&lt;RCTView:0x7fb63252e960; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 0}, {375, 667}}; AX.activationPoint={187.5, 333.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 667}}; opaque; alpha=1&gt;
      |  |  |  |  |  |--&lt;RCTView:0x7fb63252e390; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 0}, {375, 667}}; AX.activationPoint={187.5, 333.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 667}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |--&lt;RCTView:0x7fb63252d340; AX=N; AX.frame={{0, 0}, {375, 64}}; AX.activationPoint={187.5, 32}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 64}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb63252ced0; AX=N; AX.frame={{-375, 0}, {375, 64}}; AX.activationPoint={-187.5, 32}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{-375, 0}, {375, 64}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb63252ca60; AX=N; AX.frame={{-375, 0}, {375, 64}}; AX.activationPoint={-187.5, 32}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 64}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb63252b8f0; AX=N; AX.frame={{-375, 20}, {375, 43.5}}; AX.activationPoint={-187.5, 41.75}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 20}, {375, 43.5}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |--&lt;RCTView:0x7fb634b02770; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 0}, {375, 667}}; AX.activationPoint={187.5, 333.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 667}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb634a02910; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 0}, {375, 667}}; AX.activationPoint={187.5, 333.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 667}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb634a02610; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 0}, {375, 667}}; AX.activationPoint={187.5, 333.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 667}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb634a01240; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 0}, {375, 667}}; AX.activationPoint={187.5, 333.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 667}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb632536870; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 0}, {375, 667}}; AX.activationPoint={187.5, 333.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 667}}; opaque; alpha=0; UIE=N&gt;
      |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb632536260; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 50}, {375, 617}}; AX.activationPoint={187.5, 358.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 50}, {375, 617}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb632533f30; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 50}, {375, 617}}; AX.activationPoint={187.5, 358.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 617}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb632532ed0; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 50}, {375, 617}}; AX.activationPoint={187.5, 358.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 617}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb632532900; AX=Y; AX.label='I just want to Sign In'; AX.frame={{0, 384.5}, {375, 43.5}}; AX.activationPoint={187.5, 406.25}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 334.5}, {375, 43.5}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb6325322e0; AX=N; AX.label='I just want to Sign In'; AX.frame={{85.5, 384.5}, {204, 43.5}}; AX.activationPoint={187.5, 406.25}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{85.5, 0}, {204, 43.5}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTTextView:0x7fb632531e70; AX=Y; AX.label='I just want to Sign In'; AX.frame={{106.5, 395.5}, {163, 22}}; AX.activationPoint={188, 406.5}; AX.traits='UIAccessibilityTraitStaticText'; AX.focused='N'; frame={{21, 11}, {163, 22}}; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb632531860; AX=Y; AX.label='Register for App'; AX.frame={{0, 311}, {375, 43.5}}; AX.activationPoint={187.5, 332.75}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 261}, {375, 43.5}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb632524d20; AX=N; AX.label='Register for App'; AX.frame={{100.5, 311}, {174, 43.5}}; AX.activationPoint={187.5, 332.75}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{100.5, 0}, {174, 43.5}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTTextView:0x7fb63251b750; AX=Y; AX.label='Register for App'; AX.frame={{121.5, 322}, {132, 22}}; AX.activationPoint={187.5, 333}; AX.traits='UIAccessibilityTraitStaticText'; AX.focused='N'; frame={{21, 11}, {132, 22}}; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTTextView:0x7fb632523100; AX=Y; AX.label='I just installed the app.'; AX.frame={{0, 279.5}, {375, 22}}; AX.activationPoint={187.5, 290.5}; AX.traits='UIAccessibilityTraitStaticText'; AX.focused='N'; frame={{0, 229.5}, {375, 22}}; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb63251bd20; AX=N; AX.frame={{0, 150.5}, {375, 114}}; AX.activationPoint={187.5, 207.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 100.5}, {375, 114}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTImageView:0x7fb63251c190; AX=N; AX.frame={{49.5, 165.5}, {276, 99}}; AX.activationPoint={187.5, 215}; AX.traits='UIAccessibilityTraitImage'; AX.focused='N'; frame={{49.5, 15}, {276, 99}}; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTTextView:0x7fb632526d30; AX=Y; AX.label='Welcome to the App'; AX.frame={{0, 80}, {375, 71}}; AX.activationPoint={187.5, 115.5}; AX.traits='UIAccessibilityTraitStaticText'; AX.focused='N'; frame={{0, 30}, {375, 71}}; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb63252ad20; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 0}, {375, 667}}; AX.activationPoint={187.5, 333.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 667}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb63252a890; AX=N; AX.label='Welcome to the CompCare Member App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 0}, {375, 667}}; AX.activationPoint={187.5, 333.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 667}}; opaque; alpha=1&gt;
      +  +  +  +  +  +  +  +  +  +  +  +  +--&lt;RCTView:0x7fb63252a270; AX=N; AX.id='signInOrRegisterPage'; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 0}, {375, 667}}; AX.activationPoint={187.5, 333.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 667}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb6348012c0; AX=N; AX.frame={{0, 395}, {375, 272}}; AX.activationPoint={187.5, 531}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 395}, {375, 272}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb6349019d0; AX=N; AX.frame={{0, 395}, {375, 272}}; AX.activationPoint={187.5, 531}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 272}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb632720000; AX=N; AX.frame={{0, 395}, {375, 272}}; AX.activationPoint={187.5, 531}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 272}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb634800d30; AX=N; AX.frame={{0, 395}, {375, 272}}; AX.activationPoint={187.5, 531}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 272}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTImageView:0x7fb63271fd20; AX=N; AX.frame={{0, 395}, {375, 272}}; AX.activationPoint={187.5, 531}; AX.traits='UIAccessibilityTraitImage'; AX.focused='N'; frame={{0, 0}, {375, 272}}; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb632717e80; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 50}, {375, 617}}; AX.activationPoint={187.5, 358.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 50}, {375, 617}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb632718cf0; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 50}, {375, 617}}; AX.activationPoint={187.5, 358.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 617}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb6327189f0; AX=N; AX.label='Welcome to the App I just installed the app. Register for App I just want to Sign In'; AX.frame={{0, 50}, {375, 617}}; AX.activationPoint={187.5, 358.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {375, 617}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb6327186f0; AX=Y; AX.label='I just want to Sign In'; AX.frame={{0, 384.5}, {375, 43.5}}; AX.activationPoint={187.5, 406.25}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 334.5}, {375, 43.5}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb632529b40; AX=N; AX.label='I just want to Sign In'; AX.frame={{85.5, 384.5}, {204, 43.5}}; AX.activationPoint={187.5, 406.25}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{85.5, 0}, {204, 43.5}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTTextView:0x7fb63250ce50; AX=Y; AX.label='I just want to Sign In'; AX.frame={{106.5, 395.5}, {163, 22}}; AX.activationPoint={188, 406.5}; AX.traits='UIAccessibilityTraitStaticText'; AX.focused='N'; frame={{21, 11}, {163, 22}}; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb632719c90; AX=Y; AX.label='Register for App'; AX.frame={{0, 311}, {375, 43.5}}; AX.activationPoint={187.5, 332.75}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 261}, {375, 43.5}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb632719990; AX=N; AX.label='Register for App'; AX.frame={{100.5, 311}, {174, 43.5}}; AX.activationPoint={187.5, 332.75}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{100.5, 0}, {174, 43.5}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTTextView:0x7fb632715c30; AX=Y; AX.label='Register for App'; AX.frame={{121.5, 322}, {132, 22}}; AX.activationPoint={187.5, 333}; AX.traits='UIAccessibilityTraitStaticText'; AX.focused='N'; frame={{21, 11}, {132, 22}}; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTTextView:0x7fb632716a40; AX=Y; AX.label='I just installed the app.'; AX.frame={{0, 279.5}, {375, 22}}; AX.activationPoint={187.5, 290.5}; AX.traits='UIAccessibilityTraitStaticText'; AX.focused='N'; frame={{0, 229.5}, {375, 22}}; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTView:0x7fb632719270; AX=N; AX.frame={{0, 150.5}, {375, 114}}; AX.activationPoint={187.5, 207.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 100.5}, {375, 114}}; opaque; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTImageView:0x7fb632702a20; AX=N; AX.frame={{49.5, 165.5}, {276, 99}}; AX.activationPoint={187.5, 215}; AX.traits='UIAccessibilityTraitImage'; AX.focused='N'; frame={{49.5, 15}, {276, 99}}; alpha=1&gt;
      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |--&lt;RCTTextView:0x7fb6348007e0; AX=Y; AX.label='Welcome to the App'; AX.frame={{0, 80}, {375, 71}}; AX.activationPoint={187.5, 115.5}; AX.traits='UIAccessibilityTraitStaticText'; AX.focused='N'; frame={{0, 30}, {375, 71}}; alpha=1&gt;]
</code></pre>

<p>You can see where I have placed a row of pluses to indicate where it is finding the element in this hierarchy.</p>
",https://stackoverflow.com/questions/53477506/detox-e2e-testing-with-react-navigation-and-react-native-fluid-transitions-exp,"['react-native', 'transition', 'react-navigation', 'detox']",2881,TRUE,2,1
"React Native e2e testing + Detox: Second keyboard test fails, even though first one succeeds","<p><strong>Description:</strong>
I'm currently writing my e2e tests for my React Native application using Detox. The tests are getting executed on the ios simulator.</p>

<p>Here are my tests:</p>

<pre><code>import { ERROR_MESSAGE_INVALID_CREDENTIALS_TITLE } from ""../app/config/constants/errorMessages"";

describe(""email login"", () =&gt; {
  beforeEach(async () =&gt; {
    await device.reloadReactNative();
  });

  it(""should have a logo"", async () =&gt; {
    await expect(element(by.id(""ordersome_logo""))).toBeVisible();
  });

  it(""should be able to successfully log in"", async () =&gt; {
    await element(by.id(""email_input"")).typeText(""test@test.test"");
    await element(by.id(""password_input"")).typeText(""correctpassword"");
    await element(by.id(""submit_button"")).tap();
    await expect(element(by.id(""homescreen_text""))).toHaveText(""HomeScreen"");
  });

  it(""should show an alert if the password or username is wrong"", async () =&gt; {
    await expect(element(by.id(""email_input""))).toBeVisible();
    await element(by.id(""email_input"")).typeText(""test@test.test"");
    await element(by.id(""password_input"")).typeText(""wrongpassword"");
    await element(by.id(""submit_button"")).tap();
    await expect(element(by.text(ERROR_MESSAGE_INVALID_CREDENTIALS_TITLE))).toBeVisible();
  });
});
</code></pre>

<p>The first test passes successfully. Detox opens the keyboard, puts in the credentials and the application logs in. Then Detox reloads the app (just like described by the <code>beforeEach()</code>. Then the second test immediatly fails with the following error:</p>

<pre><code>Failed: [Error: Error: An action failed. Please refer to the error trace below.
    Exception with Action: {
      ""Action Name"" : ""Type 'test@test.test'"",
      ""Element Matcher"" : ""(((respondsToSelector(accessibilityIdentifier) &amp;&amp; accessibilityID('email_input')) &amp;&amp; !(kindOfClass('RCTScrollVie
w'))) || (kindOfClass('UIScrollView') &amp;&amp; ((kindOfClass('UIView') || respondsToSelector(accessibilityContainer)) &amp;&amp; ancestorThatMatches(((re
spondsToSelector(accessibilityIdentifier) &amp;&amp; accessibilityID('email_input')) &amp;&amp; kindOfClass('RCTScrollView'))))))""
    }


    Error Trace: [
      {
        ""Description"" : ""Failed to type string 'test@test.test', because keyboard was not shown on screen."",
        ""Error Domain"" : ""com.google.earlgrey.ElementInteractionErrorDomain"",
        ""Error Code"" : ""2"",
        ""File Name"" : ""GREYKeyboard.m"",
        ""Function Name"" : ""+[GREYKeyboard typeString:inFirstResponder:error:]"",
        ""Line"" : ""185""
      }
    ]]
</code></pre>

<p>What is the reason for this? Why does the first test succeed (after disabling the hardware keyboard) and the second one fail?</p>

<ul>
<li>Detox: 8.00</li>
<li>React Native: 0.56</li>
<li>Node: 9.4.0</li>
<li>Device: iPhone X</li>
<li>Xcode: 9.4.1</li>
<li>macOS: High Sierra 10.13.4</li>
</ul>

<h2>Edit</h2>

<p>I found a workaround. If I tap the input in the second keyboard test first it works. I would still be interested in a ""real"" answer if any one knows what's up :) </p>

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

<pre><code>it(""should show an alert if the password or username is wrong"", async () =&gt; {
    await element(by.id(""email_input"")).tap();
    await element(by.id(""email_input"")).typeText(""test@test.test"");
    ...
</code></pre>
",https://stackoverflow.com/questions/51252727/react-native-e2e-testing-detox-second-keyboard-test-fails-even-though-first,"['react-native', 'keyboard', 'ios-simulator', 'detox']",622,FALSE,1,0
Email all test case logs to my email using Detox e2e testing library from bitbar.com device farming service,"<p>I am testing react native app on bitbar.com device farm and using Detox/wix e2e testing library. I want to get the test case pass/fail logs to my email from several devices which I select on bitbar.com device farm.</p>

<p>Is there any feature in Detox library to configure email ?</p>

<p>bitbar.com is actually using loggly.com logging services to send logs to email, but there is no guide to set it up in react-native application. Need help.</p>
",https://stackoverflow.com/questions/51435996/email-all-test-case-logs-to-my-email-using-detox-e2e-testing-library-from-bitbar,"['linux', 'react-native', 'detox', 'testdroid']",209,FALSE,0,1
Protractor - E2E testing starts only when I move the mouse over the browser window for each Cucumber scenario,"<p>I'm working on an Angular 6/Protractor/Cucumber application when I launch E2E testing it only starts when I move the mouse over the browser window (for each Cucumber scenario).
my protractor.conf.js</p>

<pre><code>exports.config = {
  allScriptsTimeout: 100000,
  capabilities: {
    'browserName': 'chrome'
  },
  multiCapabilities: [
    {
      browserName: 'chrome',
      specs: 'e2e/features/*.feature'
    }
  ],
  directConnect: true,
  baseUrl: 'http://localhost:4201/',

  // Use a custom framework adapter and set its relative path
  framework: 'custom',
  frameworkPath: require.resolve('protractor-cucumber-framework'),

  // cucumber command line options
  cucumberOpts: {
    // require step definition files before executing features
    require: [""supports/timeout.js"", './e2e/steps/**/*.ts', './cucumber/*.js'],
    // &lt;string[]&gt; (expression) only execute the features or scenarios with tags matching the expression
    tags: [],
    // &lt;boolean&gt; fail if there are any undefined or pending steps
    strict: true,
    // &lt;string[]&gt; (type[:path]) specify the output format, optionally supply PATH to redirect formatter output (repeatable)
    format: [
      'json:e2e/reports/summary.json'
    ],
    // &lt;boolean&gt; invoke formatters without executing steps
    dryRun: false,
    // &lt;string[]&gt; (""extension:module"") require files with the given EXTENSION after requiring MODULE (repeatable)
    compiler: []
  },

  // Enable TypeScript for the tests
  onPrepare() {
    require('ts-node').register({
      project: './e2e/tsconfig.e2e.json'
    });
  },
};
</code></pre>

<p>And an example of step :</p>

<pre><code>import {Before, Given} from 'cucumber';
import {browser} from 'protractor';
import {StepsUtils} from '../utils';


const {setDefaultTimeout} = require('cucumber');

Before(() =&gt; {
  setDefaultTimeout(60 * 15000);
});

Given('J\'ouvre Google Chrome en mode plein écran', function () {
  StepsUtils.navigateToRoot();
  browser.manage()
    .window()
    .maximize()
    .catch(ignoreVoid =&gt; {
      return;
    });
  return browser.getTitle();
});
</code></pre>

<p>The browser is maximized but then the next steps doesn't follow up until I move the mouse over the browser. If I don't move the mouse over the following error shows off in the console :</p>

<pre><code>E/launcher - script timeout: result was not received in 100 seconds
  (Session info: chrome=69.0.3497.100)
</code></pre>
",https://stackoverflow.com/questions/53005198/protractor-e2e-testing-starts-only-when-i-move-the-mouse-over-the-browser-wind,"['angular', 'google-chrome', 'protractor', 'cucumber']",178,TRUE,0,1
React: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL,"<p>In my react application i am trying to write e2e testing using with puppeteer (jest).</p>

<p>test.js</p>

<pre><code>  const puppeteer = require(""puppeteer"");

    let browser;
    let page;

    describe(""LoginPage"", () =&gt; {
     beforeAll(async () =&gt; {
     browser = await puppeteer.launch({
     headless: false,
     slowMo: 250
    });
      page = await browser.newPage();
    });

   it(""should display login page"", async () =&gt; {
     await page.goto(""http://localhost:3000/"");
     const text = await page.evaluate(() =&gt; document.body.innerText);
     expect(text).toContain(""Unity"");
   });

    it(""should show error message if email is not correct"", async() =&gt; {
      await page.type(""#email"", ""user"");
      await page.type(""#password"", ""pass"");
      await page.click(""button[type=submit]"";

            const errorMessage = await page.evaluate(
            async () =&gt;
             document.getElementsByClassName(""ui negative message container"")[0]
            );
          console.log(""errorMessage"", errorMessage);
       });
    });
</code></pre>

<p>But this e2e testing couldn't make it work.</p>

<p>I am receiving an error :</p>

<pre><code>Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
</code></pre>

<p>Can somebody help me to solve this issue?</p>
",https://stackoverflow.com/questions/48883524/react-timeout-async-callback-was-not-invoked-within-timeout-specified-by-jasm,"['reactjs', 'asynchronous', 'jestjs', 'e2e-testing', 'puppeteer']",1802,TRUE,1,1
Nuxt.js end to end testing errors after following documentation also using nuxt-auth,"<p>Edit: Reduced test case <a href=""https://github.com/mkstix6/nuxt-e2e-testing-auth-bug"" rel=""nofollow noreferrer"">https://github.com/mkstix6/nuxt-e2e-testing-auth-bug</a></p>

<hr>

<p>I'm following the nuxt.js e2e testing documentation here:</p>

<p><a href=""https://nuxtjs.org/guide/development-tools#end-to-end-testing"" rel=""nofollow noreferrer"">https://nuxtjs.org/guide/development-tools#end-to-end-testing</a></p>

<p>I am also using the nuxt-auth module (<a href=""https://auth.nuxtjs.org"" rel=""nofollow noreferrer"">https://auth.nuxtjs.org</a>)</p>

<p>When I follow the documentation and run <code>npm test</code> I get errors.</p>

<p>The first few lines are [edit: expanded this a bit]:</p>

<pre><code>Entrypoint app = 7e99177222eb06aee534.js f26c11108ae3834e1137.js 3e276f5900ac5332c193.js
[12:04:56 PM] Compiling server
[12:05:01 PM] Compiled server in 5s

Hash: 944950bfae0ad00400a8
Version: webpack 4.20.2
Time: 4945ms
Built at: 10/16/2018 12:05:01 PM
             Asset     Size  Chunks             Chunk Names
server-bundle.json  995 KiB          [emitted]
Entrypoint app = server-bundle.js
[Vue warn]: Property or method ""$auth"" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based comp
onents, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

found in

---&gt; &lt;Default&gt; at default.vue
       &lt;Root&gt;
[Vue warn]: Error in render: ""TypeError: Cannot read property '$state' of undefined""

found in

---&gt; &lt;Default&gt; at default.vue
       &lt;Root&gt;
[Vue warn]: Property or method ""$auth"" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based comp
onents, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

found in

---&gt; &lt;Default&gt; at default.vue
       &lt;Root&gt;
[Vue warn]: Error in render: ""TypeError: Cannot read property '$state' of undefined""

found in

---&gt; &lt;Default&gt; at default.vue
       &lt;Root&gt;
[12:05:02 PM] TypeError: Cannot read property '$state' of undefined
at Proxy.defaultvue_type_template_id_706d1520_render (server-bundle.js:2010:28)
at VueComponent.Vue._render (/PROJECT_PATH/node_modules/vue/dist/vue.runtime.common.js:4542:22)
at renderComponentInner (/PROJECT_PATH/node_modules/vue-server-renderer/build.js:7532:25)
at renderComponent (/PROJECT_PATH/node_modules/vue-server-renderer/build.js:7502:5)
at RenderContext.renderNode (/PROJECT_PATH/node_modules/vue-server-renderer/build.js:7418:5)
at RenderContext.next (/PROJECT_PATH/node_modules/vue-server-renderer/build.js:2436:14)
at cachedWrite (/PROJECT_PATH/node_modules/vue-server-renderer/build.js:2295:9)
at renderElement (/PROJECT_PATH/node_modules/vue-server-renderer/build.js:7656:5)
at renderNode (/PROJECT_PATH/node_modules/vue-server-renderer/build.js:7420:5)
at renderComponentInner (/PROJECT_PATH/node_modules/vue-server-renderer/build.js:7538:3)
at renderComponent (/PROJECT_PATH/node_modules/vue-server-renderer/build.js:7502:5)
at RenderContext.renderNode (/PROJECT_PATH/node_modules/vue-server-renderer/build.js:7418:5)
at RenderContext.next (/PROJECT_PATH/node_modules/vue-server-renderer/build.js:2436:14)
at RenderContext.next (/PROJECT_PATH/node_modules/vue-server-renderer/build.js:2449:12)
at cachedWrite (/PROJECT_PATH/node_modules/vue-server-renderer/build.js:2295:9)
at renderElement (/PROJECT_PATH/node_modules/vue-server-renderer/build.js:7646:5)

  2 failed

  Route / exits and render HTML

  /PROJECT_PATH/server-bundle.js:2010

  Rejected promise returned by test. Reason:

  TypeError {
    message: 'Cannot read property \'$state\' of undefined',
  }

  Proxy.defaultvue_type_template_id_706d1520_render (server-bundle.js:2010:28)
  VueComponent.Vue._render (node_modules/vue/dist/vue.runtime.common.js:4542:22)
  renderComponentInner (node_modules/vue-server-renderer/build.js:7532:25)
  renderComponent (node_modules/vue-server-renderer/build.js:7502:5)
  RenderContext.renderNode (node_modules/vue-server-renderer/build.js:7418:5)
  RenderContext.next (node_modules/vue-server-renderer/build.js:2436:14)
  cachedWrite (node_modules/vue-server-renderer/build.js:2295:9)
  renderElement (node_modules/vue-server-renderer/build.js:7656:5)
  renderNode (node_modules/vue-server-renderer/build.js:7420:5)
  renderComponentInner (node_modules/vue-server-renderer/build.js:7538:3)
  renderComponent (node_modules/vue-server-renderer/build.js:7502:5)
  RenderContext.renderNode (node_modules/vue-server-renderer/build.js:7418:5)
  RenderContext.next (node_modules/vue-server-renderer/build.js:2436:14)
  RenderContext.next (node_modules/vue-server-renderer/build.js:2449:12)
  cachedWrite (node_modules/vue-server-renderer/build.js:2295:9)
  renderElement (node_modules/vue-server-renderer/build.js:7646:5)



  Route / exits and render HTML with CSS applied

  /PROJECT_PATH/node_modules/request-promise-core/lib/errors.js:32

  Rejected promise returned by test. Reason:

  StatusCodeError {
    error: Buffer @Uint8Array [
</code></pre>

<p>I have tried the advice in the ""Declaring Reactive Properties"" page – as hinted to in the error – but I'm quite new to nuxt.js and vue.js; I may have gotten it wrong.</p>

<p>I'm looking for some advice on how to move past these errors.</p>

<p>Thanks for reading.</p>
",https://stackoverflow.com/questions/52783787/nuxt-js-end-to-end-testing-errors-after-following-documentation-also-using-nuxt,"['e2e-testing', 'nuxt.js']",987,FALSE,1,0
How to verify sorting of multiple ag-grid columns in Protractor,"<p>I am using protractor for e2e testing. 
There is a ag-grid table where multiple columns are sorted in ascending order.</p>

<p>How do i go about verifying this?<br>
<a href=""https://i.stack.imgur.com/V1qan.png"" rel=""nofollow noreferrer"">Picture of Sample table</a></p>
",https://stackoverflow.com/questions/50140531/how-to-verify-sorting-of-multiple-ag-grid-columns-in-protractor,"['angularjs', 'testing', 'automation', 'protractor', 'ag-grid']",1340,FALSE,-2,1
Cypress test: is .contains() equivalent to should(&#39;contain&#39;)?,"<p>Is this: <code>cy.get('[name=planSelect]').contains(dummyPlan)</code></p>

<p>equivalent to this: <code>cy.get('[name=planSelect]').should('contain', dummyPlan)</code></p>

<p>And if so, which is preferred? The first is more of an implicit assertion, but it's shorter and cleaner to my mind.</p>

<p><strong>Follow-up question:</strong> After looking around to see how best to select elements for e2e testing I found that the <a href=""https://docs.cypress.io/guides/references/best-practices.html#Selecting-Elements"" rel=""noreferrer"">Cypress docs</a> recommend using <code>data-cy</code> attributes. Is there a reason this would be better than just adding <code>name</code> attributes to the markup? Should <code>name</code> only be used for forms fields?</p>
",https://stackoverflow.com/questions/50042670/cypress-test-is-contains-equivalent-to-shouldcontain,"['e2e-testing', 'cypress']",35827,TRUE,34,3
Unable to ignore proguard warning,"<p>I'm trying to add Detox e2e testing to my project, and when I run the <code>assembleAndroidTest</code> I get proguard warnings that fails the build:</p>

<p><code>Warning: library class android.content.Intent depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlSerializer
Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.BitmapDrawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.util.Xml depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.util.Xml depends on program class org.xmlpull.v1.XmlSerializer
Warning: library class android.util.Xml depends on program class org.xmlpull.v1.XmlPullParser
Note: there were 13 unresolved dynamic references to classes or interfaces.
      You should check if you need to specify additional program jars.
      (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)
Note: there were 39 accesses to class members by means of introspection.
      You should consider explicitly keeping the mentioned class members
      (using '-keep' or '-keepclassmembers').
      (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclassmember)
Warning: there were 89 unresolved references to classes or interfaces.
         You may need to add missing library jars or update their versions.
         If your code works fine without the missing classes, you can suppress
         the warnings with '-dontwarn' options.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
Warning: there were 16 instances of library classes depending on program classes.
         You must avoid such dependencies, since the program classes will
         be processed, while the library classes will remain unchanged.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#dependency)</code></p>

<p>Couldn't find any <code>dontwarn</code> that suppressed it and allowed me to build the project, <a href=""https://stackoverflow.com/questions/5333830/android-proguard-error-with-org-xmlpull-v1-xmlpullparser"">This SO thread</a> didn't worked either.</p>

<p>Thanks</p>
",https://stackoverflow.com/questions/50248117/unable-to-ignore-proguard-warning,"['proguard', 'android-proguard', 'detox']",373,FALSE,4,0
convert Bouncy Castle&#39;s AsymmetricCipherKeyPair (RSA) to java.security.KeyPair,"<p>I am trying to automate generation of CA and certificates for our E2E testing. I started with Bouncy Castle and I have managed to generate CA cert and machine cert. However, now I need to convert the RSA keypair represented by BC' <code>org.bouncycastle.crypto.AsymmetricCipherKeyPair</code> to <code>java.security.KeyPair</code>. I cannot seem to find a way to do this.</p>
",https://stackoverflow.com/questions/49158734/convert-bouncy-castles-asymmetriccipherkeypair-rsa-to-java-security-keypair,"['java', 'encryption', 'bouncycastle', 'jce']",1290,TRUE,5,1
Microsoft Teams Client Credentials Flow,"<p>Wondering if it is possible to use the client credentials flow for authorization when developing a Microsoft Teams Tab Application. </p>

<p>I see general Active Directory information for the flow <a href=""https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols-oauth-client-creds"" rel=""nofollow noreferrer"">here</a>, does this apply to teams apps?</p>

<p>If not, how would one recommend completing authorization while E2E testing the app? </p>

<p>Thanks.</p>
",https://stackoverflow.com/questions/48403825/microsoft-teams-client-credentials-flow,"['oauth-2.0', 'office365', 'microsoft-teams']",424,TRUE,0,1
How to trigger change event on slate.js when testing with Selenium or Cypress,"<p>I'm trying to find a way to simulate a ""change"" event when doing E2E testing (with selenium or cypress) and slate.js</p>

<p>In our UI, when the user clicks on a word, we pop-up a modal (related to that word).  I've been unable to make this happen as I can't get the change event to trigger </p>
",https://stackoverflow.com/questions/53598450/how-to-trigger-change-event-on-slate-js-when-testing-with-selenium-or-cypress,"['selenium', 'cypress', 'slate.js']",2140,TRUE,4,3
Galera Kubernetes E2E - How to set password in YAML?,"<p>Is there a way to set a Galera root password with this script?</p>

<p><a href=""https://github.com/kubernetes/kubernetes/tree/master/test/e2e/testing-manifests/statefulset/mysql-galera"" rel=""nofollow noreferrer"">https://github.com/kubernetes/kubernetes/tree/master/test/e2e/testing-manifests/statefulset/mysql-galera</a></p>

<p>Everything works great but I can't figure out how to set password.</p>

<p>Thank you.</p>

<pre><code>apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: mysql
spec:
  serviceName: ""galera""
  replicas: 3
  selector:
    matchLabels:
      app: mysql
  template:
    metadata:
      labels:
        app: mysql
    spec:
      initContainers:
      - name: install
        image: k8s.gcr.io/galera-install:0.1
        imagePullPolicy: Always
        args:
        - ""--work-dir=/work-dir""
        volumeMounts:
        - name: workdir
          mountPath: ""/work-dir""
        - name: config
          mountPath: ""/etc/mysql""
      - name: bootstrap
        image: debian:jessie
        command:
        - ""/work-dir/peer-finder""
        args:
        - -on-start=""/work-dir/on-start.sh""
        - ""-service=galera""
        env:
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        volumeMounts:
        - name: workdir
          mountPath: ""/work-dir""
        - name: config
          mountPath: ""/etc/mysql""
      containers:
      - name: mysql
        image: k8s.gcr.io/mysql-galera:e2e
        ports:
        - containerPort: 3306
          name: mysql
        - containerPort: 4444
          name: sst
        - containerPort: 4567
          name: replication
        - containerPort: 4568
          name: ist
        args:
        - --defaults-file=/etc/mysql/my-galera.cnf
        - --user=root
        readinessProbe:
          # TODO: If docker exec is buggy just use k8s.gcr.io/mysql-healthz:1.0
          exec:
            command:
            - sh
            - -c
            - ""mysql -u root -e 'show databases;'""
          initialDelaySeconds: 15
          timeoutSeconds: 5
          successThreshold: 2
        volumeMounts:
        - name: datadir
          mountPath: /var/lib/
        - name: config
          mountPath: /etc/mysql
      volumes:
      - name: config
        emptyDir: {}
      - name: workdir
        emptyDir: {}
  volumeClaimTemplates:
  - metadata:
      name: datadir
    spec:
      accessModes: [ ""ReadWriteOnce"" ]
      resources:
        requests:
          storage: 1Gi
</code></pre>

<p>Where would I add:</p>

<pre><code>env:
        - name: MYSQL_ROOT_PASSWORD
          valueFrom:
            secretKeyRef:
              name: mysql-pass
              key: password
</code></pre>

<p>Then do I need to add it to the args?</p>

<pre><code>args:
- --defaults-file=/etc/mysql/my-galera.cnf
- --user=root
</code></pre>

<p>And readiness probe?</p>

<pre><code> readinessProbe:
      # TODO: If docker exec is buggy just use k8s.gcr.io/mysql-healthz:1.0
      exec:
        command:
        - sh
        - -c
        - ""mysql -u root -e 'show databases;'""
</code></pre>
",https://stackoverflow.com/questions/51601662/galera-kubernetes-e2e-how-to-set-password-in-yaml,"['kubernetes', 'galera']",131,TRUE,1,1
Kubernetes Galera: WSREP: failed to open gcomm backend connection: 110:,"<p>I am trying to setup a Kubernetes Galera 3 Replica set. I am using:</p>

<p><a href=""https://github.com/kubernetes/kubernetes/tree/master/test/e2e/testing-manifests/statefulset/mysql-galera"" rel=""nofollow noreferrer"">https://github.com/kubernetes/kubernetes/tree/master/test/e2e/testing-manifests/statefulset/mysql-galera</a></p>

<p>The first pod spins up fine, but the second pod gets stuck:</p>

<pre><code>1 [ERROR] WSREP: failed to open gcomm backend connection: 110: failed to reach primary view: 110 (Connection timed out)
         at gcomm/src/pc.cpp:connect():162
2018-07-21 18:24:40 1 [ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():208: Failed to open backend connection: -110 (Connection timed out)
2018-07-21 18:24:40 1 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1379: Failed to open channel 'mysql' at 'gcomm://mysql-0.galera.mysql.svc.cluster.local,mysql-1.galera.mysql.svc.cluster.local': -110 (Connection timed out)
2018-07-21 18:24:40 1 [ERROR] WSREP: gcs connect failed: Connection timed out
2018-07-21 18:24:40 1 [ERROR] WSREP: wsrep::connect(gcomm://mysql-0.galera.mysql.svc.cluster.local,mysql-1.galera.mysql.svc.cluster.local) failed: 7
2018-07-21 18:24:40 1 [ERROR] Aborting
</code></pre>

<p>Do I need to have etcd setup for this cluster to work? Any suggestions would be appreciated.  </p>

<p>Thank you!</p>

<p>Kubernetes Info:</p>

<pre><code>Client Version: version.Info{Major:""1"", Minor:""11"", GitVersion:""v1.11.1"", GitCommit:""b1b29978270dc22fecc592ac55d903350454310a"", GitTreeState:""clean"", BuildDate:""2018-07-17T18:53:20Z"", GoVersion:""go1.10.3"", Compiler:""gc"", Platform:""linux/amd64""}
Server Version: version.Info{Major:""1"", Minor:""11"", GitVersion:""v1.11.1"", GitCommit:""b1b29978270dc22fecc592ac55d903350454310a"", GitTreeState:""clean"", BuildDate:""2018-07-17T18:43:26Z"", GoVersion:""go1.10.3"", Compiler:""gc"", Platform:""linux/amd64""}
</code></pre>
",https://stackoverflow.com/questions/51459102/kubernetes-galera-wsrep-failed-to-open-gcomm-backend-connection-110,"['mysql', 'kubernetes', 'centos7', 'galera']",1092,FALSE,1,0
Angular 5 - End to End testing with ngModel,"<p>in last week we are trying to add e2e testing to our project, but it seems (after a big research in the web) there is no library that can work with Angular ngModel (version 2+).</p>

<p>what can we do ? is there anything except from protractor, which is not support Angular 2 ngModel and binding ?</p>

<p>html example:
</p>

<p>I need to look for the following model ""data.user.name"".</p>

<p>thanks.</p>
",https://stackoverflow.com/questions/48783639/angular-5-end-to-end-testing-with-ngmodel,"['angular', 'protractor', 'angular5', 'e2e-testing', 'angular2-ngmodel']",910,TRUE,1,1
Testing Passport in NestJS,"<p>I'm trying to do a e2e testing to a route that has an AuthGuard from nestjs passport module and I don't really know how to approach it. When I run the tests it says:</p>

<blockquote>
  <p>[ExceptionHandler] Unknown authentication strategy ""bearer""</p>
</blockquote>

<p>I haven't mock it yet so I suppose it's because of that but I don't know how to do it.</p>

<p>This is what I have so far:</p>

<p><strong>player.e2e-spec.ts</strong></p>

<pre><code>import { Test } from '@nestjs/testing';
import { INestApplication } from '@nestjs/common';
import * as request from 'supertest';
import { PlayerModule } from '../src/modules/player.module';
import { PlayerService } from '../src/services/player.service';
import { Repository } from 'typeorm';

describe('/player', () =&gt; {
  let app: INestApplication;
  const playerService = { updatePasswordById: (id, password) =&gt; undefined };

  beforeAll(async () =&gt; {
    const module = await Test.createTestingModule({
      imports: [PlayerModule],
    })
      .overrideProvider(PlayerService)
      .useValue(playerService)
      .overrideProvider('PlayerRepository')
      .useClass(Repository)
      .compile();

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

  it('PATCH /password', () =&gt; {
    return request(app.getHttpServer())
      .patch('/player/password')
      .expect(200);
  });
});
</code></pre>

<p><strong>player.module.ts</strong></p>

<pre><code>import { Module } from '@nestjs/common';
import { PlayerService } from 'services/player.service';
import { PlayerController } from 'controllers/player.controller';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Player } from 'entities/player.entity';
import { PassportModule } from '@nestjs/passport';

@Module({
  imports: [
    TypeOrmModule.forFeature([Player]),
    PassportModule.register({ defaultStrategy: 'bearer' }),
  ],
  providers: [PlayerService],
  controllers: [PlayerController],
  exports: [PlayerService],
})
export class PlayerModule {}
</code></pre>
",https://stackoverflow.com/questions/53267536/testing-passport-in-nestjs,['nestjs'],6222,TRUE,2,2
Use Chrome/FF beta version in selenoid,"<p>I am using selenoid for automated e2e-testing and really like it. To ensure browser support on all versions, I am testing with different versions of Chrome/FF and now would need to also test with the beta versions of these browsers.
I found out <a href=""https://aerokube.com/selenoid/latest/#_browser_image_information"" rel=""nofollow noreferrer"">here</a> that there is no built-in image for beta versions.</p>

<p>Is there another way to use beta versions anyway?</p>
",https://stackoverflow.com/questions/51248556/use-chrome-ff-beta-version-in-selenoid,['selenoid'],114,TRUE,1,1
Cypress: can&#39;t log in in the Cypress browser,"<p>I'm trying to set up E2E testing of a Vue application with Cypress. </p>

<p>I can log into the app with my regular Chrome browser. However, the browser opened up by Chrome won't let me log in. Both the automatic login via Cypress and manual login fail. </p>

<p>Is there a setting I'm missing? </p>

<p>My Vue element:</p>

<pre><code>&lt;template&gt;
    &lt;div class=""d-flex justify-content-center""&gt;

            &lt;div class=""field is-horizontal""&gt;
                &lt;div class=""field-label is-normal""&gt;
                    &lt;label class=""label""&gt;Username&lt;/label&gt;
                &lt;/div&gt;
                &lt;div class=""field-body""&gt;
                    &lt;div class=""field""&gt;
                        &lt;div class=""control""&gt;
                            &lt;input v-model=""username"" class=""input"" type=""text""
                                   placeholder=""Your username""&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=""field is-horizontal""&gt;
                &lt;div class=""field-label is-normal""&gt;
                    &lt;label class=""label""&gt;Password&lt;/label&gt;
                &lt;/div&gt;
                &lt;div class=""field-body""&gt;
                    &lt;div class=""field""&gt;
                        &lt;div class=""control""&gt;
                            &lt;input v-model=""password"" class=""input"" type=""password""
                                   placeholder=""Your password""&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=""field is-horizontal""&gt;
                &lt;div class=""field-label""&gt;
                    &lt;!-- Left empty for spacing --&gt;
                &lt;/div&gt;
                &lt;div class=""field-body""&gt;
                    &lt;div class=""field""&gt;
                        &lt;div class=""control text-center""&gt;
                            &lt;button v-on:click=""login()"" class=""button is-primary""&gt;
                                Login
                            &lt;/button&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/template&gt;
</code></pre>

<p>My test file:</p>

<pre><code>describe('Logging in', () =&gt; {
    it('Logs in as admin', () =&gt; {
        cy.visit('/')
            .get('input[type=""text""]')
            .type('Admin')
            .get('input[type=""password""]')
            .type('Pass1234')
            .get('button').click()
            .location().should((loc) =&gt; {
            expect(loc.pathname).to.eq('/dashboard-main/dashboard');
        })
    })
})
</code></pre>

<p>Update: some suggestions here: <a href=""https://github.com/cypress-io/cypress/issues/1759#issuecomment-391729559"" rel=""nofollow noreferrer"">https://github.com/cypress-io/cypress/issues/1759#issuecomment-391729559</a></p>
",https://stackoverflow.com/questions/50488533/cypress-cant-log-in-in-the-cypress-browser,['cypress'],1175,TRUE,2,1
"Puppeteer&#39;s page.goto(url) fails, I want to close the page/exit gracefully so my other JEST tests can continue to run","<p>I have a test suite with Jest and Puppeteer hooked up for headless e2e testing. I set it up so running 'npm test' will run my Puppeteer tests first and then will run the rest of my tests. </p>

<p>Let's say the URL is unavailable. e.g. no internet connection or I forgot to serve it up. I want to exit my Puppeteer tests gracefully and not crash and burn.</p>

<pre><code>page.goto('http://localhost:8000')
// above will fail and I want a way to know it failed to load that.
</code></pre>
",https://stackoverflow.com/questions/51644496/puppeteers-page-gotourl-fails-i-want-to-close-the-page-exit-gracefully-so-my,"['javascript', 'selenium-chromedriver', 'jestjs', 'puppeteer', 'google-chrome-headless']",1222,FALSE,1,1
How to delete a specific folder in a workspace in Jenkins,"<p>I need to remove one folder from a Jenkins project, I know you can wipe the whole database but I don't know if I want to do that, it's a node e2e testing program, so I'm afraid it will wipe the dependencies. </p>

<p>Is there a way to delete just one folder in Jenkins? Or am I being irrational thinking if I wipe the database, it will break the job?</p>

<p>Thanks!</p>
",https://stackoverflow.com/questions/50214810/how-to-delete-a-specific-folder-in-a-workspace-in-jenkins,['jenkins'],1518,FALSE,1,1
E2E tests for random scenarios,"<p>Interested in approach to test random scenarios in case of E2E testing. </p>

<p>Q1: So we need to check all the system parts are connected correctly and what does it mean in case of random answer from the server etc (happy parts instead of single happy part)?</p>

<p>Q2: How to test errors in e2e scenarios? As example of this case different server errors etc. Does it have to be tested at all?</p>
",https://stackoverflow.com/questions/53707473/e2e-tests-for-random-scenarios,"['testing', 'random', 'error-handling', 'automated-tests', 'end-to-end']",304,TRUE,0,1
Appium + Mocha + WebDriverIO async timeout exceeded,"<p>I'm trying to run some e2e testing using Appium. I have simple test like this:</p>

<pre><code>describe('TEST', () =&gt; {
    it('TOST', () =&gt; {
        return client
                .init()
                .click('#loginButton')
        })
});
</code></pre>

<p>Running this one application is started just fine but the Mocha is giving me this error:  </p>

<blockquote>
  <p>Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure
  ""done()"" is called; if returning a Promise, ensure it resolves.</p>
</blockquote>

<p>If I put the same code as just Node.js script (without Mocha) everything is working correct.</p>
",https://stackoverflow.com/questions/50783852/appium-mocha-webdriverio-async-timeout-exceeded,"['javascript', 'mocha.js', 'appium', 'webdriver-io', 'appium-android']",702,TRUE,0,1
How can I clear redux state after finishing test,"<p>I just tried Detox for e2e testing UI Automation. This library is really good. I just want to ask if there is any way for me to clear redux state after finishing a test suite. In my case, I want to clear my shopping cart</p>

<p>Here's my code:</p>

<pre><code>import CartActions, {reducer, INITIAL_STATE} from '../../App/Redux/CartRedux'

describe('Add menu from home screen and do checkout', () =&gt; {
  it ('should navigate to meal detail screen after tapping first meal', async () =&gt; {
    await waitFor(element(by.id('MealListSlider'))).toBeVisible().withTimeout(7500)
    await element(by.id('homeMenu_0')).tap()
    await expect(element(by.id('MealDetailScreen'))).toBeVisible()
  })

  it ('should show shopping cart button after add item to cart', async () =&gt; {
    await element(by.id('addToCart_')).tap()
    await expect(element(by.id('shoppingCartButtonOnMealDetail'))).toBeVisible()
  })

  it ('should navigate to checkout screen', async () =&gt; {
    await element(by.id('shoppingCartButtonOnMealDetail')).tap()
    await expect(element(by.id('SingleOrderCheckoutScreen'))).toBeVisible()
  })

  afterAll(() =&gt; {
    reducer(INITIAL_STATE, CartActions.userEmptyingCart())
  })
})
</code></pre>

<p>I'm using Jest as my test runner. Please help me if I'm doing wrong. Thanks</p>

<p>Detox: 8.0.0
React Native: 0.47.2
Device: iOS
Xcode: 9
macOS: High Sierra</p>
",https://stackoverflow.com/questions/51320270/how-can-i-clear-redux-state-after-finishing-test,"['react-native', 'ui-automation', 'detox']",857,TRUE,0,1
Detox - Testing visibility of modal in react native,"<p>We are using detox to write E2E testing of a react native app where we have a case which needs to test if a modal appears after a button tap. </p>

<p>But detox was not able to identify modal with the given <code>testID</code> thought the modal opens as expected. Is there a different way test modal in reactnative using detox?</p>

<p>Below is the modal JSX</p>

<pre><code>&lt;Modal
    testID=""loadingModal""
    animationType=""none""
    transparent
    visible={loading}
    onRequestClose={() =&gt; {}}
  &gt;
    &lt;View style={styles.modalContainer}&gt;
      &lt;View style={styles.loginModal}&gt;
        &lt;ActivityIndicator
          animating
          size=""large""
          color=""#00e0ff""
        /&gt;
        &lt;Text style={styles.login}&gt;Logging in...&lt;/Text&gt;
      &lt;/View&gt;
    &lt;/View&gt;
  &lt;/Modal&gt;
</code></pre>

<p>And below is the code to test the visibility of modal</p>

<pre><code>it('should have welcome screen', async () =&gt; {      
    ....

    await element(by.text('CONTINUE')).tap();
    await waitFor(element(by.id('loadingModal'))).toBeVisible().withTimeout(5000);
    await expect(element(by.id('loadingModal'))).toBeVisible(); // this always fails    
});
</code></pre>
",https://stackoverflow.com/questions/50117265/detox-testing-visibility-of-modal-in-react-native,"['javascript', 'testing', 'react-native', 'integration-testing', 'detox']",3206,TRUE,0,1
JAVA - can&#39;t import src/test/java to src/main/java,"<p>I have created an E2E testing project, initially, all the java classes were in 'src/test/java"", but now I want to move all the files that do not contain tests to the ""src/main/java"" folder, the problem is after I do it: <br/>
<strong>I can't import packages from ""src/test/java"" to ""src/main/java""</strong> (but can do the opposite). like the packages do not exist at all for import.</p>

<p>Cleaned the project and tried to run via IDE and via maven and it does not change the result. </p>

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

<p>What am I doing wrong? </p>
",https://stackoverflow.com/questions/53530533/java-cant-import-src-test-java-to-src-main-java,"['java', 'eclipse', 'maven', 'testing']",16256,TRUE,11,5
Selenium-Webdriver returns StaleElementReferenceError on doubleClick action,"<p>I am using protractor-cucumber-framework to do e2e testing and just recently, my double click method stopped working and have been returning StaleElementReferenceError ever since.</p>

<p>So my code goes as follows:</p>

<pre><code> generic.tableRows().each((element) =&gt; {
  element.all(by.tagName('td')).each((tdElement) =&gt; {
    tdElement.getText().then((rowCellText) =&gt; {
      if (rowCellText === identifier) {
        browser.actions().doubleClick(tdElement).perform();
      }
    });
  });
});
</code></pre>

<p>The double clicking returns </p>

<blockquote>
  <p>StaleElementReferenceError: stale element reference: element is not attached to the page document</p>
</blockquote>

<p>But when I do:</p>

<pre><code>tdElement.click();
</code></pre>

<p>The element is found and clicked. No errors are returned.</p>

<p>Things that I have tried:</p>

<pre><code>browser.wait(EC.presenceOf(tdElement), 10000).then(() =&gt; {
    browser.actions().doubleClick(tdElement).perform();
 });
</code></pre>

<p>--</p>

<pre><code>browser.actions().mouseDown(tdElement).mouseUp().perform();
browser.sleep(1000); // Tried even without a hard wait
browser.actions().click(tdElement).perform();
</code></pre>

<p>--</p>

<pre><code>tdElement.click().then(() =&gt; {
  browser.sleep(800); // Tried even without a hard wait
  tdElement.click();
});
</code></pre>

<p>-- And</p>

<pre><code>browser.actions().click(tdElement).click(tdElement).perform();
</code></pre>

<p>Any help or insight to this issue would be greatly appreciated.</p>
",https://stackoverflow.com/questions/53910786/selenium-webdriver-returns-staleelementreferenceerror-on-doubleclick-action,"['selenium-webdriver', 'protractor', 'cucumberjs']",875,TRUE,1,2
How to properly write e2e tests of Vuetify apps?,"<p>Currently I am using Nightwatch.js with Chromedriver to perform e2e tests of my Vuetify app. However, the test results are indeterministic.</p>

<p>Many times I get errors like: <code>Timed out while waiting for element &lt;.menuable__content__active&gt; to be present for 5000 milliseconds.</code> when running <code>waitForElementVisible('.menuable__content__active', 5000)</code> right after <code>click('.v-select')</code>, whereas sometimes it passes.</p>

<p>There must be a simpler way to select an item in <code>&lt;v-select&gt;</code> other than clicking on it, waiting for <code>.menuable__content__active</code> and clicking on <code>.menuable__content__active .v-list__tile--link</code>. The same with <code>&lt;v-menu&gt;</code>, <code>&lt;v-autocomplete&gt;</code>, <code>&lt;v-date-picker&gt;</code>, etc.</p>

<p>Other times running <code>click('#myid .v-btn')</code> does not work, but <code>execute('document.querySelector(""#myid .v-btn"").click()')</code> does.</p>

<p>What is the proper way to do deterministic e2e testing of Vuetify apps with a lot of dynamic components?</p>
",https://stackoverflow.com/questions/52522735/how-to-properly-write-e2e-tests-of-vuetify-apps,"['nightwatch.js', 'vuetify.js', 'e2e-testing']",1161,TRUE,4,1
JSON int key issue data e2e (invalid character &#39;1&#39; looking for beginning of object key string),"<p>My app uses aerospike to store Map in one of the bins,
I am use <a href=""https://github.com/viant/endly/"" rel=""nofollow noreferrer"">endly</a> for e2e testing, which uses JSON for data representation:</p>

<p>How do to populate datastore with with JSON  where key needs to be an int ?
Since json does not allowed int key I am getting the following error:  invalid character '1' looking for beginning of object key string</p>

<p>Here is my data workflow (invoked by regression workflow)</p>

<p>@data.yaml</p>

<pre><code>defaults:
  datastore: db1
pipeline:
  register:
    action: dsunit:register
    config:
    driverName: aerospike
    descriptor: ""tcp([host]:3000)/[namespace]""
    parameters:
      dbname: db1
      namespace: test
      host: 127.0.0.1
      port: 3000
      dateFormat: yyyy-MM-dd hh:mm:ss
  prepare:
    data:
      action: nop
      init:
      - key = data.db.mydaaset
      - mydaaset = $AsTableRecords($key)
    setup:
      action: dsunit:prepare
      URL: regression/db1/data/
      data: $mydaaset
</code></pre>

<p>Here is my use case level data:</p>

<p>@mydaaset.json</p>

<pre><code>[
  {
    ""Table"": ""myDataset"",
    ""Value"": [{
      ""id"": ""$id"",
      ""created"": ""$timestamp.yesterday"",
      ""fc"":{
                1191: ""$timestamp.yesterday"",
                1192: ""$timestamp.now"",
      }
    }],
   ""AutoGenerate"": {
      ""id"": ""uuid.next""
    },
    ""Key"": ""${tagId}_myDataset""
  }
]
</code></pre>
",https://stackoverflow.com/questions/50218518/json-int-key-issue-data-e2e-invalid-character-1-looking-for-beginning-of-obje,"['json', 'integration-testing', 'aerospike', 'end-to-end', 'endly']",570,TRUE,0,1
Handling Hover over menu&#39;s using Cypress,"<p>I recently stumbled upon the e2e tool - <a href=""https://www.cypress.io/"" rel=""noreferrer"">Cypress.io</a>. I'm currently doing a POC for the firm I work with for e2e testing of a react app. It has a hover over menu like most of the web apps have now. </p>

<p>An example : </p>

<p>URL : <a href=""https://fmovies.pe/"" rel=""noreferrer"">Fmovies</a></p>

<p>I was trying to click a menu item from this hover over but the test fails saying that the <code>display</code> is set to <code>none</code>. </p>

<p>In Selenium, we use the <code>moveElement</code> approach to go to this element, and then do whatever we need to do. However, I'm failing to do so using Cypress. </p>

<p>Considering the current menu, I wrote this</p>

<pre><code>it('goes to specific element in Genre',()=&gt;{
        cy.get('#menu').within(()=&gt;{
            cy.get('ul').within(()=&gt;{
                cy.contains('Family').click();
            });
        });
    }); 
</code></pre>

<p>Error :
<a href=""https://i.stack.imgur.com/FHi2S.png"" rel=""noreferrer""><img src=""https://i.stack.imgur.com/FHi2S.png"" alt=""Error""></a></p>
",https://stackoverflow.com/questions/48852219/handling-hover-over-menus-using-cypress,"['javascript', 'e2e-testing', 'cypress']",16328,TRUE,11,1
How to run cypress e2e tests on localhost on Travis CI,"<p>I have a simple create-react-app that runs on <code>https://localhost:3000</code> locally and I use Cypress e2e testing by running <code>cypress run</code> and that works as expected. However when I try to do the same in Travis CI it fails:</p>

<p>My spec is simply : </p>

<pre><code>it('Visit the Welcome page', () =&gt; { cy.visit('https://localhost:3000') })
</code></pre>

<p>My travis does the following :</p>

<ul>
<li>installs yarn and starts the app with <code>yarn start</code></li>
<li>Runs <code>cypress run</code></li>
</ul>

<p>The <code>error</code> :</p>

<blockquote>
  <p><a href=""https://localhost:3000"" rel=""nofollow noreferrer"">https://localhost:3000</a>
      We attempted to make an http request to this URL but the request failed without a response.
      We received this error at the network level: > <strong><em>Error: connect ECONNREFUSED 127.0.0.1:3000</em></strong></p>
</blockquote>
",https://stackoverflow.com/questions/51168642/how-to-run-cypress-e2e-tests-on-localhost-on-travis-ci,"['node.js', 'travis-ci', 'cypress']",1863,TRUE,2,1
Soft assertions in javascript,"<p>I have two backend projects P1 &amp; P2. Data from P1 has to flow into P2 after some processing via a middleware. I am writing this middleware and I have to create an E2E testing module.</p>

<p>I will have 100s of test cases and in each there may be 3 or 4 expect statements. The chai 'expect' function is a form of hard assertion. How can I get soft assertions in javascript. Basically, the test case will run all 3 or 4 expect statements and report which one's failed.</p>
",https://stackoverflow.com/questions/52515721/soft-assertions-in-javascript,"['javascript', 'testing', 'mocha.js', 'chai']",4931,TRUE,3,2
How can I keep my results from overwriting themselves in Mocha Junit,"<p>I'm using Cypress with Mocha Junit to do e2e testing for React in Chrome. The default behavior is for it to have one single output for results each time it runs my tests, and it overwrites the file every time. I'd like to have it keep these files in like a log.</p>

<p>The config is in a JSON file that looks like this:</p>

<pre><code>}
  ""projectId"": ""XXXXXX"",
  ""reporter"": ""junit"",
  ""reporterOptions"": {
    ""mochaFile"": ""./cypress/results/my-test-output.xml"",
    ""toConsole"": true
  }
}
</code></pre>

<p>I'd like to do something like </p>

<pre><code>var date = new Date();
""mochaFile"": ""./cypress/results/my-test-output${date}.xml"",
</code></pre>

<p>Obviously this isn't valid JSON. How can I rig this up to make it generate something unique each time?</p>
",https://stackoverflow.com/questions/48452474/how-can-i-keep-my-results-from-overwriting-themselves-in-mocha-junit,"['javascript', 'json', 'reactjs', 'mocha.js']",1535,TRUE,2,2
Testing numeric value of an element for &#39;If/then&#39;,"<h2>Protractor E2E Testing</h2>

<p><strong>Scenario</strong></p>

<p>I need to be able to click on a value in a grid as long as that value is greater than 1.</p>

<p>If the condition is met, then click on the element to proceed to the next step.</p>

<p>If the condition fails, - <em>ideally</em>, try the value in the next column or failing that - a console message.</p>

<p>I understand that the initial element needs to be a variable....</p>

<pre><code>var avail  = element(by.xpath("".//*[@id='grd_Availability']/tbody/tr[1]/td[3]""));
</code></pre>

<p>If anyone could help with some broad brush-stroke advice and examples of doing this sort of thing, I'd be very grateful.
David</p>
",https://stackoverflow.com/questions/48518661/testing-numeric-value-of-an-element-for-if-then,"['jasmine', 'protractor']",21,FALSE,0,0
cucumber-js: specify path for step-definitions file,"<p>I have multiple projects and I would like to implement cucumber-js E2E testing for all of them. I have a step definitions file which can be used for testing all of these projects, however I want to have multiple feature files with each project folder containing the feature files specific to the project. This is the layout:</p>

<p>step definitions:
projects/E2E/step_definitions/chat.js</p>

<p>feature files:
projects/project_1/features/feature_1.js</p>

<p>Right now, since the step definitions is outside of the features folder, I'm getting unimplemented steps error. Is there a way to specify the path to the step definitions when running cucumber-js?</p>
",https://stackoverflow.com/questions/51065553/cucumber-js-specify-path-for-step-definitions-file,"['cucumber', 'gherkin', 'cucumberjs']",5312,TRUE,7,1
Empty maven jar created by bazel,"<p>I'm having issues using maven dependencies when building with bazel. The problem seems to be that the downloaded jar is empty, with only the manifest in it. I've double and triple checked that the path and version are correct and also used the sha1 to ensure that the correct jar is being targeted.</p>

<p>WORKSPACE:</p>

<pre><code>maven_server(
  name = ""default"",
  url = ""http://central.maven.org/maven2/
)

maven_jar(
  name = ""org_seleniumhq_selenium_selenium_java"",
  artifact = ""org.seleniumhq.selenium:selenium-java:3.11.0"",
  sha1 = ""05b50d4072e0e51779b6e9f3594106312061bfde""
)
</code></pre>

<p>BUILD:</p>

<pre><code>package(default_visibility = [""//visibility:public""])

java_library(
  name = ""core"",
  srcs = glob(
     [""main/core/**/*.java""]
  ),
  resources = glob([""test/resources/*""]),
  deps = [""@org_seleniumhq_selenium_selenium_java//jar""]
)
</code></pre>

<p>Calling ""bazel build //src:core"" immediately fails with ""error: package org.openqa.selenium does not exist"", however I can see that the selenium-java.jar is being created in bazel-e2e-testing/external/org_seleniumhq_selenium_selenium_java, but again, it is empty.</p>

<p>Any suggestions on what I might be doing wrong?</p>

<p>Thanks in advance</p>
",https://stackoverflow.com/questions/50228604/empty-maven-jar-created-by-bazel,"['maven', 'bazel']",414,TRUE,0,1
TestCafe - Wait for page load after click on link,"<p>I'm using testcafe for e2e testing my current e-commerce project. On the product listing page, I use a Selector to select a product tile and perform a click. After this, the page loads the product detail page and I can continue with testing.</p>

<p>The issue is though that It already continues with the asserts of the product detail page while the page is not loaded yet. I assumed that the click action will wait for the element to appear and wait for the page to load before continuing to the asserts.</p>

<p>test: </p>

<pre><code>import HomePage from '../pages/HomePage/HomePage';
import ProductListerPage from '../pages/ProductListerPage/ProductListerPage';
import Browser from '../helpers/Browser';

fixture('test case').page('http://www.homepage.com');

test('test 1', async t =&gt; {
  const homePage = new HomePage();
  await homePage.header.search(t, 'foo bar');

  await t.expect(Browser.getCurrentLocation()).eql('http://www.product-lister/search?q=3301');
  const productListerPage = new ProductListerPage();
  await productListerPage.goToFirstProduct(); // &lt;&lt;&lt; in here I click on the first product

  await t.expect(Browser.getCurrentLocation()).eql('http://www.product-detail/'); // &lt;&lt; already executed on lister page instead of product page
});
</code></pre>

<p>ProductListerPage:</p>

<pre><code>import AbstractPage from '../AbstractPage';
import {t, Selector} from ""testcafe"";

class ProductListerPage extends AbstractPage {

  constructor() {
    super();

    this._productTilesContainer = Selector('.productLister-productTeasersInner');
    this._productTiles = this._productTilesContainer.child('a.productListerTeaser');
  }

  async goToFirstProduct() {
    return await t.click(this._productTiles.nth(0));
  }
}

export default ProductListerPage;
</code></pre>

<p>Is there another way of waiting for page load instead of using just a sleep? Or what is the best solution?</p>

<p>regards,
Cornel</p>
",https://stackoverflow.com/questions/52078301/testcafe-wait-for-page-load-after-click-on-link,"['javascript', 'testing', 'automated-tests', 'e2e-testing', 'testcafe']",10136,TRUE,11,1
How to select checkboxes with same web elements in protractor,"<p>I'm trying to write an automated script for an E2E testing using protractor + Jasmine. But, struck at a point of selecting a checkbox where all the web elements are same for all three checkboxes. I want to select the second checkbox.</p>

<p>Could anyone guide me through this issue please ? Below is the Angular JS code snippet for your kind reference.</p>

<p>Even the xpath and CSSSelector value wasn't helpful since they were same as well.</p>

<p>CSSSelector: #checks
xpath: //*[@id=""checks""]</p>

<p>The only tag which I see the difference in this is [class=""ng-binding""].</p>

<p>Snippet:</p>

<pre><code>&lt;tr x-ng-repeat=""productOffering in allProductList"" class=""prod-input-select ng-scope""&gt;
&lt;td&gt;
&lt;input ng-show=""productOffering.added == 'N'"" name=""checks"" id=""checks"" type=""checkbox"" ng-click=""addTempProductToBeAdded($event,productOffering)"" ng-model=""productOffering.isSelected"" class=""ng-pristine ng-valid""&gt;
&lt;/td&gt;
&lt;td class=""ng-binding""&gt;
Product1
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr x-ng-repeat=""productOffering in allProductList"" class=""prod-input-select ng-scope""&gt;
&lt;td&gt;
&lt;input ng-show=""productOffering.added == 'N'"" name=""checks"" id=""checks"" type=""checkbox"" ng-click=""addTempProductToBeAdded($event,productOffering)"" ng-model=""productOffering.isSelected"" class=""ng-pristine ng-valid""&gt;
&lt;/td&gt;
&lt;td class=""ng-binding""&gt;
Product2
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr x-ng-repeat=""productOffering in allProductList"" class=""prod-input-select ng-scope""&gt;
&lt;td&gt;
&lt;input ng-show=""productOffering.added == 'N'"" name=""checks"" id=""checks"" type=""checkbox"" ng-click=""addTempProductToBeAdded($event,productOffering)"" ng-model=""productOffering.isSelected"" class=""ng-pristine ng-valid""&gt;
&lt;/td&gt;
&lt;td class=""ng-binding""&gt;
Product3
&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>Cheers,
Ashish</p>
",https://stackoverflow.com/questions/50462644/how-to-select-checkboxes-with-same-web-elements-in-protractor,"['angularjs', 'jasmine', 'protractor']",1193,TRUE,0,2
Technical difference between Protractor and Selenium,"<p>I want to build an e2e testing suite for my Angular (2+) app.</p>

<p>What would be the technical differences between implementing such suite using <a href=""https://www.protractortest.org"" rel=""nofollow noreferrer"">Protractor</a> and using <a href=""https://www.seleniumhq.org"" rel=""nofollow noreferrer"">Selenium</a> (e.g. using Python Selenium or Java Selenium).</p>

<p>Both of them are based on the <a href=""https://github.com/SeleniumHQ/selenium/wiki/WebDriverJs"" rel=""nofollow noreferrer"">WebDriverJS</a>, but Protractor claims to be made specifically for ""Angular and AngularJS applications"".</p>

<p>So I'm not looking for opinions on which one is better, but I would rather understand what are the practical differences (e.g. in which ways is Protractor ""made for Angular apps""? can it be seen as ""Selenium optimised for Angular apps"" and why?).</p>
",https://stackoverflow.com/questions/51098353/technical-difference-between-protractor-and-selenium,"['angular', 'selenium', 'selenium-webdriver', 'protractor', 'e2e-testing']",1773,FALSE,-2,2
Nighwatch find multiple elements with unique css selectors,"<p>I'm writing some e2e testing with Nightwatch, but I have some problems with css selectors. I need to click the last element of a user menu. The menu is framework generated, so I can't really assign an <code>id</code> to the last element, so I decided to proceed with the following code:</p>

<pre><code>browser.waitForElmentVisibleAndClick = function(element) {
  this.waitForElementVisible(element, DEFAULT_WAITING_TIME);
  this.click(element);

  return this;
};

.waitForElmentVisibleAndClick('.user-menu-items:last-child')
</code></pre>

<p>The problem is that the element is not clicked. In the test warning I see the following:</p>

<blockquote>
  <p>Warn: WaitForElement found 2 elements for selector
  "".user-menu-items:last-child"". Only the first one will be checked.</p>
</blockquote>

<p>How it can find two elements with the selector :last-child? What am I doing wrong?</p>
",https://stackoverflow.com/questions/50721472/nighwatch-find-multiple-elements-with-unique-css-selectors,"['css-selectors', 'nightwatch.js']",431,FALSE,0,1
Nightwatch.js E2E - can it test Vue.js Single File Components Loaded via Vue Router,"<p>Our case is:</p>

<ul>
<li>Vue.js </li>
<li>Vuex</li>
<li>Vue Router </li>
<li>Single File Components</li>
</ul>

<p>Vue Router repo has examples for Nightwatch.js E2E testing, but not for single file components. </p>

<p>When we tried, the result of tests of loading components, with </p>

<p><code>.assert.elementPresent</code></p>

<p>where not consistent. We tested clicking a <code>router-link</code> and looked for loading the corresponding single file component (SFC). That is, the current component was replaced on the page by the loaded component. </p>

<p>Our navigation is through a <a href=""https://vuematerial.io/components/drawer"" rel=""nofollow noreferrer"">Vue Material drawer</a>  drawer. But we believe this is not ann essential element. <strong>But we may be wrong here.</strong></p>

<p>Was someone able to get consistent results of tests of loading of such components?</p>
",https://stackoverflow.com/questions/48049627/nightwatch-js-e2e-can-it-test-vue-js-single-file-components-loaded-via-vue-rou,"['vue.js', 'vue-router', 'vuex', 'nightwatch.js', 'vue-material']",419,FALSE,3,0
Using firebase email link login for e2e tests?,"<p>I stumbled upon following issue today while doing automated e2e tests on CI. My app uses 3 firebase login methods: email link, firebase and google.</p>

<p>During e2e tests I initially thought I'll use email link to log in, but this is not possible as app needs to go out into an email client and click on such link, so now I am blocked.</p>

<p>I was researching the docs to see if there was any e2e testing advice on this matter, but wasn't able to find a solution.</p>

<p>Is there a common solution to this provided by firebase? Or is the only way here to use email + password auth?</p>
",https://stackoverflow.com/questions/50871096/using-firebase-email-link-login-for-e2e-tests,"['firebase', 'react-native', 'firebase-authentication', 'e2e-testing', 'detox']",625,TRUE,3,1
Angular 2 App - Debugging Protractor Code,"<p>Does anybody actually know how to debug protractor code for an angular 2 application? I have npm version 8 installed and the 'browser.pause()' function has now been removed in this version. Apparently I need to use 'debugger'. I have tried adding 'debugger;' to my code, but when my code reached this section in the code it just runs straight through it, without stopping.</p>

<p>I have spent days trying to find documentation on this, but everything seems to either be related to angularJS or plane javascript applications. Please could somebody end my misery and tell me how to debug my angular 2 protractor e2e testing code?</p>
",https://stackoverflow.com/questions/49862896/angular-2-app-debugging-protractor-code,"['angular', 'debugging', 'visual-studio-code', 'protractor']",253,FALSE,2,0
Selenium web tests on saucelabs is slow from Australia,"<p>We are an Australia based company developing a web app and using SauceLabs to do Selenium E2E testing. The problem is the test is slow on SauceLabs (6 mins from Australian server vs 30mins+ on SauceLabs).</p>

<p>We have API servers in both Australia and the US, so the API request time shouldn't be a problem.</p>

<p>My questions are:</p>

<ol>
<li><p>Are Saucelabs' VMs all located in the US?</p></li>
<li><p>Does Selenium send test scripts line by line?</p></li>
</ol>

<p>If both guesses are true, then sending selenium scripts from an Australian Jenkins server to SauceLabs can take long.</p>

<p>If not, what could possibly be the reason and, what's a good solution?</p>

<p>Thanks!</p>
",https://stackoverflow.com/questions/51924674/selenium-web-tests-on-saucelabs-is-slow-from-australia,"['selenium', 'saucelabs']",132,FALSE,1,1
How do you avoid InvalidArgumentException in Selenium controlled via phpunit?,"<p>I am trying to use <code>PHPUnit_Extensions_Selenium2TestCase</code> to write some e2e testing but it keeps throwing the following exception:</p>

<pre><code>InvalidArgumentException: Element not found.
</code></pre>

<p>Obviously I checked the page <code>signup_page.php</code> and all the HTML elements are there and the behaviour of the form being sent is also working (it prints a ""success"" message when it is submitted). It clearly cannot find any of the element on the page but for the life of me I cannot figure out why.</p>

<p>Here's the code of the test: </p>

<pre><code>$this-&gt;url(""signup_page.php"");
$this-&gt;byName(""username"")-&gt;value(self::USERNAME);
$this-&gt;byName(""email"")-&gt;value(self::EMAIL);
$this-&gt;byName(""password"")-&gt;value(self::PASSWORD);
$this-&gt;byTag(""form"")-&gt;submit();
$this-&gt;assertRegExp(""/success/"", $this-&gt;byTag(""body"")-&gt;text());
</code></pre>

<p>I can see the browser being directed to the page but then it suddenly dies as the exceptions is thrown.</p>

<p>And here's the php page just in case:</p>

<pre><code>&lt;!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 3.2 Final//EN""&gt;
&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;link rel=""stylesheet"" href=""http://yui.yahooapis.com/pure/0.3.0/pure-min.css""&gt;
      &lt;link rel=""stylesheet"" href=""css/base.css""&gt;
   &lt;/head&gt;
   &lt;body&gt;

      &lt;form action=""signup.php"" method=""get"" class=""pure-form pure-form-stacked""&gt;

         &lt;fieldset&gt;

            &lt;legend&gt;Signup&lt;/legend&gt;

            &lt;label for=""username""&gt;username&lt;/label&gt;
            &lt;input type=""text"" name=""username"" id=""username"" /&gt;

            &lt;label for=""email""&gt;email&lt;/label&gt;
            &lt;input type=""text"" name=""email"" id=""email"" /&gt;

            &lt;label for=""password""&gt;password&lt;/label&gt;
            &lt;input type=""password"" name=""password"" id=""password"" /&gt;

            &lt;input type=""submit"" name=""submit"" value=""signup"" class=""pure-button pure-button-primary"" /&gt;

         &lt;/fieldset&gt;

      &lt;/form&gt;

   &lt;/body&gt;
&lt;/html&gt;
</code></pre>
",https://stackoverflow.com/questions/48497741/how-do-you-avoid-invalidargumentexception-in-selenium-controlled-via-phpunit,"['php', 'phpunit']",253,TRUE,0,2
Angular 2 - How to inject service in a e2e test with protractor,"<p>For my automation testing, I need to inject service to get the data and check if I am on the correct page or not. I dont want to use DOM for this, I want to check through my service.</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-js lang-js prettyprint-override""><code>import { CurrentEntityService } from ""./../../app/services/current-entity.service"";
        describe(""App component"", () =&gt; {
            it(""check current entity name"", inject([CurrentEntityService], (currentEntityService: CurrentEntityService) =&gt; {
                  browser.get(""/tenants/"");
                  expect(currentEntityService.entityName.value).toEqual(""value"");
               }));
        });</code></pre>
</div>
</div>
</p>

<p>When I run the test, the web driver runs  but it gives the following error</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-js lang-js prettyprint-override""><code> [17:15:38] I/testLogger - [firefox #01] PID: 28196
 [firefox #01] [17:15:34] I/direct - Using FirefoxDriver directly...
 [firefox #01] [17:15:37] I/runnerCli - undefined</code></pre>
</div>
</div>
</p>

<p>Do I need to do anything extra for using services in my e2e test? Why am I seeing this undefined error? Am I doing something wrong while injecting the service. Please point me out in the right direction for injecting a service in protractor test in angular 2. I am new to e2e testing. </p>
",https://stackoverflow.com/questions/48552506/angular-2-how-to-inject-service-in-a-e2e-test-with-protractor,"['angular', 'protractor', 'angular2-services', 'e2e-testing']",1872,FALSE,1,0
How to use Appium in NativeScript code sharing project?,"<p>I have a code sharing NativeScript project with Angular that uses Jasmine for unit testing. I'm trying to add <a href=""https://github.com/NativeScript/nativescript-dev-appium"" rel=""nofollow noreferrer"">nativescript-dev-appium</a>, so I can use Appium for UI/e2e testing on web and native platforms. </p>

<p>The resulting setup uses Mocha, which clashes with Jasmine. I get “duplicate identifier” errors because of the duplicate typings, and now I have two frameworks that essentially serve the same purpose (as far as I understand it).</p>

<p>Is it possible to use Jasmine with Appium instead of Mocha? Or do I have to change my unit tests to use Mocha? What is the correct way to set this up?</p>
",https://stackoverflow.com/questions/52414864/how-to-use-appium-in-nativescript-code-sharing-project,"['angular', 'jasmine', 'mocha.js', 'appium', 'nativescript']",167,FALSE,0,1
"Page Object Mode with node, ES7, puppeteer","<p>I recently started utilizing Puppeteer for e2e testing (I have some experience with Selenium Web Driver) and I could not find anything in the documentation discussing POM pattern. Are there any examples available how to implement this correctly in node/ES7 within Puppeteer?</p>

<p>Let us say I have a simple script that tests the login functionality of a page:</p>

<pre><code>(async () =&gt; {
...

     await page.goto(url, {
        timeout: 5000
    });

    await page.waitFor('input[id=userId]');

    await page.type('input[id=userId]', 'John Doe');
    await page.type('input[id=password]', 'password1');
    await page.click('button[type=""submit""]');
    await page.waitFor('p.success-msg');
...
}();
</code></pre>

<p>Typically, we would have a Page Object Model for the login page. How would I create a basic POM for the above page and integrate it with my script? How would you call the POM in my test script in this environment?  Would I use <code>import</code>?  I am just looking for a basic 'hello world' example.</p>
",https://stackoverflow.com/questions/48216151/page-object-mode-with-node-es7-puppeteer,"['javascript', 'node.js', 'testing', 'puppeteer']",4127,TRUE,2,1
Verify Email links via Protractor,"<p>I'm trying to test email links with Protractor . I understand that checking Email links doesn't come under the scope of e2e testing.  I have seen couple of node packages like nodemailer(or) mail-listener. But i would like to check if there are any other approaches?</p>

<p>The scenarios which i would like to cover:</p>

<ol>
<li>User invitation will be sent to the email, after clicking the link, it would re-directo to a page where i fill in details and proceed with registration.</li>
<li>Reset Password link will be sent to email, after clicking it, it will proceed to change password form, where i fill in details and login in new password.</li>
</ol>

<p>Any thoughts will be of great help. Thanks!</p>

<p>Angular: 4
Protractor :5.1</p>
",https://stackoverflow.com/questions/49664767/verify-email-links-via-protractor,"['angularjs', 'selenium', 'testing', 'protractor']",644,TRUE,0,2
"Protractor, helper function is not receiving update value","<p>I am e2e testing an edit function in my app. The user clicks on a row, then clicks on an edit button. From there they are brought to a menu where they can edit their creditials. This function here: </p>

<pre><code>export async function findRow(rows, matcher) {

    const relevantRow = await rows.filter(row =&gt; {

        return row.getText().then(text =&gt; {

            return text.includes(matcher);

        });

    }).first();

    return relevantRow;
</code></pre>

<p>Retrieves the row based on whatever value I pass.
In my spec class I test it like so: </p>

<pre><code>  it('should edit the user', async function()  {

page.editUser();

const row = await findRow(page.rows, 'testEmail@testEmail')

expect(await row.getText()).toContain('editedName')
</code></pre>

<p>Now my test fails saying something like expected 'OriginalName' to contain editedName. On screen as I watch my test automated through Chrome, I see the value change. I have the browser wait a little too so that the function can grab the values. This leads me to believe that my function is grabbing the row before the edit function. I am not sure if this is the case though, so any input would be great. Thank you!</p>
",https://stackoverflow.com/questions/50994734/protractor-helper-function-is-not-receiving-update-value,"['angular', 'protractor', 'automated-tests']",43,TRUE,0,1
Guide to automation framework in detox : React Native? Creating End 2 end and integration testing framework,"<hr />
<p>Automation testing on <strong>detox</strong> for <strong>react native apps</strong> to create E2E tests and integration tests.
Need suggestion on the following:</p>
<ul>
<li>Best Automation Framework that can be used TDD,BDD to avoid refactoring of code.</li>
<li>How to create integration tests for Android and iOS using detox and jest</li>
<li>Easy to use TestRunner Mocha or Jest or any other.</li>
<li>Any reporting mechanism once the test has been executed.</li>
<li>Any POC on detox automation for e2e testing with CI/CD.</li>
<li>Design Pattern like POM how to use it for React Native</li>
<li>Any Sample detox repository with step by step approach to integrate it with RN app.</li>
</ul>
<p><strong>Note:</strong> I have already installed the required dependency need in <strong>detox</strong> with <strong>Mocha</strong> from <a href=""https://github.com/wix/detox"" rel=""nofollow noreferrer"">Wix</a> git repo and successfully launched the demo project.Looking for a Framework template that I can use it as a reference in designing my own framework.</p>
",https://stackoverflow.com/questions/50837274/guide-to-automation-framework-in-detox-react-native-creating-end-2-end-and-in,"['react-native', 'automated-tests', 'mocha.js', 'jestjs', 'detox']",2025,TRUE,4,1
How to scroll to the bottom of the page with Nightwatch.js,"<p>I'm using Nightwatch.js to perform e2e testing on my Vue.js application. My application contains long forms, which ""hides"" the buttons outside of the view while performing the tests.
I looked into many questions that suggests the usage of <code>getLocationInView</code>, but the <a href=""http://nightwatchjs.org/api/#getLocationInView"" rel=""nofollow noreferrer"">documentation</a> clearly says </p>

<blockquote>
  <p>Determine an element's location on the screen once it has been scrolled into view</p>
</blockquote>

<p>I tried using something like </p>

<pre><code>browser
  .url(""http://localhost:8080"")
  .setValue(""@email"", ""valid4@mail.ca"")
  .getLocationInView(""#myElement"")
  .submit()    //defined elsewhere
  .waitForElementVisible(""#error"", 3000);
</code></pre>

<p>This snippet is supposed to click on a button at the bottom of the form, that's what <code>submit()</code> does but when I get the error screenshot to find that no scrolling down whatsoever has happened, leading the button to stay out of focus and therefore unclicked!</p>

<p>is there a way to ultimately scroll to the bottom of the page so I can pass the tests without having to change or at least with minimum changes to my original code?</p>
",https://stackoverflow.com/questions/52951869/how-to-scroll-to-the-bottom-of-the-page-with-nightwatch-js,"['javascript', 'vue.js', 'nightwatch.js']",2507,TRUE,0,2
Detox UI tests run erroneously on CircleCI 2.0,"<p>We are building react-native app (iOS only) and for e2e testing we use Detox (<a href=""https://github.com/wix/detox"" rel=""nofollow noreferrer"">https://github.com/wix/detox</a>). When I run these tests locally everything works fine but I'm unable to make them run in CircleCI (2.0).</p>

<p>Here is what our config.yml file looks like (in .circleci folder)</p>

<ul>
<li><a href=""https://ibb.co/eJc0pc"" rel=""nofollow noreferrer"">https://ibb.co/eJc0pc</a></li>
<li><a href=""https://ibb.co/jA3JaH"" rel=""nofollow noreferrer"">https://ibb.co/jA3JaH</a></li>
</ul>

<p>And these are the relevant package.json parts</p>

<p>under scripts:</p>

<ul>
<li><a href=""https://ibb.co/fq1RUc"" rel=""nofollow noreferrer"">https://ibb.co/fq1RUc</a></li>
</ul>

<p>and then:</p>

<ul>
<li><a href=""https://ibb.co/bXRMvH"" rel=""nofollow noreferrer"">https://ibb.co/bXRMvH</a></li>
</ul>

<p>When I run these tests on CircleCI everything works up to the test phase.  There it behaves erroneously. First it finds the booted device but it seems like detox skips some of the setup steps it does when run locally and tries to run some test steps but these seems to be chosen randomly and are not even part of the same test function.</p>

<ul>
<li><p><a href=""https://ibb.co/ksHfNx"" rel=""nofollow noreferrer"">https://ibb.co/ksHfNx</a></p></li>
<li><p><a href=""https://ibb.co/cXcrUc"" rel=""nofollow noreferrer"">https://ibb.co/cXcrUc</a></p></li>
</ul>

<p>Did anyone encounter similar problems?</p>
",https://stackoverflow.com/questions/49412920/detox-ui-tests-run-erroneously-on-circleci-2-0,"['react-native', 'circleci', 'detox', 'circleci-2.0']",902,FALSE,2,0
Using cypress with vuetify,"<p>I have a Vue.js project (Nuxt.js) and as UI I use the Vuetify. 
For e2e testing I use the Cypress. </p>

<p>Below is my scenarios of test in Cypress:</p>

<p>I have a problem while creating test for page where I use v-autocomplete component. 
The problem is that I can't use Vuetify native classes to get the element I want to test.
below is an example with data-cy selector</p>

<pre><code>   &lt;v-autocomplete
      v-model=""model""
      :items=""items""
      item-text=""Description""
      item-value=""API""
      label=""Public APIs""
      placeholder=""Start typing to Search""
      data-cy=""autocomplete""
    &gt;&lt;/v-autocomplete&gt; 
</code></pre>

<p>I type some text into search input. 
Then in v-autocomplete have been found search results. 
And example of one of there is below: </p>

<pre><code>...
    &lt;div&gt;
       &lt;a class=""v-list__tile v-list__tile--link theme--light""&gt;
         &lt;div class=""v-list__tile__content""&gt;
         &lt;div class=""v-list__tile__title""&gt;Result item
           &lt;span class=""v-list__tile__mask""&gt;result item&lt;/span&gt;
         &lt;/div&gt;
         &lt;/div&gt;
       &lt;/a&gt;
   &lt;/div&gt;
...
</code></pre>

<p>Then I want select one of search items by clicking to one of found results.
And for that I should to use native classes of Vuetify, but it is not have stability (<code>.v-list__tile--link</code> class сan be renamed by developers).
How I can add data-cy selector into result search html item? 
Maybe who know any another way to resolve this problem?</p>
",https://stackoverflow.com/questions/53610949/using-cypress-with-vuetify,"['vue.js', 'vuetify.js', 'e2e-testing', 'cypress']",6134,TRUE,7,1
Protractor: by.model can&#39;t find element inside custom directive,"<p>I have this AngularJS project where I have a complex HTML layout.</p>

<pre><code>&lt;div id=""ngView"" class=""container-fluid""&gt;
    &lt;input type=""text"" ng-model=""model.test""&gt;&lt;/input&gt;
    &lt;div ng-view&gt;&lt;/div&gt;
    &lt;br&gt;&lt;br&gt;
&lt;/div&gt;
</code></pre>

<p>model.test is successfully found by element(by.model('model.test')). </p>

<p>Inside the ng-view, I load different components. One of those components, loads another html directive, this one: </p>

<pre><code>&lt;div class=""trans-edit"" ng-if=""$root.editing""&gt; 
    &lt;edit-task task=""$root.task "" editando=""$root.editing "" 
     reload=""$root.getData"" class=""trans-edit""&gt;
    &lt;/edit-task&gt; 
&lt;/div&gt;
</code></pre>

<p>The outcome of which is:</p>

<pre><code>&lt;edit-task task=""$root.task "" editing=""$root.editing "" reload=""$root.getData"" class=""trans-edit ng-isolate-scope""&gt;
&lt;div class=""modal-header""&gt;
    &lt;div class=""row""&gt;
        &lt;div class=""col-md-6 col-xs-12""&gt;
            &lt;h3 class=""modal-title ng-binding""&gt;Create task&lt;/h3&gt;
        &lt;/div&gt;
        &lt;div class=""col-md-6 col-xs-12""&gt;
            &lt;input type=""text"" ng-model=""task.desTask"" class=""form-control input-lg ng-pristine ng-untouched ng-valid""&gt;
        &lt;/div&gt;
        ... it goes on .... &lt;/div&gt; 
</code></pre>

<p></p>

<p>I can't make the <code>element(by.model('task.desTask'))</code> work, even after waiting for angular or setting a wait time. Protractor always fails by:</p>

<blockquote>
  <p>Failed: No element found using locator: by.model(""task.desTask""). </p>
</blockquote>

<p>I'm a newbie still learning e2e testing, but this is the first test in a
very long testing process that has failed, and I fail to find info on
the matter of directives and protractor.</p>

<p><strong>I've tried adding an id to an element inside the custom directive, and it can't be found</strong>. Seems like the system is blind to everything under the custom HTML tag <code>&lt;edit-task&gt;&lt;/edit-task&gt;</code>. </p>

<p>Any help would be great, using by.model would be crucial for this project.</p>
",https://stackoverflow.com/questions/51103782/protractor-by-model-cant-find-element-inside-custom-directive,"['angularjs', 'protractor', 'angularjs-e2e']",570,TRUE,0,1
Functional testing angular,"<p>I am required to functional test a web app built using angular 5. The app has a lot of chart widgets - basically reporting done through the chart based on the values in the sql server database for specific criteria given through the query bar. I basically have to check for dynamic changes in the charts based on updates - add/delete/change in the database. There are several different charts which get affected by those changes and I have to validate both the ui and db using automation. I have been reading that protractor can be used for e2e testing, would I be able to validate data updates and changes to the chart using protractor or please suggest me a tool for this. Also I am not seeing a lot of blogs for checking dynamically generated charts using protractor. Please help me with any material you can.</p>
",https://stackoverflow.com/questions/50780387/functional-testing-angular,['protractor'],778,FALSE,0,1
Detox: Using multiple element matchers results in error,"<p>I am using Detox for E2E testing on a React Native app using the following specs:</p>

<p><code>React Native 0.55.4
Node 9.2.0
Detox 7.3.7</code></p>

<p>When I am on a page within my app I can scroll using the scrollView with the Matcher <code>element(by.id('scrollView'))</code> and I can click a button with the Matcher <code>element(by.text('This Button'))</code> but if I want to select the button element using chaining with the <code>.and()</code> method I get an error <code>Cannot find UI element</code>. </p>

<p>I cannot figure out why I can interact with these two elements independently, but when I link them they no longer work. </p>

<p>Here is a sanitized example of what the React Native code looks like:</p>

<p>Route.js</p>

<pre><code>&lt;ScrollView style={styles.container} testID={""scrollView""}&gt;
 &lt;View style={styles.header} /&gt;
   this.body()
&lt;/ScrollView&gt;
</code></pre>

<p>this.body() does some validation but the <code>render()</code> is nothing special:</p>

<pre><code>&lt;View&gt;
  &lt;CustomButtonComponent /&gt;
&lt;/View&gt;
</code></pre>

<p>The custom button component is another View with some Text and a Button element.   </p>

<p>My only guess is that since I am using nested views/custom components maybe the Matcher logic cannot handle that. Any ideas? Maybe I don't understand the Documentation completely.</p>
",https://stackoverflow.com/questions/51313046/detox-using-multiple-element-matchers-results-in-error,"['javascript', 'react-native', 'e2e-testing', 'detox']",1977,TRUE,0,1
Testing React Native app with Espresso. Step by step instructions,"<p>I'm trying to configure e2e testing of my React Native app. The RN version I'm using is 0.56. Unfortunately Detox doesn't support this version on Android and I decided to implement temporarily Espresso tests directly while waiting for Detox official support. </p>

<p>I followed <a href=""https://developer.android.com/training/testing/espresso/setup"" rel=""nofollow noreferrer"">instructions</a> on setting up Espresso for Android app. Luckily most of that has been already added by Detox. I also created a test file in android/app/src/androidTest/java/[com/package/name/]MainActivityTest.java. Here is its context:</p>

<pre><code>package com.package.name;

import android.support.test.espresso.ViewAssertion;
import android.support.test.espresso.ViewInteraction;
import android.support.test.espresso.assertion.ViewAssertions;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.LargeTest;

import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;

import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static android.support.test.espresso.matcher.ViewMatchers.withContentDescription;
import static org.hamcrest.Matchers.allOf;

@LargeTest
@RunWith(AndroidJUnit4.class)
public class MainActivityTest {

    @Rule
    public ActivityTestRule&lt;MainActivity&gt; mActivityTestRule = new ActivityTestRule&lt;&gt;(MainActivity.class);

    @Test
    public void mainActivityTest() {
        try {
            Thread.sleep(1500);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        ViewInteraction view = onView(allOf(withContentDescription(""onboardingScreen""), isDisplayed()));

        ViewInteraction button = onView(allOf(withContentDescription(""login""), isDisplayed()));

        button.perform(click());

        onView(allOf(withContentDescription(""currentMealPlanTab""), isDisplayed()));

}
</code></pre>

<p>...and added { accessible: true, accessibilityLabel: id } to the views I'm testing.</p>

<p>When I run the test either from Android Studio or by issuing ""./gradlew connectedAndroidTest"" I get java.lang.RuntimeException: No activities found. Did you forget to launch the activity by calling getActivity().</p>

<p>I was unable to find a step by step guide on how to setup Espresso for React Native. Please let me know what I'm doing wrong and how to set it up.</p>
",https://stackoverflow.com/questions/51857886/testing-react-native-app-with-espresso-step-by-step-instructions,"['android', 'react-native', 'android-espresso']",698,TRUE,2,1
Getting past a SAML login screen with Cypress,"<p>I am new to Cypress, and test automation in general, but we have decided to use this tool for some basic e2e testing and post deploy sanity checks, specifically on our webpages with Looker dashboards integrated.  Looks like great software but I am having a problem getting through our SAML Authentication...the Cypress documentation describes a few solutions but I can't seem to figure out why my code is not completing successfully. Here is what I have:</p>

<pre><code>describe('Main page', function() {
  it('login page should render', function() {
    cy.visit('/login/email')
    cy.get('#login-email')
      .should('be.visible')
  })
  it('uses the login fields', function() {
    cy.get('#login-email').type('user@supercool.com')
    cy.get('#login-password').type('password')
      .should('have.value', 'password')
    cy.get('#login-submit').click()
  })
  it('redirects to dashboard after login', function() {
    cy.visit('/dashboards/analytics_external::live_event_summary?time_filter=6%20months&amp;title_filter=&amp;filter_config=%7B""time_filter"":%5B%7B""type"":""past"",""values"":%5B%7B""constant"":""6"",""unit"":""mo""%7D,%7B%7D%5D,""id"":4%7D%5D,""title_filter"":%5B%7B""type"":""%3D"",""values"":%5B%7B""constant"":""""%7D,%7B%7D%5D,""id"":5%7D%5D%7D')
    cy.url().should('include', 'dashboards')
  })
})
</code></pre>

<p>Right now, it works right up until the user/pass are submitted.  I get this Uncaught Error: [$injectort:modulerr] Failed to instantiate module Looker due to: Error:[$injector:nomod] Module 'Looker' is not available! <a href=""https://screencast.com/t/52EnQuYgVL"" rel=""nofollow noreferrer"">https://screencast.com/t/52EnQuYgVL</a></p>

<p>I know this is very basic so thank you ahead of time for the patience, and understanding.  I have combed through pretty much everything related to login, and read through all the Cypress docs but I'm just missing something here so any insight is much appreciated! THANKS!</p>
",https://stackoverflow.com/questions/50339309/getting-past-a-saml-login-screen-with-cypress,"['javascript', 'authentication', 'saml', 'cypress']",1071,FALSE,2,0
E2E Best Practices - Waiting for Elements on the Page,"<p>Recently, our team has adopted <a href=""https://www.npmjs.com/package/blue-harvest"" rel=""nofollow noreferrer"">blue-harvest</a> for E2E testing which seems to be a wrapper around Protractor.</p>
<p>I noticed that our tests are flimsy in that sometimes they pass and sometimes they don't. Even if nothing changes, and you just run them again, the results are intermittent.</p>
<p>I feel like one of the reasons is because we have so many timeouts littered across our tests to wait for things to be clickable, visible, etc.</p>
<p>In terms of best practices, is it common to <em>always</em> have to wait for things to be on the page before clicking on them or interacting with them to test them?</p>
<p>I feel like using <code>slow</code> (in the case of blue-harvest), or even <a href=""https://github.com/angular-seattle/blue-harvest/blob/master/action_helpers/actions.ts#L47"" rel=""nofollow noreferrer"">agonizinglySlow</a> doesn't look good and is the effect of flimsy tests.</p>
<p>If I do choose to continue going down this route, is it better to make everything always wait? Instead of having some tests written as:</p>
<pre><code>await slow.see('My Element');
await click('My Element');
await click('Another Element');
await slow.see('Another Element');
</code></pre>
<p>Should I just be consistent and make <em>everything</em> slow?</p>
<p>Thanks</p>
",https://stackoverflow.com/questions/51910191/e2e-best-practices-waiting-for-elements-on-the-page,"['protractor', 'e2e-testing']",533,TRUE,0,1
Timeout error in Protractor when running in batches but works fine when running it individually?,"<p>I am setting up e2e testing with Protractor and Angular. Here I am writing 3 test cases in a suite. When there is only 2 it runs fine. Anything more than that it fails with a time out error. I even tried implementing a call back function ""done"" but can't solve it. Strange thing is If I rearrange the test-cases in an order all the 3 test cases passes. For instance see the code below. </p>

<p><strong>app.po.ts</strong></p>

<pre><code>import { browser, by, element } from 'protractor';

export class TestEngine {
  navigateTo() {
    browser.get('/');
    var script = ""window.localStorage.setItem('isAccepted', 'true')"";
    return browser.executeScript(script);
  }

  getParagraphText() {
    return element(by.css('page-welcome p')).getText();
    }

  getButtons() { 
      return element(by.buttonText('Login')).getText();
  }

  getButtonsClick() {
      return  browser.actions().mouseMove(element(by.tagName('b'))).click();
        }

}
</code></pre>

<p><strong>test-e2e.spec.ts</strong></p>

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

    describe('Test Engine App', () =&gt; {
      let page: TestEngine;

      beforeEach(function (done) {
        setTimeout(function () {
          page = new TestEngine();
          done();
        }, 1);
      });

//1. Promise included

      it('should display the question for Validation', function (done) {
        page.navigateTo();
        page.getParagraphText()
          .then((text) =&gt; {
            expect(text).toEqual('Want to validate an engine?');
            done();
          });
      });

// 2. Promise included

      it('should display a button which is used for Validation', function (done) {
        page.navigateTo();
        page.getButtons().
          then((text) =&gt; {
            expect(text).toEqual('Login');
            done();
          });
      });

 //3. Promise not included   

      it('should click on the button which is used for Login', function (done) {
        page.navigateTo();
        page.getButtonsClick()
        done();
      });

    });
</code></pre>

<p>Scenario 
when test cases 1,2,3 are in the above it throws an error stating</p>

<pre><code>Test Engine App
    √ should display the question for Validation
    √ should display a button which is used for Validation
    × should click on the button which is used for Login
      - Failed: timeout
        (Session info: chrome=69.0.3497.100)
        (Driver info: chromedriver=2.41.578737 (49da6702b16031c40d6xgret43e5618de0x3a32ff6c19xx7e),platform=Windows NT 10.0.16299 x86_64)
        (Session info: chrome=69.0.3497.100)
        (Driver info: chromedriver=2.41.578737 (49da6702b16031c40d6xgret43e5618de0x3a32ff6c19xx7e),platform=Windows NT 10.0.16299 x86_64)

      From asynchronous test:
      Error
          at Suite.&lt;anonymous&gt; (D:\TESTING CLONE\e2e\e2e\test.e2e-spec.ts:33:3)
          at Object.&lt;anonymous&gt; (D:\TESTING CLONE\e2e\e2e\test.e2e-spec.ts:5:1)
          at Module._compile (module.js:649:30)
          at Module.m._compile (D:\VSTS TESTING CLONE\e2e\node_modules\ts-node\src\index.ts:439:23)
          at Module._extensions..js (module.js:660:10)
          at Object.require.extensions.(anonymous function) [as .ts] (D:\TESTING CLONE\e2e\node_modules\ts-node\src\index.ts:442:12)

**************************************************
*                    Failures                    *
**************************************************

1) Test Engine App should click on the button which is used for Login
  - Failed: timeout
    (Session info: chrome=69.0.3497.100)
    (Driver info: chromedriver=2.41.578737 (49da6702b16031c40d63e5618de03a32ff6c197e),platform=Windows NT 10.0.16299 x86_64)

Executed 3 of 3 specs (1 FAILED) in 5 mins 17 secs.
[16:56:48] I/launcher - 0 instance(s) of WebDriver still running
[16:56:48] I/launcher - chrome #01 failed 1 test(s)
[16:56:48] I/launcher - overall: 1 failed spec(s)
[16:56:48] E/launcher - Process exited with error code 1
</code></pre>

<p>But if I run all 3 separately using <strong>fit</strong> or <strong>xit</strong> every scenario passes and also if i run it in the order of 1-> 3-> 2 by swapping the 3rd testcase with 2nd , then all passes as a batch.</p>

<p>What am I doing wrong here? Is it something with the call back function done(); Is it placed in the right place? Because in this spec file I am planning to have more than 100 test cases.  All will include promises involved.</p>
",https://stackoverflow.com/questions/52500498/timeout-error-in-protractor-when-running-in-batches-but-works-fine-when-running,"['angular', 'jasmine', 'protractor', 'automated-tests', 'end-to-end']",519,FALSE,3,0
angularjs - Protractor - run test on different port numbers,"<p>We have a client application built on angularjs. We are using protractor for e2e testing. Our code base is visual studio online with continuous integration implemented. Whenever there is a check-in and a pull request (PR) created, the build is triggered which includes multiple steps. One of them is running e2e test cases.</p>

<p>We have a single build machine which takes care of individual developer's PR builds and also the prod builds once these PRs are merged with the master.</p>

<p><strong>Problem</strong> - On the build server, if there are two or more simultaneous builds running, only one of them succeeds and the rest of them fail because of e2e failure. The problem here is, e2e's try to run on the same port every time, and if it is occupied, then there is a failure in execution of this step.</p>

<p>I am sure this might be a problem for many and might have been solved.
Looking for suggestions and probable solutions.</p>

<p>Is there a way to run each of them on different port number ?</p>

<p>Below is the protractor config</p>

<pre><code>const { SpecReporter } = require('jasmine-spec-reporter');

exports.config = {
    allScriptsTimeout: 11000,
    specs: [
        './e2e/**/*.e2e-spec.ts'
    ],
    capabilities: {
        'browserName': 'chrome',
        chromeOptions: {
            args: [
                '--start-maximized'
            ]
        }
    },
    directConnect: true,
    baseUrl: 'http://localhost:443/',
    framework: 'jasmine',
    jasmineNodeOpts: {
        showColors: true,
        defaultTimeoutInterval: 90000,
        print: function () { }
    },
    beforeLaunch: function () {
        require('ts-node').register({
            project: 'e2e'
        });
    },
    onPrepare: function () {
        jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
        var failFast = require('jasmine-fail-fast');
        jasmine.getEnv().addReporter(failFast.init());
    }
};
</code></pre>
",https://stackoverflow.com/questions/48392615/angularjs-protractor-run-test-on-different-port-numbers,"['angularjs', 'protractor', 'e2e-testing', 'angularjs-e2e']",1263,FALSE,0,1
How to make a cross domain request and send cookies with the request,"<p>I'm developing 2 applications for backend and frontend (spring mvc and angular4), i host the spring app on tomcat server using the http port (8080) and my frontend using the http port (4200) , the communication between both of the apps is made using json.
To identify the user i'm using a session cookie.</p>

<p>The problem is that i came to a cross domain issue because i use different ports for both of the apps, the cookie is not send when i make a http post request.</p>

<p><strong>the only solution i found until now :</strong>
When i put the angular app inside the /src/main/webapp of my spring project, following <a href=""http://csetutorials.com/deploy-angular-2-maven-webapp-on-tomcat.html"" rel=""nofollow noreferrer"">this documentation</a> , i dont have the issue and the cookie are automatically set but it's painful to do the previous steps everytime when i want to test something.</p>

<p>I thought also about some workaround like jsonp during the development process but i don't think this would be productive plus later on i need to execute some e2e testing.</p>

<p>Did anyone have an idea/example about how to make this cross domain...</p>
",https://stackoverflow.com/questions/48540216/how-to-make-a-cross-domain-request-and-send-cookies-with-the-request,"['spring', 'angular', 'http', 'cookies', 'tomcat8']",531,TRUE,0,2
Keep application-state in protractor E2E tests,"<p>I have a big application written with angular and I currently try to introduce e2e testing. Is it possible to keep the ""state"" of the application and not write a single <code>it</code> statement. So at the my tests look like this:</p>

<pre><code>describe('Dashboard', () =&gt; {
  beforeEach(() =&gt; {
    // do login
  });

  it('should navigate to X', () =&gt; {
    // click on navigation
    // test if component X is open
  });

  it('should navigate to Y', () =&gt; {
    // click on navigation
    // test if component Y is open
  });

  it('should navigate to Z', () =&gt; {
    // click on navigation
    // test if component Z is open
  });
});
</code></pre>

<p>In the <code>beforeEach</code> the test logs into the app (so the dashboard is open). In every test, first there is a click on a navigation-element and I test if the according component opens.</p>

<p>What I want is that I don't have to do the login in each <code>beforeEach</code> in any of my tests. So the tests keep the state of the application and that the application running all the time as in ""real usage"" and not restart after every test. Is the only possibility for this to write a single <code>it</code> statement like this:</p>

<pre><code>describe('Application', () =&gt; {
    // do login

    // should navigate to X
    // click on navigation
    // test if component X is open

    // should navigate to Y
    // click on navigation
    // test if component Y is open

    // should navigate to Z
    // click on navigation
    // test if component Z is open
  });
});
</code></pre>

<p>Maybe I understand the e2e test wrong and I should use another sort of tests for this. If thats the case, could you give me some advice for a testing-framework which can be used for angular?</p>

<p>Thanks in advance!</p>
",https://stackoverflow.com/questions/52109689/keep-application-state-in-protractor-e2e-tests,"['angular', 'testing', 'protractor', 'e2e-testing', 'angular-e2e']",176,FALSE,0,0
Mark the current test as skipped instead of failed,"<p>I have a test that goes through a process to get to the part that is the actual test.  We have a situation where one of the setup steps/states may not be correct for executing the test.  In that case I want to skip the current test, but not fail it.  i.e. My list of quotes is empty, so I cannot click a quote to continue with the ""Order a quote"" process.</p>

<p>I don't want to fail the test, but I do need to make note that this test cannot be completed at this time.</p>

<p>Note that this is different than marking a module as @disabled or using the ''+ trick to skip an individual test.  This is starting a test, determining the situation cannot be tested in the current state, and exiting the current test with a Skipped flag instead of a pass/fail.  </p>

<p>(The issue stems from the state of the page being derived from 3rd party data that cannot be easily mocked. The quote MUST exist and be processable by the staging ERP to do the E2E testing...)</p>
",https://stackoverflow.com/questions/49039741/mark-the-current-test-as-skipped-instead-of-failed,['nightwatch.js'],574,TRUE,0,2
Testing a library that changes DOM directly,"<p>I wrote a tiny library that manipulates DOM directly, using <code>window</code> and <code>document</code> to search and change the DOM. And now I'm trying to figure out how to test it.</p>

<p>So far I have tried a combination of <a href=""https://github.com/facebook/jest"" rel=""nofollow noreferrer"">jest</a> + <a href=""https://github.com/jsdom/jsdom"" rel=""nofollow noreferrer"">jsdom</a>:</p>

<pre><code>const jsdom = require('jsdom');
const {JSDOM} = jsdom;

const dom = new JSDOM('&lt;!DOCTYPE html&gt;&lt;p&gt;Hello world&lt;/p&gt;');

// these two lines do not seem to do anything useful:
global.window = dom.window;
global.document = dom.window.document;

test('can globally access and search the DOM', () =&gt; {
    // this doesn't work
    expect(global.document.querySelectorAll('p').length).toBe(1);
});
</code></pre>

<p>Am I doing something wrong here, or am I entirely wrong with the testing approach? And if so, what would be the right way to approach such testing?</p>

<p>I feel a bit lost here, between what's called e2e testing and Unit testing, because in my case this seems to be something right in between.</p>

<p>Ideally, I would want to end up with this thing tested against multiple browsers, and to get some sort of test coverage. But that's more like the next step. Right now I cannot get it to work at all.</p>

<p>I know how fast things are moving in the Web world, so if I'm wrong completely, I appreciate if you can point me at what's the right way to do it today.</p>

<hr>

<p><strong>UPDATE</strong></p>

<p>Here's my complete code, after a few suggestions from @duxfox, since with this approach my library is now missing event <code>DOMContentLoaded</code> which is supposed to trigger its DOM processing.</p>

<pre><code>const jsdom = require('jsdom');
const {JSDOM} = jsdom;

const { document } = (new JSDOM('&lt;!DOCTYPE html&gt;&lt;p&gt;Hello world&lt;/p&gt;')).window;
global.document = document;

global.window = document.defaultView;
window.console = global.console;

Object.keys(document.defaultView).forEach((property) =&gt; {
    if (typeof global[property] === 'undefined') {
        global[property] = document.defaultView[property];
    }
});

global.navigator = {
    userAgent: 'node.js'
};

// Here I'm trying to follow a suggestion from Luis:
// https://stackoverflow.com/questions/36803733/jsdom-dispatchevent-addeventlistener-doesnt-seem-to-work
window.addEventListener('DOMContentLoaded', function (ev) {
    console.log('DOMContentLoaded called!'); // this is not called.
    /*
    console.log('window click', ev.target.constructor.name,
        ev.currentTarget.constructor.name);*/
});

// loading my library here:
// const root = require('../src');

test('something', () =&gt; {

    // This now works, but my library is missing
    // event DOMContentLoaded to start processing the DOM

    expect(document.querySelectorAll('p').length).toBe(1);
});
</code></pre>
",https://stackoverflow.com/questions/51540912/testing-a-library-that-changes-dom-directly,"['javascript', 'testing', 'jestjs', 'ui-testing', 'jsdom']",1081,TRUE,2,1
How would I unit test this simple jQuery code with karma/jasmine?,"<p>I'm working on creating a webpack starter app for to support lightweight Typescript and jQuery development. So far it's working out well, doing all the cool stuff I want it to do like automatically detecting edits, rebuilding and relaunching the app when you change things, etc. It supports unit and e2e testing as well.</p>

<p>But I've never unit tested jQuery code, and I don't even know where to begin to test this dead-simple ""Hello, world!"" app:</p>

<pre><code>import * as $ from 'jquery';

export interface SampleInterface {
  stuff: string;
}

$('#message').text('Hello, world!');
</code></pre>

<p>What would a unit test that ensures that this message has been set look like?</p>

<p>I've installed <code>karma-jquery</code> and <code>karma-jasmine-jquery</code>. I've googled a lot looking for examples of how to use these tools, but none of what I've seen matches the simple problem I'm trying to solve.</p>

<p><strong>UPDATE:</strong></p>

<p>I think I'm getting closer to what I want to do with the following test that doesn't quite work:</p>

<pre><code>describe('main', () =&gt; {
  it('should say hello', () =&gt; {
    spyOn(jQuery.prototype, 'text').and.callThrough();
    require('./main');
    expect(jQuery.prototype.text).toHaveBeenCalledWith('Hello, world!');
  });
});
</code></pre>

<p>It doesn't surprise me that this doesn't work, because this spies on a jQuery prototype method, whereas what I think I need to be spying on is a particular jQuery object, but how to create that and spy on it so that it works with the selector <code>#message</code>, I haven't got a clue yet.</p>
",https://stackoverflow.com/questions/50438272/how-would-i-unit-test-this-simple-jquery-code-with-karma-jasmine,"['jquery', 'unit-testing', 'typescript', 'jasmine', 'karma-webpack']",1439,TRUE,1,1
"Failed: No element found using locator: By(css selector, option[value=&quot;xxx&quot;])","<p>I just wrote my first e2e test with Protractor in VS Code. Here is a weird issue that has been bugging me for days. I keep getting this error from time to time. I noticed that sometimes when I shut down the VS Code and re-open it. The issue will be gone. However, it will come back after a while.</p>

<p>test.spec.ts</p>

<pre><code>fit('should have an quote price', async () =&gt; {
  await page.fillApplicantAge(0, '20');

  const tobaccoUsageSelection = page.getRadioButton('smoker', 'no');

  await page.clickElement(tobaccoUsageSelection);

  const planTypeSelection = page.getNamedRadioButton('planType', 'Single');

  await page.clickElement(planTypeSelection);

  const coverageTypeSelection = page.getNamedRadioButton('coverageType', 'Gold');

  await page.clickElement(coverageTypeSelection);

  await page.fillApplicantEffectiveDate(0, 'today');

  await page.fillApplicantExpiryDate(0, 'next month');

  await page.setSelectBoxValueInsideChildComponent('destination', 'New York');

  await page.fillTextBox('sumInsured', '5500');

  const priceElement = await page.getElementByCss('h3 .amount');

  expect(+(await priceElement.getText()).replace(',', '')).toBeGreaterThan(0);
});
</code></pre>

<p>and in the test.po.ts file:</p>

<pre><code>async setSelectBoxValueInsideChildComponent(formFieldName: string, value: string) {
   const formField = element(by.css(`[formControlName=""${formFieldName}""] select`))
  .element(by.css(`option[value=""${value}""]`));

   await formField.click();
}

 getElementByCss(selector: string) {
   return element(by.css(selector));
}
</code></pre>

<p>So this test file should be ran successfully. It actually has been running successfully several times. But sometimes, the line of ""destination"" throws an error and sometimes the ""h3 .amount"" line throws an error with no reason.</p>

<p>Failed: No element found using locator: By(css selector, option[value=""xxx""])</p>

<p>And the screen just flash and exit very quickly. So I was not able to inspect what's going on.</p>

<p>I'm very confused. I shut down VS Code to solve the issue so far. But it really bugs me since once I modify something, the error might come back.</p>

<p>Please help! Thanks in advance!</p>

<p>BTW, how can we debug in VS Code for e2e testing? I have tried several suggestions from internet, nothing worked... :( </p>
",https://stackoverflow.com/questions/49989951/failed-no-element-found-using-locator-bycss-selector-optionvalue-xxx,"['visual-studio-code', 'protractor', 'e2e-testing']",887,FALSE,0,2
E2E tests with Espresso: Keep application open after finishing a @Test/properly structuring larger test cases,"<p><strong>What I do</strong></p>

<p>I want to build a ""happy path""-style end-to-end test for my Android application. It involves a number of steps that need to be performed:</p>

<ol>
<li>Swipe through multiple slides of an on-boarding screen</li>
<li>Click a ""Finish onboarding"" button</li>
<li>Fill in a registration form</li>
<li>Click a registration button and wait for registration to be finished</li>
<li>Open the main screen and perform the actual functional tests</li>
</ol>

<p>While I am able to implement all of that, I do stumble upon one issue. After each <code>@Test</code>-annotated function, the application is closed and restarted. Now with an e2e-testing scenario like mine, where each step depends on the previous one, that doesn't work too well.</p>

<p><strong>What I have</strong></p>

<p>To avoid that issue, right now, I have all my individual test steps broken down into individual functions and call them all from one central <code>@Test</code> function (they're named more appropriately in my actual code):</p>

<pre><code>@Test
public void followHappyPath() {
    performStep1();
    performStep2();
    performStep3();
}

private void performStep1() {
   // ...
}

// ...
</code></pre>

<p>This runs the tests just fine, but I get no detailed reporting per test case (e.g. ""Success: it should show the registration form"").</p>

<p><strong>What I want</strong></p>

<p>What I would prefer instead, would be a setup like this:</p>

<pre><code>@Test
public void itShouldPerformStep1() {
}

@Test
public void itShouldPerformStep2() {
}
// ...
</code></pre>

<p>That would enable me to get a more detailed reporting per test case.</p>

<p>Is there any way to achieve this?</p>
",https://stackoverflow.com/questions/52891433/e2e-tests-with-espresso-keep-application-open-after-finishing-a-test-properly,"['android', 'testing', 'android-espresso']",394,FALSE,0,0
Can&#39;t click on element in a cell that is not displayed in Appium - IOS using Java-Client,"<p>I'm trying to create automation E2E testing for an SDK we build.
We decided to test the SDK with a test app that will call the commands in a table that will test all SDK capabilities.</p>

<p>I was stuck for a while, Not understanding why some click events are working and some are not.</p>

<p>I've figure this out, It is because the ones that are working are visible and the the ones that are not working are not visible (don't really exists until the cell is created when needed to be visible?). In any case this is what I think or Hoping for because if not i really don't understand what is going on.</p>

<p>Example for code that is working:</p>

<pre><code>@Test
public void step2_resetToken() throws InterruptedException {
    int count = 0;
    String s;
    do {
        MobileElement mElement = (MobileElement) iosDriver.findElement(By.name(""Reset Token""));
        mElement.click();
        Thread.sleep(500);
        count++;
        assert count &lt; TIMEOUTTIME;
        s = element.getText();
        System.out.println(s);
    } while(!(element.getText().contains(""reset token performed:"")));
}
</code></pre>

<p>Example for code that is not working:</p>

<pre><code>@Test
public void step3_isAuthenticatedByPIN() throws InterruptedException {
    WebElement tableView = (WebElement) iosDriver.findElementByClassName(""XCUIElementTypeTable"");
    tableView.scrollTo(""isAuthenticatedByPIN"").click();
    int count = 0;
    String s;
    do {
        ////XCUIElementTypeStaticText[@name=""isAuthenticatedByPIN""]
        MobileElement mElement = (MobileElement) iosDriver.findElementByClassName(""XCUIElementTypeTable"");
        mElement.sendKeys(""isAuthenticatedByPIN"");
        mElement.findElement(By.name(""isAuthenticatedByPIN""));
        mElement.click();

        Thread.sleep(500);
        count++;
        assert count &lt; TIMEOUTTIME;
        s = element.getText();
        System.out.println(s);
    } while(!(element.getText().contains(""isAuthenticatedByPIN: YES"")));
}
</code></pre>

<p>I've tried also calling this method before so there will be a scroll but it seems that it just can't find elements that where not visible when the app started:</p>

<pre><code> public static void scrolltoXPath(RemoteWebDriver driver, String xPath) {

    RemoteWebElement parent = (RemoteWebElement)driver.findElement(By.className(""XCUIElementTypeTable""));
    String parentID = parent.getId();
    HashMap&lt;String, String&gt; scrollObject = new HashMap&lt;String, String&gt;();
    scrollObject.put(""element"", parentID);
    scrollObject.put(""name"", ""isConnected"");
    driver.executeScript(""mobile:scroll"", scrollObject);
}
</code></pre>

<p><strong>This what a tests to try with scrollTo but Java-client does not recognise scrollTo (Is this Java or Javascript method). Also i've tried with all other methods i found in google and couldn't figure this out.</strong></p>

<ol>
<li>Anyone can tell me if i'm right about the conclusion that i cant click on a cell that is not displayed?</li>
<li>If so, Please help with how to scroll to the cell i need to click on.</li>
</ol>

<p>Thanks.</p>
",https://stackoverflow.com/questions/52291653/cant-click-on-element-in-a-cell-that-is-not-displayed-in-appium-ios-using-jav,"['appium', 'appium-ios', 'java-client', 'appium-desktop']",1499,TRUE,0,1
Regarding Angular 5 Automation using Protractor with C#,"<p>This is with regards to Angular 5 Automation with Protractor using c#</p>

<p>Currently my application is developed based on Angular5 with Primeng UI components and kendo grid. Please find the following queries:</p>

<p>a) Can protractor be used to Automate angular 5 application ?</p>

<p>b) When I try to inspect, there are no ng-model, ng-reflect, ng-binding, ng-repeat etc.. available ? Should I discuss with development team to add these locators for Angular 5 or any other locators are available ?</p>

<p>c) Can I use the nuget package protractor in visual studio and start writing code in c#.Does that protractor nuget package support angular 5 Automation ? In our company I am not supposed to use JavaScript or typescript. How feasible it is to write in c# using the protractor package ?</p>

<p>d) Do you have any guideline that a developer should follow in Angular 5 development to cater E2e testing using protractor.net. Like ex for a input box what angular attribute to be added ?
For a drop down ? For a grid what angular attribute to be added ?</p>

<p>e) There are two types of build prod build and dev build. Actually we are supposed to test in prod build but unable to find any angular components in prod build, as the webpack tool coverts all the angular components to javascript  . In this case where there are no angular components in prod build. How to Automate ?</p>

<p>Please help me with these queries and in case you have any solution for protractor.net please share.</p>
",https://stackoverflow.com/questions/50700143/regarding-angular-5-automation-using-protractor-with-c,"['c#', 'protractor']",407,FALSE,0,1
Test ionic app with real http requests - Integration Test,"<p>I want to test my app and I am not sure which kind of test to use for which purpose.</p>

<p>I have an app that loads a page with the given data, then starts a http request (with a provider) to load and update the data in the view. If you click on some piece of data, the next page gets the data already there and then loads the rest and updates and so on. I want to test the update functions and the http requests.</p>

<p>I want to test my app from end to end, so I tried using e2e testing (with pretractor). But I found no way to check the data in the background, e.g. the data comming back from the server or the data held in my data model. Besides, my information is that the e2e test should be used for UI testing rather than function testing.</p>

<p>So I tried unit-testing (with Jasmine and Karma). I can access the right functions and variables, but I found no way to use the real http requests (not mockups) for my tests. Furthermore I need the result from the last page to send the right http request for the current page and I understand that this is not what unit testing is supposed to do.</p>

<p>I think I need some kind of integration test, but I have no idea how to implement this with ionic 3. 
So: Which test should I use and how to use it to to what I need?</p>
",https://stackoverflow.com/questions/49193878/test-ionic-app-with-real-http-requests-integration-test,"['angular', 'testing', 'ionic-framework', 'jasmine', 'protractor']",458,TRUE,0,1
How to use Firebase Auth&#39;s Google Sign-In option with Cypress.io,"<p>I need help using Google Sign-In when testing my Angular 6 app with Cypress. It can't use the sign-in popup, and so I'm trying to follow Cypress' advice to ""always use <code>cy.request()</code> to talk to 3rd party servers via their APIs."" That's from <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> which then points us to this example: <a href=""https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/logging-in__single-sign-on/cypress/integration/logging-in-single-sign-on-spec.js"" rel=""nofollow noreferrer"">https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/logging-in__single-sign-on/cypress/integration/logging-in-single-sign-on-spec.js</a> - more info on how to do this is seen at minute 23 in a presentation by the Cypress author: <a href=""https://www.youtube.com/watch?v=5XQOK0v_YRE"" rel=""nofollow noreferrer"">https://www.youtube.com/watch?v=5XQOK0v_YRE</a></p>

<p>I'm taking the video solution and trying to modify it for Firebase Auth according to <a href=""https://firebase.google.com/docs/auth/web/google-signin#advanced-authenticate-with-firebase-in-nodejs"" rel=""nofollow noreferrer"">https://firebase.google.com/docs/auth/web/google-signin#advanced-authenticate-with-firebase-in-nodejs</a> but I'm getting stuck on how to obtain the proper <code>id_token</code> and so far I have this code in my commands.js file:</p>

<pre><code>Cypress.Commands.add('login', () =&gt; {
  var id_token = ___?____;
  cy.request({
    method: 'POST',
    url: 'https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyAssertion?key=[API_KEY]',
    body: {
      ""requestUri"": ""http://localhost:3500"",
      ""postBody"": `id_token=${id_token}&amp;providerId=google.com`,
      ""returnSecureToken"": true,
      ""returnIdpCredential"": true
    }
  })
})
</code></pre>

<p>I believe I need to use a different API to initiate the login and request user credentials, which will include the id_token, and so I tried <a href=""https://firebase.google.com/docs/auth/web/google-signin#advanced-authenticate-with-firebase-in-nodejs"" rel=""nofollow noreferrer"">https://firebase.google.com/docs/auth/web/google-signin#advanced-authenticate-with-firebase-in-nodejs</a> but am not yet skilled enough to pull in external js files (<a href=""https://apis.google.com/js/platform.js"" rel=""nofollow noreferrer"">https://apis.google.com/js/platform.js</a>) into Node (This is probably not possible in js files the way it is in html). Using this package: <a href=""https://github.com/google/google-auth-library-nodejs"" rel=""nofollow noreferrer"">https://github.com/google/google-auth-library-nodejs</a> may be my next attempt. Is there anyone who can pick it up from here?</p>

<p>Similar question at <a href=""https://stackoverflow.com/questions/48735570/is-it-possible-to-use-cypress-e2e-testing-with-a-firebase-auth-project"">Is it possible to use Cypress e2e testing with a firebase auth project?</a> - but they are signing in  with user and pass.</p>
",https://stackoverflow.com/questions/51275072/how-to-use-firebase-auths-google-sign-in-option-with-cypress-io,"['node.js', 'firebase', 'integration-testing', 'google-authentication', 'cypress']",1193,FALSE,4,0
"TypeScript, Vue and experimentalDecorators","<p>I've created a Vue project through Vue-CLI v3.0.0-beta.15, now, everything is working, I mean, when I do <code>npm run serve</code> it compiles and runs fine but TypeScript throws the following error message and <strong>only inside the editor!</strong></p>

<pre><code>Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.
</code></pre>

<p><strong>The things I've tried and didn't work:</strong></p>

<ol>
<li><p>I double check that the <code>experimentalDecorators</code> is set to true in my <code>tsconfig.json</code> file which Vue does by default.</p></li>
<li><p>I tried to create a <code>jsconfig.json</code> file with the following options:</p>

<pre><code>{
    ""compilerOptions"": {
        ""experimentalDecorators"": true
    }
}
</code></pre></li>
<li><p>I tried to change the following options in VSCode <code>""javascript.implicitProjectConfig.experimentalDecorators"": true</code></p></li>
</ol>

<p>Now, I'm using the Vetur extension with VSCode which I already posted an <a href=""https://github.com/vuejs/vetur/issues/815"" rel=""nofollow noreferrer"">issue</a> on their repo <strong>but I don't use any extensions with Visual Studio for Vue and yet I get the same error</strong> so I don't know what triggers it but I think that something doesn't pick the <code>tsconfig.json</code> file.</p>

<p><strong>Here are the steps I've taken to generate the project:</strong></p>

<ol>
<li>mkdir experiment &amp;&amp; cd $_</li>
<li>npm init</li>
<li>npm install -D <code>@vue/cli</code></li>
<li>./node_modules/.bin/vue create dashboard</li>
<li><p>I've used the following options:</p>

<ul>
<li>Check the features needed for your project: Babel, TS, PWA, Router, Vuex, CSS Pre-processors, Linter, Unit, E2E</li>
<li>Use class-style component syntax? Yes</li>
<li>Use Babel alongside TypeScript for auto-detected polyfills? Yes</li>
<li>Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): SCSS/SASS</li>
<li>Pick a linter / formatter config: TSLint</li>
<li>Pick additional lint features: Lint on save</li>
<li>Pick a unit testing solution: Mocha</li>
<li>Pick a E2E testing solution: Cypress</li>
<li>Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In dedicated config files</li>
<li>Save this as a preset for future projects? No</li>
</ul></li>
<li><p>Then navigate to dashboard/src/views/Home.vue</p></li>
</ol>

<p>That's how it looks like in <strong>Visual Studio</strong>:</p>

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

<p>And that's how it looks like in <strong>VSCode</strong>:</p>

<p><a href=""https://i.stack.imgur.com/5ejTt.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/5ejTt.png"" alt=""enter image description here""></a></p>
",https://stackoverflow.com/questions/50782749/typescript-vue-and-experimentaldecorators,"['typescript', 'vue.js', 'visual-studio-code', 'vetur']",3848,TRUE,5,2
How to login in Auth0 in an E2E test with Cypress?,"<p>I have started testing a react webapp but I didn't go far because I had issues with the login. I am using <a href=""https://www.cypress.io/"" rel=""noreferrer"">cypress</a> e2e testing tool.</p>

<p>A welcome page is shown with a button to login, which will redirect you to <a href=""https://auth0.com/"" rel=""noreferrer""><code>auth0</code></a> service. User is login with email and password , then is redirected back to the webapp with a token.</p>

<p>I tried many different approach each of them resulting in a different problem.</p>

<p>Note: I don't want to test Auth0, I just want to enter in my webapp.</p>

<p><strong>Attempt 1. Clicking on login button</strong></p>

<p>Tried: Cypress should do the same as what the user does, therefore the test will click login button and go to Auth0 and fill in credentials.
Problem: Cypress doesn't allow you to navigate to another domain during the test.</p>

<blockquote>
  <p><a href=""https://docs.cypress.io/guides/guides/web-security.html#One-Superdomain-per-Test"" rel=""noreferrer"">Because Cypress changes its own host URL to match that of your applications, it requires that your application remain on the same superdomain for the entirety of a single test.</a></p>
</blockquote>

<p>You are supposed to be able to disable that setting setting <code>""chromeWebSecurity"": false</code> in <code>cypress.json</code> but it will not work yet because <a href=""https://github.com/cypress-io/cypress/issues/944"" rel=""noreferrer"">you can only visit a single domain with <code>cy.visit()</code></a></p>

<p><strong>Attempt 2. Login programmatically from the test</strong></p>

<p>Tried: login from the cypress test with <a href=""https://github.com/auth0/auth0.js"" rel=""noreferrer""><code>auth0-js</code></a> library so it is not needed to click in login button and thus no domain change occurs. </p>

<pre><code>describe('Waiting to fetch', () =&gt; {
  beforeEach(() =&gt; {
    this.fetchAuthDeferred = getDeferred()
    cy.visit('http://localhost:3000', {
      onBeforeLoad(win) {
        cy.stub(win, 'fetch')
          .withArgs($url)
          .as('fetchAuth')
          .returns(this.fetchAuthDeferred.promise)
      }
    })
  })

  it('login', () =&gt; {
    cy.visit('http://localhost:3000')

    const auth = new auth0.WebAuth(authOptions)
    auth.login(loginOptions)

    cy.get('@fetchAuth', { timeout: 10000 }).should('haveOwnProperty', 'token')

    cy.visit('http://localhost:3000')
    cy.get('[class*=""hamburger""]').click()
  })
})
</code></pre>

<p>Problems: <code>cy.route()</code> <a href=""https://github.com/cypress-io/cypress/issues/95"" rel=""noreferrer"">doesn't wait for fetch request</a>, a workaround is to use <a href=""https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/stubbing-spying__window-fetch/cypress/integration/spy-stub-clock-spec.js"" rel=""noreferrer""><code>cy.stub(win, 'fetch')</code></a>. It won't wait:</p>

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

<p><strong>Attempt 3. Login programmatically from the webapp</strong></p>

<p>Tried: I started to think that cypress only spy request made from the app and not from the test itself (as I tried in the point above).</p>

<p>I added a <em>fake-login</em> button in the welcome page which will call <code>auth0-js</code> (so no domain change) with hardcoded credentials and click it from the test</p>

<pre><code>cy.get('#fake-login').click()
</code></pre>

<p>Problems: that strategy worked, but of course I don't want to add a button with credential in the welcome page. So I tried adding the button element to the webapp during the test:</p>

<pre><code>it('Login adding element', () =&gt; {
  cy.visit('http://localhost:3000')
  const = document.createElement('div')
  fakeLogin.innerHTML = 'Fake login'
  fakeLogin.onclick = function() {
    const auth = new auth0.WebAuth(authOptions)
    auth.login(loginOptions)
  }
  fakeLogin.style.position = 'absolute'
  fakeLogin.style.zIndex = 1000
  fakeLogin.id = 'fake-login'

  cy.get('#root').invoke('prepend', fakeLogin)
  cy.get('#fake-login').click()
  cy.get('[class*=""hamburger""]').click() // Visible when logged in
})
</code></pre>

<p>And for some reason this doesn't work, the element is added but yt will not wait until the request are made.</p>

<p>So I don't know what else to try.
Maybe everything is a misunderstanding of how login should be done in E2E, should I work with mock data so login is not needed?</p>
",https://stackoverflow.com/questions/51208998/how-to-login-in-auth0-in-an-e2e-test-with-cypress,"['testing', 'mocking', 'auth0', 'e2e-testing', 'cypress']",18724,TRUE,30,4
ng e2e test timesout,"<h2>Problem</h2>

<p>My e2e test stopped working some time ago with no changes made to it.  I don't know why it is timing out, and I'm not sure how to diagnose this myself.  I have learned that the code in my test is actually a Promise that gets run when Angular is ready, and not knowing this earlier incorrectly led me to believe that the problem I was having was that my test was running before Angular was ready.</p>

<p>Now I have a <code>.then(...)</code> and a <code>.catch(...)</code> on my <code>page.getParagraphText()</code> call to see what is eventually going on.  After 30 seconds (I've increased how long it is willing to wait), it errors out with a timeout error.  I've gone to the url it suggests and tried anything that seemed related, to no avail.</p>

<h2>Version</h2>

<pre><code>$ ng version

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/

Angular CLI: 1.6.3
Node: 8.9.4
OS: win32 x64
Angular: 5.1.3
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker

@angular/cli: 1.6.3
@angular/language-service: 4.4.6
@angular-devkit/build-optimizer: 0.0.36
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.42
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.3
@schematics/angular: 0.1.11
@schematics/schematics: 0.0.11
typescript: 2.4.2
webpack: 3.10.0
</code></pre>

<h2>Screenshot</h2>

<p><a href=""https://i.stack.imgur.com/NZpDg.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/NZpDg.png"" alt=""debug screen shot""></a></p>

<p>My protractor configuration matches any new Angular CLI project that I create and those new ones that I generate have no problem with their e2e tests.  I haven't changed my applications default e2e test that I started with, but sure would like to begin writing more tests in the e2e space.</p>

<p>At first, I thought that the browser wasn't being captured as I have had that error come up before.  But as soon as I figured out how to debug e2e tests in vs code, I noticed this isn't the same issue as I've seen in the past.</p>

<h2>Question</h2>

<p>How do I diagnose what the hang up is?  Are there fairly common reasons for these tests to timeout?</p>

<h2>app.po.ts</h2>

<pre><code>import { browser, by, element } from 'protractor'; 

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

    getParagraphText() { 
        return element(by.css('header.header &gt; div.header-content &gt; div.header-logo &gt; a.logo &gt; span.header-title')).getText(); 
    } 
}
</code></pre>

<h2>Update</h2>

<p>I'm still having this issue.  One other thing I've learned is that as soon as I resize the window that comes up during e2e testing, the tests run immediately.  But I don't want to have to manually resize the window for each test run, obviously.  But does that hint at what the issue could be?</p>

<p>In other words, if I do this to each test, they run:</p>

<pre><code>import { browser } from 'protractor';

import { TDPortalPage } from './app.po';

describe('tdportal App', () =&gt; {
  let page: TDPortalPage;

  beforeEach(() =&gt; {
    page = new TDPortalPage();
  });

  it('should display message saying Title', () =&gt; {
    page.navigateTo()
      // THIS IS WHAT ALLOWS MY TEST TO RUN.  BUT I HAVE TO DO IT TO EACH TEST.
      .then(_ =&gt; browser.manage().window().setSize(800, 600));
    expect(page.getParagraphText()).toEqual('Title');
  });
});
</code></pre>
",https://stackoverflow.com/questions/48194109/ng-e2e-test-timesout,"['angular', 'typescript', 'protractor', 'e2e-testing', 'angular-e2e']",1292,TRUE,2,1
How to code page in Page Object Model for easier debugging of Protractor tests?,"<p><strong>Preface</strong></p>

<p>I want to prepare easy to maintain and debug code for e2e testing using Page Object Model.</p>

<p><strong>What I do</strong></p>

<p>When I start to prepare the <a href=""https://www.protractortest.org"" rel=""nofollow noreferrer"">Protractor</a> end 2 end tests, I try to prepare code in <a href=""https://martinfowler.com/bliki/PageObject.html"" rel=""nofollow noreferrer"">Page Object Model</a> by performing following steps:</p>

<ol>
<li>Open page that I am going to test in web browser, </li>
<li>Open <a href=""https://developers.google.com/web/tools/chrome-devtools/"" rel=""nofollow noreferrer"">developer tools</a> (F12),</li>
<li>Using <a href=""https://developers.google.com/web/tools/chrome-devtools/inspect-styles/"" rel=""nofollow noreferrer"">inspect</a> tool familiarize with the DOM of the
page, looking at ID's, classes names and CSS Selectors for the elements that I want to use for Page Object Model,</li>
<li>start coding in such a way that elements depends on the
previously defined ones. In particular, I try to divide my code in different classes.</li>
</ol>

<p>Let me provide a simplified example of such code mentioned in point 4:</p>

<pre><code>class genericPageWithTable {

    get Frame1() {
        return element(by.id('someId'));
        }

    get Table1() {
        return this.Frame1.element(by.tagName('table'));
        }
}

class specificTable extends genericPageWithTable {

    get specificElement {
        return this.Table1.element(by.className('specificElement'));
        }
}
</code></pre>

<p>and I wrote simple test with following example assertion:</p>

<pre><code>expect(specificElement.getText()).toBe('someString');
</code></pre>

<p>and there's where my frustration begins...</p>

<p>Test fails, beacause <code>undefined</code> has no getText()...</p>

<p><strong>Problem</strong></p>

<p>I don't know which element was undefined, which of my methods returned no element. I don't know if I could trust any of my methods.</p>

<p>so I'm running <code>protractor --elementExplorer</code> and try to verify if I wrote properly each of my locators...
in elementExplorer it works, so I'm starting to adding <code>browser.wait(EC.visibilityOf(...))</code> conditions... but now the error message provides me information that undefined doesn't contain 'isPresent' method.
So I'm starting to add <code>async</code> and <code>await</code>, but in many cases it is still difficult to find where the undefined is returned...</p>

<p>adding break points and trying to debug also confuses me in many cases, because the flow is in some way unexpected.</p>

<hr>

<p><strong>Questions</strong></p>

<p>Could you please tell me:</p>

<ol>
<li>How should I prepare code for Page Object Model, so that it will be easier to maintain and debug, so that I will be sure that my methods really returns something? Are there better ways than using developer tools in browser and coding based on what I see in HTML?</li>
<li>What is a better way to ensure that my code for Page Object Model is correct? Obviously I could try to write test for each method/property, but I don't want to confuse those who will read the test output (and expect the results from business perspective)?</li>
</ol>
",https://stackoverflow.com/questions/51672256/how-to-code-page-in-page-object-model-for-easier-debugging-of-protractor-tests,"['typescript', 'debugging', 'protractor', 'pageobjects']",211,TRUE,0,1
Vue-CLI v3 opinionated project structure,"<p>I'm trying to move existing project to Vue and I've used Vue-CLI 3 and installed it locally and then I've generated the project through the following command <code>./node_modules/.bin/vue create dashboard</code> and I've used the following options:</p>

<ul>
<li><p>Check the features needed for your project: Babel, TS, PWA, Router, Vuex, CSS Pre-processors, Linter, Unit, E2E</p></li>
<li><p>Use class-style component syntax? Yes</p></li>
<li><p>Use Babel alongside TypeScript for auto-detected polyfills? Yes</p></li>
<li><p>Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): SCSS/SASS</p></li>
<li><p>Pick a linter / formatter config: TSLint</p></li>
<li><p>Pick additional lint features: Lint on save</p></li>
<li><p>Pick a unit testing solution: Mocha</p></li>
<li><p>Pick a E2E testing solution: Cypress</p></li>
<li><p>Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In dedicated config files</p></li>
<li><p>Save this as a preset for future projects? No</p></li>
</ul>

<p><strong>This will generate the following project structure:</strong></p>

<pre><code>..\Web\.experiment
├── dashboard
|  ├── babel.config.js
|  ├── cypress.json
|  ├── node_modules
|  ├── package-lock.json
|  ├── package.json
|  ├── public
|  |  ├── favicon.ico
|  |  ├── img
|  |  ├── index.html
|  |  └── manifest.json
|  ├── src
|  |  ├── App.vue
|  |  ├── assets
|  |  ├── components
|  |  ├── main.ts
|  |  ├── registerServiceWorker.ts
|  |  ├── router.ts
|  |  ├── shims-tsx.d.ts
|  |  ├── shims-vue.d.ts
|  |  ├── store.ts
|  |  └── views
|  ├── tests
|  |  ├── e2e
|  |  └── unit
|  ├── tsconfig.json
|  └── tslint.json
├── node_modules
├── package-lock.json
└── package.json
</code></pre>

<p><strong>Now, I'm having the following issues:</strong></p>

<ol>
<li><p>At my company we tend to install all tools that are related to the project as part of the project as opposed to global installs and in this case I couldn't find a way to tell Vue-CLI3 to generate the files directly at the <code>.experiment</code> directory so now we have two <code>node_modules</code> directories as opposed to one as you can see in the structure above.</p>

<p>Our current project structure is something like the following:</p>

<pre><code>..\Web\&lt;domain&gt;\Src\Dashboard\
├── app
├── node_modules
├── package-lock.json
├── package.json
├── tests
├── tsconfig.json
└── tslint.json
</code></pre>

<p>And this is really important to us because we have things dependent on this structure so what I did is started to copy/paste things from the generated directory into the project to match our structure.</p></li>
<li><p>After I copied/pasted everything and ran <code>npm run serve</code> it started to complain and throws the following errors:</p>

<pre><code>ERROR  Failed to compile with 1 errors                                                                                                                                                                                            
17:00:23
This relative module was not found:

* ./src/main.ts in multi (webpack)-dev-server/client?/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts  
</code></pre>

<p>So I went to the <code>node_modules</code> directory and searched for <code>./src/main.ts</code> I've found it in <code>..\Web\&lt;domain&gt;\Src\Dashboard\node_modules\@vue\cli-plugin-typescript\index.js</code> and I have no clue how to configure it so what I did is change the default path of the module to <code>./app/main.ts</code> and then I got the following error:</p>

<pre><code>ERROR  Failed to compile with 1 errors                                                                                                                                                                                            17:07:52
This dependency was not found:

* @/components/HelloWorld.vue in ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--13-2!./node_modules/vue-loader/lib??vue-loader-options!./app/views/Home.vue?vue&amp;type=script&amp;lang=ts
</code></pre>

<p>So I changed <code>@</code> to <code>/app</code> because in the comments it says the following 
""// @ is an alias to /src"" but it doesn't really work because then I get a similar error:</p>

<pre><code>ERROR  Failed to compile with 1 errors                                                                                                                                                                                            17:37:33
This dependency was not found:

* /app/components/HelloWorld.vue in ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--13-2!./node_modules/vue-loader/lib??vue-loader-options!./app/views/Home.vue?vue&amp;type=script&amp;lang=ts
</code></pre></li>
</ol>

<p><strong>And I have the following questions:</strong></p>

<ol>
<li><p>How can I generate a template in existing directory where a <code>node_modules</code> directory might exist using Vue-CLI v3?</p></li>
<li><p>How do I configure the entry point of Vue without messing with the modules themselves? e.g. I want to change <code>./src/main.ts</code> to <code>./app/main.ts</code>.</p></li>
<li><p>How do I change where <code>@</code> points to?</p></li>
</ol>

<p>I read and found that something like <code>vue.config.js</code> exists but then I didn't really understand how to configure it to fit my needs.</p>
",https://stackoverflow.com/questions/50763864/vue-cli-v3-opinionated-project-structure,['vue.js'],2966,TRUE,1,1
