def get_waitsignals_cases(order, working):
    """
    Builds combinations for signals to be emitted and expected for working cases (i.e. blocker.signal_triggered == True)
    and non-working cases, depending on the order.

    Note:
    The order ("none", "simple", "strict") becomes stricter from left to right.
    Working cases of stricter cases also work in less stricter cases.
    Non-working cases in less stricter cases also are non-working in stricter cases.
    """
    if order == "none":
        if working:
            cases = get_waitsignals_cases(order="simple", working=True)
            cases.extend([
                # allow even out-of-order signals
                (('A1', 'A2'), ('A2', 'A1'), True),
                (('A1', 'A2'), ('A2', 'Ax'), True),
                (('A1', 'B1'), ('B1', 'A1'), True),
                (('A1', 'B1'), ('B1', 'Ax'), True),
                (('A1', 'B1', 'B1'), ('B1', 'A1', 'B1'), True),
            ])
            return cases
        else:
            return [
                (('A2',), ('A1',), False),
                (('A1',), ('B1',), False),
                (('A1',), ('Bx',), False),
                (('A1', 'A1'), ('A1', 'B1'), False),
                (('A1', 'A1'), ('A1', 'Bx'), False),
                (('A1', 'A1'), ('B1', 'A1'), False),
                (('A1', 'B1'), ('A1', 'A1'), False),
                (('A1', 'B1'), ('B1', 'B1'), False),
                (('A1', 'B1', 'B1'), ('A1', 'A1', 'B1'), False),
            ]
    elif order == "simple":
        if working:
            cases = get_waitsignals_cases(order="strict", working=True)
            cases.extend([
                # allow signals that occur in-between, before or after the expected signals
                (('B1', 'A1', 'A1', 'B1', 'A1'), ('A1', 'B1'), True),
                (('A1', 'A1', 'A1'), ('A1', 'A1'), True),
                (('A1', 'A1', 'A1'), ('A1', 'Ax'), True),
                (('A1', 'A2', 'A1'), ('A1', 'A1'), True),
            ])
            return cases
        else:
            cases = get_waitsignals_cases(order="none", working=False)
            cases.extend([
                # don't allow out-of-order signals
                (('A1', 'B1'), ('B1', 'A1'), False),
                (('A1', 'B1'), ('B1', 'Ax'), False),
                (('A1', 'B1', 'B1'), ('B1', 'A1', 'B1'), False),
                (('A1', 'B1', 'B1'), ('B1', 'B1', 'A1'), False),
            ])
            return cases
    elif order == "strict":
        if working:
            return [
                # only allow exactly the same signals to be emitted that were also expected
                (('A1',), ('A1',), True),
                (('A1',), ('Ax',), True),
                (('A1', 'A1'), ('A1', 'A1'), True),
                (('A1', 'A1'), ('A1', 'Ax'), True),
                (('A1', 'A1'), ('Ax', 'Ax'), True),
                (('A1', 'A2'), ('A1', 'A2'), True),
                (('A2', 'A1'), ('A2', 'A1'), True),
                (('A1', 'B1'), ('A1', 'B1'), True),
                (('A1', 'A1', 'B1'), ('A1', 'A1', 'B1'), True),
                (('A1', 'A2', 'B1'), ('A1', 'A2', 'B1'), True),
                (('A1', 'B1', 'A1'), ('A1', 'A1'), True),  # blocker doesn't know about signal B1 -> test passes
                (('A1', 'B1', 'A1'), ('Ax', 'A1'), True),
            ]
        else:
            cases = get_waitsignals_cases(order="simple", working=False)
            cases.extend([
                # don't allow in-between signals
                (('A1', 'A1', 'A2', 'B1'), ('A1', 'A2', 'B1'), False),
            ])
            return cases