UNPKG

1.08 kBMarkdownView Raw
1* [I have a \_\_\_x\_\_\_ screen size](i-have-a-\_\_\_x\_\_\_-screen-size)
2 * [regex](regex)
3 * [execution](execution)
4# I have a \_\_\_x\_\_\_ screen size
5## regex
6 regex should match "I have..."
7
8```
9verifyStepMatch('I have a 800x600 screen size');
10```
11
12
13 regex should match "I change to..."
14
15```
16verifyStepMatch('I change to a 800x600 screen size');
17```
18
19
20 regex should match "I resize to..."
21
22```
23verifyStepMatch('I resize to a 800x600 screen size');
24```
25
26
27 regex should match "I rotate to..."
28
29```
30verifyStepMatch('I rotate to a 800x600 screen size');
31```
32
33
34 regex should not capture "have"
35
36```
37verifyStepDoesNotCapture('I have a 800x600 screen size', 'have');
38```
39
40
41 regex should capture the dimensions
42
43```
44verifyStepCaptures('I have a 800x600 screen size', '800', '600');
45```
46
47
48## execution
49 execution should set the browser resolution
50
51```
52return executeStep('I have a 800x600 screen size', function() {
53 return browser.manage().window().getSize().then(function(size) {
54 expect(size.width).to.equal(800);
55 expect(size.height).to.equal(600);
56 });
57});
58```