Comments (9)
#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.
So is the future recommendation here to use CypressIO in the future instead of Drupal Test Traits?
from drupal9ci.
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.
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.
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.
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.
@fjgarlin I think that this is done already, correct?
from drupal9ci.
Correct @juampynr, done and merged to the main branch.
from drupal9ci.
Thanks! Closing.
from drupal9ci.
Related Issues (20)
- Annotations for code-standards HOT 2
- Changes to upstream image causes CircleCI to break HOT 1
- Is this still supported? HOT 5
- Run Travis CI in a Drupal Docker project HOT 3
- Clarify instructions in scripts/databases HOT 8
- Cannot touch 'storage/testing.sqlite': No such file or directory HOT 1
- Errors saving and restoring cache HOT 8
- Drupal 9 compatibility HOT 4
- Replace Behat tests by Cypress.io ones HOT 4
- Create Composer 2 version for both Dockerfile and Dockerfile9 HOT 6
- "Failed to connect to localhost port 80: Connection refused" HOT 1
- DocumentRoot directory doesn't exist HOT 12
- jq not available by default in drupal8ci:latest image
- Include intl extension for PHP
- Update underlying docker image or use third party one HOT 8
- Interactive command line interface HOT 2
- Remove CircleCI test
- Config validation in CI
- Rename project and references from drupal9ci to drupalci HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drupal9ci.