Skip to content

Commit

Permalink
ci/ui: test filtering with lower and upper case
Browse files Browse the repository at this point in the history
  • Loading branch information
juadk committed Apr 6, 2023
1 parent f3396ab commit 3889629
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions tests/cypress/latest/e2e/unit_tests/advanced_filtering.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,14 @@ filterTests(['main'], () => {
});

it('One machine inventory should appear by filtering on test-filter-one', () => {
// Only test-filter-one should appear with test-filter-one as filter
cy.checkFilter({filterName: 'test-filter-one',
testFilterOne: true,
testFilterTwo: false,
shouldNotMatch: false});
// Only test-filter-one should appear with test-filter-one and Test-Filter_One as filter
// Checking with lower and upper case make sure we are not hitting https://github.com/rancher/elemental/issues/627
['test-filter-one', 'Test-Filter-One'].forEach(filter => {
cy.checkFilter({filterName: filter,
testFilterOne: true,
testFilterTwo: false,
shouldNotMatch: false});
});
});

it('No machine inventory should appear by filtering on test-bad-filter', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/latest/fixtures/machine_inventory_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
annotations:
myInvAnnotation1: myInvAnnotationValue1
labels:
testfilter: test-filter-one
testfilter: Test-Filter-One
name: test-filter-one
namespace: fleet-default
spec:
Expand Down

0 comments on commit 3889629

Please sign in to comment.