-
Notifications
You must be signed in to change notification settings - Fork 492
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into cypress-forked-prs
- Loading branch information
Showing
47 changed files
with
1,047 additions
and
933 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { cy, describe, it, beforeEach, Cypress } from "local-cypress"; | ||
import LoginPage from "../../pageobject/Login/LoginPage"; | ||
|
||
describe("redirect", () => { | ||
const loginPage = new LoginPage(); | ||
|
||
beforeEach(() => { | ||
cy.log("Logging in the user devdistrictadmin"); | ||
}); | ||
|
||
it("Check if login redirects to the right url", () => { | ||
cy.awaitUrl("/resource/board", true); | ||
loginPage.loginManuallyAsDistrictAdmin(); | ||
loginPage.ensureLoggedIn(); | ||
cy.url().should("include", "/resource/board"); | ||
}); | ||
|
||
it("Check if the redirect param works", () => { | ||
const baseUrl = Cypress.config("baseUrl"); | ||
cy.awaitUrl(`login?redirect=${baseUrl}/resource/board`, true); | ||
loginPage.loginManuallyAsDistrictAdmin(); | ||
loginPage.ensureLoggedIn(); | ||
cy.url().should("include", "/resource/board"); | ||
}); | ||
|
||
it("Check to ensure that redirect is the same origin", () => { | ||
cy.awaitUrl("login?redirect=https://google.com", true); | ||
loginPage.loginManuallyAsDistrictAdmin(); | ||
loginPage.ensureLoggedIn(); | ||
cy.url().should("include", "/facility"); | ||
}); | ||
}); |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import UserDetails from "./UserDetails"; | ||
|
||
const UserDetailComponent = ({ | ||
id, | ||
title, | ||
value, | ||
}: { | ||
id: string; | ||
title: string; | ||
value: string; | ||
}) => ( | ||
<div className="col-span-1"> | ||
<UserDetails id={id} title={title}> | ||
<div className="overflow-hidden"> | ||
<div className="truncate font-semibold" title={value}> | ||
{value} | ||
</div> | ||
</div> | ||
</UserDetails> | ||
</div> | ||
); | ||
|
||
export default UserDetailComponent; |
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
Oops, something went wrong.