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

chore: Cypress runtime enhancements #21332

Merged
merged 34 commits into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9366d17
Enhance dashboards list tests
geido Aug 30, 2022
1864115
Seed/clean up dashboards
geido Aug 31, 2022
04d1a76
Enhance dashboards list filtering
geido Aug 31, 2022
f5a74cd
Enhance charts list tests
geido Aug 31, 2022
b429773
Enhance charts filter test
geido Sep 1, 2022
c95faa2
Enhance dashboard load tests
geido Sep 1, 2022
984baf6
Refactor edit/save dashboard tests
geido Sep 2, 2022
3ea671e
Improve cleanup samples data
geido Sep 2, 2022
1c4d440
Additional sample data management enhancements
geido Sep 2, 2022
106c917
Clean up
geido Sep 5, 2022
1cc7d74
Minor enhancements
geido Sep 5, 2022
39b7428
Add codeowner
geido Sep 5, 2022
4559fe6
Move markdown in editmode
geido Sep 5, 2022
05049de
Improve test reliability
geido Sep 5, 2022
d179a95
Merge branch 'master' of https://github.com/apache/superset into chor…
geido Sep 5, 2022
a9eb065
Refactor fav/unfav
geido Sep 5, 2022
ac2219a
Lint
geido Sep 5, 2022
76bb41a
Refactor tabs test
geido Sep 5, 2022
4afedab
Improve nativeFilters tests
geido Sep 7, 2022
b50c508
Improve database tests
geido Sep 7, 2022
abb038c
Skip unused test
geido Sep 7, 2022
83578a5
Improve dataset test
geido Sep 7, 2022
fe89588
improve alerts_reports tests
geido Sep 7, 2022
b99051d
Skip unused test
geido Sep 7, 2022
fadbec6
Lint
geido Sep 7, 2022
30d483f
Merge branch 'master' of https://github.com/apache/superset into chor…
geido Sep 8, 2022
34ada5a
Refactor nativeFilters tests
geido Sep 8, 2022
ba1257c
Remove unused command
geido Sep 8, 2022
7f86449
Clean up
geido Sep 9, 2022
1cb117a
Minor enhancements
geido Sep 9, 2022
c61a533
Merge branch 'master' of https://github.com/apache/superset into chor…
geido Sep 9, 2022
9e2e334
Add TODOs
geido Sep 12, 2022
24cee14
Skip unused test
geido Sep 12, 2022
1318e88
Clean up test data
geido Sep 12, 2022
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
/helm/superset/ @craig-rueda @dpgaspar @villebro

# Notify E2E test maintainers of changes
/superset-frontend/cypress-base/ @jinghua-qa
/superset-frontend/cypress-base/ @jinghua-qa @geido
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions superset-frontend/cypress-base/cypress/fixtures/charts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[
{
"slice_name": "1 - Sample chart",
"description": "chart description",
"owners": [1],
"viz_type": "line",
"cache_timeout": 1000,
"datasource_id": 1,
"datasource_type": "table"
},
{
"slice_name": "2 - Sample chart",
"description": "chart description",
"owners": [1],
"viz_type": "line",
"cache_timeout": 1000,
"datasource_id": 1,
"datasource_type": "table"
},
{
"slice_name": "3 - Sample chart",
"description": "chart description",
"owners": [1],
"viz_type": "line",
"cache_timeout": 1000,
"datasource_id": 1,
"datasource_type": "table"
},
{
"slice_name": "4 - Sample chart",
"description": "chart description",
"owners": [1],
"viz_type": "line",
"cache_timeout": 1000,
"datasource_id": 1,
"datasource_type": "table"
}
]
18 changes: 18 additions & 0 deletions superset-frontend/cypress-base/cypress/fixtures/dashboards.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"dashboard_title": "1 - Sample dashboard",
"slug": "1-sample-dashboard"
},
{
"dashboard_title": "2 - Sample dashboard",
"slug": "2-sample-dashboard"
},
{
"dashboard_title": "3 - Sample dashboard",
"slug": "3-sample-dashboard"
},
{
"dashboard_title": "4 - Sample dashboard",
"slug": "4-sample-dashboard"
}
]

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,28 @@
* specific language governing permissions and limitations
* under the License.
*/
import { ALERT_LIST } from './alert_report.helper';
import { ALERT_LIST } from 'cypress/utils/urls';

