hoodiehq-archive / hoodie-integration-test

⛔ deprecated
Apache License 2.0
3 stars 2 forks source link

[WIP] adding test for admin dashboard app #8

Closed gr2m closed 10 years ago

gr2m commented 10 years ago

This tests fails because the login form does not become visible. There are no JS errors and the CSS is fine. My guess is that the HTML generated by the dashboard app is invalid. If I comment out the current <body> tag with its <script> tags and replace it with the static HTML from Chrome's inspector, it works all fine. Well possible that Chrome auto-fixed the HTML.

Next step would be to look trough the templates of the admin dashboard app and look for tags that don't get closed.

gr2m commented 10 years ago

I've spent another day trying to figure out what the problem is with the specs for the admin dashboard. No luck. I've added a simple test in a branch of the admin-dashboard repo: https://github.com/hoodiehq/hoodie-admin-dashboard/commit/6d47235475ca91678676addade2ed05e65b0b6a6

I give up. No clue what the fuck is going wrong here. But it's super strange and I'm out of ideas what else to try :/

gr2m commented 10 years ago

any chance of running the specs with something else than phantomjs? @boennemann

gr2m commented 10 years ago

The very last idea I have is that it would be an encoding issue. The source files in /src are not stored as utf-8, e.g.

file --mime src/index.html 
# src/index.html: text/html; charset=us-ascii

What is strange is that I can't change it to UTF-8 with iconv

iconv -f ISO-8859-1 -t UTF-8 src/index.html > src/index-utf8.html
file --mime src/*.html
# src/index-utf8.html: text/html; charset=us-ascii
# src/index.html:      text/html; charset=us-ascii

The only thing that worked was using sublime: File -> Save with Encoding -> UTF-8 with BOM. After that, I get src/index.html: text/html; charset=utf-8. I've set all files in www/ to UTF-8 that way, but the problem remained. Last thing I'd try is to set the encoding on all sourcefiles, and then see if that helps anything (yeah I'm really out of ideas). But I've no clue on how to turn all text files recursively to UTF-8, it's too much to do it by hand with Sublime

gr2m commented 10 years ago

As discussed with @boennemann, we will postpone the integrations tests for the admin dashboard to later, to not get blocked by it for now.