Skip to content

Commit 40b1569

Browse files
committed
Refactor accept/reject fields
1 parent ebeea4a commit 40b1569

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

UI-TESTS/PmLayer.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ namespace UnityAppiumTests
22
{
33
public abstract class PmLayer
44
{
5+
public abstract string rejectAllPath { get; }
6+
public abstract string acceptAllPath { get; }
57
public abstract string textViewPath { get; }
68
public abstract string saveAndExitPath { get; }
79
public abstract string exitButtonPath { get; }
@@ -11,6 +13,8 @@ public abstract class PmLayer
1113
public abstract WebDriverWait wait { get; }
1214
public DriverHelper driverHelper;
1315

16+
public void pressAcceptAll() => driverHelper.pressButton(acceptAllPath, textViewPath);
17+
public void pressRejectAll() => driverHelper.pressButton(rejectAllPath, textViewPath);
1418
public void pressSaveAndExit() => driverHelper.pressButton(saveAndExitPath, textViewPath);
1519
public void pressExit() => driverHelper.pressButton(exitButtonPath, textViewPath);
1620
public bool webViewIsOpen() => driverHelper.webViewIsOpen(textViewPath);

UI-TESTS/PmLayerCCPA.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@ namespace UnityAppiumTests
22
{
33
public abstract class PmLayerCCPA: PmLayer
44
{
5-
public abstract string rejectAllPath { get; }
6-
public abstract string acceptAllPath { get; }
75
public abstract string switchValueOn { get; }
86

9-
public void pressAcceptAll() => driverHelper.pressButton(acceptAllPath, textViewPath);
10-
public void pressRejectAll() => driverHelper.pressButton(rejectAllPath, textViewPath);
117
public void clickOnSwitches(int num = 1) => base.clickOnSwitches(num, true, switchValueOn, driverHelper.platform == "iOS");
128
public int getCheckedSwitchesNum()
139
{

UI-TESTS/PmLayerGDPR.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@ namespace UnityAppiumTests
22
{
33
public abstract class PmLayerGDPR: PmLayer
44
{
5-
public abstract string rejectAllPath { get; }
6-
public abstract string acceptAllPath { get; }
75
public abstract string attributeName { get; }
86
public abstract string attributeValue { get; }
97

10-
public void pressAcceptAll() => driverHelper.pressButton(acceptAllPath, textViewPath);
11-
public void pressRejectAll() => driverHelper.pressButton(rejectAllPath, textViewPath);
128
public int getCheckedSwitchesNum() => base.getCheckedSwitchesNum(false, attributeName, attributeValue);
139
}
1410

UI-TESTS/PmLayerUSNAT.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ namespace UnityAppiumTests
22
{
33
public abstract class PmLayerUSNAT: PmLayer
44
{
5-
public abstract string rejectAllPath { get; }
6-
public abstract string acceptAllPath { get; }
7-
8-
public void pressAcceptAll() => driverHelper.pressButton(acceptAllPath, textViewPath);
9-
public void pressRejectAll() => driverHelper.pressButton(rejectAllPath, textViewPath);
105
public void pressSaveAndExit() => driverHelper.pressButton(saveAndExitPath, textViewPath, true, true);
116
public void pressExit() => driverHelper.pressButton(exitButtonPath, textViewPath, true, true);
127
public void clickOnSwitches(int num = 1) => base.clickOnSwitches(num, true);

0 commit comments

Comments
 (0)