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

WIP: updated E2E test suite with @grafana/plugin-e2e #746

Draft
wants to merge 6 commits into
base: digest-auth-lib-change
Choose a base branch
from

Conversation

yesoreyeram
Copy link
Collaborator

@yesoreyeram yesoreyeram commented Jan 18, 2024

This PR replaces the old E2E test suite using cypress with E2E test suite using @grafana/plugin-e2e

Fixes #720

@yesoreyeram
Copy link
Collaborator Author

@sunker - fyi

@sunker
Copy link

sunker commented Jan 30, 2024

@sunker - fyi

Nice @yesoreyeram! Been merging a few minor breaking changes and improvements the last couple of days:

getQueryEditorRow is no longer async:

//before
const queryEditorRow = await explorePage.getQueryEditorRow('A');
await queryEditorRow.getByText('Enter SpreadsheetID').click();
//after
await explorePage.getQueryEditorRow('A').getByText('Enter SpreadsheetID').click();

toHavePanelError matcher does not exist anymore. Use the following istead:

await expect(panelEditPage.panel.getErrorIcon()).toBeVisible();
await expect(explorePage.timeSeriesPanel.getErrorIcon()).not.toBeVisible();

You no longer need to define the auth.login in your plugin code - point to the one from plugin-e2e instead:

//playwright.config.ts
projects: [
  {
    name: 'auth',
    testDir: 'node_modules/@grafana/plugin-e2e/dist/auth',
    testMatch: [/.*\.js/],
  },
  {
    name: 'chromium',
    use: {
      ...devices['Desktop Chrome'],
      storageState: 'playwright/.auth/user.json',
    },
    dependencies: ['auth'],
  },
],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

2 participants