-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: fix Onboarding/CreateNewApp flaky test #21347
Changes from all commits
8bfde38
1bb7036
b8ba541
1fc950b
7426f9f
fda4bf9
9abd3d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,42 +3,13 @@ const guidedTourLocators = require("../../../../locators/GuidedTour.json"); | |
const commonlocators = require("../../../../locators/commonlocators.json"); | ||
const homePage = require("../../../../locators/HomePage"); | ||
import * as _ from "../../../../support/Objects/ObjectsCore"; | ||
let workspaceName; | ||
|
||
describe("Creating new app after discontinuing guided tour should not start the same", function() { | ||
it("1. Creating new app after discontinuing guided tour should not start the same", function() { | ||
// Start guided tour | ||
_.homePage.NavigateToHome(); | ||
_.agHelper.GenerateUUID(); | ||
cy.get("@guid").then((uid) => { | ||
workspaceName = "CNAppWorspace" + uid; | ||
_.homePage.CreateNewWorkspace(workspaceName); | ||
_.homePage.CreateAppInWorkspace(workspaceName); //Since welcome tour always creates app in 1st workspace available | ||
_.homePage.NavigateToHome(); | ||
}); | ||
_.agHelper.Sleep(4000); //Adding only because of the CI failure | ||
cy.get(guidedTourLocators.welcomeTour).click(); | ||
_.dataSources.CloseReconnectDataSourceModal(); // Check if reconnect data source modal is visible and close it | ||
cy.get(guidedTourLocators.welcomeTour) | ||
.click() | ||
.wait(2000); | ||
_.dataSources.CloseReconnectDataSourceModal(); // Check if reconnect data source modal is visible and close it | ||
cy.get("body").then(($ele) => { | ||
if ($ele.find(guidedTourLocators.welcomeTour).length) { | ||
cy.get(guidedTourLocators.welcomeTour) | ||
.click() | ||
.wait(2000); | ||
} | ||
}); | ||
_.dataSources.CloseReconnectDataSourceModal(); // Check if reconnect data source modal is visible and close it | ||
|
||
cy.get("body").then(($ele) => { | ||
if ($ele.find(guidedTourLocators.startBuilding).length == 0) { | ||
cy.get(commonlocators.homeIcon).click({ force: true }); | ||
cy.get(guidedTourLocators.welcomeTour) | ||
.click() | ||
.wait(4000); | ||
} | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was added since we see the Reconnect modal dialog appearing out of nowhere in this test flow & test failing to click on welcome tour. Removing this also will not solve the 503 issue. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the reconnect modal does appear then either it is a bug or some issue the fork api on ci. Either ways keeping this is a workaround. I can have a look at it when it happens next time, so far the 4 times we ran it does not seem to have happened. |
||
|
||
cy.get(guidedTourLocators.startBuilding).should("be.visible"); | ||
// Go back to applications page | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We aren't really using the
workspaceName
variable anywhere in the test so have removed this . Removing this also seems to have stopped the 503 errors not sure why thoughThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this does not solve the issue. I add the new workspace creation code as a part of script fix - for 503. Tried adding new workspace, creating new application in it & then try to click on welcome tour. This will not/does not solve the 503.