Skip to content

Commit

Permalink
CRUD tests: wait for rows before typing in search input
Browse files Browse the repository at this point in the history
  • Loading branch information
spadgett committed Jan 9, 2019
1 parent 71a9ca2 commit a664cae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/integration-tests/tests/crud.scenario.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ describe('Kubernetes resource CRUD operations', () => {

it('deletes the resource instance', async() => {
await browser.get(`${appHost}${namespaced ? `/k8s/ns/${testName}` : '/k8s/cluster'}/${resource}`);
await crudView.resourceRowsPresent();
// Filter by resource name to make sure the resource is on the first page of results.
// Otherwise the tests fail since we do virtual scrolling and the element isn't found.
await crudView.filterForName(testName);
await crudView.resourceRowsPresent();
await crudView.deleteRow(kind)(testName);

leakedResources.delete(JSON.stringify({name: testName, plural: resource, namespace: namespaced ? testName : undefined}));
Expand Down Expand Up @@ -175,10 +175,10 @@ describe('Kubernetes resource CRUD operations', () => {

it('search view displays created RoleBinding', async() => {
await browser.get(`${appHost}/k8s/ns/${testName}/rolebindings`);
await crudView.resourceRowsPresent();
// Filter by resource name to make sure the resource is on the first page of results.
// Otherwise the tests fail since we do virtual scrolling and the element isn't found.
await crudView.filterForName(bindingName);
await crudView.resourceRowsPresent();
expect(crudView.rowForName(bindingName).isPresent()).toBe(true);
});

Expand Down

0 comments on commit a664cae

Please sign in to comment.