Skip to content

Commit

Permalink
rename to lock y axis
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Kusumgar committed Sep 7, 2023
1 parent 335c81f commit a71b1fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/static/src/app/components/options/GraphSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<input type="checkbox" class="form-check-input" style="vertical-align:bottom;" v-model="logScaleYAxis">
</div>
</div>
<div id="lock-axes" class="row my-2">
<div id="lock-y-axis" class="row my-2">
<div class="col-5">
<label class="col-form-label">Lock axes</label>
<label class="col-form-label">Lock Y Axis</label>
</div>
<div class="col-6">
<input type="checkbox" class="form-check-input" style="vertical-align:bottom;" v-model="lockYAxis">
Expand Down
6 changes: 3 additions & 3 deletions app/static/tests/e2e/options.etest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ test.describe("Options Tab tests", () => {

test("can change graph setting for lock axes", async ({ page }) => {
await expect(await page.innerText(":nth-match(.collapse-title, 3)")).toContain("Graph Settings");
await page.locator("#lock-axes input").click();
await page.locator("#lock-y-axis input").click();

const tickSelector = ":nth-match(.plotly .ytick text, 6)";
await expect(await page.innerHTML(tickSelector)).toBe("1M");
Expand All @@ -225,15 +225,15 @@ test.describe("Options Tab tests", () => {

// would be 1B if we didn't lock the axes
await expect(await page.innerHTML(tickSelector)).toBe("1M");
await page.locator("#lock-axes input").click();
await page.locator("#lock-y-axis input").click();

// autorange on deselect of lock axes
await expect(await page.innerHTML(tickSelector)).toBe("1B");
});

test("overrides axes lock if log scale toggle changes", async ({ page }) => {
await expect(await page.innerText(":nth-match(.collapse-title, 3)")).toContain("Graph Settings");
await page.locator("#lock-axes input").click();
await page.locator("#lock-y-axis input").click();

const tickSelector = ":nth-match(.plotly .ytick text, 2)";
await expect(await page.innerHTML(tickSelector)).toBe("0.2M");
Expand Down

0 comments on commit a71b1fd

Please sign in to comment.