Skip to content

Commit

Permalink
pagination change fixes + new settings
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-cox committed Oct 25, 2024
1 parent 63885b4 commit ef7367e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const simpleBox = new SimpleBoxPo();
const header = new HeaderPo();

describe('Cluster Dashboard', { testIsolation: 'off', tags: ['@explorer', '@adminUser'] }, () => {
const podName = `e2e-test-${ +new Date() }`;
let podName = `e2e-test`;

before(() => {
cy.login();
Expand Down Expand Up @@ -237,7 +237,10 @@ describe('Cluster Dashboard', { testIsolation: 'off', tags: ['@explorer', '@admi

// create pod
// eslint-disable-next-line no-return-assign
cy.createPod(nsName, podName, 'nginx:latest').then(() => removePod = true);
cy.createPod(nsName, podName, 'nginx:latest').then((resp) => {
podName = resp.body.metadata.name;
removePod = true;
});
});
});

Expand Down
10 changes: 6 additions & 4 deletions cypress/e2e/tests/pages/explorer/dashboard/events.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Events', { testIsolation: 'off', tags: ['@explorer', '@adminUser'] },
});

describe('List', { tags: ['@vai', '@adminUser'] }, () => {
const uniquePod = 'aaa-e2e-test-pod-name';
let uniquePod = 'unique-pod-name';
const podNamesList = [];
let nsName1: string;
let nsName2: string;
Expand All @@ -31,8 +31,8 @@ describe('Events', { testIsolation: 'off', tags: ['@explorer', '@adminUser'] },
while (i < 125) {
const podName = Cypress._.uniqueId(Date.now().toString());

cy.createPod(nsName1, podName, 'nginx:latest', false).then(() => {
podNamesList.push(`pod-${ podName }`);
cy.createPod(nsName1, podName, 'nginx:latest', false).then((resp) => {
podNamesList.push(resp.body.metadata.name);
});

i++;
Expand All @@ -46,7 +46,9 @@ describe('Events', { testIsolation: 'off', tags: ['@explorer', '@adminUser'] },
cy.createNamespace(nsName2);

// create unique pod for filtering/sorting test
cy.createPod(nsName2, uniquePod, 'nginx:latest');
cy.createPod(nsName2, uniquePod, 'nginx:latest').then((resp) => {
uniquePod = resp.body.metadata.name;
});
});
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/tests/pages/fleet/advanced/workspaces.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('Workspaces', { testIsolation: 'off', tags: ['@fleet', '@adminUser'] },
cy.createFleetWorkspace(uniqueWorkspaceName).then((resp: Cypress.Response<any>) => {
const wsId = resp.body.id;

uniqueWorkspaceName = resp.body.metadata.name;
uniqueWorkspaceName = resp.body.name;

workspaceNameList.push(wsId);
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/utils/settings-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
* (tests will check that the pre-authed setting count is less than this, and the post-authed count is greater than)
*
*/
export const PARTIAL_SETTING_THRESHOLD = 13;
export const PARTIAL_SETTING_THRESHOLD = 12;

0 comments on commit ef7367e

Please sign in to comment.