Skip to content

Conversation

JeeveshJ7
Copy link

No description provided.


// Create a new axios instance for this specific request
const response = await axios.request({
url: 'https://api.lambdatest.com/pdf/upload',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use Constants for Host and Routes, will be useful for stage and prod testing

Copy link
Author

Choose a reason for hiding this comment

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

ok

try {
// Create a new axios instance for this specific request
const response = await axios.request({
url: 'https://api.lambdatest.com/automation/smart-ui/screenshot/build/status',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use Constants for Host and Routes

headers: {
...formData.getHeaders(),
'username': this.username,
'accessKey': this.accessKey
Copy link
Collaborator

Choose a reason for hiding this comment

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

username and accessKey not required here


// Verify authentication credentials
if (!ctx.env.LT_USERNAME || !ctx.env.LT_ACCESS_KEY) {
console.log(chalk.red('Error: LT_USERNAME and LT_ACCESS_KEY environment variables are required for fetching results'));
Copy link
Collaborator

Choose a reason for hiding this comment

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

use ctx.log.error() here

const buildId = ctx.pdfBuildId;

if (!buildId && !buildName) {
console.log(chalk.red('Error: Build information not found for fetching results'));
Copy link
Collaborator

Choose a reason for hiding this comment

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

use ctx.log.error() here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants