github.com/hernad/nomad@v1.6.112/e2e/ui/tests/example.spec.js (about) 1 /** 2 * Copyright (c) HashiCorp, Inc. 3 * SPDX-License-Identifier: MPL-2.0 4 */ 5 6 const { test, expect } = require('@playwright/test'); 7 8 test('authenticated users can see their policies', async ({ page }) => { 9 10 var NOMAD_ADDR = process.env.NOMAD_ADDR; 11 if (NOMAD_ADDR == undefined || NOMAD_ADDR == "") { 12 NOMAD_ADDR = 'http://localhost:4646'; 13 } 14 15 await page.goto(NOMAD_ADDR+'/ui/settings/tokens'); 16 17 // smoke test that we reached the page 18 const logo = page.locator('div.navbar-brand'); 19 await expect(logo).toBeVisible(); 20 21 22 const policies = page.locator('text=Policies') 23 await expect(policies).toBeVisible(); 24 });