Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
ade5cbba
Commit
ade5cbba
authored
Jun 28, 2018
by
ιεΈ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add circleci support
parent
8de6bda1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
.circleci/config.yml
.circleci/config.yml
+23
-0
src/e2e/login.e2e.js
src/e2e/login.e2e.js
+6
-0
tests/fix_puppeteer.sh
tests/fix_puppeteer.sh
+8
-0
No files found.
.circleci/config.yml
0 β 100644
View file @
ade5cbba
version
:
2
jobs
:
build
:
docker
:
-
image
:
circleci/node:8.11.2
steps
:
-
checkout
-
run
:
npm install
-
run
:
npm run build
test
:
docker
:
-
image
:
circleci/node:8.11.2
steps
:
-
checkout
-
run
:
sh ./tests/fix_puppeteer.sh
-
run
:
npm install
-
run
:
npm run test:all
workflows
:
version
:
2
build_and_test
:
jobs
:
-
build
-
test
\ No newline at end of file
src/e2e/login.e2e.js
View file @
ade5cbba
...
@@ -17,6 +17,9 @@ describe('Login', () => {
...
@@ -17,6 +17,9 @@ describe('Login', () => {
afterEach
(()
=>
page
.
close
());
afterEach
(()
=>
page
.
close
());
it
(
'
should login with failure
'
,
async
()
=>
{
it
(
'
should login with failure
'
,
async
()
=>
{
await
page
.
waitForSelector
(
'
#userName
'
,
{
timeout
:
2000
,
});
await
page
.
type
(
'
#userName
'
,
'
mockuser
'
);
await
page
.
type
(
'
#userName
'
,
'
mockuser
'
);
await
page
.
type
(
'
#password
'
,
'
wrong_password
'
);
await
page
.
type
(
'
#password
'
,
'
wrong_password
'
);
await
page
.
click
(
'
button[type="submit"]
'
);
await
page
.
click
(
'
button[type="submit"]
'
);
...
@@ -24,6 +27,9 @@ describe('Login', () => {
...
@@ -24,6 +27,9 @@ describe('Login', () => {
});
});
it
(
'
should login successfully
'
,
async
()
=>
{
it
(
'
should login successfully
'
,
async
()
=>
{
await
page
.
waitForSelector
(
'
#userName
'
,
{
timeout
:
2000
,
});
await
page
.
type
(
'
#userName
'
,
'
admin
'
);
await
page
.
type
(
'
#userName
'
,
'
admin
'
);
await
page
.
type
(
'
#password
'
,
'
888888
'
);
await
page
.
type
(
'
#password
'
,
'
888888
'
);
await
page
.
click
(
'
button[type="submit"]
'
);
await
page
.
click
(
'
button[type="submit"]
'
);
...
...
tests/fix_puppeteer.sh
0 β 100644
View file @
ade5cbba
#!/bin/bash
apt-get update
apt-get
install
-yq
gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3
\
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4
\
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1
\
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6
\
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment