Skip to content

Commit

Permalink
fix data source flaky tests (#1383)
Browse files Browse the repository at this point in the history
* troubleshoot

Signed-off-by: SuZhou-Joe <[email protected]>

* troubleshoot

Signed-off-by: SuZhou-Joe <[email protected]>

* troubleshoot

Signed-off-by: SuZhou-Joe <[email protected]>

* troubleshoot

Signed-off-by: SuZhou-Joe <[email protected]>

* troubleshoot

Signed-off-by: SuZhou-Joe <[email protected]>

* troubleshoot

Signed-off-by: SuZhou-Joe <[email protected]>

* troubleshoot

Signed-off-by: SuZhou-Joe <[email protected]>

* troubleshoot

Signed-off-by: SuZhou-Joe <[email protected]>

* troubleshoot

Signed-off-by: SuZhou-Joe <[email protected]>

* troubleshoot

Signed-off-by: SuZhou-Joe <[email protected]>

* troubleshoot

Signed-off-by: SuZhou-Joe <[email protected]>

* troubleshoot

Signed-off-by: SuZhou-Joe <[email protected]>

* troubleshoot

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
(cherry picked from commit ba9ac55)
  • Loading branch information
SuZhou-Joe authored and github-actions[bot] committed Jun 12, 2024
1 parent a8a4e3d commit 8a8eaa0
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ if (Cypress.env('DATASOURCE_MANAGEMENT_ENABLED')) {
after(() => {
// Clean up after all test are run
cy.deleteAllDataSources();
// remove the default data source
cy.setAdvancedSetting({
defaultDataSource: '',
});
});

it('should successfully load the page', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ if (Cypress.env('DATASOURCE_MANAGEMENT_ENABLED')) {
after(() => {
// Clean up after all test are run
cy.deleteAllDataSources();
// clear cache
cy.clearCache();
// remove the default data source
cy.setAdvancedSetting({
defaultDataSource: '',
});
});

it('should successfully load the page', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ if (Cypress.env('DATASOURCE_MANAGEMENT_ENABLED')) {
after(() => {
// Clean up after all test are run
cy.deleteAllDataSources();
// remove the default data source
cy.setAdvancedSetting({
defaultDataSource: '',
});
});

it('should successfully load the listing page & have 2 records in table', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ if (Cypress.env('DATASOURCE_MANAGEMENT_ENABLED')) {
});
after(() => {
// Clean up after all test are run
cy.deleteAllDataSourcesOnUI();
cy.deleteAllDataSources();
// remove the default data source
cy.setAdvancedSetting({
defaultDataSource: '',
});
});
it('The first data source is the default data source', () => {
cy.visitDataSourcesListingPage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ Cypress.Commands.add('singleDeleteDataSourceByTitle', (dataSourceTitle) => {
.should('exist') // Ensure the button exists
.should('be.visible') // Ensure the button is visible
.click({ force: true }); // Click the button
cy.wait(1000);

cy.wait(2000);
cy.visitDataSourcesListingPage();
});

Expand Down

0 comments on commit 8a8eaa0

Please sign in to comment.