Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
ae17793b
Commit
ae17793b
authored
8 years ago
by
Tom Robinson
Browse files
Options
Downloads
Patches
Plain Diff
Screenshots
parent
b7b5813f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
circle.yml
+2
-1
2 additions, 1 deletion
circle.yml
frontend/test/e2e/auth/login.spec.js
+18
-0
18 additions, 0 deletions
frontend/test/e2e/auth/login.spec.js
with
21 additions
and
1 deletion
.gitignore
+
1
−
0
View file @
ae17793b
...
...
@@ -40,3 +40,4 @@ bin/release/aws-eb/metabase-aws-eb.zip
/reset-password-artifacts
/.env
/npm-debug.log
/screenshots
This diff is collapsed.
Click to expand it.
circle.yml
+
2
−
1
View file @
ae17793b
...
...
@@ -48,4 +48,5 @@ deployment:
-
./bin/deploy-webhook $DEPLOY_WEBHOOK
general
:
artifacts
:
-
"
target/uberjar/metabase.jar"
-
target/uberjar/metabase.jar
-
screenshots
This diff is collapsed.
Click to expand it.
frontend/test/e2e/auth/login.spec.js
+
18
−
0
View file @
ae17793b
import
{
startServer
,
isReady
}
from
"
../support/start-server
"
;
import
webdriver
,
{
By
,
until
}
from
"
selenium-webdriver
"
;
import
fs
from
"
fs-promise
"
;
import
path
from
"
path
"
;
jasmine
.
DEFAULT_TIMEOUT_INTERVAL
=
60000
;
...
...
@@ -15,6 +17,16 @@ function waitForUrl(driver, url, timeout = 5000) {
return
driver
.
wait
(
async
()
=>
await
driver
.
getCurrentUrl
()
===
url
,
timeout
);
}
async
function
screenshot
(
driver
,
filename
)
{
let
dir
=
path
.
dirname
(
filename
);
if
(
dir
&&
!
(
await
fs
.
exists
(
dir
))){
await
fs
.
mkdir
(
dir
);
}
let
image
=
await
driver
.
takeScreenshot
();
await
fs
.
writeFile
(
filename
,
image
,
'
base64
'
);
}
describe
(
"
auth/login
"
,
()
=>
{
let
server
,
driver
;
...
...
@@ -39,6 +51,7 @@ describe("auth/login", () => {
await
driver
.
get
(
`
${
server
.
host
}
/`
);
await
waitForUrl
(
driver
,
`
${
server
.
host
}
/auth/login?redirect=%2F`
);
expect
(
await
driver
.
isElementPresent
(
By
.
css
(
"
[name=email]
"
))).
toEqual
(
true
);
await
screenshot
(
driver
,
"
screenshots/auth-login.png
"
);
});
it
(
"
should log you in
"
,
async
()
=>
{
...
...
@@ -65,6 +78,11 @@ describe("auth/login", () => {
await
driver
.
get
(
`
${
server
.
host
}
/`
);
await
waitForUrl
(
driver
,
`
${
server
.
host
}
/`
);
});
it
(
"
loads the qb
"
,
async
()
=>
{
await
driver
.
get
(
`
${
server
.
host
}
/q#eyJuYW1lIjpudWxsLCJkYXRhc2V0X3F1ZXJ5Ijp7ImRhdGFiYXNlIjoxLCJ0eXBlIjoibmF0aXZlIiwibmF0aXZlIjp7InF1ZXJ5Ijoic2VsZWN0ICdvaCBoYWkgZ3Vpc2Ug8J-QsScifSwicGFyYW1ldGVycyI6W119LCJkaXNwbGF5Ijoic2NhbGFyIiwidmlzdWFsaXphdGlvbl9zZXR0aW5ncyI6e319`
);
await
screenshot
(
driver
,
"
screenshots/qb.png
"
);
});
});
afterAll
(
async
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment