Skip to content
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

Open
wants to merge 2 commits into
base: stage
Choose a base branch
from
Open

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