-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add pdf support in cli #227
base: stage
Are you sure you want to change the base?
Conversation
|
||
// Create a new axios instance for this specific request | ||
const response = await axios.request({ | ||
url: 'https://api.lambdatest.com/pdf/upload', |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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')); |
There was a problem hiding this comment.
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')); |
There was a problem hiding this comment.
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
No description provided.