github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/e2e/ui/tests/example.spec.js (about)

     1  const { test, expect } = require('@playwright/test');
     2  
     3  test('authenticated users can see their policies', async ({ page }) => {
     4  
     5    var NOMAD_ADDR = process.env.NOMAD_ADDR;
     6    if (NOMAD_ADDR == undefined || NOMAD_ADDR == "") {
     7      NOMAD_ADDR = 'http://localhost:4646';
     8    }
     9  
    10    await page.goto(NOMAD_ADDR+'/ui/settings/tokens');
    11  
    12    // smoke test that we reached the page
    13    const logo = page.locator('div.navbar-brand');
    14    await expect(logo).toBeVisible();
    15  
    16  
    17    const policies = page.locator('text=Policies')
    18    await expect(policies).toBeVisible();
    19  });