Skip to content

Commit

Permalink
test: remove unnecessary console log in test
Browse files Browse the repository at this point in the history
  • Loading branch information
sun-mota committed Nov 1, 2024
1 parent d2d75e0 commit 52902ea
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions test/auro-flight-main.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ describe('auro-flight-main', () => {
<auro-flight-main departureTime="2022-05-04T00:30:00-07:00" departureStation="SEA" arrivalTime="2022-05-04T11:55:00-04:00" arrivalStation="PVD" flights='["AS 1436"]' reroutedArrivalStation="SFO" reroutedDepartureStation="LAX"></auro-flight-main>
`);

console.log("this:", el.shadowRoot.querySelector('.departureTime'));

await expect(el.shadowRoot.querySelector('.departureTime').querySelector('[auro-datetime]').getAttribute('setDate')).to.equal('2022-05-04T00:30:00-07:00');
await expect(el.shadowRoot.querySelector('.arrivalTime').querySelector('[auro-datetime]').getAttribute('setDate')).to.equal('2022-05-04T11:55:00-04:00');
await expect(el.shadowRoot.querySelector('.departureStation').textContent.trim()).to.contain('SEA');
Expand Down Expand Up @@ -108,8 +106,8 @@ describe('auro-flight-main', () => {
`);

const expectedDepartureCity = `L A X`,
expectedDepartureTime = `12:30 AM`,
expectedReroutedFlight = 'Flight S E A to P V D has been re-routed.';
expectedDepartureTime = `12:30 AM`,
expectedReroutedFlight = 'Flight S E A to P V D has been re-routed.';

const actual = el.shadowRoot.querySelector('.util_displayHiddenVisually').textContent.trim().replace(/\n|\r/g, "");
const departureRerouteSpan = el.shadowRoot.querySelector('.departureStation .util_lineThrough');
Expand All @@ -135,7 +133,7 @@ describe('auro-flight-main', () => {
`);

const expectedArrival = 'and arrives S F O at 11:55 AM',
expectedReroutedFlight = 'Flight S E A to P V D has been re-routed.';
expectedReroutedFlight = 'Flight S E A to P V D has been re-routed.';

const actual = el.shadowRoot.querySelector('.util_displayHiddenVisually').textContent.trim().replace(/\n|\r/g, "");
const departureRerouteSpan = el.shadowRoot.querySelector('.departureStation .util_lineThrough');
Expand All @@ -161,9 +159,9 @@ describe('auro-flight-main', () => {
`);

const expectedDepartureCity = `L A X`,
expectedDepartureTime = `12:30 AM`,
expectedArrival = 'and arrives S F O at 11:55 AM',
expectedReroutedFlight = 'Flight S E A to P V D has been re-routed.';
expectedDepartureTime = `12:30 AM`,
expectedArrival = 'and arrives S F O at 11:55 AM',
expectedReroutedFlight = 'Flight S E A to P V D has been re-routed.';

const actual = el.shadowRoot.querySelector('.util_displayHiddenVisually').textContent.trim().replace(/\n|\r/g, "");
const departureRerouteSpan = el.shadowRoot.querySelector('.departureStation .util_lineThrough');
Expand Down

0 comments on commit 52902ea

Please sign in to comment.