Skip to content
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

update final parts for cypress testing (k8s, docker) #1324

Merged
merged 7 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ updates:
schedule:
interval: "monthly"

#cypress updates -1
- package-ecosystem: "npm"
directory: "/src/test/e2e"
schedule:
interval: "monthly"

#cypress updates -2
- package-ecosystem: "npm"
directory: "/src/test/K8s-tests"
schedule:
interval: "monthly"
# check our npm for dev
- package-ecosystem: "npm"
directory: "/"
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/.bash_history
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ rm -rf jdk-18_linux-x64_bin.deb
git rebase -i main
git rebase -i master
git stash
export tempPassword="xw1nQ/d3x3jpCLwVS9QHZTHKcXh4z5Enuk2v70QRmq0="
export tempPassword="lrh0SwKlWyAijVZ4Kn0gEmDhASCe6Y2CdEfKyw37jd0="
mvn run tempPassword
k6
npx k6
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/minikube-vault-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,12 @@ jobs:

- name: Run Tests
run: |
npm install cypress
npx cypress run --config-file src/test/K8s-tests/cypress.config.js && minikube delete
cd src/test/K8s-tests
npm install
npx cypress run
minikube delete
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: e2e results
path: src/test/K8s-tests/cypress/reports/mochawesome/
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ node_modules
src/test/e2e/cypress/videos
src/test/e2e/cypress/screenshots
src/test/e2e/cypress/reports
src/test/k8s-tests/cypress/videos
src/test/k8s-tests/cypress/screenshots
src/test/k8s-tests/cypress/reports
cypress/downloads
py_env
tmp/
Expand Down
2 changes: 1 addition & 1 deletion js/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// eslint-disable-next-line no-unused-vars
function secret () {
const password = 'TV5mQAM=' + 9 + 'Fcek' + 6 + 'atA=' + 2 + 'O7ad' + 7
const password = 'dXChjts=' + 9 + '2pa1' + 6 + 'gT0=' + 2 + 'vwT8' + 7
return password
}
6 changes: 5 additions & 1 deletion src/test/K8s-tests/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ module.exports = defineConfig({
video: false,
e2e: {
baseUrl: 'http://localhost:8080/',
specPattern: 'src/test/K8s-tests/cypress/e2e/*.cy.js',
specPattern: 'cypress/e2e/*.cy.js',
supportFile: false,
reporter: 'cypress-multi-reporters',
reporterOptions: {
configFile: 'reporter-config.json'
},
setupNodeEvents (on, config) {
// implement node event listeners here
}
Expand Down
1 change: 1 addition & 0 deletions src/test/K8s-tests/cypress/e2e/Challenge45Test.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ describe('Challenge45 Tests', () => {
cy.get('[data-cy=spoiler-answer]').invoke('text').then(spoilerAnswer => {
// Asserting that the spoiler is not a default value
expect(spoilerAnswer.trim()).to.not.equal('if_you_see_this_please_use_K8S_and_Vault')
expect(spoilerAnswer.trim()).to.not.equal('ACTUAL_ANSWER_CHALLENGE7')
expect(spoilerAnswer.trim()).to.not.be.empty

// Visit the challenge page and submit the spoiler as the answer
Expand Down
Loading
Loading