Chore: Remove old storybook-verification cypress test (#108696)
* add check for frontend code changing * remove cache * add to pr-e2e-tests instead * fix CODEOWNERS * remove cypress test
This commit is contained in:
@@ -1004,8 +1004,6 @@ embed.go @grafana/grafana-as-code
|
|||||||
/.github/workflows/scripts/json-file-to-job-output.js @grafana/plugins-platform-frontend
|
/.github/workflows/scripts/json-file-to-job-output.js @grafana/plugins-platform-frontend
|
||||||
/.github/workflows/stale.yml @grafana/grafana-developer-enablement-squad
|
/.github/workflows/stale.yml @grafana/grafana-developer-enablement-squad
|
||||||
/.github/workflows/storybook-a11y.yml @grafana/grafana-frontend-platform
|
/.github/workflows/storybook-a11y.yml @grafana/grafana-frontend-platform
|
||||||
/.github/workflows/storybook-verification.yml @grafana/grafana-frontend-platform
|
|
||||||
/.github/workflows/storybook-verification-playwright.yml @grafana/grafana-frontend-platform
|
|
||||||
/.github/workflows/update-make-docs.yml @grafana/docs-tooling
|
/.github/workflows/update-make-docs.yml @grafana/docs-tooling
|
||||||
/.github/workflows/scripts/kinds/verify-kinds.go @grafana/platform-monitoring
|
/.github/workflows/scripts/kinds/verify-kinds.go @grafana/platform-monitoring
|
||||||
/.github/workflows/scripts/create-security-branch/create-security-branch.sh @grafana/grafana-developer-enablement-squad
|
/.github/workflows/scripts/create-security-branch/create-security-branch.sh @grafana/grafana-developer-enablement-squad
|
||||||
|
|||||||
@@ -196,6 +196,34 @@ jobs:
|
|||||||
path: videos
|
path: videos
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
|
run-storybook-test:
|
||||||
|
name: Verify Storybook (Playwright)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: detect-changes
|
||||||
|
if: needs.detect-changes.outputs.changed == 'true'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn install --immutable
|
||||||
|
|
||||||
|
- name: Install Playwright browsers
|
||||||
|
run: npx playwright install --with-deps
|
||||||
|
|
||||||
|
- name: Run Storybook and E2E tests
|
||||||
|
run: yarn e2e:playwright:storybook
|
||||||
|
|
||||||
run-playwright-tests:
|
run-playwright-tests:
|
||||||
needs:
|
needs:
|
||||||
- build-grafana
|
- build-grafana
|
||||||
@@ -232,6 +260,7 @@ jobs:
|
|||||||
required-playwright-tests:
|
required-playwright-tests:
|
||||||
needs:
|
needs:
|
||||||
- run-playwright-tests
|
- run-playwright-tests
|
||||||
|
- run-storybook-test
|
||||||
- build-grafana
|
- build-grafana
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
name: All Playwright tests complete
|
name: All Playwright tests complete
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
name: Verify Storybook (Playwright)
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'packages/grafana-ui/**'
|
|
||||||
- 'e2e-playwright/storybook/**'
|
|
||||||
- '!docs/**'
|
|
||||||
- '!*.md'
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- 'packages/grafana-ui/**'
|
|
||||||
- 'e2e-playwright/storybook/**'
|
|
||||||
- '!docs/**'
|
|
||||||
- '!*.md'
|
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
verify-storybook:
|
|
||||||
name: Verify Storybook (Playwright)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
cache: 'yarn'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: yarn install --immutable
|
|
||||||
|
|
||||||
- name: Install Playwright browsers
|
|
||||||
run: npx playwright install --with-deps
|
|
||||||
|
|
||||||
- name: Run Storybook and E2E tests
|
|
||||||
run: yarn e2e:playwright:storybook
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
name: Verify Storybook
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'packages/grafana-ui/**'
|
|
||||||
- '!docs/**'
|
|
||||||
- '!*.md'
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- 'packages/grafana-ui/**'
|
|
||||||
- '!docs/**'
|
|
||||||
- '!*.md'
|
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
verify-storybook:
|
|
||||||
name: Verify Storybook
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
cache: 'yarn'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: yarn install --immutable
|
|
||||||
|
|
||||||
- name: Run Storybook and E2E tests
|
|
||||||
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f
|
|
||||||
with:
|
|
||||||
browser: chrome
|
|
||||||
start: yarn storybook --quiet
|
|
||||||
wait-on: 'http://localhost:9001'
|
|
||||||
wait-on-timeout: 60
|
|
||||||
command: yarn e2e:storybook
|
|
||||||
install: false
|
|
||||||
env:
|
|
||||||
HOST: localhost
|
|
||||||
PORT: 9001
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
// very basic test to verify that the button story loads correctly
|
|
||||||
// this is only intended to catch some basic build errors with storybook
|
|
||||||
// NOTE: storybook must already be running (`yarn storybook`) for this test to work
|
|
||||||
describe('Verify storybook', () => {
|
|
||||||
it('Loads the button story correctly', () => {
|
|
||||||
cy.visit('?path=/story/inputs-button--basic');
|
|
||||||
getIframeBody().find('button:contains("Example button")').should('be.visible');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// see https://www.cypress.io/blog/2020/02/12/working-with-iframes-in-cypress
|
|
||||||
function getIframeBody() {
|
|
||||||
return cy.get('#storybook-preview-iframe').its('0.contentDocument.body').should('not.be.empty').then(cy.wrap);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user