running-tools

A collection of tools for runners and their coaches
git clone https://git.ashermorgan.net/running-tools/
Log | Files | Refs | README

commit a23b1855c4b96cf6321624c6b2051af720f12306
parent 6b5d8096614996c42aa3b8605320af8ea73fc667
Author: Asher Morgan <59518073+ashermorgan@users.noreply.github.com>
Date:   Sat, 23 Aug 2025 14:53:29 -0700

Rename option to "Workout name customization"

Diffstat:
Msrc/components/AdvancedOptionsInput.vue | 4++--
Mtests/e2e/batch-calculator.spec.js | 4++--
Mtests/e2e/cross-calculator.spec.js | 10+++++-----
Mtests/e2e/workout-calculator.spec.js | 2+-
Mtests/unit/components/AdvancedOptionsInput.spec.js | 12++++++------
5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/components/AdvancedOptionsInput.vue b/src/components/AdvancedOptionsInput.vue @@ -17,9 +17,9 @@ </div> <div v-if="props.type === Calculators.Workout"> - Target name customization: + Workout name customization: <select v-model="(options as WorkoutOptions).customTargetNames" - aria-label="Target name customization"> + aria-label="Workout name customization"> <option :value="false">Disabled</option> <option :value="true">Enabled</option> </select> diff --git a/tests/e2e/batch-calculator.spec.js b/tests/e2e/batch-calculator.spec.js @@ -36,7 +36,7 @@ test('Batch calculator', async ({ page }) => { // Change prediction model, enable customized target names, and set custom batch column label await page.getByText('Advanced Options').click(); await page.getByLabel('Prediction model').selectOption('Riegel\'s Model'); - await page.getByLabel('Target name customization').selectOption('Enabled'); + await page.getByLabel('Workout name customization').selectOption('Enabled'); await page.getByLabel('Batch column label').fill('foo'); // Assert workout results are correct @@ -167,7 +167,7 @@ test('Batch calculator', async ({ page }) => { // Assert workout results are correct (inputs not reset, but updated options are used) { await page.getByLabel('Calculator').selectOption('Workout Calculator'); - await expect(page.getByLabel('Target name customization')).toHaveValue("true"); + await expect(page.getByLabel('Workout name customization')).toHaveValue("true"); await expect(page.getByRole('row').nth(0).getByRole('cell').nth(0)).toHaveText('foo'); await expect(page.getByRole('row').nth(0).getByRole('cell').nth(2)).toHaveText('800 m @ 5 km'); await expect(page.getByRole('row').nth(0).getByRole('cell')).toHaveCount(5); diff --git a/tests/e2e/cross-calculator.spec.js b/tests/e2e/cross-calculator.spec.js @@ -113,7 +113,7 @@ test('Cross-calculator', async ({ page }) => { // Change riegel exponent and enable target name customization await page.getByText('Advanced Options').click(); await page.getByLabel('Riegel Exponent').fill('1.12'); - await page.getByLabel('Target name customization').selectOption('Enabled'); + await page.getByLabel('Workout name customization').selectOption('Enabled'); // Change default units (should update on other calculators too) await page.getByLabel('Default units').selectOption('Kilometers'); @@ -152,7 +152,7 @@ test('Cross-calculator', async ({ page }) => { // Assert workout results are correct (new workout options loaded) await page.getByLabel('Calculator').selectOption('Workout Calculator'); - await expect(page.getByLabel('Target name customization')).toHaveValue("true"); + await expect(page.getByLabel('Workout name customization')).toHaveValue("true"); await expect(page.getByRole('row').nth(0).getByRole('cell').nth(0)).toHaveText('2 mi'); await expect(page.getByRole('row').nth(0).getByRole('cell').nth(2)).toHaveText('800 m @ 5 km'); await expect(page.getByRole('row').nth(0).getByRole('cell')).toHaveCount(5); @@ -449,7 +449,7 @@ test('Cross-calculator', async ({ page }) => { // Assert workout results are correct (new workout options loaded) await page.getByLabel('Calculator').selectOption('Workout Calculator'); - await expect(page.getByLabel('Target name customization')).toHaveValue("true"); + await expect(page.getByLabel('Workout name customization')).toHaveValue("true"); await expect(page.getByRole('row').nth(0).getByRole('cell').nth(0)).toHaveText('2 mi'); await expect(page.getByRole('row').nth(0).getByRole('cell').nth(2)).toHaveText('800 m @ 5 km'); await expect(page.getByRole('row').nth(0).getByRole('cell')).toHaveCount(5); @@ -992,7 +992,7 @@ test('v1.4.1 Migration', async ({ page }) => { await page.getByText('Advanced Options').click(); await expect(page.getByLabel('Default units')).toHaveValue('metric'); await expect(page.getByLabel('Selected target set')).toHaveValue('_workout_targets'); - await expect(page.getByLabel('Target name customization')).toHaveValue('false'); + await expect(page.getByLabel('Workout name customization')).toHaveValue('false'); await expect(page.getByLabel('Prediction model')).toHaveValue('RiegelModel'); await expect(page.getByLabel('Riegel Exponent')).toHaveValue('1.06'); @@ -1089,7 +1089,7 @@ test('v1.4.1 Migration', async ({ page }) => { await page.getByText('Advanced Options').click(); await expect(page.getByLabel('Default units')).toHaveValue('metric'); await expect(page.getByLabel('Selected target set')).toHaveValue('_workout_targets'); - await expect(page.getByLabel('Target name customization')).toHaveValue('false'); + await expect(page.getByLabel('Workout name customization')).toHaveValue('false'); await expect(page.getByLabel('Prediction model')).toHaveValue('RiegelModel'); await expect(page.getByLabel('Riegel Exponent')).toHaveValue('1.06'); diff --git a/tests/e2e/workout-calculator.spec.js b/tests/e2e/workout-calculator.spec.js @@ -77,7 +77,7 @@ test('Workout Calculator', async ({ page }) => { // Test custom target set (with custom target names) { // Enable target name customization - await page.getByLabel('Target name customization').selectOption('Enabled'); + await page.getByLabel('Workout name customization').selectOption('Enabled'); // Create custom target set await page.getByLabel('Selected target set').selectOption('[ Create New Target Set ]'); diff --git a/tests/unit/components/AdvancedOptionsInput.spec.js b/tests/unit/components/AdvancedOptionsInput.spec.js @@ -65,7 +65,7 @@ test('should be correctly render pace options according to props', () => { ], }, }); - expect(wrapper.findAll('select[aria-label="Target name customization"]')).to.have + expect(wrapper.findAll('select[aria-label="Workout name customization"]')).to.have .length(0); expect(wrapper.findAll('input[aria-label="Batch column label"]')).to.have .length(0); @@ -102,7 +102,7 @@ test('should be correctly render race options according to props', () => { .equal('metric'); expect(wrapper.findComponent({ name: 'target-set-selector' }).vm.selectedTargetSet).to .equal('_new'); - expect(wrapper.findAll('select[aria-label="Target name customization"]')).to.have + expect(wrapper.findAll('select[aria-label="Workout name customization"]')).to.have .length(0); expect(wrapper.findAll('input[aria-label="Batch column label"]')).to.have .length(0); @@ -181,7 +181,7 @@ test('should be correctly render split options according to props', () => { .equal('metric'); expect(wrapper.findComponent({ name: 'target-set-selector' }).vm.selectedTargetSet).to .equal('_new'); - expect(wrapper.findAll('select[aria-label="Target name customization"]')).to.have + expect(wrapper.findAll('select[aria-label="Workout name customization"]')).to.have .length(0); expect(wrapper.findAll('input[aria-label="Batch column label"]')).to.have .length(0); @@ -218,7 +218,7 @@ test('should be correctly render workout options according to props', () => { expect(wrapper.find('select[aria-label="Default units"]').element.value).to.equal('metric'); expect(wrapper.findComponent({ name: 'target-set-selector' }).vm.selectedTargetSet).to .equal('_new'); - expect(wrapper.find('select[aria-label="Target name customization"]').element.value).to + expect(wrapper.find('select[aria-label="Workout name customization"]').element.value).to .equal('true'); expect(wrapper.findAll('input[aria-label="Batch column label"]')).to.have .length(0); @@ -434,7 +434,7 @@ test('should pass correct props to TargetSetSelector', async () => { .to.equal(false); // Update options - await wrapper.find('select[aria-label="Target name customization"]').setValue('true'); + await wrapper.find('select[aria-label="Workout name customization"]').setValue('true'); // Assert props are updated expect(wrapper.findComponent({ name: 'target-set-selector' }).vm.customWorkoutNames) @@ -487,7 +487,7 @@ test('should emit input events when options are modified', async () => { }, }, 'targetSets'); await wrapper.findComponent({ name: 'target-set-selector' }).setValue('B', 'selectedTargetSet'); - await wrapper.find('select[aria-label="Target name customization"]').setValue('true'); + await wrapper.find('select[aria-label="Workout name customization"]').setValue('true'); await wrapper.find('select[aria-label="Prediction model"]').setValue('CameronModel'); await wrapper.findComponent({ name: 'decimal-input' }).setValue(1.3);