skip to Main Content

Visual Studio Code – How to make remove unused imports warnings when are used as a parameter (VSC)

Hi I got unused imports warnings in VSC. My file: import * as en from '../../src/assets/i18n/en.json' import * as fi from '../../src/assets/i18n/fi.json' import * as sv from '../../src/assets/i18n/sv.json' async checkFields(language) { await expect(this.heading).toContainText( language.EinvoicesProductRegister_Heading_Title, ) on en.json file I got…

VIEW QUESTION

Can you reference a variable dynamically using JavaScript for Playwright

I have a JSON file that I'm reading data from for a Playwright test as below: async answerMyDetails(){ const testDataFile = './myJsonFile.json' let data = await fs.readFile(testDataFile) let testData = await JSON.parse(data) await this.page.locator(`div:has(> label:has-text("Some Text")) input`).fill(`${testData.myDetailsPageQuestions.vehicleReg.answer_fullUkLicence_carInsurance}`) } I'd like…

VIEW QUESTION
Back To Top
Search