Skip to content

Commit

Permalink
Update hard-coded legend color values in functional tests
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Romero <[email protected]>
  • Loading branch information
joshuarrrr committed Jul 18, 2023
1 parent 1782d1b commit 8fd5be5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions test/functional/apps/dashboard/dashboard_state.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.dashboard.switchToEditMode();

await PageObjects.visChart.openLegendOptionColors('Count');
await PageObjects.visChart.selectNewLegendColorChoice('#EA6460');
await PageObjects.visChart.selectNewLegendColorChoice('#8d4059');

await PageObjects.dashboard.saveDashboard('Overridden colors');

await PageObjects.dashboard.gotoDashboardLandingPage();
await PageObjects.dashboard.loadSavedDashboard('Overridden colors');
const colorChoiceRetained = await PageObjects.visChart.doesSelectedLegendColorExist(
'#EA6460'
'#8d4059'
);

expect(colorChoiceRetained).to.be(true);
Expand Down Expand Up @@ -243,9 +243,9 @@ export default function ({ getService, getPageObjects }) {
it('updates a pie slice color on a soft refresh', async function () {
await dashboardAddPanel.addVisualization(PIE_CHART_VIS_NAME);
await PageObjects.visChart.openLegendOptionColors('80,000');
await PageObjects.visChart.selectNewLegendColorChoice('#F9D9F9');
await PageObjects.visChart.selectNewLegendColorChoice('#e9b0c3');
const currentUrl = await browser.getCurrentUrl();
const newUrl = currentUrl.replace('F9D9F9', 'FFFFFF');
const newUrl = currentUrl.replace('e9b0c3', 'FFFFFF');
await browser.get(newUrl.toString(), false);
await PageObjects.header.waitUntilLoadingHasFinished();

Expand Down
2 changes: 1 addition & 1 deletion test/functional/page_objects/visualize_chart_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export function VisualizeChartPageProvider({ getService, getPageObjects }: FtrPr
await testSubjects.click(`legend-${name}`);
await this.waitForVisualizationRenderingStabilized();
// arbitrary color chosen, any available would do
const isOpen = await this.doesLegendColorChoiceExist('#EF843C');
const isOpen = await this.doesLegendColorChoiceExist('#e09e64');
if (!isOpen) {
throw new Error('legend color selector not open');
}
Expand Down

0 comments on commit 8fd5be5

Please sign in to comment.