Commit Graph

19 Commits

Author SHA1 Message Date
Steven Vachon
10715a1c79
@grafana/e2e: added tests (#25836)
* Use at least cypress@4.9

... which has [arguably] better TypeScript definitions

* Updated lockfile

* Added tests for CLI and API

* Minor changes
2020-06-25 13:17:45 -04:00
Steven Vachon
fe74abfaae
@grafana/e2e: improvements (#25610)
* Added dependency for attaching files to forms

* Fixed closing of panel options

* Updated lockfile
2020-06-16 12:42:35 -04:00
Steven Vachon
4c8ad8d031
@grafana/e2e: improvements (#25497)
* Minor changes

* Use UI for removing dashboards and datasources

… with an optional “quick” mode that instead does so via a request

* Improved URL helpers

* Simplified test teardown

* Added support for multiple tests

... instead of being forced to cram everything into a single test because the session was cleared
2020-06-11 16:31:49 -04:00
Steven Vachon
d62926b5a3
@grafana/e2e: improvements (#25342)
* Minor changes

* Remove console.* logger plugin

... as it doesn't work in Electron

* Only open/close panel editor options and groups when state is inverted

... meaning, only open when closed and only close when open. This avoids unpredictable states, causing inconsistent results.

* Support for adding multiple datasources and dashboards

... and having them all auto-removed when tests are completed

* Avoid page errors when removing dashboards and datasources [keep?]

* Wait for chart data before saving panel

... so that everything is ready when returning to the dashboard
2020-06-08 09:52:34 -04:00
Hugo Häggmark
00a9af00fc
Templating: removes old Angular variable system and featureToggle (#24779)
* Chore: initial commit

* Tests: fixes MetricsQueryEditor.test.tsx

* Tests: fixes cloudwatch/specs/datasource.test.ts

* Tests: fixes stackdriver/specs/datasource.test.ts

* Tests: remove refrences to CustomVariable

* Refactor: moves DefaultVariableQueryEditor

* Refactor: moves utils

* Refactor: moves types

* Refactor: removes variableSrv

* Refactor: removes feature toggle newVariables

* Refactor: removes valueSelectDropDown

* Chore: removes GeneralTabCtrl

* Chore: migrates RowOptions

* Refactor: adds RowOptionsButton

* Refactor: makes the interface more explicit

* Refactor: small changes

* Refactor: changed type as it can be any variable type

* Tests: fixes broken test

* Refactor: changes after PR comments

* Refactor: adds loading state and call to onChange in componentDidMount
2020-06-04 13:44:48 +02:00
Steven Vachon
df7647b268
@grafana/e2e: improvements and dumb fixes for #25203 (#25269)
* Fix type definitions

* Fix typo

* Added support for fetch() within tests
2020-06-01 13:55:37 -04:00
Steven Vachon
78febbbeef
@grafana/e2e: screenshots and panel flow (#25203)
* Cleanup

* addPanel now supports (optional) custom dashboardUid

* addPanel now supports (optional) visualization name

* Added CLI option for updating screenshot fixtures

* Added support for console.* functions within tests

* Refactored screenshot command for greater simplicity

* addPanel now sets a unique title

* Updated lockfile
2020-06-01 08:48:23 -04:00
Steven Vachon
2724f05d5e
@grafana/e2e: Avoid Cypress' issue with JSON file reporter (#25092)
https://github.com/cypress-io/cypress/issues/6406
2020-05-25 19:28:35 -04:00
Steven Vachon
68154cf98d
@grafana/e2e: generate JSON report file (#25033)
* Output JSON report from Cypress

* Updated lockfile
2020-05-25 15:07:28 -04:00
Hugo Häggmark
e4d492fd35
e2e: adds inspect drawer tests (#23823)
* Explore: Create basic E2E test

* Feature: adds e2e tests for panel inspector

* Refactor: adds ts-ignore because of type checking errors

* Refactor: changes after PR comments and updates snapshot

* Refactor: adds typings back for IScope

* Refactor: changes after PR comments

Co-authored-by: Andreas Opferkuch <andreas.opferkuch@gmail.com>
2020-04-24 08:48:04 +02:00
Steven Vachon
a4308fffe7
@grafana/e2e: API improvements (#23079)
* Minor changes

* Fixtures path is now relative to the project directory

* URL support module now has individual exports

* Scenario context timing issues resolved

... caused by being ran synchronously, instead of as part of Cypress' asynchronous queue.

* Scenario context API now supports multiple keys per function call

* addDataSource flow accepts a config argument

… and optionally checks datasource health status

* Added readProvisions command

* Added addPanel flow
2020-03-26 12:15:58 -04:00
Torkel Ödegaard
75d7f9072c
E2E: Add new run modes for e2e tests (#22795)
* WIP: started e2e tests for bar gauge

* Updated

* Updated

* Updated cypress from 3.7 -> 4.1

* reverted cypress upgrade

* Updated test

* Update e2e docs

* Updated docs
2020-03-16 14:35:55 +01:00
Steven Vachon
4fecf5a7a6
@grafana/e2e: correctly exclude dependencies from TypeScript builds (#22732)
* maintains support for Grafana core e2e tests
* avoids producing declaration files in plugin source directories
2020-03-11 15:30:29 -04:00
Marcus Andersson
f26d14eef1
reverting the changes that failed the e2e tests. (#22714) 2020-03-11 11:26:52 +01:00
Steven Vachon
23d72d25e4
@grafana/e2e: fix runtime ts-loader errors with Cypress support files (#22688)
* Minor changes

* Only exclude installed packages that are not @grafana/e2e itself

* Explicitly load Cypress tsconfig for clarity

* Fix Cypress tsconfig

  * it was trying to extend a config that is not published
  * it needs to be commonjs
2020-03-10 12:20:44 -04:00
Steven Vachon
ee5fcc03df
@grafana/e2e: added support for plugin repositories (#22546)
* Minor changes

* Include Cypress support files in published package

* Added CLI

… with support for custom configurations (which Cypress does not currently support by default):

  * Loads cypress.json from @grafana/e2e as a base config (via a custom Cypress plugin)
  * Sets default values for project-level Cypress files (tests, etc)
  * Optionally loads a cypress.json from the current working directory as overrides

* Updated lockfile
2020-03-03 18:12:52 -05:00
Steven Vachon
f48169633c
TSLint → ESLint (#21006)
* Alphabetized tslint and tsconfig files

* Optimized tsconfig files

* Optimized editorconfig & prettier config files

… to reduce redundancy

* Switched to @grafana/tsconfig

… and:
* de-duped options
* removed options with default values

* Fixed nasty issue with types for nested slate-react

* Replaced TSLint with ESLint

* TSLint disables → ESLint disables

… also JSHint removals, which haven’t had an affect since it was replaced with TSLint.

* Compliances for ESLint, Prettier and TypeScript

* Updated lockfile
2020-02-08 02:40:04 +01:00
Hugo Häggmark
c530426506
e2e: Adds better log information during test runs (#20987)
* e2e: Adds log output when you use a selector

* e2e: Adds more log output

* Refactor: Changes after PR comments
2019-12-10 09:47:03 +01:00
Hugo Häggmark
58cffde0f2
e2e: Uses Cypress instead of Puppeteer (#20753)
* WIP: intial commit

* Tests: Runs e2e tests

* Refactor: Adds BASE_URL support

* Refactor: Adds namespacing

* Refactor: Cleans up the Page api

* Build: Adds to build-branches-and-prs job for testing

* Build: Hardcoded image for now

* Refactor: Uses Selectors in App

* Refactor: Adds addDataSource flow

* WIP

* Refactor: Adds e2eScenario

* Refactor: Adds add and delete scenarios

* Refactor: Adds logging

* Refactor: Adds ability to for Selectors with variables

* Refactor: Using variable selectors instead

* Refactor: Adds flow until Share Panel

* Refactor: Adds clicking on rendered image link

* Refactor: Deletes log output

* Refactor: Updates snapshots

* Chore: Reverts changes

* Refactor: Removes log plugin because maybe it breaks yarn build

* Refactor: Adds rendered image download

* Refactor: Adds image comparison

* Refactor: Removes uncaught errors override

* Refactor: Changes order of images to compare

* Refactor: Updates truth image

* Build: Updates path to CI artifacts

* Refactor: Cleaning up types and config

* wip

* Refactor: Cleans up external api

* Refactor: More cleanup

* Refactor: More cleanup

* Refactor: Removes usages of Pages and Flows

* Refactor: Removes last traces of Cypress in spec

* Refactor: Adds comments
2019-12-09 00:14:25 -08:00