-
-
Notifications
You must be signed in to change notification settings - Fork 736
/
Copy pathgithub_test.js
79 lines (71 loc) · 1.93 KB
/
github_test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// / <reference path="./steps.d.ts" />
Feature('GitHub')
Before(({ I }) => {
I.amOnPage('https://github.com')
I.see('GitLab')
})
xScenario('test ai features', ({ I }) => {
I.amOnPage('https://getbootstrap.com/docs/5.1/examples/checkout/')
})
Scenario('Incorrect search for Codeceptjs', ({ I }) => {
I.fillField('.search-input', 'CodeceptJS')
I.pressKey('Enter')
I.waitForElement('[data-testid=search-sub-header]', 10)
I.see('Supercharged End 2 End Testing')
})
Scenario('Visit Home Page @retry', async ({ I }) => {
// .retry({ retries: 3, minTimeout: 1000 })
I.retry(2).see('GitHub')
I.retry(3).see('ALL')
I.retry(2).see('IMAGES')
})
Scenario('search @grop', { timeout: 6 }, ({ I }) => {
I.amOnPage('https://github.com/search')
const a = {
b: {
c: 'asdasdasd',
},
}
const b = {
users: {
admin: {
name: 'Admin',
},
user: {
name: 'user',
},
other: (world = '') => `Hello ${world}`,
},
urls: {},
}
I.fillField('Search GitHub', 'CodeceptJS')
// pause({ a, b });
I.pressKey('Enter')
I.wait(3)
// pause();
I.see('Codeception/CodeceptJS', locate('.repo-list .repo-list-item').first())
})
Scenario('signin @sign', { timeout: 6 }, ({ I, loginPage }) => {
I.say('it should not enter')
loginPage.login('[email protected]', '123456')
I.see('Incorrect username or password.', '.flash-error')
})
.tag('normal')
.tag('important')
.tag('@slow')
Scenario('signin2', { timeout: 1 }, ({ I, Smth }) => {
Smth.openAndLogin()
I.see('Incorrect username or password.', '.flash-error')
})
Scenario('register', ({ I }) => {
within('.js-signup-form', () => {
I.fillField('user[login]', 'User')
I.fillField('user[email]', '[email protected]')
I.fillField('user[password]', '[email protected]')
I.fillField('q', 'aaa')
I.click('button')
})
I.see('There were problems creating your account.')
I.click('Explore')
I.seeInCurrentUrl('/explore')
})