Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

feat: block screen [SGW-3617] #788

Merged
merged 1 commit into from
Jun 4, 2024
Merged

feat: block screen [SGW-3617] #788

merged 1 commit into from
Jun 4, 2024

Conversation

dalsontws
Copy link
Contributor

@dalsontws dalsontws commented Jun 4, 2024

Notion link

This PR adds...

Screen.Recording.2024-06-04.at.2.33.41.PM.mov
  • I've kept this PR as small as possible (~600 lines) by splitting it into PRs with manageable chunks of code
  • I've requested reviews from 1-2 reviewers
  • I've added accessibility IDs to my components
  • I've added/updated unit/integration tests
  • I've added/updated e2e tests for at least the happy flow
  • I've added Chinese translations for i18n setup
  • I've added documentation in README/Notion

Copy link

@supplyally-bot
Copy link

Application

Expo QR
OR Enter this link into your dev client: exp+rationally://expo-development-client/?url=https://u.expo.dev/cf511b6b-f66b-45b5-b856-2339182f8052?channel-name=pr788

Storybook

Expo QR
OR Enter this link into your dev client: exp+rationally://expo-development-client/?url=https://u.expo.dev/cf511b6b-f66b-45b5-b856-2339182f8052?channel-name=storybook-pr788

@@ -271,78 +272,88 @@ export const CollectCustomerDetailsScreen: FunctionComponent<

const tCampaignName = c13nt(features?.campaignName ?? "");

const [shouldBlock, setShouldBlock] = useState(true);
useEffect(() => {
Copy link
Contributor Author

@dalsontws dalsontws Jun 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

block for the first time when user navigates to CollectCustomerDetailsScreen (triggered by refreshing or after OTP)

Screen.Recording.2024-06-04.at.1.49.04.PM.mov

Comment on lines +278 to +282
const [shouldBlock, setShouldBlock] = useState(true);
useEffect(() => {
setShouldBlock(true);
}, []);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocks when user navigates to login (AKA add new campaign)

Screen.Recording.2024-06-04.at.1.31.26.PM.mov

@dalsontws dalsontws changed the title chore: block screen [SGW-3617] feat: block screen [SGW-3617] Jun 4, 2024
@@ -107,6 +109,8 @@ describe("CollectCustomerDetailsScreen", () => {
</CreateProvidersWrapper>
);

const continueAppButton = getByTestId(continueAppButtonId);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this screen is blocked, all tests require additional button click to reach original screen

@@ -77,11 +78,13 @@ describe("LoginContainer component tests", () => {
cleanup();
});

it("should render LoginScanCard", () => {
it("should render LoginScanCard", async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this screen is blocked, all tests require additional button click to reach original screen

@dalsontws dalsontws requested a review from legendac June 4, 2024 06:57
Comment on lines +118 to +119
// jest.advanceTimersByTime(29999);
// expect(queryByText("Resend")).toBeNull();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some flakiness related to timer - infinite loop, looking into this

Comment on lines +87 to +89
const handleWebNavigation = (): void => {
Linking.openURL("https://app.supply.gov.sg");
};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen.Recording.2024-06-04.at.3.00.12.PM.mov

@dalsontws dalsontws force-pushed the chore/block-screen branch from 31c9920 to d0e7354 Compare June 4, 2024 07:28
@dalsontws dalsontws force-pushed the chore/block-screen branch from d0e7354 to b57c811 Compare June 4, 2024 07:29
@dalsontws dalsontws merged commit 6072e24 into master Jun 4, 2024
8 checks passed
@dalsontws dalsontws deleted the chore/block-screen branch June 4, 2024 10:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants