-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests: Initial e2e tests setup #332
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fda2125
Tests: config integration tests
ea16dc5
Find the redis instance name and put into clearDatabase expression
21303dc
Storybook with typescript
ba21916
Clear naming
b9c463d
Check typescript before commit
63de4d3
Merge branch 'feature/typescript' into tests/e2e
81f839e
Run creevey with typescript and fix eslint after rebase
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"parser": "babel-flow", | ||
"parser": "typescript", | ||
"printWidth": 100, | ||
"tabWidth": 4, | ||
"trailingComma": "es5", | ||
"endOfLine": "lf" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const path = require("path"); | ||
|
||
module.exports = { | ||
launch: { | ||
headless: process.env.HEADLESS !== "false", | ||
}, | ||
browser: "chromium", | ||
server: [ | ||
{ | ||
command: `docker-compose -f ${path.join( | ||
__dirname, | ||
"src/tests/core/api/docker-compose.yml" | ||
)} up`, | ||
port: 8080, | ||
launchTimeout: 120000, | ||
}, | ||
{ | ||
command: "yarn start-with-local-api", | ||
port: 9000, | ||
launchTimeout: 60000, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
let isE2eTests = process.env["TYPE"] === "e2e"; | ||
// When running on code editor | ||
const testPathIndex = process.argv.findIndex((arg) => arg === "--runTestsByPath"); | ||
if (testPathIndex !== -1) { | ||
const testPath = process.argv[testPathIndex + 1]; | ||
isE2eTests = testPath.includes("/src/tests"); | ||
} | ||
|
||
module.exports = { | ||
// NOTE: ignore e2e tests when running jest with common config | ||
modulePathIgnorePatterns: isE2eTests ? [] : ["/src/tests"], | ||
preset: isE2eTests ? "jest-puppeteer" : undefined, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { clearDatabase } from "./core/utils"; | ||
import { AddTriggerPage } from "./pages/AddTriggerPage"; | ||
import { TriggerViewPage } from "./pages/TriggerViewPage"; | ||
|
||
describe("Add trigger page", () => { | ||
beforeAll(async () => { | ||
await clearDatabase(); | ||
}); | ||
|
||
it(`create new trigger`, async () => { | ||
const addTriggerPage = new AddTriggerPage(page); | ||
await addTriggerPage.open(); | ||
await addTriggerPage.Name.type("trigger name"); | ||
await addTriggerPage.TargetT1.type("sumSeries(test.target.*)"); | ||
await addTriggerPage.WarnT1.type("10"); | ||
await addTriggerPage.Tags.addTag("test"); | ||
await addTriggerPage.AddTrigger.click(); | ||
|
||
const triggerViewPage = new TriggerViewPage(page); | ||
await expect(triggerViewPage.isOpen()).resolves.toEqual(true); | ||
await expect(triggerViewPage.Name).resolves.toEqual("trigger name"); | ||
}, 30000); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
server { | ||
listen 0.0.0.0:8083 default; | ||
|
||
location /api/ { | ||
proxy_pass http://api:8081; | ||
} | ||
|
||
location / { | ||
proxy_pass http://web:80; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Пробелы в названии - это ок?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not/
Код выглядит немного чище, чем с разделителем дефисом.
Но это вскусовщина. Если считаешь лучше другая нотация, не проблема поменять.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если ни на что не влияет, то норм