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

Fix Map spec and Alert Page snapshot flakyness #4403

Merged
merged 5 commits into from
Nov 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions client/app/pages/alert/components/Query.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,13 @@
.alert-query-schedule {
font-style: italic;
text-transform: lowercase;
}

@media only percy {
// hide query selector arrow in Percy to avoid a flaky snapshot
.alert-query-selector {
.ant-select-arrow-icon {
display: none !important;
}
}
}
6 changes: 3 additions & 3 deletions client/cypress/integration/visualizations/choropleth_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ describe('Choropleth', () => {
cy.clickThrough('Choropleth.EditorTabs.Colors');
cy.clickThrough('Choropleth.Editor.Colors.Min');
cy.fillInputs({ 'ColorPicker.CustomColor': 'yellow{enter}' });
cy.wait(100); // eslint-disable-line cypress/no-unnecessary-waiting
cy.getByTestId('ColorPicker.CustomColor').should('not.be.visible');
cy.clickThrough('Choropleth.Editor.Colors.Max');
cy.fillInputs({ 'ColorPicker.CustomColor': 'red{enter}' });
cy.wait(100); // eslint-disable-line cypress/no-unnecessary-waiting
cy.getByTestId('ColorPicker.CustomColor').should('not.be.visible');
cy.clickThrough('Choropleth.Editor.Colors.Borders');
cy.fillInputs({ 'ColorPicker.CustomColor': 'black{enter}' });
cy.wait(100); // eslint-disable-line cypress/no-unnecessary-waiting
cy.getByTestId('ColorPicker.CustomColor').should('not.be.visible');

cy.clickThrough(`
Choropleth.EditorTabs.Format
Expand Down
12 changes: 7 additions & 5 deletions client/cypress/integration/visualizations/map_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,18 @@ describe('Map (Markers)', () => {
cy.clickThrough('Map.EditorTabs.Groups');
cy.clickThrough('Map.Editor.Groups.Israel.Color');
cy.fillInputs({ 'ColorPicker.CustomColor': 'red{enter}' });
cy.wait(100); // eslint-disable-line cypress/no-unnecessary-waiting
cy.getByTestId('ColorPicker.CustomColor').should('not.be.visible');
cy.clickThrough('Map.Editor.Groups.Ukraine.Color');
cy.fillInputs({ 'ColorPicker.CustomColor': 'green{enter}' });
cy.wait(100); // eslint-disable-line cypress/no-unnecessary-waiting
cy.getByTestId('ColorPicker.CustomColor').should('not.be.visible');
cy.clickThrough('Map.Editor.Groups.Hungary.Color');
cy.fillInputs({ 'ColorPicker.CustomColor': 'blue{enter}' });
cy.getByTestId('ColorPicker.CustomColor').should('not.be.visible');

cy.getByTestId('VisualizationPreview').find('.leaflet-control-zoom-in').click();

// Wait for proper initialization of visualization
cy.wait(500); // eslint-disable-line cypress/no-unnecessary-waiting
cy.wait(1000); // eslint-disable-line cypress/no-unnecessary-waiting
cy.percySnapshot('Visualizations - Map (Markers) with groups', { widths: [viewportWidth] });
});

Expand Down Expand Up @@ -84,14 +85,15 @@ describe('Map (Markers)', () => {

cy.clickThrough('Map.Editor.MarkerBackgroundColor');
cy.fillInputs({ 'ColorPicker.CustomColor': 'red{enter}' });
cy.wait(100); // eslint-disable-line cypress/no-unnecessary-waiting
cy.getByTestId('ColorPicker.CustomColor').should('not.be.visible');
cy.clickThrough('Map.Editor.MarkerBorderColor');
cy.fillInputs({ 'ColorPicker.CustomColor': 'maroon{enter}' });
cy.getByTestId('ColorPicker.CustomColor').should('not.be.visible');

cy.getByTestId('VisualizationPreview').find('.leaflet-control-zoom-in').click();

// Wait for proper initialization of visualization
cy.wait(500); // eslint-disable-line cypress/no-unnecessary-waiting
cy.wait(1000); // eslint-disable-line cypress/no-unnecessary-waiting
cy.percySnapshot('Visualizations - Map (Markers) with custom markers', { widths: [viewportWidth] });
});
});