Skip to content

Commit e5a3e32

Browse files
committed
tests(e2e): add some more test cases
1 parent d6cfdaa commit e5a3e32

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

tests/e2e/specs/test.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ module.exports = {
4040
browser.click('body > div > header > button.d-none.d-lg-block.navbar-toggler', function (response) {
4141
console.log('response', typeof response)
4242
this.assert.ok(browser === this, 'Check if the context is right.')
43-
this.assert.cssClassPresent('body', 'aside-menu-show')
43+
this.assert.cssClassPresent('body', 'aside-menu-lg-show')
4444
})
4545

4646
browser.pause(500)
4747

4848
browser.click('body > div > header > button.d-none.d-lg-block.navbar-toggler', function (response) {
4949
console.log('response', typeof response)
50-
this.assert.cssClassNotPresent('body', 'aside-menu-show')
50+
this.assert.cssClassNotPresent('body', 'aside-menu-lg-show')
5151
})
5252

5353
browser.pause(500)
@@ -72,6 +72,7 @@ module.exports = {
7272
console.log('response', typeof response)
7373
this.assert.cssClassPresent('/html/body', 'sidebar-minimized')
7474
this.assert.cssClassPresent('/html/body', 'brand-minimized')
75+
this.assert.cssProperty("/html/body/div/div/main", "margin-left", "50px");
7576
})
7677
.pause(500)
7778
.click('/html/body/div/div/div/button', function (response) {
@@ -89,6 +90,7 @@ module.exports = {
8990
.click('/html/body/div/header/button[1]', function (response) {
9091
console.log('response', typeof response)
9192
this.assert.cssClassPresent('/html/body', 'sidebar-show')
93+
this.assert.cssProperty("/html/body/div/div/main", "margin-left", "200px");
9294
})
9395

9496
browser
@@ -98,6 +100,16 @@ module.exports = {
98100
this.assert.cssClassNotPresent('/html/body', 'sidebar-show')
99101
})
100102

103+
browser
104+
.resizeWindow(500, 600)
105+
.pause(500)
106+
107+
.click('/html/body/div/header/button[1]', function (response) {
108+
console.log('response', typeof response)
109+
this.assert.cssClassPresent('/html/body', 'sidebar-show')
110+
this.assert.cssProperty("/html/body/div/div/main", "margin-left", "0px");
111+
})
112+
101113
browser
102114
.pause(5000)
103115
.end()

0 commit comments

Comments
 (0)