1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package edu.samplu.krad.demo.uif.library.navigation.magic;
18
19 import edu.samplu.common.ITUtil;
20 import edu.samplu.common.WebDriverLegacyITBase;
21 import org.junit.runner.RunWith;
22
23 @RunWith(MagicSmokeTestRunner.class)
24 public abstract class MagicWebDriverLegacyITBase extends WebDriverLegacyITBase {
25
26 private String testUrl = ITUtil.KRAD_PORTAL;
27 private boolean shouldNavigate = false;
28
29 @Override
30 public String getTestUrl() {
31 return testUrl;
32 }
33
34 protected void enableBookmarkMode() {
35 this.testUrl = getBookmarkUrl();
36 }
37
38 protected void enableNavigationMode() {
39 this.shouldNavigate = true;
40 this.testUrl = ITUtil.KRAD_PORTAL;
41 }
42
43 @Override
44 protected void navigateInternal() throws Exception {
45 if (this.shouldNavigate) {
46 navigate();
47 }
48 }
49
50 protected abstract String getBookmarkUrl();
51
52 protected abstract void navigate() throws Exception;
53
54 }