Skip to content

"Run now" reloads app#221

Merged
Gaurav0 merged 3 commits intoember-cli:masterfrom
pangratz:run-now-reloads-app
Oct 19, 2015
Merged

"Run now" reloads app#221
Gaurav0 merged 3 commits intoember-cli:masterfrom
pangratz:run-now-reloads-app

Conversation

@pangratz
Copy link
Copy Markdown
Contributor

The used {{dummy-demo-app}} component only reloads the application if
the passed html property changes. If nothing changes in the underlying
app, succeeding clicks on "run now" will do nothing, as the HTML doesn't
change.

To force enable the reload of the application, this commit adds a new
<meta name="build-at" > tag, which' value is set to the milliseconds
since the Unix Epoch. By this, the HTML changes everytime the app is
build and now the "run now" button always reloads the application.


This addresses #220

@pangratz pangratz changed the title Run now reloads app "Run now" reloads app Oct 18, 2015
Comment thread tests/acceptance/run-now-test.js Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you may need to move this inside previous andThen

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, nice catch.

The used `{{dummy-demo-app}}` component only reloads the application if
the passed `html` property changes. If nothing changes in the underlying
app, succeeding clicks on "run now" will do nothing, as the HTML doesn't
change.

To force enable the reload of the application, this commit adds a new
`<meta name="build-at" >` tag, which' value is set to the milliseconds
since the Unix Epoch. By this, the HTML changes everytime the app is
build and now the "run now" button always reloads the application.
Some acceptance tests fail since the <iframe> which contains the app is
not yet loaded and hence the assertions on the content fail.

This commit adds the previously `waitForLoadedIFrame()` helper so it is
ensured that the iframe is loaded before the asserions are made.
@Gaurav0
Copy link
Copy Markdown
Contributor

Gaurav0 commented Oct 19, 2015

👍

Gaurav0 added a commit that referenced this pull request Oct 19, 2015
@Gaurav0 Gaurav0 merged commit b4d6ba0 into ember-cli:master Oct 19, 2015
@pangratz pangratz deleted the run-now-reloads-app branch October 19, 2015 13:34
@rwjblue
Copy link
Copy Markdown
Member

rwjblue commented Oct 19, 2015

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants