-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3237 from OpenLiberty/revert-3220-changingDefault…
…Test Revert "Changing default test"
- Loading branch information
Showing
4 changed files
with
59 additions
and
35 deletions.
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 @@ | ||
# This workflow will run the cypress tests that are unrelated to the downloading and | ||
# testing of the starter zip files | ||
|
||
name: General Starter and Redirect Tests | ||
name: Test Feature Versions RedirectURls and Runtime Release Versions | ||
on: | ||
workflow_dispatch: | ||
|
||
|
@@ -63,23 +63,3 @@ 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/[email protected] | ||
- 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 | ||
|
||
|
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
39 changes: 39 additions & 0 deletions
39
src/test/cypressjs/cypress/e2e/testOLStarterGradleDefaults.cy.js
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,39 @@ | ||
|
||
describe('Test Open Liberty Starter - Gradle 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 | ||
|
||
const default_javahome = Cypress.env('jdk_11_home'); | ||
const appname = "app-name-g-default"; | ||
const downloadsFolder = Cypress.config('downloadsFolder'); | ||
const eeDefault = "10.0"; | ||
const mpDefault = "6.0" | ||
const javaDefault = Cypress.env('default_jdk'); | ||
|
||
// tests | ||
it('Default values for Open Liberty Starter', () => { | ||
cy.goToOpenLibertyStarter(); | ||
cy.get("#Starter_Base_Package").should("have.value", "com.demo"); | ||
cy.get("#Starter_App_Name").should("have.value", "app-name"); | ||
cy.get('#build_system_gradle').click(); | ||
cy.get("#starter_section input[type=radio]:checked").should("have.value", "gradle"); | ||
cy.get("#Starter_Java_Version").should("have.value", javaDefault); | ||
cy.get("#Starter_Jakarta_Version").should("have.value", eeDefault); | ||
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,'g'); | ||
cy.runGradlewLibertyDev(appname, default_javahome); | ||
cy.checkLocalSplashPage(); | ||
cy.runGradlewLibertyStop(appname, default_javahome); | ||
}); | ||
|
||
}); |
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