|
3 | 3 |
|
4 | 4 |
|
5 | 5 | class VisualLayoutTests(BaseCase): |
6 | | - def test_applitools_layout_change(self): |
| 6 | + def test_xkcd_layout_change(self): |
7 | 7 | self.demo_mode = False # (It would interfere with html comparisons) |
8 | | - self.open("https://applitools.com/helloworld/?diff1") |
9 | | - self.wait_for_element('a[href="?diff1"]') |
| 8 | + self.open("https://xkcd.com/1424/") |
10 | 9 | print('\nCreating baseline in "visual_baseline" folder.') |
11 | 10 | self.sleep(0.08) |
12 | | - self.check_window(name="helloworld", baseline=True) |
13 | | - # Click a button that changes the text of an element |
14 | | - # (Text changes do not impact visual comparisons) |
15 | | - self.sleep(0.06) |
16 | | - self.click('a[href="?diff1"]') |
17 | | - self.sleep(0.14) |
| 11 | + self.check_window(name="xkcd", baseline=True) |
| 12 | + # Go to a different comic |
| 13 | + self.open("https://xkcd.com/1425/") |
18 | 14 | # Verify html tags match the baseline |
19 | | - self.check_window(name="helloworld", level=1) |
| 15 | + self.check_window(name="xkcd", level=1) |
20 | 16 | # Verify html tags and attribute names match the baseline |
21 | | - self.check_window(name="helloworld", level=2) |
22 | | - # Verify html tags and attribute values match the baseline |
23 | | - self.check_window(name="helloworld", level=3) |
24 | | - # Click a button that makes a hidden element visible |
25 | | - self.click("button") |
26 | | - self.check_window(name="helloworld", level=1) |
27 | | - self.check_window(name="helloworld", level=2) |
| 17 | + self.check_window(name="xkcd", level=2) |
| 18 | + # Verify html tags and attribute values don't match the baseline |
28 | 19 | with self.assert_raises(Exception): |
29 | | - self.check_window(name="helloworld", level=3) |
| 20 | + self.check_window(name="xkcd", level=3) |
30 | 21 | # Now that we know the Exception was raised as expected, |
31 | 22 | # let's print out the comparison results by running a Level-0 check. |
32 | 23 | # (NOTE: Running with level-0 will print but NOT raise an Exception.) |
33 | | - self.check_window(name="helloworld", level=0) |
| 24 | + self.check_window(name="xkcd", level=0) |
0 commit comments