Skip to content

Instantly share code, notes, and snippets.

resource "azurerm_virtual_machine_extension" "vmExtension" {
name = "hostname"
virtual_machine_id = azurerm_linux_virtual_machine.yourvmname.id
publisher = "Microsoft.Azure.Extensions"
type = "CustomScript"
type_handler_version = "2.0"
settings = <<SETTINGS
{
"commandToExecute": "curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh"
}
resource "azurerm_network_security_group" "securitygroupname" {
name = "${var.resource_group_name}-department-SecurityGroup"
location = var.vm_location
resource_group_name = var.resource_group_name
}
resource "azurerm_network_security_rule" "securityrulename" {
for_each = local.secrules
name = each.key
direction = each.value.direction
access = each.value.access
resource "azurerm_virtual_machine_extension" "vmExtension" {
name = "hostname"
virtual_machine_id = azurerm_linux_virtual_machine.yourvmname.id
publisher = "Microsoft.Azure.Extensions"
type = "CustomScript"
type_handler_version = "2.0"
settings = <<SETTINGS
{
"commandToExecute": "curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh"
}
let myVar = "Hello World";
myVar = 5;
console.log(myVar);
let myVar: string = "Hello World";
myVar = 10;
console.log(myVar);
await page.goto('https://ecommerce-playground.lambdatest.io/');
await page.locator("span.title", {hasText: 'Mega Menu' }).hover()
await page.locator("a[title=Desktop]").click();
await page.locator("div.carousel-item.active > img[title='HTC Touch HD']").click()
await page.locator("#container button[title='Add to Cart']").click();
await page.locator("a.btn.btn-primary.btn-block",{hasText: 'View Cart'}).click()
await expect(page.locator("td.text-left", {hasText: 'HTC Touch HD'})).toBeVisible()
await expect(page.locator("div[class$='flex-nowrap'] > input")).toHaveValue("1")
test('Should add item to cart', async({page})=>{
await page.goto('https://ecommerce-playground.lambdatest.io/');
await page.locator("span.title", {hasText: 'Mega Menu' }).hover()
await page.locator("a[title=Desktop]").click();
await page.locator("div.carousel-item.active > img[title='HTC Touch HD']").click()
await page.locator("#container button[title='Add to Cart']").click();
await page.locator("a.btn.btn-primary.btn-block",{hasText: 'View Cart'}).click()
await expect(page.locator("td.text-left", {hasText: 'HTC Touch HD'})).toBeVisible()
await expect(page.locator("div[class$='flex-nowrap'] > input")).toHaveValue("1")
});