Add the missing <workout> tag :)

This commit is contained in:
Rene Saarsoo 2020-10-01 20:04:21 +03:00
parent ac126f36da
commit 7f35a9a6b1
2 changed files with 179 additions and 169 deletions

View File

@ -105,7 +105,7 @@ export const generateZwo = ({ name, author, description, intervals }: Workout):
{ author: author }, { author: author },
{ description: description }, { description: description },
{ sportType: "bike" }, { sportType: "bike" },
...detectRepeats(intervals).map(generateInterval), { workout: detectRepeats(intervals).map(generateInterval) },
], ],
}, },
{ indent: " " }, { indent: " " },

View File

@ -6,6 +6,7 @@ exports[`Generate ZWO examples/comments.txt 1`] = `
<author></author> <author></author>
<description></description> <description></description>
<sportType>bike</sportType> <sportType>bike</sportType>
<workout>
<Warmup Duration=\\"600\\" PowerLow=\\"0.25\\" PowerHigh=\\"0.75\\"> <Warmup Duration=\\"600\\" PowerLow=\\"0.25\\" PowerHigh=\\"0.75\\">
<textevent timeoffset=\\"10\\" message=\\"Welcome to: #8\\"> <textevent timeoffset=\\"10\\" message=\\"Welcome to: #8\\">
</textevent> </textevent>
@ -60,6 +61,7 @@ exports[`Generate ZWO examples/comments.txt 1`] = `
<textevent timeoffset=\\"440\\" message=\\"Until next time!\\"> <textevent timeoffset=\\"440\\" message=\\"Until next time!\\">
</textevent> </textevent>
</Cooldown> </Cooldown>
</workout>
</workout_file>" </workout_file>"
`; `;
@ -69,12 +71,14 @@ exports[`Generate ZWO examples/darth-vader.txt 1`] = `
<author>HumanPowerPerformance.com</author> <author>HumanPowerPerformance.com</author>
<description>Sign up for coaching with HumanPowerPerformance.com and get custom workouts and training plans</description> <description>Sign up for coaching with HumanPowerPerformance.com and get custom workouts and training plans</description>
<sportType>bike</sportType> <sportType>bike</sportType>
<workout>
<SteadyState Duration=\\"300\\" Power=\\"0.55\\"> <SteadyState Duration=\\"300\\" Power=\\"0.55\\">
</SteadyState> </SteadyState>
<IntervalsT Repeat=\\"10\\" OnDuration=\\"180\\" OnPower=\\"0.82\\" OffDuration=\\"20\\" OffPower=\\"1.3\\"> <IntervalsT Repeat=\\"10\\" OnDuration=\\"180\\" OnPower=\\"0.82\\" OffDuration=\\"20\\" OffPower=\\"1.3\\">
</IntervalsT> </IntervalsT>
<SteadyState Duration=\\"300\\" Power=\\"0.55\\"> <SteadyState Duration=\\"300\\" Power=\\"0.55\\">
</SteadyState> </SteadyState>
</workout>
</workout_file>" </workout_file>"
`; `;
@ -90,6 +94,7 @@ you will be scored on the final 20 minute segment.
Upon saving your ride, you will be notified if your FTP improved.</description> Upon saving your ride, you will be notified if your FTP improved.</description>
<sportType>bike</sportType> <sportType>bike</sportType>
<workout>
<Warmup Duration=\\"300\\" PowerLow=\\"0.3\\" PowerHigh=\\"0.7\\"> <Warmup Duration=\\"300\\" PowerLow=\\"0.3\\" PowerHigh=\\"0.7\\">
<textevent timeoffset=\\"20\\" message=\\"Welcome to the FTP test\\"> <textevent timeoffset=\\"20\\" message=\\"Welcome to the FTP test\\">
</textevent> </textevent>
@ -138,6 +143,7 @@ Upon saving your ride, you will be notified if your FTP improved.</description>
</FreeRide> </FreeRide>
<Cooldown Duration=\\"300\\" PowerLow=\\"0.5\\" PowerHigh=\\"0.3\\"> <Cooldown Duration=\\"300\\" PowerLow=\\"0.5\\" PowerHigh=\\"0.3\\">
</Cooldown> </Cooldown>
</workout>
</workout_file>" </workout_file>"
`; `;
@ -149,6 +155,7 @@ exports[`Generate ZWO examples/halvfems.txt 1`] = `
This pairs with Devedeset (90 in Croatian) and Novanta (90 in Italian) to make up the sweet spot trifecta in this plan. This pairs with Devedeset (90 in Croatian) and Novanta (90 in Italian) to make up the sweet spot trifecta in this plan.
The workouts are alphabetically ordered from easiest to hardest, so enjoy the middle of these three challenging workouts today...</description> The workouts are alphabetically ordered from easiest to hardest, so enjoy the middle of these three challenging workouts today...</description>
<sportType>bike</sportType> <sportType>bike</sportType>
<workout>
<Warmup Duration=\\"420\\" PowerLow=\\"0.25\\" PowerHigh=\\"0.75\\"> <Warmup Duration=\\"420\\" PowerLow=\\"0.25\\" PowerHigh=\\"0.75\\">
</Warmup> </Warmup>
<SteadyState Duration=\\"30\\" Power=\\"0.95\\" Cadence=\\"95\\"> <SteadyState Duration=\\"30\\" Power=\\"0.95\\" Cadence=\\"95\\">
@ -201,6 +208,7 @@ The workouts are alphabetically ordered from easiest to hardest, so enjoy the mi
</IntervalsT> </IntervalsT>
<Cooldown Duration=\\"360\\" PowerLow=\\"0.55\\" PowerHigh=\\"0.25\\"> <Cooldown Duration=\\"360\\" PowerLow=\\"0.55\\" PowerHigh=\\"0.25\\">
</Cooldown> </Cooldown>
</workout>
</workout_file>" </workout_file>"
`; `;
@ -217,6 +225,7 @@ Working predominately aerobic metabolism.
In time your body will become more comfortable at these powers In time your body will become more comfortable at these powers
and your FTP will increase.</description> and your FTP will increase.</description>
<sportType>bike</sportType> <sportType>bike</sportType>
<workout>
<Warmup Duration=\\"1200\\" PowerLow=\\"0.45\\" PowerHigh=\\"0.75\\"> <Warmup Duration=\\"1200\\" PowerLow=\\"0.45\\" PowerHigh=\\"0.75\\">
</Warmup> </Warmup>
<SteadyState Duration=\\"300\\" Power=\\"0.52\\"> <SteadyState Duration=\\"300\\" Power=\\"0.52\\">
@ -225,6 +234,7 @@ and your FTP will increase.</description>
</IntervalsT> </IntervalsT>
<Cooldown Duration=\\"600\\" PowerLow=\\"0.65\\" PowerHigh=\\"0.45\\"> <Cooldown Duration=\\"600\\" PowerLow=\\"0.65\\" PowerHigh=\\"0.45\\">
</Cooldown> </Cooldown>
</workout>
</workout_file>" </workout_file>"
`; `;