Git Product home page Git Product logo

Comments (9)

fjgarlin avatar fjgarlin commented on July 17, 2024 1

#65 and #66 removed that dependency and that package is no longer required.

There is still left Gitlab to fully check but with that push the testing has been a bit standarised (or at least a bit more). It might be interesting to work on a CypressIO integration as suggested here #67 for end to end tests.

from drupal9ci.

davereid-pfg avatar davereid-pfg commented on July 17, 2024

So is the future recommendation here to use CypressIO in the future instead of Drupal Test Traits?

from drupal9ci.

fjgarlin avatar fjgarlin commented on July 17, 2024

My 2c, I guess you can go either way or both ways to be honest, it'll probably depends on the experience that you have with the tools.

In the case of CypressIO it's really quick and easy to get it set up and to write end-to-end tests. You can see a very quick intro here: https://www.youtube.com/watch?v=eL4zkArYQLo.
Basically it's npm install cypress and then write a test like this:

describe('Visit homepage', () => {
  it('Sees welcome message', () => {
    cy.visit('/')
    cy.contains('Welcome').should('be.visible')
  })
})

and you're almost done :-)
You can see the WIP PR for CypressIO integration here: #70 (and related issue #67). This is already working for Gitlab.

Also, the Javascript testing that was done was using ExistingSiteJavascript/ExistingSiteTest.php, but the official Javascript testing on Drupal seems to be different (classes should extend Drupal\FunctionalJavascriptTests\WebDriverTestBase). This can be added if needed too at a later stage. I'm only adding Cypress on the above PR, not replacing behat.

The way I see this integration is that it provides the base tools and then you can build on that on a project per project basis, this is just the initial push to get CI configured.

from drupal9ci.

juampynr avatar juampynr commented on July 17, 2024

I second @fjgarlin. If you are going to do BDD, cypress.io's developer experience is much more transparent than Drupal Test Traits.

from drupal9ci.

deviantintegral avatar deviantintegral commented on July 17, 2024

Can you still use DTT traits like NodeCreationTrait? Admittedly, on my last project we never ran tests multiple times on the same environment, but it'd be good to document and tell users what the alternatives are.

From an adoption standpoint, if someone is willing to finish the DTT integration, that makes it more likely this will be used on existing projects with tests.

from drupal9ci.

fjgarlin avatar fjgarlin commented on July 17, 2024

Based on this: https://api.drupal.org/api/drupal/core%21tests%21Drupal%21FunctionalJavascriptTests%21WebDriverTestBase.php/class/WebDriverTestBase/9.1.x if you use WebDriverTestBase then those traits should still be available.

Before asking for the final review on #70 I'll also make sure to update the README file with the information concerning CypressIO and any other relevant changes.

from drupal9ci.

juampynr avatar juampynr commented on July 17, 2024

@fjgarlin I think that this is done already, correct?

from drupal9ci.

fjgarlin avatar fjgarlin commented on July 17, 2024

Correct @juampynr, done and merged to the main branch.

from drupal9ci.

juampynr avatar juampynr commented on July 17, 2024

Thanks! Closing.

from drupal9ci.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.