Просмотр исходного кода

Merge pull request #17 from cyril-ui-developer/improve-data-test-discovery

CONSOLE-3303: Move plugin template to the openshift GitHub org - update test-prow-e2e script with yarn install and improve data-test discovery for Plugin Example nav
Jakub Hadvig 3 лет назад
Родитель
Сommit
61a9dcc41b
2 измененных файлов с 7 добавлено и 0 удалено
  1. 2 0
      integration-tests/tests/example-page.cy.ts
  2. 5 0
      test-prow-e2e.sh

+ 2 - 0
integration-tests/tests/example-page.cy.ts

@@ -73,6 +73,8 @@ if (!Cypress.env('OPENSHIFT_CI') || Cypress.env('PLUGIN_TEMPLATE_PULL_SPEC')) {
       cy.url().should('include', '/example');
       cy.url().should('include', '/example');
     });
     });
     it('Verify the example page title', () => {
     it('Verify the example page title', () => {
+      cy.get('[data-quickstart-id="qs-nav-home"]').click();
+      cy.get('[data-test="nav"]').contains('Plugin Example').click();
       cy.get('[data-test="example-page-title"]').should(
       cy.get('[data-test="example-page-title"]').should(
         'contain',
         'contain',
         'Hello, Plugin!',
         'Hello, Plugin!',

+ 5 - 0
test-prow-e2e.sh

@@ -24,5 +24,10 @@ set -x
 BRIDGE_BASE_ADDRESS="$(oc get consoles.config.openshift.io cluster -o jsonpath='{.status.consoleURL}')"
 BRIDGE_BASE_ADDRESS="$(oc get consoles.config.openshift.io cluster -o jsonpath='{.status.consoleURL}')"
 export BRIDGE_BASE_ADDRESS
 export BRIDGE_BASE_ADDRESS
 
 
+echo "Install dependencies"
+if [ ! -d node_modules ]; then
+  yarn install
+fi
+
 echo "Runs Cypress tests in headless mode"
 echo "Runs Cypress tests in headless mode"
 yarn run test-cypress-headless
 yarn run test-cypress-headless