hyperstack-org / hyperstack-org/hyperstack

Using HyperSpec when loading a page via `visit`

Ouverte
#398 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
JavaScript
Étoiles
538
Forks
41
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

If you visit a page (rather than use `mount`) you don't get the HyperSpec extra stuff (like TimeCop integration, ability to use `before_mount`, `insert_html` etc.

Furthermore, when you call on_client the @hyper_spec_mounted flag is not set, and so the page will get reloaded.

You can work around the second part by doing a `page.instance_variable_set("@hyper_spec_mounted", true)` after the visit.

But this should all be nicely integrated, possibly some ERB helpers that could be used in test mode when loading the layout?

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.