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

fix: reenable cypress tests for offline #1928

Merged
merged 3 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions cypress/integration/edit/edit_dashboard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ Feature: Creating, editing and deleting dashboard
And I confirm I want to discard changes
Then the dashboard displays in view mode

# @mutating
# Scenario: I star the dashboard
# Given I open existing dashboard
# And the dashboard is not starred
# When I click to star the dashboard
# Then the dashboard is starred
# When I click to unstar the dashboard
# Then the dashboard is not starred
@mutating
Scenario: I star the dashboard
Given I open existing dashboard
And the dashboard is not starred
When I click to star the dashboard
Then the dashboard is starred
When I click to unstar the dashboard
Then the dashboard is not starred


@mutating
Expand Down
69 changes: 69 additions & 0 deletions cypress/integration/view/offline.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
Feature: Offline dashboard

Scenario: I cache an uncached dashboard
Given I create a cached and uncached dashboard
Then the cached dashboard has a Last Updated time and chip icon
And the uncached dashboard does not have a Last Updated time and no chip icon

Scenario: I am online with an uncached dashboard when I lose connectivity
Given I open an uncached dashboard
When connectivity is turned off
Then all actions for "uncached" dashboard requiring connectivity are disabled

Scenario: I am online with a cached dashboard when I lose connectivity
Given I open a cached dashboard
Then the cached dashboard options are available
When connectivity is turned off
Then all actions for "cached" dashboard requiring connectivity are disabled

Scenario: I am offline and switch from a cached dashboard to an uncached dashboard
Given I open a cached dashboard
And connectivity is turned off
When I click to open an uncached dashboard when offline
Then the dashboard is not available and offline message is displayed

Scenario: I am offline and switch to a cached dashboard
Given I open an uncached dashboard
And connectivity is turned off
When I click to open a cached dashboard when offline
Then the cached dashboard is loaded and displayed in view mode

Scenario: I am offline and switch to an uncached dashboard and then connectivity is restored
Given I open a cached dashboard
And connectivity is turned off
When I click to open an uncached dashboard when offline
Then the dashboard is not available and offline message is displayed
When connectivity is turned on
Then the uncached dashboard is loaded and displayed in view mode

Scenario: I am in edit mode on an uncached dashboard when I lose connectivity and then I exit without saving and then connectivity is restored
Given I open an uncached dashboard in edit mode
When connectivity is turned off
Then all edit actions requiring connectivity are disabled
When I click Exit without saving
Then the dashboard is not available and offline message is displayed
When connectivity is turned on
Then the uncached dashboard is loaded and displayed in view mode

Scenario: I am in edit mode on a cached dashboard when I lose connectivity and then I exit without saving
Given I open a cached dashboard in edit mode
When connectivity is turned off
Then all edit actions requiring connectivity are disabled
When I click Exit without saving
Then the cached dashboard is loaded and displayed in view mode

Scenario: The sharing dialog is open when connectivity is lost
Given I open a cached dashboard
When I open sharing settings
And connectivity is turned off
Then it is not possible to change sharing settings

# Scenario: The interpretations panel is open when connectivity is lost
# Given I open a cached dashboard
# And I open the interpretations panel
# When connectivity is turned off
# Then it is not possible to interact with interpretations


Scenario: I delete the cached and uncached dashboard
Given I delete the cached and uncached dashboard