mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-27 08:39:49 +00:00
better looking code (#699)
This commit is contained in:
parent
1eb67c69d9
commit
beb8363722
1
.gitignore
vendored
1
.gitignore
vendored
@ -44,4 +44,3 @@ cypress.env.json
|
|||||||
*/cypress/screenshots
|
*/cypress/screenshots
|
||||||
*/cypress/videos
|
*/cypress/videos
|
||||||
*/cypress/support
|
*/cypress/support
|
||||||
*/cypress.json
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
"viewportHeight": 1080,
|
"viewportHeight": 1080,
|
||||||
"video": false,
|
"video": false,
|
||||||
"screenshotOnRunFailure": false,
|
"screenshotOnRunFailure": false,
|
||||||
|
"defaultCommandTimeout": 5000,
|
||||||
"testFiles": [
|
"testFiles": [
|
||||||
"tests/GuiPort.js",
|
"tests/GuiPort.js",
|
||||||
"tests/MultipleNamespaces.js",
|
"tests/MultipleNamespaces.js",
|
||||||
@ -11,6 +12,7 @@
|
|||||||
"tests/NoRedact.js",
|
"tests/NoRedact.js",
|
||||||
"tests/Regex.js",
|
"tests/Regex.js",
|
||||||
"tests/RegexMasking.js",
|
"tests/RegexMasking.js",
|
||||||
|
"tests/IgnoredUserAgents.js",
|
||||||
"tests/UiTest.js"
|
"tests/UiTest.js"
|
||||||
],
|
],
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"watchForFileChanges":false,
|
|
||||||
"viewportWidth": 1920,
|
|
||||||
"viewportHeight": 3500,
|
|
||||||
"video": false,
|
|
||||||
"screenshotOnRunFailure": false,
|
|
||||||
"testFiles": [
|
|
||||||
"tests/IgnoredUserAgents.js"
|
|
||||||
],
|
|
||||||
|
|
||||||
"env": {
|
|
||||||
"testUrl": "http://localhost:8899/"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +1,11 @@
|
|||||||
import {isValueExistsInElement} from "../testHelpers/TrafficHelper";
|
import {isValueExistsInElement, resizeToHugeMizu} from "../testHelpers/TrafficHelper";
|
||||||
|
|
||||||
it('Loading Mizu', function () {
|
it('Loading Mizu', function () {
|
||||||
cy.visit(Cypress.env('testUrl'));
|
cy.visit(Cypress.env('testUrl'));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('going through each entry', function () {
|
it('going through each entry', function () {
|
||||||
|
resizeToHugeMizu();
|
||||||
cy.get('#total-entries').then(number => {
|
cy.get('#total-entries').then(number => {
|
||||||
const getNum = () => {
|
const getNum = () => {
|
||||||
const numOfEntries = number.text();
|
const numOfEntries = number.text();
|
||||||
|
@ -62,7 +62,7 @@ func TestTap(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runCypressTests(t, "npx cypress run --spec \"cypress/integration/tests/UiTest.js\" --config-file cypress/integration/configurations/Default.json")
|
runCypressTests(t, "npx cypress run --spec \"cypress/integration/tests/UiTest.js\"")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -110,7 +110,7 @@ func TestTapGuiPort(t *testing.T) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
runCypressTests(t, fmt.Sprintf("npx cypress run --spec \"cypress/integration/tests/GuiPort.js\" --env port=%d --config-file cypress/integration/configurations/Default.json", guiPort))
|
runCypressTests(t, fmt.Sprintf("npx cypress run --spec \"cypress/integration/tests/GuiPort.js\" --env port=%d", guiPort))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -156,7 +156,7 @@ func TestTapAllNamespaces(t *testing.T) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
runCypressTests(t, fmt.Sprintf("npx cypress run --spec \"cypress/integration/tests/MultipleNamespaces.js\" --env name1=%v,name2=%v,name3=%v,namespace1=%v,namespace2=%v,namespace3=%v --config-file cypress/integration/configurations/Default.json",
|
runCypressTests(t, fmt.Sprintf("npx cypress run --spec \"cypress/integration/tests/MultipleNamespaces.js\" --env name1=%v,name2=%v,name3=%v,namespace1=%v,namespace2=%v,namespace3=%v",
|
||||||
expectedPods[0].Name, expectedPods[1].Name, expectedPods[2].Name, expectedPods[0].Namespace, expectedPods[1].Namespace, expectedPods[2].Namespace))
|
expectedPods[0].Name, expectedPods[1].Name, expectedPods[2].Name, expectedPods[0].Namespace, expectedPods[1].Namespace, expectedPods[2].Namespace))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ func TestTapMultipleNamespaces(t *testing.T) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
runCypressTests(t, fmt.Sprintf("npx cypress run --spec \"cypress/integration/tests/MultipleNamespaces.js\" --env name1=%v,name2=%v,name3=%v,namespace1=%v,namespace2=%v,namespace3=%v --config-file cypress/integration/configurations/Default.json",
|
runCypressTests(t, fmt.Sprintf("npx cypress run --spec \"cypress/integration/tests/MultipleNamespaces.js\" --env name1=%v,name2=%v,name3=%v,namespace1=%v,namespace2=%v,namespace3=%v",
|
||||||
expectedPods[0].Name, expectedPods[1].Name, expectedPods[2].Name, expectedPods[0].Namespace, expectedPods[1].Namespace, expectedPods[2].Namespace))
|
expectedPods[0].Name, expectedPods[1].Name, expectedPods[2].Name, expectedPods[0].Namespace, expectedPods[1].Namespace, expectedPods[2].Namespace))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,7 +251,7 @@ func TestTapRegex(t *testing.T) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
runCypressTests(t, fmt.Sprintf("npx cypress run --spec \"cypress/integration/tests/Regex.js\" --env name=%v,namespace=%v --config-file cypress/integration/configurations/Default.json",
|
runCypressTests(t, fmt.Sprintf("npx cypress run --spec \"cypress/integration/tests/Regex.js\" --env name=%v,namespace=%v",
|
||||||
expectedPods[0].Name, expectedPods[0].Namespace))
|
expectedPods[0].Name, expectedPods[0].Namespace))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,7 +349,7 @@ func TestTapRedact(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runCypressTests(t, fmt.Sprintf("npx cypress run --spec \"cypress/integration/tests/Redact.js\" --config-file cypress/integration/configurations/Default.json"))
|
runCypressTests(t, "npx cypress run --spec \"cypress/integration/tests/Redact.js\"")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestTapNoRedact(t *testing.T) {
|
func TestTapNoRedact(t *testing.T) {
|
||||||
@ -401,7 +401,7 @@ func TestTapNoRedact(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runCypressTests(t, "npx cypress run --spec \"cypress/integration/tests/NoRedact.js\" --config-file cypress/integration/configurations/Default.json")
|
runCypressTests(t, "npx cypress run --spec \"cypress/integration/tests/NoRedact.js\"")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestTapRegexMasking(t *testing.T) {
|
func TestTapRegexMasking(t *testing.T) {
|
||||||
@ -452,7 +452,7 @@ func TestTapRegexMasking(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runCypressTests(t, "npx cypress run --spec \"cypress/integration/tests/RegexMasking.js\" --config-file cypress/integration/configurations/Default.json")
|
runCypressTests(t, "npx cypress run --spec \"cypress/integration/tests/RegexMasking.js\"")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -514,7 +514,7 @@ func TestTapIgnoredUserAgents(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runCypressTests(t, "npx cypress run --spec \"cypress/integration/tests/IgnoredUserAgents.js\" --config-file cypress/integration/configurations/HugeMizu.json")
|
runCypressTests(t, "npx cypress run --spec \"cypress/integration/tests/IgnoredUserAgents.js\"")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestTapDumpLogs(t *testing.T) {
|
func TestTapDumpLogs(t *testing.T) {
|
||||||
|
Loading…
Reference in New Issue
Block a user