Skip to content

Commit

Permalink
adding defaults test
Browse files Browse the repository at this point in the history
  • Loading branch information
amyreit committed Jun 26, 2023
1 parent e3184bd commit 91dcd08
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 55 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will run the cypress tests that are unrelated to the downloading and
# testing of the starter zip files

name: Test Feature Versions RedirectURls and Runtime Release Versions
name: General Starter and Redirect Tests
on:
workflow_dispatch:

Expand Down Expand Up @@ -63,3 +63,23 @@ jobs:
name: cypress-videos
path: /__w/start.openliberty.io/start.openliberty.io/cypress/videos/testRedirectURLs.cy.js.mp4

use-cypress-test-StarterDefaults:
runs-on: ubuntu-latest
container: cypress/included:12.5.1
steps:
- uses: actions/checkout@v3.3.0
- run: cypress run --browser chrome --env JDK_VERSION="${{ inputs.java_version }}" --config-file /__w/start.openliberty.io/start.openliberty.io/src/test/cypressjs/cypress.config.js --spec /__w/openliberty.io/openliberty.io/src/test/cypressjs/cypress/e2e/testOLStarterDefaults.cy.js

- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: /__w/start.openliberty.io/start.openliberty.io/cypress/screenshots/testOLStarterDefaults.cy.js

- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-videos
path: /__w/start.openliberty.io/start.openliberty.io/cypress/videos/testOLStarterDefaults.cy.js.mp4


Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

describe('Test Open Liberty Starter - Maven Default EE and MP', () => {
// Allow users to specify URL via variables found in cypress.env.json
// java home path for jdk17, jdk11, jdk8 can be change via cypress.env.json base on user env var
// this test will only download the starter for the default_jdk in that file

// Test the default values for the starter

const default_javahome = Cypress.env('jdk_11_home');
const appname = "app-name-m-default";
const downloadsFolder = Cypress.config('downloadsFolder');
Expand All @@ -22,15 +20,4 @@ describe('Test Open Liberty Starter - Maven Default EE and MP', () => {
cy.get("#Starter_MicroProfile_Version").should("have.value", mpDefault);
});

it('Test zip file is downloaded with default values', () => {
cy.exec(`rm -rf ${downloadsFolder}`, { failOnNonZeroExit: false });
// download zip for the defaults
cy.log('appname ' + appname);
cy.log('javaLevel ' + javaDefault);
cy.goToOpenLibertyStarter();
cy.downloadAndUnzipFile(appname, eeDefault, mpDefault,'m');
cy.runMVNWLibertyDev(appname, default_javahome);
cy.checkLocalSplashPage();
cy.runMVNWLibertyStop(appname, default_javahome);
});
});
39 changes: 0 additions & 39 deletions src/test/cypressjs/cypress/e2e/testOLStarterGradleDefaults.cy.js

This file was deleted.

0 comments on commit 91dcd08

Please sign in to comment.