describe('alert list view', () => {
beforeEach(() => {
cy.login();
describe('Alert list view', () => {
before(() => {
cy.visit(ALERT_LIST);
});

afterEach(() => {
cy.eyesClose();
beforeEach(() => {
cy.preserveLogin();
});

it('should load alert lists', () => {
cy.visit(ALERT_LIST);

cy.get('[data-test="listview-table"]').should('be.visible');
// check alert list view header
cy.get('[data-test="sort-header"]').eq(1).contains('Last run');
cy.get('[data-test="sort-header"]').eq(2).contains('Name');
cy.get('[data-test="sort-header"]').eq(3).contains('Schedule');
cy.get('[data-test="sort-header"]').eq(4).contains('Notification method');
cy.get('[data-test="sort-header"]').eq(5).contains('Created by');
cy.get('[data-test="sort-header"]').eq(6).contains('Owners');
cy.get('[data-test="sort-header"]').eq(7).contains('Modified');
// TODO: this assert is flaky, we need to find a way to make it work consistenly
// cy.get('[data-test="sort-header"]').eq(7).contains('Active');
// cy.get('[data-test="sort-header"]').eq(8).contains('Actions');
cy.getBySel('listview-table').should('be.visible');
cy.getBySel('sort-header').eq(1).contains('Last run');
cy.getBySel('sort-header').eq(2).contains('Name');
cy.getBySel('sort-header').eq(3).contains('Schedule');
cy.getBySel('sort-header').eq(4).contains('Notification method');
cy.getBySel('sort-header').eq(5).contains('Created by');
cy.getBySel('sort-header').eq(6).contains('Owners');
cy.getBySel('sort-header').eq(7).contains('Modified');
cy.getBySel('sort-header').eq(8).contains('Active');
// TODO Cypress won't recognize the Actions column
// cy.getBySel('sort-header').eq(9).contains('Actions');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,28 @@
* specific language governing permissions and limitations
* under the License.
*/
import { REPORT_LIST } from './alert_report.helper';
import { REPORT_LIST } from 'cypress/utils/urls';

describe('report list view', () => {
beforeEach(() => {
cy.login();
describe('Report list view', () => {
before(() => {
cy.visit(REPORT_LIST);
});

afterEach(() => {
cy.eyesClose();
beforeEach(() => {
cy.preserveLogin();
});

it('should load report lists', () => {
cy.visit(REPORT_LIST);

cy.get('[data-test="listview-table"]').should('be.visible');
// check report list view header
cy.get('[data-test="sort-header"]').eq(1).contains('Last run');
cy.get('[data-test="sort-header"]').eq(2).contains('Name');
cy.get('[data-test="sort-header"]').eq(3).contains('Schedule');
cy.get('[data-test="sort-header"]').eq(4).contains('Notification method');
cy.get('[data-test="sort-header"]').eq(5).contains('Created by');
cy.get('[data-test="sort-header"]').eq(6).contains('Owners');
cy.get('[data-test="sort-header"]').eq(7).contains('Modified');
// TODO: this assert is flaky, we need to find a way to make it work consistenly
// cy.get('[data-test="sort-header"]').eq(7).contains('Active');
// cy.get('[data-test="sort-header"]').eq(8).contains('Actions');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you fixed the Active one. Is Actions a lost cause, or should we leave the commented line in for now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I think I just forgot to keep that comment. Cypress won't recognize that one. There is something weird going on with it. For now, I'll bring the comment back.

cy.getBySel('listview-table').should('be.visible');
cy.getBySel('sort-header').eq(1).contains('Last run');
cy.getBySel('sort-header').eq(2).contains('Name');
cy.getBySel('sort-header').eq(3).contains('Schedule');
cy.getBySel('sort-header').eq(4).contains('Notification method');
cy.getBySel('sort-header').eq(5).contains('Created by');
cy.getBySel('sort-header').eq(6).contains('Owners');
cy.getBySel('sort-header').eq(7).contains('Modified');
cy.getBySel('sort-header').eq(8).contains('Active');
// TODO Cypress won't recognize the Actions column
// cy.getBySel('sort-header').eq(9).contains('Actions');
});
});

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { CHART_LIST } from './chart_list.helper';
import { CHART_LIST } from 'cypress/utils/urls';

describe('charts list view', () => {
beforeEach(() => {
Expand Down
Loading