Acknowledged
CIQQA-3895

bug: Activity.getNextWorkoutStep() returns 1st step instead of 2nd in simulator for watches

In SDK 8.4.1 for watches (i.e: enduro3, fr955) Activity.getNextWorkoutStep() returns the 1st step instead of the 2nd.

This only happens when the current step is the 1st step of the workout, and the next step should be the 2nd. For later steps it does work. For edge devices (i.e edge1040) it also works.

import Toybox.Activity;
import Toybox.Graphics;
import Toybox.Lang;
import Toybox.System;
import Toybox.WatchUi;

class WorkoutDFView extends WatchUi.DataField {
    function initialize() {
        DataField.initialize();
        loadSettings();
    }

    function onWorkoutStarted() as Void {
        System.println("onWorkoutStarted");
        calculateWorkoutStepData();
    }

    function onWorkoutStepComplete() as Void {
        System.println("onWorkoutStepComplete");
        calculateWorkoutStepData();
    }

    private function calculateWorkoutStepData() as Void {
        if (Activity has :getCurrentWorkoutStep) {
            var currentWorkoutStepInfo = Activity.getCurrentWorkoutStep();
            if (currentWorkoutStepInfo != null) {
                System.println("current: " + getStepInfoLog(currentWorkoutStepInfo));
            }
        }

        if (Activity has :getNextWorkoutStep) {
            var nextWorkoutStepInfo = Activity.getNextWorkoutStep();
            if (nextWorkoutStepInfo != null) {
                System.println("next: " + getStepInfoLog(nextWorkoutStepInfo));
            }
        }
    }

	private function getStepInfoLog(workoutStepInfo as WorkoutStepInfo) as String {
	    return workoutStepInfo.intensity + ": " + workoutStepInfo.name + (workoutStepInfo.notes.length() > 0 ? " (" + workoutStepInfo.notes + ")" : "");
	}

}

class WorkoutDFApp extends Application.AppBase {
    hidden var mView as WorkoutDFView?;

    function initialize() {
        AppBase.initialize();
    }

    function getInitialView() as [Views] or [Views, InputDelegates] {
        mView = new WorkoutDFView();
        return [ mView ];
    }
}

See:  How can I get the 2nd workout step before I finish the 1st step?