Comments (4)
Does some simple JS page work for you, e.g. when you change page HTML via JS and then assert that in Mink?
from minkzombiedriver.
Thanks for your fast reply!
I've added an simple JS-Script-Tag, that replaces some text after the js-event load is fired. I can not assert that successfully in Mink.
Do I have to tell Zombie somehow to execute the JS?
Edit: after fiddling around I got that replacing some text with js-script is working quite well.
I did not assert correctly for that.
I assumed that after calling $page->getContent()
javascript was already executed. But this does not seem to be correct.
<!DOCTYPE html>
<html lang="de" translate="no">
<head>
<meta charset="utf-8"/>
<title>Some title</title>
<base href="/"/>
<meta name="color-scheme" content="light dark"/>
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta name="format-detection" content="telephone=no"/>
<meta name="msapplication-tap-highlight" content="no"/>
<link rel="icon" type="image/png" href="assets/icon/favicon.png"/>
<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<link rel="stylesheet" href="styles.css"></head>
<body>
<app-root></app-root>
<script src="runtime.js" type="module"></script><script src="polyfills.js" type="module"></script><script src="vendor.js" type="module"></script><script src="main.js" type="module"></script></body>
So that's my original response, I get. But asserting an item, that should be added after executing all the included scripts does not succeed.
Is there any option to find out, what's going on there?
from minkzombiedriver.
Do I have to tell Zombie somehow to execute the JS?
No.
We have a test suite in place on GitHub Actions, that tests that it works with both JS and HTML. It passes.
Maybe Zombie can't handle non-HTML5 tags, like <app-root></app-root>
. Mink is just a wrapper around Zombie. You need to contact the Zombie developer at http://zombie.js.org/ to see if it can deal with such HTML.
from minkzombiedriver.
Thanks a lot for your reply. I'm sorry for bothering you!
Just as a reference: I've asked the question again there: assaf/zombie#1218
from minkzombiedriver.
Related Issues (20)
- Cannot read property 'nodeType' of null HOT 12
- Throw exception, when options are changed on running server HOT 3
- Changing host or port should regenerate server code HOT 2
- The "node_modules" path not validated during server construction HOT 1
- Using "Behat\Mink\Driver\NodeJS\Server::createTemporaryServer" replaces user provided server code HOT 4
- The server should not use a temporary file HOT 2
- The "wait()" does not work, when Zombie has empty event loop HOT 6
- Warning: socket_read(): unable to read from socket [10054]: An existing connection was forcibly closed by the remote host. HOT 10
- How to change timeout? HOT 4
- Zombie Server is still active and listening to port after a Behat exception HOT 2
- Using a local Zombie installation HOT 23
- Unable to run tests for the project HOT 22
- The PHP 7 tests failing on Travis CI HOT 3
- Update README.md with example of setting options HOT 1
- Driver does not work with Symfony 4.0+ HOT 3
- Fails with latest zombie
- Can't find module HOT 7
- Handle non-ascii characters in url
- Tests failing on ppc64le architecture for master and versions v1.4.0,v1.5.0 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 minkzombiedriver.