Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d4e21e5 authored by William Escande's avatar William Escande
Browse files

[PANDORA_TEST] pts-bot HFP Coverage: PSI

Add the following HFP test:
  * HFP/AG/PSI/BV-03-C

Bug: 237447510
Test: atest pts-bot:HFP/AG/PSI/BV-03-C
Change-Id: I16a7e7f7c131e353628e0268ece9bf626e9e3402
parent 8395ec9e
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -108,3 +108,25 @@ class HFPProxy(ProfileProxy):

        self.hfp.DisableSlc(connection=self.connection)
        return "OK"

    @assert_description
    def TSC_make_battery_charged(self, **kwargs):
        """
        Click Ok, then manipulate the Implementation Under Test (IUT) so that
        the battery is fully charged.
        """

        self.hfp.SetBatteryLevel(connection=self.connection, battery_percentage=100)

        return "OK"

    @assert_description
    def TSC_make_battery_discharged(self, **kwargs):
        """
        Manipulate the Implementation Under Test (IUT) so that the battery level
        is not fully charged, then click Ok.
        """

        self.hfp.SetBatteryLevel(connection=self.connection, battery_percentage=42)

        return "OK"
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
        <option name="profile" value="GATT/CL/GAW" />
        <option name="profile" value="HFP/AG/DIS" />
        <option name="profile" value="HFP/AG/HFI" />
        <option name="profile" value="HFP/AG/PSI" />
        <option name="profile" value="HFP/AG/SLC" />
        <option name="profile" value="HFP/AG/TCA" />
        <option name="profile" value="HID/HOS" />
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
        <option name="profile" value="GATT/CL/GAW" />
        <option name="profile" value="HFP/AG/DIS" />
        <option name="profile" value="HFP/AG/HFI" />
        <option name="profile" value="HFP/AG/PSI" />
        <option name="profile" value="HFP/AG/SLC" />
        <option name="profile" value="HFP/AG/TCA" />
        <option name="profile" value="SDP/SR" />
+5 −0
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@
    "GATT/CL/GAW/BV-05-C",
    "GATT/CL/GAW/BV-08-C",
    "GATT/CL/GAW/BV-09-C",
    "HFP/AG/PSI/BV-03-C",
    "HID/HOS/DAT/BV-01-C",
    "HID/HOS/HCE/BV-01-I",
    "HID/HOS/HCE/BV-03-I",
@@ -269,6 +270,10 @@
    "HFP/AG/DIS/BV-01-I",
    "HFP/AG/HFI/BI-03-I",
    "HFP/AG/HFI/BV-02-I",
    "HFP/AG/PSI/BV-01-C",
    "HFP/AG/PSI/BV-02-C",
    "HFP/AG/PSI/BV-04-I",
    "HFP/AG/PSI/BV-05-I",
    "HFP/AG/SLC/BV-01-C",
    "HFP/AG/SLC/BV-02-C",
    "HFP/AG/SLC/BV-03-C",
+10 −0
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@ service HFP {
  rpc EnableSlc(EnableSlcRequest) returns (google.protobuf.Empty);
  // Disable Service level connection
  rpc DisableSlc(DisableSlcRequest) returns (google.protobuf.Empty);
  // Change the battery level to the one requested
  rpc SetBatteryLevel(SetBatteryLevelRequest) returns (google.protobuf.Empty);
}

// Request of the `EnableSlc` method.
@@ -26,3 +28,11 @@ message DisableSlcRequest {
  // Connection crafted by grpc server
  Connection connection = 1;
}

// Request of the `SetBatteryLevel` method.
message SetBatteryLevelRequest {
  // Connection crafted by grpc server
  Connection connection = 1;
  // Battery level to be set on the DUT
  int32 battery_percentage = 2;
}
Loading