Skip to content

Commit 0f0678d

Browse files
committed
only skip specific tests
1 parent 0e1dadd commit 0f0678d

File tree

2 files changed

+64
-51
lines changed

2 files changed

+64
-51
lines changed

packages/compass-global-writes/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"test-cov": "nyc --compact=false --produce-source-map=false -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test",
4646
"test-watch": "npm run test -- --watch",
4747
"test-ci": "npm run test-cov",
48+
"test-ci-electron": "npm run test-electron",
4849
"reformat": "npm run eslint . -- --fix && npm run prettier -- --write ."
4950
},
5051
"dependencies": {

packages/compass-global-writes/src/components/shard-zones-table.spec.tsx

Lines changed: 63 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -56,59 +56,71 @@ describe('Compass GlobalWrites Plugin', function () {
5656
expect(within(rows[2]).getByText('EMEA (Frankfurt)')).to.be.visible;
5757
});
5858

59-
it('allows top level search', function () {
60-
render(
61-
<ShardZonesTable
62-
shardZones={[
63-
...shardZones,
64-
{
65-
zoneId: '438908',
66-
country: 'Slovakia',
67-
readableName: 'Slovakia',
68-
isoCode: 'SK',
69-
typeOneIsoCode: 'SK',
70-
zoneName: 'Zone 2',
71-
zoneLocations: ['Location 2'],
72-
},
73-
]}
74-
/>
75-
);
59+
describe('search', function () {
60+
before(function () {
61+
if (
62+
process.env.NODE_ENV === 'test' &&
63+
process.env.npm_lifecycle_event === 'test-electron'
64+
) {
65+
// TODO(COMPASS-8368)
66+
this.skip();
67+
}
68+
});
69+
it('allows top level search', function () {
70+
render(
71+
<ShardZonesTable
72+
shardZones={[
73+
...shardZones,
74+
{
75+
zoneId: '438908',
76+
country: 'Slovakia',
77+
readableName: 'Slovakia',
78+
isoCode: 'SK',
79+
typeOneIsoCode: 'SK',
80+
zoneName: 'Zone 2',
81+
zoneLocations: ['Location 2'],
82+
},
83+
]}
84+
/>
85+
);
7686

77-
const searchInput = screen.getByLabelText('Search for a location');
78-
expect(searchInput).to.be.visible;
79-
userEvent.type(searchInput, 'Slo');
80-
const rows = screen.getAllByRole('row');
81-
expect(rows).to.have.lengthOf(2); // 1 header, 1 item
82-
expect(within(rows[1]).getByText('Slovakia (SK)')).to.be.visible;
83-
expect(within(rows[1]).getByText('Zone 2 (Location 2)')).to.be.visible;
84-
});
87+
const searchInput = screen.getByLabelText('Search for a location');
88+
expect(searchInput).to.be.visible;
89+
userEvent.type(searchInput, 'Slo');
90+
const rows = screen.getAllByRole('row');
91+
// screen.debug(rows[1]);
92+
expect(rows).to.have.lengthOf(2); // 1 header, 1 item
93+
expect(within(rows[1]).getByText('Slovakia (SK)')).to.be.visible;
94+
expect(within(rows[1]).getByText('Zone 2 (Location 2)')).to.be.visible;
95+
});
8596

86-
it('allows subZone search', function () {
87-
render(
88-
<ShardZonesTable
89-
shardZones={[
90-
...shardZones,
91-
{
92-
zoneId: '4389048',
93-
country: 'Slovakia',
94-
readableName: 'Slovakia',
95-
isoCode: 'SK',
96-
typeOneIsoCode: 'SK',
97-
zoneName: 'Zone 2',
98-
zoneLocations: ['Location 2'],
99-
},
100-
{
101-
zoneId: '8908900',
102-
country: 'Slovakia',
103-
readableName: 'Slovakia - Bratislava',
104-
isoCode: 'SK-BA',
105-
typeOneIsoCode: 'SK',
106-
zoneName: 'Zone 2',
107-
zoneLocations: ['Location 2'],
108-
},
109-
]}
110-
/>
111-
);
97+
it('allows subZone search', function () {
98+
render(
99+
<ShardZonesTable
100+
shardZones={[
101+
...shardZones,
102+
{
103+
zoneId: '4389048',
104+
country: 'Slovakia',
105+
readableName: 'Slovakia',
106+
isoCode: 'SK',
107+
typeOneIsoCode: 'SK',
108+
zoneName: 'Zone 2',
109+
zoneLocations: ['Location 2'],
110+
},
111+
{
112+
zoneId: '8908900',
113+
country: 'Slovakia',
114+
readableName: 'Slovakia - Bratislava',
115+
isoCode: 'SK-BA',
116+
typeOneIsoCode: 'SK',
117+
zoneName: 'Zone 2',
118+
zoneLocations: ['Location 2'],
119+
},
120+
]}
121+
/>
122+
);
123+
});
112124

113125
const searchInput = screen.getByLabelText('Search for a location');
114126
expect(searchInput).to.be.visible;

0 commit comments

Comments
 (0)