Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 () => driver.switchTo().window(returnTo) | 47 () => driver.switchTo().window(returnTo) |
48 ); | 48 ); |
49 } | 49 } |
50 | 50 |
51 function testSubscribeLink(driver) | 51 function testSubscribeLink(driver) |
52 { | 52 { |
53 return driver.findElement(By.id("subscribe-button")).click().then(() => | 53 return driver.findElement(By.id("subscribe-button")).click().then(() => |
54 driver.wait(() => | 54 driver.wait(() => |
55 driver.getAllWindowHandles().then(handles => | 55 driver.getAllWindowHandles().then(handles => |
56 handles.length > 2 ? handles : null | 56 handles.length > 2 ? handles : null |
57 ), 1000 | 57 ), 3000 |
58 ) | 58 ) |
59 ).then(handles => | 59 ).then(handles => |
60 closeWindow(driver, handles[2], handles[1], () => | 60 closeWindow(driver, handles[2], handles[1], () => |
61 driver.wait(until.ableToSwitchToFrame(0), 1000).then(() => | 61 driver.wait(until.ableToSwitchToFrame(0), 1000).then(() => |
tlucas
2018/09/26 08:28:17
In order to not reject subscriptions, which might
Sebastian Noack
2018/09/26 11:07:36
But if there is a bug (caught by this test) with t
tlucas
2018/09/26 18:19:40
Acknowledged.
| |
62 driver.wait(until.elementLocated(By.id("dialog-content-predefined")), | 62 driver.wait(until.elementLocated(By.id("dialog-content-predefined")), |
63 1000) | 63 1000) |
64 ).then(dialog => | 64 ).then(dialog => |
65 Promise.all([ | 65 Promise.all([ |
66 dialog.isDisplayed(), | 66 dialog.isDisplayed(), |
67 dialog.findElement(By.css("h3")).getText() | 67 dialog.findElement(By.css("h3")).getText() |
68 ]).then(([displayed, title]) => | 68 ]).then(([displayed, title]) => |
69 { | 69 { |
70 assert.ok(displayed, "subscribe link: dialog shown"); | 70 assert.ok(displayed, "subscribe link: dialog shown"); |
71 assert.equal(title, "ABP Testcase Subscription", | 71 assert.equal(title, "ABP Testcase Subscription", |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
245 title | 245 title |
246 ) | 246 ) |
247 ); | 247 ); |
248 }); | 248 }); |
249 } | 249 } |
250 return p2; | 250 return p2; |
251 }); | 251 }); |
252 return p1; | 252 return p1; |
253 }); | 253 }); |
254 }); | 254 }); |
LEFT | RIGHT |