https://cypress.io logo
Join Discord
Powered by
# general-chat
  • s

    salmon-computer-88142

    08/03/2022, 3:39 PM
    cypress does not support it
  • g

    gray-kilobyte-89541

    08/03/2022, 3:44 PM
    https://github.com/bahmutov/cypress-recurse
  • s

    salmon-computer-88142

    08/03/2022, 4:02 PM
    is there any integration with rxjs?
  • s

    salmon-computer-88142

    08/03/2022, 4:02 PM
    because you can do complex reactive operations with it
  • s

    salmon-computer-88142

    08/03/2022, 4:02 PM
    not just wait for function to return true
  • g

    gray-kilobyte-89541

    08/03/2022, 4:59 PM
    Sure, you can wrap a promise returned by the rxjs pipeline and Cypress will wait for it to resolve. I doubt that you will achieve more than straight cy.request plus whatever UI commands give you
  • s

    salmon-computer-88142

    08/03/2022, 9:07 PM
    @gray-kilobyte-89541 works great thx, can i merge 2 chains together?
  • s

    salmon-computer-88142

    08/03/2022, 9:08 PM
    if i have function return cypress chain and i want to concatenate it with the previous chain
  • s

    stale-park-86404

    08/03/2022, 11:43 PM
    Looking forward to that webkit support 🙂
  • g

    gray-kilobyte-89541

    08/04/2022, 12:00 PM
    I don't understand what you are trying to do without some code
  • s

    strong-energy-6158

    08/04/2022, 12:07 PM
    I have a small doubt. Could someone help me out? I have a url. In the url , date parameter is there but the value is not in date format. How I can validate that date? sample url: https://abc/cde?dateFrom=1651663139&dateTo=1659611939' The date I have given is start date= 4th May 2022 and end date=4th Aug 2022
  • f

    fresh-doctor-14925

    08/04/2022, 12:33 PM
    I'll give you a hint: those timestamps are in a format known 'Epoch Timestamp', which is the number of milliseconds since Jan 01 1970 😅. If you have a look on google, you'll find ways to convert them into a more human-readable format
  • n

    nutritious-honey-65632

    08/04/2022, 1:13 PM
    `node inspect brk 5556 node modules
  • s

    strong-energy-6158

    08/04/2022, 2:51 PM
    Thanks a lot. I could get the date and time. it('Convert Epoch Timestamp', () => { var d = new Date(1659619678*1000) cy.log('Converted to date: ' + d.toLocaleString()) } // out put is 04/08/2022, 14:27:58 I just want to pick only the date ie 04/08/2022 from it. How we can do it?
  • f

    fresh-doctor-14925

    08/04/2022, 2:55 PM
    Well, you've got a string there, so you could parse it with some regular expression to look for everything before the comma Or you could pass in an option to
    .toLocaleString()
    so you only get the parts of the date you want. More on that here: https://www.w3schools.com/jsref/jsref_tolocalestring.asp
  • s

    strong-energy-6158

    08/04/2022, 4:20 PM
    Thanks a lot. Got solution from the link 🙂
  • s

    swift-kitchen-62493

    08/05/2022, 8:12 AM
    can i make teset in real mobile device?
  • s

    stale-optician-85950

    08/05/2022, 9:11 AM
    The closest you can get to running on a real mobile device is using UserAgent specifying mobile https://glebbahmutov.com/blog/mobile-tests/
  • s

    stale-park-86404

    08/05/2022, 9:55 AM
    Hi, I need some clarification/help on this output, I have steps for logging in on the app and put inside before(), but everytime I run the test, login still happens in every it() block,
  • f

    fresh-doctor-14925

    08/05/2022, 10:07 AM
    You mean that you're asked to login in every
    it()
    block?
  • s

    stale-park-86404

    08/05/2022, 10:08 AM
    yes
  • s

    stale-park-86404

    08/05/2022, 10:09 AM
    this caused other it block to fail
  • s

    stale-park-86404

    08/05/2022, 10:09 AM
    so i ended up using beforeEach
  • f

    fresh-doctor-14925

    08/05/2022, 10:09 AM
    That's expected behaviour. Cypress clears context between
    it()
    blocks. You will need to put it in a
    beforeEach()
    or use the
    cy.session()
    API
  • s

    stale-park-86404

    08/05/2022, 10:21 AM
    okay, I was confused in there. my initial understanding was that, it would be automatically logged in each time it executes it block, before(() => { cy.visit('/') }) it('testA', () => { }) it('testB', () => { })
  • m

    mammoth-manchester-71430

    08/05/2022, 11:21 AM
    Hi.. anyone know how to call the function from one step definition to another step definition instead of creating it in the commands
  • g

    gray-kilobyte-89541

    08/05/2022, 11:56 AM
    use
    beforeEach
  • r

    red-flower-83890

    08/05/2022, 12:31 PM
    anyone knows what is wrong here?
    Copy code
    const {defineConfig} = require("cypress");
    
    module.exports = defineConfig({
        chromeWebSecurity: false,
        viewportWidth: 1600,
        viewportHeight: 1200,
        reporter: "mochawesome",
        reporterOptions: {
            overwrite: false,
            html: false,
            json: true,
        },
        e2e: {
        // We've imported your old cypress plugins here.
        // You may want to clean this up later by importing these.
            setupNodeEvents(on, config) {
                // implement node event listeners here
            },
            baseUrl: "http://localhost:3000/",
            excludeSpecPattern: [
                "e2e.cy.js"
            ],
        },
    });
  • f

    freezing-piano-2792

    08/05/2022, 4:58 PM
    https://github.com/badeball/cypress-cucumber-preprocessor/blob/master/docs/cucumber-basics.md#nested-steps
  • n

    nutritious-honey-65632

    08/05/2022, 6:48 PM
    all the options above e2e should be the part of e2e object (chromeWebSecurity, viewport...)
1...737475...127Latest