Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,17 @@ public void onError(FacebookException error) {
public void onClick(View view) {
if (!usernameEditText.getText().toString().trim().isEmpty() &&
!passwordEditText.getText().toString().trim().isEmpty()) {
authenticate(usernameEditText.getText().toString().trim(),
passwordEditText.getText().toString().trim(), TestpressSdk.Provider.TESTPRESS);
authenticate("111",
"111", TestpressSdk.Provider.TESTPRESS);
}
}
});
loginView = findViewById(R.id.scroll_view);
}

private void authenticate(String userId, String accessToken, TestpressSdk.Provider provider) {
InstituteSettings instituteSettings = new InstituteSettings("https://sandbox.testpress.in");
instituteSettings.setWhiteLabeledHostUrl("https://sandbox.testpress.in");
InstituteSettings instituteSettings = new InstituteSettings("https://lmsdemo.testpress.in");
instituteSettings.setWhiteLabeledHostUrl("https://lmsdemo.testpress.in");
Comment on lines +122 to +123
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

URL endpoint update to demo environment.

The institute URL has been updated from sandbox to demo environment. This change appears intentional and aligned with the hardcoded credentials update.

Verify that other parts of the application that may be using the sandbox URL have also been updated accordingly:


🏁 Script executed:

#!/bin/bash
# Check for any remaining references to sandbox.testpress.in
rg "sandbox\.testpress\.in" --type-not xml

Length of output: 9767


Remaining sandbox URLs in tests need updating

We’ve verified that while the sample activity now points to the demo endpoint, numerous test fixtures and test classes still reference sandbox.testpress.in. These should be updated to the demo URL (or made configurable) to keep environments consistent:

• store/src/test/resources/products_list.json
• core/src/test/resources/discussions.json
• course/src/test/resources/content_attempts.json
• exam/src/test/java/in/testpress/exam/ui/AttemptActivityTest.java
• exam/src/androidTest/java/in/testpress/exam/ui/ReviewStatsActivityTest.java
• exam/src/androidTest/java/in/testpress/exam/ui/ShareToUnlockActivityTest.kt
• course/src/test/java/in/testpress/course/network/CourseNetworkTest.kt

Please replace all remaining sandbox.testpress.in references with the demo endpoint or refactor to use environment variables.

instituteSettings.setAndroidSentryDns("https://186f9948d5294b4c9c03aa9d2a11c982@sentry.testpress.in/3");
instituteSettings.setEnableOfflineExam(true);
instituteSettings.setShowOfflineExamEndingAlert(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import in.testpress.samples.R;
import in.testpress.samples.core.TestpressCoreSampleActivity;
import in.testpress.store.TestpressStore;
import in.testpress.store.ui.ProductDetailFragmentV2;
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify the usage of this imported class.

The ProductDetailFragmentV2 class is imported but doesn't appear to be used in this file. If it's intended for future implementation, this is fine. Otherwise, consider removing unused imports.


🏁 Script executed:

#!/bin/bash
# Check if ProductDetailFragmentV2 is used anywhere in the NavigationDrawerActivity
rg -A 3 -B 3 "ProductDetailFragmentV2" samples/src/main/java/in/testpress/samples/store/NavigationDrawerActivity.java

# Check for usage in other files that might be extended from or related to this activity
rg "ProductDetailFragmentV2.*NavigationDrawerActivity" --include "*.java" --include "*.kt"

Length of output: 989


Remove unused import of ProductDetailFragmentV2

The import of in.testpress.store.ui.ProductDetailFragmentV2 in NavigationDrawerActivity.java isn’t referenced elsewhere in this file and can be safely removed to clean up unused imports.

• File: samples/src/main/java/in/testpress/samples/store/NavigationDrawerActivity.java
• Line: 12

import in.testpress.store.ui.ProductListFragmentV2;

import static in.testpress.samples.core.TestpressCoreSampleActivity.AUTHENTICATE_REQUEST_CODE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ProductDetailsActivityV2 : BaseToolBarActivity() {

productId = intent?.getIntExtra(PRODUCT_ID, DEFAULT_PRODUCT_ID) ?: DEFAULT_PRODUCT_ID

ProductDetailFragment.show(this, binding.fragmentContainer.id, productId)
ProductDetailFragmentV2.show(this, binding.fragmentContainer.id, productId)
}

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
Expand Down
Loading