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

Fix tests for enterprise #1719

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,27 +103,26 @@
>
<template v-slot:item.view="{ item }">
<v-btn color="primary" @click="viewScriptLog(item)">
<span v-if="item.name.includes('(') && item.name.includes(')')"
>Script Report</span
>
<span v-else>Script Log</span>
<span v-if="item.name.includes('(') && item.name.includes(')')">
Script Report
</span>
<span v-else> Script Log </span>
<v-icon right> mdi-eye </v-icon>
</v-btn>
</template>
<template v-slot:item.download="{ item }">
<v-btn
icon
:disabled="downloadScript"
:loading="downloadScript && downloadScript.name === item.name"
@click="downloadScriptLog(item)"
>
<span v-if="item.name.includes('(') && item.name.includes(')')"
>Script Report</span
>
<span v-else>Script Log</span>
<span v-if="item.name.includes('(') && item.name.includes(')')">
Script Report
</span>
<span v-else> Script Log </span>
<v-icon end> mdi-file-download-outline </v-icon>
<template v-slot:loader>
<span>Loading...</span>
<span> Loading... </span>
</template>
</v-btn>
</template>
Expand Down
2 changes: 1 addition & 1 deletion playwright/tests/bucket-explorer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ test('direct URLs', async ({ page }) => {
test('view file', async ({ page, utils }) => {
await page.getByText('config').click()
await page.getByRole('cell', { name: 'DEFAULT' }).click()
await page.getByRole('cell', { name: 'targets' }).click()
await page.getByRole('cell', { name: 'targets', exact: true }).click()
await page.getByRole('cell', { name: 'INST', exact: true }).click()
await page.getByRole('cell', { name: 'procedures' }).click()
await page.locator('[data-test="search-input"] input').fill('calendar')
Expand Down
4 changes: 2 additions & 2 deletions playwright/tests/global.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ setup('global setup', async ({ page }) => {
}

// Logout and log back in as admin
await page.getByText('The Operator').click()
await page.locator('button:has-text("Logout")').click()
await page.getByText('The Operator', { exact: true }).click()
await page.getByRole('button', { name: 'Logout' }).click()
await page.waitForURL('**/auth/**')
await page.getByLabel('Username or email').fill('admin')
await page.getByLabel('Password', { exact: true }).fill('admin')
Expand Down
6 changes: 2 additions & 4 deletions playwright/tests/script-runner/script-menu.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,13 @@ test('show started scripts', async ({ page, utils }) => {
await page.locator('text="Execution Status"').click()
await utils.sleep(1000)
// Each section has a Refresh button so click the first one
await page.locator('button:has-text("Refresh")').first().click()
await page.getByRole('button', { name: 'Refresh' }).first().click()
await expect(page.locator('[data-test=running-scripts]')).toContainText(
format(new Date(), 'yyyy_MM_dd'),
)

// Get out of the Running Scripts sheet
await page
.locator('#openc3-menu >> text=Script Runner')
.click({ force: true })
await page.keyboard.press('Escape')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, much better

await page.locator('[data-test=go-button]').click()
await expect(page.locator('[data-test=state] input')).toHaveValue('stopped')
await page.locator('[data-test=script-runner-script]').click()
Expand Down
5 changes: 5 additions & 0 deletions playwright/tests/utc-time.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ test.describe('CmdTlmServer', () => {
test.use({
toolPath: '/tools/cmdtlmserver',
toolName: 'CmdTlmServer',
storageState: 'adminStorageState.json',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was the key missing piece for enterprise

})
test('displays in local or UTC time', async ({ page, utils }) => {
// Allow the table to populate
Expand Down Expand Up @@ -111,6 +112,7 @@ test.describe('Data Extractor', () => {
test.use({
toolPath: '/tools/dataextractor',
toolName: 'Data Extractor',
storageState: 'adminStorageState.json',
})

test('displays in local or UTC time', async ({ page, utils }) => {
Expand Down Expand Up @@ -210,6 +212,7 @@ test.describe('Data Viewer', () => {
test.use({
toolPath: '/tools/dataviewer',
toolName: 'Data Viewer',
storageState: 'adminStorageState.json',
})

test('displays in local or UTC time', async ({ page, utils }) => {
Expand Down Expand Up @@ -285,6 +288,7 @@ test.describe('Packet Viewer', () => {
test.use({
toolPath: '/tools/packetviewer',
toolName: 'Packet Viewer',
storageState: 'adminStorageState.json',
})

test('displays in local or UTC time', async ({ page, utils }) => {
Expand Down Expand Up @@ -367,6 +371,7 @@ test.describe('Telemetry Grapher', () => {
test.use({
toolPath: '/tools/tlmgrapher',
toolName: 'Telemetry Grapher',
storageState: 'adminStorageState.json',
})

test('displays in local or UTC time', async ({ page, utils }) => {
Expand Down
Loading