diff --git a/.gitignore b/.gitignore index c83baf3b1..35366c80f 100644 --- a/.gitignore +++ b/.gitignore @@ -44,4 +44,3 @@ cypress.env.json */cypress/screenshots */cypress/videos */cypress/support -*/cypress.json diff --git a/acceptanceTests/cypress/integration/configurations/Default.json b/acceptanceTests/cypress.json similarity index 89% rename from acceptanceTests/cypress/integration/configurations/Default.json rename to acceptanceTests/cypress.json index d19ccd08f..3a8b155f9 100644 --- a/acceptanceTests/cypress/integration/configurations/Default.json +++ b/acceptanceTests/cypress.json @@ -4,6 +4,7 @@ "viewportHeight": 1080, "video": false, "screenshotOnRunFailure": false, + "defaultCommandTimeout": 5000, "testFiles": [ "tests/GuiPort.js", "tests/MultipleNamespaces.js", @@ -11,6 +12,7 @@ "tests/NoRedact.js", "tests/Regex.js", "tests/RegexMasking.js", + "tests/IgnoredUserAgents.js", "tests/UiTest.js" ], diff --git a/acceptanceTests/cypress/integration/configurations/HugeMizu.json b/acceptanceTests/cypress/integration/configurations/HugeMizu.json deleted file mode 100644 index 969bbab10..000000000 --- a/acceptanceTests/cypress/integration/configurations/HugeMizu.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "watchForFileChanges":false, - "viewportWidth": 1920, - "viewportHeight": 3500, - "video": false, - "screenshotOnRunFailure": false, - "testFiles": [ - "tests/IgnoredUserAgents.js" - ], - - "env": { - "testUrl": "http://localhost:8899/" - } -} diff --git a/acceptanceTests/cypress/integration/tests/IgnoredUserAgents.js b/acceptanceTests/cypress/integration/tests/IgnoredUserAgents.js index 46b569efa..8e8fc98cb 100644 --- a/acceptanceTests/cypress/integration/tests/IgnoredUserAgents.js +++ b/acceptanceTests/cypress/integration/tests/IgnoredUserAgents.js @@ -1,10 +1,11 @@ -import {isValueExistsInElement} from "../testHelpers/TrafficHelper"; +import {isValueExistsInElement, resizeToHugeMizu} from "../testHelpers/TrafficHelper"; it('Loading Mizu', function () { cy.visit(Cypress.env('testUrl')); }); it('going through each entry', function () { + resizeToHugeMizu(); cy.get('#total-entries').then(number => { const getNum = () => { const numOfEntries = number.text(); diff --git a/acceptanceTests/tap_test.go b/acceptanceTests/tap_test.go index 36a9af82c..ede2ca766 100644 --- a/acceptanceTests/tap_test.go +++ b/acceptanceTests/tap_test.go @@ -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 } - 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 } - 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)) } @@ -205,7 +205,7 @@ func TestTapMultipleNamespaces(t *testing.T) { 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)) } @@ -251,7 +251,7 @@ func TestTapRegex(t *testing.T) { 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)) } @@ -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) { @@ -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) { @@ -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) {