-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Ui/replication/test update #8995
Merged
andaley
merged 7 commits into
ui/replication-status-discoverability
from
ui/replication/test-update
May 18, 2020
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c73c478
make sure progress bar updates and animates
andaley 4abcd03
ensure dashboard updates when replication mode has changed
andaley 8d6b3f4
make sure we update isSyncing when state has changed
andaley d05219b
wip - console log statements to see if components are getting new attrs
andaley 4c80808
Revert "wip - console log statements to see if components are getting…
andaley d060393
style progress bar in mozilla; allow testing the progress bar in stor…
andaley 8940688
test that primary and secondary card container don't display at the s…
andaley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { module, test } from 'qunit'; | ||
import { setupRenderingTest } from 'ember-qunit'; | ||
import { render } from '@ember/test-helpers'; | ||
import { assign } from '@ember/polyfills'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
|
||
const REPLICATION_DETAILS = { | ||
|
@@ -27,13 +28,12 @@ module('Integration | Enterprise | Component | replication-dashboard', function( | |
setupRenderingTest(hooks); | ||
|
||
hooks.beforeEach(function() { | ||
this.set('replicationDetails', REPLICATION_DETAILS); | ||
this.set('clusterMode', 'secondary'); | ||
this.set('isSecondary', true); | ||
}); | ||
|
||
test('it renders', async function(assert) { | ||
this.set('replicationDetails', REPLICATION_DETAILS); | ||
|
||
await render(hbs`<ReplicationDashboard | ||
@replicationDetails={{replicationDetails}} | ||
@clusterMode={{clusterMode}} | ||
|
@@ -47,8 +47,24 @@ module('Integration | Enterprise | Component | replication-dashboard', function( | |
assert.dom('[data-test-flash-message]').doesNotExist('no flash message is displayed on render'); | ||
}); | ||
|
||
test('it updates the dashboard when the replication mode has changed', async function(assert) { | ||
await render(hbs`<ReplicationDashboard | ||
@replicationDetails={{replicationDetails}} | ||
@clusterMode={{clusterMode}} | ||
@isSecondary={{isSecondary}} | ||
/>`); | ||
|
||
assert.dom('[data-test-selectable-card-container="secondary"]').exists(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we also check here that |
||
assert.dom('[data-test-selectable-card-container="primary"]').doesNotExist(); | ||
|
||
this.set('clusterMode', 'primary'); | ||
this.set('isSecondary', false); | ||
|
||
assert.dom('[data-test-selectable-card-container="primary"]').exists(); | ||
assert.dom('[data-test-selectable-card-container="secondary"]').doesNotExist(); | ||
}); | ||
|
||
test('it renders the primary selectable-card-container when the cluster is a primary', async function(assert) { | ||
this.set('replicationDetails', REPLICATION_DETAILS); | ||
this.set('isSecondary', false); | ||
|
||
await render(hbs`<ReplicationDashboard | ||
|
@@ -58,6 +74,7 @@ module('Integration | Enterprise | Component | replication-dashboard', function( | |
/>`); | ||
|
||
assert.dom('[data-test-selectable-card-container="primary"]').exists(); | ||
assert.dom('[data-test-selectable-card-container="secondary"]').doesNotExist(); | ||
}); | ||
|
||
test('it renders an alert banner if the dashboard is syncing', async function(assert) { | ||
|
@@ -94,5 +111,12 @@ module('Integration | Enterprise | Component | replication-dashboard', function( | |
IS_REINDEXING.reindex_building_progress, | ||
'shows the reindexing progress inside the alert banner' | ||
); | ||
|
||
const reindexingInProgress = assign({}, IS_REINDEXING, { reindex_building_progress: 27000 }); | ||
this.set('replicationDetails', reindexingInProgress); | ||
|
||
assert | ||
.dom('.message-title>.progress') | ||
.hasValue(reindexingInProgress.reindex_building_progress, 'updates the reindexing progress'); | ||
}); | ||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we target
::-moz-progress-value
as well so there is cross-browser support? Looks like we may need-webkit-appearance: none;
on the .progress styles too. Ref: https://developer.mozilla.org/en-US/docs/Web/CSS/::-webkit-progress-valueThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes, thank you so much for catching this! i often forget to add these additional prefixes. appreciate the link, too!