Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Run now" reloads app #221

Merged
merged 3 commits into from
Oct 19, 2015
Merged

"Run now" reloads app #221

merged 3 commits into from
Oct 19, 2015

Conversation

pangratz
Copy link
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
find(".run-now").click();
});

waitForLoadedIFrame();
Copy link
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
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
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
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