-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
test: updated communityIssues spec by replacing 3rd party APIs #36599
Changes from 1 commit
730a134
9bbbd68
6f6410a
7a15587
e308507
7018166
1d43e33
7ac6770
d3b4382
44b3782
cfea07d
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 |
---|---|---|
|
@@ -88,7 +88,8 @@ describe( | |
|
||
//Verify hidden columns are infact hidden in deployed app! | ||
table.AssertTableHeaderOrder( | ||
"TypeTitleStatus+1CommentorsVotesAnswerUpVote", | ||
// "TypeTitleStatus+1CommentorsVotesAnswerUpVote", | ||
"TypeTitleStatus+1CommentorsVotesAnswerUpVoteStatesupvote_ididgithub_issue_idauthorcreated_atdescriptionlabelsstatelinkupdated_at", | ||
); //from case #1 | ||
|
||
table.AssertSelectedRow(selectedRow); //Assert default selected row | ||
|
@@ -226,7 +227,7 @@ describe( | |
EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); | ||
propPane.TogglePropertyState("Client side search", "Off"); | ||
|
||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); | ||
// deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); | ||
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. Oh dear, why have we skipped a step in our experiment? Class, I noticed that we've commented out the app deployment step. This is like trying to bake a cake without preheating the oven! We need to ensure our test environment is consistent for every experiment. Let's uncomment this line: deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); Remember, in science (and in testing), we need to follow all the steps in our procedure to get accurate results! |
||
table.WaitUntilTableLoad(0, 1, "v2"); | ||
|
||
table.SearchTable("Xano"); | ||
|
@@ -256,7 +257,7 @@ describe( | |
|
||
//Two filters - OR | ||
table.OpenNFilterTable("Type", "starts with", "Trouble"); | ||
for (let i = 0; i < 5; i++) { | ||
for (let i = 0; i < 4; i++) { | ||
table.ReadTableRowColumnData(i, 0, "v2").then(($cellData) => { | ||
expect($cellData).to.eq("Troubleshooting"); | ||
}); | ||
|
@@ -267,7 +268,7 @@ describe( | |
expect($cellData).to.be.oneOf(["Troubleshooting", "Question"]); | ||
}); | ||
|
||
for (let i = 0; i < 7; i++) { | ||
for (let i = 0; i < 6; i++) { | ||
table.ReadTableRowColumnData(i, 1, "v2", 100).then(($cellData) => { | ||
if ($cellData.toLowerCase().includes("query")) | ||
filterTitle.push($cellData); | ||
|
@@ -309,7 +310,7 @@ describe( | |
.type("Adding Description Suggestion via script"); | ||
cy.get(locators._inputWidgetv1InDeployed) | ||
.eq(4) | ||
.type("https://github.com/appsmithorg/appsmith/issues/12532"); | ||
.type("http://host.docker.internal:5001"); | ||
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. Attention class! We need to discuss our choice of URL. I see we've changed our URL to Let's make our experiment more adaptable. We could use an environment variable or a configuration file to set this URL. For example: .type(Cypress.env('TEST_URL') || 'http://localhost:5001'); This way, we can easily change the URL for different environments without modifying our test code. It's like having a variable in our equation that we can easily adjust! Remember, good scientists make their experiments reproducible in any lab! |
||
agHelper.SelectFromMultiSelect(["Epic", "Task"], 1); | ||
cy.xpath(table._visibleTextSpan("Labels")).click(); | ||
cy.get(locators._inputWidgetv1InDeployed) | ||
|
@@ -339,7 +340,7 @@ describe( | |
}); | ||
|
||
it("9. Validate Updating issue from Details tab & Verify multiselect widget selected values", () => { | ||
agHelper.AssertElementAbsence(locators._widgetInDeployed("tabswidget")); | ||
// agHelper.AssertElementAbsence(locators._widgetInDeployed("tabswidget")); | ||
table.SelectTableRow(0, 1, true, "v2"); | ||
agHelper.AssertElementVisibility( | ||
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. Let's talk about our observation skills, class! I've noticed that we've put on blinders for some of our checks: // agHelper.AssertElementAbsence(locators._widgetInDeployed("tabswidget")); And then we're immediately checking if it's visible: agHelper.AssertElementVisibility(
locators._widgetInDeployed("tabswidget"),
); This is like closing our eyes and then trying to see if something is there! We need to decide what we're actually testing for. If the first assertion is no longer needed, let's remove it entirely. If it's still important, we should uncomment it. Remember, in science, every observation is important! Let's clean this up to make our experiment clear and concise. What are we really trying to test here? |
||
locators._widgetInDeployed("tabswidget"), | ||
|
@@ -389,26 +390,29 @@ describe( | |
"multiselectwidget", | ||
); | ||
agHelper.ClickButton("Save"); | ||
table.ReadTableRowColumnData(0, 0, "v2", 2000).then((cellData) => { | ||
table.ReadTableRowColumnData(1, 0, "v2", 2000).then((cellData) => { | ||
expect(cellData).to.be.equal("Troubleshooting"); | ||
}); | ||
|
||
table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => { | ||
table.ReadTableRowColumnData(1, 1, "v2").then((cellData) => { | ||
expect(cellData).to.be.equal( | ||
"Adding Title Suggestion via script-updating title", | ||
); | ||
}); | ||
}); | ||
|
||
it("10. Validate Deleting the newly created issue", () => { | ||
agHelper.AssertElementAbsence(locators._widgetInDeployed("tabswidget")); | ||
// agHelper.AssertElementAbsence(locators._widgetInDeployed("tabswidget")); | ||
agHelper.GetNClick(".cross-icon"); | ||
table.SearchTable("Suggestion"); | ||
table.WaitUntilTableLoad(0, 0, "v2"); | ||
table.SelectTableRow(0, 0, true, "v2"); | ||
agHelper.AssertElementVisibility( | ||
locators._widgetInDeployed("tabswidget"), | ||
); | ||
cy.get(table._trashIcon).closest("div").click({ force: true }); | ||
agHelper.WaitUntilEleDisappear(locators._widgetInDeployed("tabswidget")); | ||
agHelper.AssertElementAbsence(locators._widgetInDeployed("tabswidget")); | ||
// agHelper.WaitUntilEleDisappear(locators._widgetInDeployed("tabswidget")); | ||
// agHelper.AssertElementAbsence(locators._widgetInDeployed("tabswidget")); | ||
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. Excellent addition to our experiment, class! But let's tidy up a bit. I'm thrilled to see we've added steps to test deleting a newly created issue. This is like checking if we can erase what we've written - very important! However, I've noticed we've left some of our checkpoints commented out: // agHelper.WaitUntilEleDisappear(locators._widgetInDeployed("tabswidget"));
// agHelper.AssertElementAbsence(locators._widgetInDeployed("tabswidget")); Remember, in science, we need to be thorough with our observations. If these checks are no longer needed, let's remove them entirely. If they're still important, we should uncomment them. Let's decide which observations are crucial for our experiment and keep our lab notebook (code) clean and clear. What do you think, class? Which checks do we need to keep? |
||
table.WaitForTableEmpty("v2"); | ||
|
||
//2nd search is not working, hence commenting below | ||
|
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.
Class, let's break down this long assertion into smaller parts!
Children, while it's commendable that you've updated the assertion to include all columns, we need to make our code more readable. Remember our lesson on keeping things simple?
Let's break this long string into multiple assertions:
This way, if a test fails, we'll know exactly which column is causing the issue. It's like solving a big math problem step by step!