forked from bloom-housing/bloom
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: flaky cypress listing search (bloom-housing#4335) (#830)
- Loading branch information
1 parent
da122b6
commit e08594c
Showing
5 changed files
with
20 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,7 @@ describe("Lottery Tests", () => { | |
cy.addMinimalApplication(uniqueListingName) | ||
|
||
// Close the listing and view lottery tab | ||
cy.visit("/") | ||
cy.contains("Listings") | ||
cy.getByTestId("ag-search-input").type(uniqueListingName) | ||
cy.getByTestId(uniqueListingName).first().click() | ||
cy.findAndOpenListing(uniqueListingName) | ||
cy.getByID("listingEditButton").contains("Edit").click() | ||
cy.getByID("closeButton").contains("Close").click() | ||
cy.getByID("close-listing-modal-button").contains("Close").click() | ||
|
@@ -45,18 +42,17 @@ describe("Lottery Tests", () => { | |
cy.visit("/") | ||
cy.getByTestId("Users-1").click() | ||
cy.contains("Users") | ||
cy.getByTestId("ag-search-input").type("[email protected]") | ||
cy.getByTestId("ag-search-input") | ||
.should("be.visible") | ||
.type("[email protected]", { force: true }) | ||
cy.getByID("[email protected]").first().click() | ||
cy.getByTestId("listings-all-Bay Area").check({ force: true }) | ||
cy.getByID("save-user").click() | ||
|
||
// Login as partner and view lottery tab | ||
cy.signOut() | ||
cy.login("partnerUser") | ||
cy.visit("/") | ||
cy.contains("Listings") | ||
cy.getByTestId("ag-search-input").type(uniqueListingName) | ||
cy.getByTestId(uniqueListingName).first().click() | ||
cy.findAndOpenListing(uniqueListingName) | ||
cy.get(`[role="tab"]`).eq(2).click() | ||
cy.get("h2").contains("Publish lottery data") | ||
|
||
|
@@ -68,10 +64,7 @@ describe("Lottery Tests", () => { | |
// Login as admin and view lottery tab | ||
cy.signOut() | ||
cy.login() | ||
cy.visit("/") | ||
cy.contains("Listings") | ||
cy.getByTestId("ag-search-input").type(uniqueListingName) | ||
cy.getByTestId(uniqueListingName).first().click() | ||
cy.findAndOpenListing(uniqueListingName) | ||
cy.get(`[role="tab"]`).eq(2).click() | ||
cy.get("h2").contains("Export lottery data") | ||
|
||
|
@@ -83,10 +76,7 @@ describe("Lottery Tests", () => { | |
// Login as partner and view lottery tab, ensure no data | ||
cy.signOut() | ||
cy.login("partnerUser") | ||
cy.visit("/") | ||
cy.contains("Listings") | ||
cy.getByTestId("ag-search-input").type(uniqueListingName) | ||
cy.getByTestId(uniqueListingName).first().click() | ||
cy.findAndOpenListing(uniqueListingName) | ||
cy.get(`[role="tab"]`).eq(2).click() | ||
cy.get("h2").contains("No lottery data") | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters